Skip to main content

plans

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

Overview

Nameplans
TypeResource
Idazure_stack.subscriptions_admin.plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringURI of the resource.
namestringName of the resource.
locationstringLocation of the resource
propertiesobjectProperties of a plan.
tagsobjectList of key-value pairs.
typestringType of resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, planGet the specified plan.
listselectsubscriptionId, resourceGroupNameGet the list of plans under a resource group.
list_allselectsubscriptionIdList all plans across all subscriptions.
create_or_updateinsertsubscriptionId, resourceGroupName, planCreate or update the plan.
deletedeletesubscriptionId, resourceGroupName, planDelete the specified plan.

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
planstringName of the plan.
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 plan.

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

INSERT examples

Create or update the plan.

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

DELETE examples

Delete the specified plan.

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