subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure_stack.user_subscriptions.subscriptions |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified identifier. |
displayName | string | Subscription name. |
offerId | string | Identifier of the offer under the scope of a delegated provider. |
state | string | Subscription state. |
subscriptionId | string | Subscription identifier. |
tenantId | string | Directory tenant identifier. |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified identifier. |
displayName | string | Subscription name. |
offerId | string | Identifier of the offer under the scope of a delegated provider. |
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 | Gets details about particular subscription. | |
list | select | Get the list of subscriptions. | ||
create_or_update | insert | subscriptionId | Create or updates a subscription. | |
delete | delete | subscriptionId | Delete the specified subscription. |
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 | Id of the subscription. |
SELECT
examples
- get
- list
Gets details about particular subscription.
SELECT
id,
displayName,
offerId,
state,
subscriptionId,
tenantId
FROM azure_stack.user_subscriptions.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
Get the list of subscriptions.
SELECT
id,
displayName,
offerId,
state,
subscriptionId,
tenantId
FROM azure_stack.user_subscriptions.subscriptions
;
INSERT
examples
- create_or_update
- Manifest
Create or updates a subscription.
INSERT INTO azure_stack.user_subscriptions.subscriptions (
data__displayName,
data__id,
data__offerId,
data__state,
data__subscriptionId,
data__tenantId,
subscriptionId
)
SELECT
'{{ displayName }}',
'{{ id }}',
'{{ offerId }}',
'{{ state }}',
'{{ subscriptionId }}',
'{{ tenantId }}',
'{{ subscriptionId }}'
RETURNING
id,
displayName,
offerId,
state,
subscriptionId,
tenantId
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: subscriptionId
value: string
description: Required parameter for the subscriptions resource.
- name: displayName
value: string
description: |
Subscription name.
- name: id
value: string
description: |
Fully qualified identifier.
- name: offerId
value: string
description: |
Identifier of the offer under the scope of a delegated provider.
- name: state
value: string
description: |
Subscription state.
valid_values: ['NotDefined', 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted']
- 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.user_subscriptions.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}' --required
;