subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure_stack.subscriptions_admin.subscriptions |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified identifier. |
delegatedProviderSubscriptionId | string | Parent DelegatedProvider subscription identifier. |
displayName | string | Subscription name. |
externalReferenceId | string | External reference identifier. |
offerId | string | Identifier of the offer under the scope of a delegated provider. |
owner | string | Subscription owner. |
routingResourceManagerType | string | Routing resource manager type. |
state | string | Subscription state. |
subscriptionId | string | Subscription identifier. |
tenantId | string | Directory tenant identifier. |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified identifier. |
delegatedProviderSubscriptionId | string | Parent DelegatedProvider subscription identifier. |
displayName | string | Subscription name. |
externalReferenceId | string | External reference identifier. |
offerId | string | Identifier of the offer under the scope of a delegated provider. |
owner | string | Subscription owner. |
routingResourceManagerType | string | Routing resource manager type. |
state | string | Subscription state. |
subscriptionId | string | Subscription identifier. |
tenantId | string | Directory tenant identifier. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , targetSubscriptionId | Get a specified subscription. | |
list | select | subscriptionId | $filter | Get the list of subscriptions. |
create_or_update | insert | subscriptionId , targetSubscriptionId | Creates or updates the specified subscription. | |
delete | delete | subscriptionId , targetSubscriptionId | Delete the specified subscription. | |
restore_data | exec | subscriptionId | Restores the data | |
check_identity_health | exec | subscriptionId | Checks the identity health | |
move_subscriptions | exec | subscriptionId , resources | Move subscriptions between delegated provider offers. | |
validate_move_subscriptions | exec | subscriptionId , resources | Validate that user subscriptions can be moved between delegated provider offers. | |
check_name_availability | exec | subscriptionId | Get the list of subscriptions. |
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.
Name | Datatype | Description |
---|---|---|
subscriptionId | string | Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call. |
targetSubscriptionId | string | The target subscription ID. |
$filter | string | OData filter parameter. |
SELECT
examples
- get
- list
Get a specified subscription.
SELECT
id,
delegatedProviderSubscriptionId,
displayName,
externalReferenceId,
offerId,
owner,
routingResourceManagerType,
state,
subscriptionId,
tenantId
FROM azure_stack.subscriptions_admin.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND targetSubscriptionId = '{{ targetSubscriptionId }}' -- required
;
Get the list of subscriptions.
SELECT
id,
delegatedProviderSubscriptionId,
displayName,
externalReferenceId,
offerId,
owner,
routingResourceManagerType,
state,
subscriptionId,
tenantId
FROM azure_stack.subscriptions_admin.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates the specified subscription.
INSERT INTO azure_stack.subscriptions_admin.subscriptions (
data__delegatedProviderSubscriptionId,
data__displayName,
data__id,
data__externalReferenceId,
data__offerId,
data__owner,
data__routingResourceManagerType,
data__state,
data__subscriptionId,
data__tenantId,
subscriptionId,
targetSubscriptionId
)
SELECT
'{{ delegatedProviderSubscriptionId }}',
'{{ displayName }}',
'{{ id }}',
'{{ externalReferenceId }}',
'{{ offerId }}',
'{{ owner }}',
'{{ routingResourceManagerType }}',
'{{ state }}',
'{{ subscriptionId }}',
'{{ tenantId }}',
'{{ subscriptionId }}',
'{{ targetSubscriptionId }}'
RETURNING
id,
delegatedProviderSubscriptionId,
displayName,
externalReferenceId,
offerId,
owner,
routingResourceManagerType,
state,
subscriptionId,
tenantId
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: subscriptionId
value: string
description: Required parameter for the subscriptions resource.
- name: targetSubscriptionId
value: string
description: Required parameter for the subscriptions resource.
- name: delegatedProviderSubscriptionId
value: string
description: |
Parent DelegatedProvider subscription identifier.
- name: displayName
value: string
description: |
Subscription name.
- name: id
value: string
description: |
Fully qualified identifier.
- name: externalReferenceId
value: string
description: |
External reference identifier.
- name: offerId
value: string
description: |
Identifier of the offer under the scope of a delegated provider.
- name: owner
value: string
description: |
Subscription owner.
- name: routingResourceManagerType
value: string
description: |
Routing resource manager type.
valid_values: ['Default', 'Admin']
- name: state
value: string
description: |
Subscription state.
valid_values: ['NotDefined', 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted', 'Deleting', 'PartiallyDeleted']
- name: subscriptionId
value: string
description: |
Subscription identifier.
- name: tenantId
value: string
description: |
Directory tenant identifier.
DELETE
examples
- delete
Delete the specified subscription.
DELETE FROM azure_stack.subscriptions_admin.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND targetSubscriptionId = '{{ targetSubscriptionId }}' --required
;
Lifecycle Methods
- restore_data
- check_identity_health
- move_subscriptions
- validate_move_subscriptions
- check_name_availability
Restores the data
EXEC azure_stack.subscriptions_admin.subscriptions.restore_data
@subscriptionId='{{ subscriptionId }}' --required
;
Checks the identity health
EXEC azure_stack.subscriptions_admin.subscriptions.check_identity_health
@subscriptionId='{{ subscriptionId }}' --required
;
Move subscriptions between delegated provider offers.
EXEC azure_stack.subscriptions_admin.subscriptions.move_subscriptions
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"targetDelegatedProviderOffer": "{{ targetDelegatedProviderOffer }}",
"resources": "{{ resources }}"
}'
;
Validate that user subscriptions can be moved between delegated provider offers.
EXEC azure_stack.subscriptions_admin.subscriptions.validate_move_subscriptions
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"targetDelegatedProviderOffer": "{{ targetDelegatedProviderOffer }}",
"resources": "{{ resources }}"
}'
;
Get the list of subscriptions.
EXEC azure_stack.subscriptions_admin.subscriptions.check_name_availability
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"name": "{{ name }}",
"resourceType": "{{ resourceType }}"
}'
;