Skip to main content

acquired_plans

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

Overview

Nameacquired_plans
TypeResource
Idazure_stack.subscriptions_admin.acquired_plans

Fields

NameDatatypeDescription
idstringIdentifier in the tenant subscription context.
acquisitionIdstringAcquisition identifier.
acquisitionTimestringAcquisition time.
externalReferenceIdstringExternal reference identifier.
planIdstringPlan identifier in the tenant subscription context.
provisioningStatestringProvisioning state for subscriptions service resources, for example, resource provider registration.

Methods

NameAccessible byRequired ParamsDescription
getSELECTplanAcquisitionId, subscriptionId, targetSubscriptionIdGets the specified plan acquired by a subscription consuming the offer.
listSELECTsubscriptionId, targetSubscriptionIdGet a collection of all acquired plans that subscription has access to.
createINSERTplanAcquisitionId, subscriptionId, targetSubscriptionIdCreates an acquired plan.
deleteDELETEplanAcquisitionId, subscriptionId, targetSubscriptionIdDeletes an acquired plan.

SELECT examples

Get a collection of all acquired plans that subscription has access to.

SELECT
id,
acquisitionId,
acquisitionTime,
externalReferenceId,
planId,
provisioningState
FROM azure_stack.subscriptions_admin.acquired_plans
WHERE subscriptionId = '{{ subscriptionId }}'
AND targetSubscriptionId = '{{ targetSubscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_stack.subscriptions_admin.acquired_plans (
planAcquisitionId,
subscriptionId,
targetSubscriptionId,
acquisitionId,
id,
planId,
externalReferenceId,
provisioningState,
acquisitionTime
)
SELECT
'{{ planAcquisitionId }}',
'{{ subscriptionId }}',
'{{ targetSubscriptionId }}',
'{{ acquisitionId }}',
'{{ id }}',
'{{ planId }}',
'{{ externalReferenceId }}',
'{{ provisioningState }}',
'{{ acquisitionTime }}'
;

DELETE example

Deletes the specified acquired_plans resource.

/*+ delete */
DELETE FROM azure_stack.subscriptions_admin.acquired_plans
WHERE planAcquisitionId = '{{ planAcquisitionId }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetSubscriptionId = '{{ targetSubscriptionId }}';