Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The policies resource type can be deployed with operations that target:
- Tenant - See tenant deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Subscription/policies resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Subscription/policies@2024-08-01-preview' = {
scope: resourceSymbolicName or scope
blockSubscriptionsIntoTenant: bool
blockSubscriptionsLeavingTenant: bool
exemptedPrincipals: [
'string'
]
name: 'default'
}
Property Values
Microsoft.Subscription/policies
Name | Description | Value |
---|---|---|
blockSubscriptionsIntoTenant | Blocks the entering of subscriptions into user's tenant. | bool |
blockSubscriptionsLeavingTenant | Blocks the leaving of subscriptions from user's tenant. | bool |
exemptedPrincipals | List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ [] |
name | The resource name | 'default' (required) |
scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
ARM template resource definition
The policies resource type can be deployed with operations that target:
- Tenant - See tenant deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Subscription/policies resource, add the following JSON to your template.
{
"type": "Microsoft.Subscription/policies",
"apiVersion": "2024-08-01-preview",
"name": "string",
"blockSubscriptionsIntoTenant": "bool",
"blockSubscriptionsLeavingTenant": "bool",
"exemptedPrincipals": [ "string" ]
}
Property Values
Microsoft.Subscription/policies
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2024-08-01-preview' |
blockSubscriptionsIntoTenant | Blocks the entering of subscriptions into user's tenant. | bool |
blockSubscriptionsLeavingTenant | Blocks the leaving of subscriptions from user's tenant. | bool |
exemptedPrincipals | List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ [] |
name | The resource name | 'default' (required) |
type | The resource type | 'Microsoft.Subscription/policies' |
Usage Examples
Terraform (AzAPI provider) resource definition
The policies resource type can be deployed with operations that target:
- Tenant
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Subscription/policies resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Subscription/policies@2024-08-01-preview"
name = "string"
parent_id = "string"
body = {
blockSubscriptionsIntoTenant = bool
blockSubscriptionsLeavingTenant = bool
exemptedPrincipals = [
"string"
]
}
}
Property Values
Microsoft.Subscription/policies
Name | Description | Value |
---|---|---|
blockSubscriptionsIntoTenant | Blocks the entering of subscriptions into user's tenant. | bool |
blockSubscriptionsLeavingTenant | Blocks the leaving of subscriptions from user's tenant. | bool |
exemptedPrincipals | List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ [] |
name | The resource name | 'default' (required) |
parent_id | The ID of the resource to apply this extension resource to. | string (required) |
type | The resource type | "Microsoft.Subscription/policies@2024-08-01-preview" |