Skip to main content

subscription_policy

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

Overview

Namesubscription_policy
TypeResource
Idazure.subscription.subscription_policy

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.
blockSubscriptionsIntoTenantbooleanBlocks the entering of subscriptions into user's tenant.
blockSubscriptionsLeavingTenantbooleanBlocks the leaving of subscriptions from user's tenant.
exemptedPrincipalsarrayList of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.
policyIdstringPolicy Id.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_policy_for_tenantselectGet the subscription tenant policy for the user's tenant.
get_policy_for_tenantexecGet the subscription tenant policy for the user's tenant.
add_update_policy_for_tenantexecCreate or Update Subscription tenant policy for user's tenant.

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

SELECT examples

Get the subscription tenant policy for the user's tenant.

SELECT
id,
name,
blockSubscriptionsIntoTenant,
blockSubscriptionsLeavingTenant,
exemptedPrincipals,
policyId,
systemData,
type
FROM azure.subscription.subscription_policy
;

Lifecycle Methods

Get the subscription tenant policy for the user's tenant.

EXEC azure.subscription.subscription_policy.get_policy_for_tenant 

;