Skip to main content

offers

Creates, updates, deletes, gets or lists a offers resource.

Overview

Nameoffers
TypeResource
Idazure_stack.subscriptions_admin.offers

Fields

NameDatatypeDescription
idtextURI of the resource.
nametextName of the resource.
descriptiontextfield from the properties object
addon_planstextfield from the properties object
base_plan_idstextfield from the properties object
display_nametextfield from the properties object
external_reference_idtextfield from the properties object
locationtextLocation of the resource
max_subscriptions_per_accounttextfield from the properties object
offertextfield from the properties object
resourceGroupNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
subscription_counttextfield from the properties object
tagstextList of key-value pairs.
typetextType of resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECToffer, resourceGroupName, subscriptionIdGet the specified offer.
listSELECTresourceGroupName, subscriptionIdGet the list of offers under a resource group.
list_allSELECTsubscriptionIdGet the list of offers.
create_or_updateINSERToffer, resourceGroupName, subscriptionIdCreate or update the offer.
deleteDELETEoffer, resourceGroupName, subscriptionIdDelete the specified offer.
linkEXECoffer, resourceGroupName, subscriptionIdLinks a plan to an offer.
unlinkEXECoffer, resourceGroupName, subscriptionIdUnlink a plan from an offer.

SELECT examples

Get the list of offers.

SELECT
id,
name,
description,
addon_plans,
base_plan_ids,
display_name,
external_reference_id,
location,
max_subscriptions_per_account,
offer,
resourceGroupName,
state,
subscriptionId,
subscription_count,
tags,
type
FROM azure_stack.subscriptions_admin.vw_offers
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new offers resource.

/*+ create */
INSERT INTO azure_stack.subscriptions_admin.offers (
offer,
resourceGroupName,
subscriptionId,
properties,
location
)
SELECT
'{{ offer }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ location }}'
;

DELETE example

Deletes the specified offers resource.

/*+ delete */
DELETE FROM azure_stack.subscriptions_admin.offers
WHERE offer = '{{ offer }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';