Skip to main content

plans

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

Overview

Nameplans
TypeResource
Idazure_stack.subscriptions_admin.plans

Fields

NameDatatypeDescription
idtextURI of the resource.
nametextName of the resource.
descriptiontextfield from the properties object
display_nametextfield from the properties object
external_reference_idtextfield from the properties object
locationtextLocation of the resource
plantextfield from the properties object
quota_idstextfield from the properties object
resourceGroupNametextfield from the properties object
sku_idstextfield 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
getSELECTplan, resourceGroupName, subscriptionIdGet the specified plan.
listSELECTresourceGroupName, subscriptionIdGet the list of plans under a resource group.
list_allSELECTsubscriptionIdList all plans across all subscriptions.
create_or_updateINSERTplan, resourceGroupName, subscriptionIdCreate or update the plan.
deleteDELETEplan, resourceGroupName, subscriptionIdDelete the specified plan.

SELECT examples

List all plans across all subscriptions.

SELECT
id,
name,
description,
display_name,
external_reference_id,
location,
plan,
quota_ids,
resourceGroupName,
sku_ids,
subscriptionId,
subscription_count,
tags,
type
FROM azure_stack.subscriptions_admin.vw_plans
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

DELETE example

Deletes the specified plans resource.

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