Skip to main content

alias

Creates, updates, deletes, gets or lists an alias resource.

Overview

Namealias
TypeResource
Idazure.subscription.alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
acceptOwnershipStatestringThe accept ownership state of the resource. Known values are: "Pending", "Completed", and "Expired". (Pending, Completed, Expired)
acceptOwnershipUrlstringUrl to accept ownership of the subscription.
billingScopestringBilling scope of the subscription. For CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName} For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName} For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}.
createdTimestringCreated Time.
displayNamestringThe display name of the subscription.
managementGroupIdstringThe Management Group Id.
provisioningStatestringThe provisioning state of the resource. Known values are: "Accepted", "Succeeded", and "Failed". (Accepted, Succeeded, Failed)
resellerIdstringReseller Id.
subscriptionIdstringNewly created subscription Id.
subscriptionOwnerIdstringOwner Id of the subscription.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectTags for the subscription.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
workloadstringThe workload type of the subscription. It can be either Production or DevTest. Known values are: "Production" and "DevTest". (Production, DevTest)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectalias_nameGet Alias Subscription.
listselectList Alias Subscription.
createinsertalias_nameCreate Alias Subscription.
deletedeletealias_nameDelete Alias.

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
alias_namestringAliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation. Required.

SELECT examples

Get Alias Subscription.

SELECT
id,
name,
acceptOwnershipState,
acceptOwnershipUrl,
billingScope,
createdTime,
displayName,
managementGroupId,
provisioningState,
resellerId,
subscriptionId,
subscriptionOwnerId,
systemData,
tags,
type,
workload
FROM azure.subscription.alias
WHERE alias_name = '{{ alias_name }}' -- required
;

INSERT examples

Create Alias Subscription.

INSERT INTO azure.subscription.alias (
properties,
alias_name
)
SELECT
'{{ properties }}',
'{{ alias_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete Alias.

DELETE FROM azure.subscription.alias
WHERE alias_name = '{{ alias_name }}' --required
;