Skip to main content

offers

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

Overview

Nameoffers
TypeResource
Idazure_stack.subscriptions_admin.offers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringURI of the resource.
namestringName of the resource.
locationstringLocation of the resource
propertiesobjectRepresents an offering of services against which a subscription can be created.
tagsobjectList of key-value pairs.
typestringType of resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, offerGet the specified offer.
listselectsubscriptionId, resourceGroupNameGet the list of offers under a resource group.
list_allselectsubscriptionIdGet the list of offers.
create_or_updateinsertsubscriptionId, resourceGroupName, offerCreate or update the offer.
deletedeletesubscriptionId, resourceGroupName, offerDelete the specified offer.
linkexecsubscriptionId, resourceGroupName, offerLinks a plan to an offer.
unlinkexecsubscriptionId, resourceGroupName, offerUnlink a plan from an offer.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
offerstringName of an offer.
resourceGroupNamestringThe resource group the resource is located under.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.

SELECT examples

Get the specified offer.

SELECT
id,
name,
location,
properties,
tags,
type
FROM azure_stack.subscriptions_admin.offers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND offer = '{{ offer }}' -- required
;

INSERT examples

Create or update the offer.

INSERT INTO azure_stack.subscriptions_admin.offers (
data__properties,
data__location,
subscriptionId,
resourceGroupName,
offer
)
SELECT
'{{ properties }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ offer }}'
RETURNING
id,
name,
location,
properties,
tags,
type
;

DELETE examples

Delete the specified offer.

DELETE FROM azure_stack.subscriptions_admin.offers
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND offer = '{{ offer }}' --required
;

Lifecycle Methods

Links a plan to an offer.

EXEC azure_stack.subscriptions_admin.offers.link 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@offer='{{ offer }}' --required
@@json=
'{
"planName": "{{ planName }}",
"planLinkType": "{{ planLinkType }}",
"maxAcquisitionCount": {{ maxAcquisitionCount }}
}'
;