Skip to main content

linked_subscriptions

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

Overview

Namelinked_subscriptions
TypeResource
Idazure_stack.azure_stack.linked_subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the resource.
namestringName of the resource.
deviceConnectionStatusstringThe status of the remote management connection of the Azure Stack device.
deviceIdstringThe identifier of the Azure Stack device for remote management.
deviceLinkStatestringThe connection state of the Azure Stack device.
deviceObjectIdstringThe object identifier associated with the Azure Stack device connecting to Azure.
etagstringThe entity tag used for optimistic concurrency when modifying the resource.
kindstringThe kind of the resource.
lastConnectedTimestringThe last remote management connection time for the Azure Stack device connected to the linked subscription resource.
linkedSubscriptionIdstringThe identifier associated with the device subscription.
locationstringLocation of the resource. Required. "global"
registrationResourceIdstringThe identifier associated with the device registration.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectCustom tags for the resource.
typestringType of Resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group, linked_subscription_name, subscription_idReturns the properties of a Linked Subscription resource.
list_by_resource_groupselectresource_group, subscription_idReturns a list of all linked subscriptions under current resource group.
list_by_subscriptionselectsubscription_idReturns a list of all linked subscriptions under current subscription.
create_or_updateinsertresource_group, linked_subscription_name, subscription_id, location, propertiesCreate or update a linked subscription resource.
updateupdateresource_group, linked_subscription_name, subscription_id, location, propertiesPatch a Linked Subscription resource.
create_or_updatereplaceresource_group, linked_subscription_name, subscription_id, location, propertiesCreate or update a linked subscription resource.
deletedeleteresource_group, linked_subscription_name, subscription_idDelete the requested Linked Subscription resource.

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.

NameDatatypeDescription
linked_subscription_namestringName of the Linked Subscription resource. Required.
resource_groupstringName of the resource group. Required.
subscription_idstring

SELECT examples

Returns the properties of a Linked Subscription resource.

SELECT
id,
name,
deviceConnectionStatus,
deviceId,
deviceLinkState,
deviceObjectId,
etag,
kind,
lastConnectedTime,
linkedSubscriptionId,
location,
registrationResourceId,
systemData,
tags,
type
FROM azure_stack.azure_stack.linked_subscriptions
WHERE resource_group = '{{ resource_group }}' -- required
AND linked_subscription_name = '{{ linked_subscription_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a linked subscription resource.

INSERT INTO azure_stack.azure_stack.linked_subscriptions (
location,
properties,
resource_group,
linked_subscription_name,
subscription_id
)
SELECT
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ resource_group }}',
'{{ linked_subscription_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Patch a Linked Subscription resource.

UPDATE azure_stack.azure_stack.linked_subscriptions
SET
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group = '{{ resource_group }}' --required
AND linked_subscription_name = '{{ linked_subscription_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update a linked subscription resource.

REPLACE azure_stack.azure_stack.linked_subscriptions
SET
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group = '{{ resource_group }}' --required
AND linked_subscription_name = '{{ linked_subscription_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete the requested Linked Subscription resource.

DELETE FROM azure_stack.azure_stack.linked_subscriptions
WHERE resource_group = '{{ resource_group }}' --required
AND linked_subscription_name = '{{ linked_subscription_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;