management_group_subscriptions
Creates, updates, deletes, gets or lists a management_group_subscriptions resource.
Overview
| Name | management_group_subscriptions |
| Type | Resource |
| Id | azure.management_groups.management_group_subscriptions |
Fields
The following fields are returned by SELECT queries:
- get_subscription
- get_subscriptions_under_management_group
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | The friendly name of the subscription. |
parent | object | The ID of the parent management group. |
state | string | The state of the subscription. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tenant | string | The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | The friendly name of the subscription. |
parent | object | The ID of the parent management group. |
state | string | The state of the subscription. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tenant | string | The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_subscription | select | group_id, subscription_id | Cache-Control | Retrieves details about given subscription which is associated with the management group. |
get_subscriptions_under_management_group | select | group_id | $skiptoken | Retrieves details about all subscriptions which are associated with the management group. |
create | insert | group_id, subscription_id | Cache-Control | Associates existing subscription with the management group. |
delete | delete | group_id, subscription_id | Cache-Control | De-associates subscription from the management group. |
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 |
|---|---|---|
group_id | string | Management Group ID. Required. |
subscription_id | string | Subscription ID. Required. |
$skiptoken | string | Page continuation token is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls. Default value is None. |
Cache-Control | string | Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache". |
SELECT examples
- get_subscription
- get_subscriptions_under_management_group
Retrieves details about given subscription which is associated with the management group.
SELECT
id,
name,
displayName,
parent,
state,
systemData,
tenant,
type
FROM azure.management_groups.management_group_subscriptions
WHERE group_id = '{{ group_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND Cache-Control = '{{ Cache-Control }}'
;
Retrieves details about all subscriptions which are associated with the management group.
SELECT
id,
name,
displayName,
parent,
state,
systemData,
tenant,
type
FROM azure.management_groups.management_group_subscriptions
WHERE group_id = '{{ group_id }}' -- required
AND $skiptoken = '{{ $skiptoken }}'
;
INSERT examples
- create
- Manifest
Associates existing subscription with the management group.
INSERT INTO azure.management_groups.management_group_subscriptions (
group_id,
subscription_id,
Cache-Control
)
SELECT
'{{ group_id }}',
'{{ subscription_id }}',
'{{ Cache-Control }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: management_group_subscriptions
props:
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the management_group_subscriptions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the management_group_subscriptions resource.
- name: Cache-Control
value: "{{ Cache-Control }}"
description: Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".
description: Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".
DELETE examples
- delete
De-associates subscription from the management group.
DELETE FROM azure.management_groups.management_group_subscriptions
WHERE group_id = '{{ group_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND Cache-Control = '{{ Cache-Control }}'
;