az blueprint assignment

Commands to manage blueprint assignment.

Commands

az blueprint assignment create

Create a blueprint assignment.

az blueprint assignment delete

Delete a blueprint assignment.

az blueprint assignment list

List blueprint assignments within a subscription.

az blueprint assignment show

Get a blueprint assignment.

az blueprint assignment update

Update a blueprint assignment.

az blueprint assignment wait

Place the CLI in a waiting state until a condition of the Blueprint Assignment is met.

az blueprint assignment who

Get Blueprint Servie Principal Name objectId.

az blueprint assignment create

Create a blueprint assignment.

az blueprint assignment create --name
                               [--blueprint-version]
                               [--description]
                               [--display-name]
                               [--identity-type {None, SystemAssigned, UserAssigned}]
                               [--location]
                               [--locks-excluded-principals]
                               [--locks-mode {AllResourcesDoNotDelete, AllResourcesReadOnly, None}]
                               [--management-group]
                               [--parameters]
                               [--principal-id]
                               [--resource-group-value]
                               [--subscription]
                               [--tenant-id]
                               [--user-assigned-identities]

Examples

Assignment with system-assigned managed identity

az blueprint assignment create --subscription MySubscription --name \
MyBlueprintAssignment --location eastus --identity-type SystemAssigned \
--description "Enforce pre-defined MyBlueprint to this subscription." \
--blueprint-version "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/provid \
ers/Microsoft.Blueprint/blueprints/MyBlueprint/versions/v2" \
--resource-group-value artifact_name=rg-art-1 name=rg1 location=westus \
--resource-group-value artifact_name=rg-art-2 name=rg2 location=eastus \
--parameters "path/to/parameter/file" \

Assignment with user-assigned managed identity

az blueprint assignment create --subscription MySubscription --name \
MyBlueprintAssignment --location eastus --identity-type UserAssigned \
--user-assigned-identities identity-id \
--description "Enforce pre-defined MyBlueprint to this subscription." \
--blueprint-version "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup \
/providers/Microsoft.Blueprint/blueprints/MyBlueprint/versions/v2" \
--resource-group-value artifact_name=rg-art-1 name=rg1 location=eastus \
--parameters "path/to/parameter/file" \

Required Parameters

--name -n

Name of the blueprint assignment.

Optional Parameters

--blueprint-version

Resource ID of the published version of a blueprint definition.

--description

Multi-line explain this resource.

--display-name

One-liner string explain this resource.

--identity-type

Type of the managed identity.

accepted values: None, SystemAssigned, UserAssigned
default value: SystemAssigned
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--locks-excluded-principals

List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted.

--locks-mode

Lock mode.

accepted values: AllResourcesDoNotDelete, AllResourcesReadOnly, None
--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--parameters -p

Blueprint assignment parameter values. It can be a JSON string or JSON file path.

--principal-id

Azure Active Directory principal ID associated with this Identity.

--resource-group-value

Key=Value pairs for a resource group. Keys include 'artifact_name'(required), 'name', 'location'.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.

--tenant-id

ID of the Azure Active Directory.

--user-assigned-identities

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

az blueprint assignment delete

Delete a blueprint assignment.

az blueprint assignment delete --name
                               [--management-group]
                               [--subscription]
                               [--yes]

Examples

Delete an assignment

az blueprint assignment delete --subscription MySubscription \
--name MyBlueprintAssignment

Required Parameters

--name -n

Name of the blueprint assignment.

Optional Parameters

--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.

--yes -y

Do not prompt for confirmation.

az blueprint assignment list

List blueprint assignments within a subscription.

az blueprint assignment list [--management-group]
                             [--subscription]

Examples

List assignments

az blueprint assignment list --subscription MySubscription

Optional Parameters

--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.

az blueprint assignment show

Get a blueprint assignment.

az blueprint assignment show --name
                             [--management-group]
                             [--subscription]

Examples

Show an assignment

az blueprint assignment show --subscription MySubscription \
--name MyBlueprintAssignment

Required Parameters

--name -n

Name of the blueprint assignment.

Optional Parameters

--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.

az blueprint assignment update

Update a blueprint assignment.

az blueprint assignment update --name
                               [--blueprint-version]
                               [--description]
                               [--display-name]
                               [--identity-type {None, SystemAssigned, UserAssigned}]
                               [--location]
                               [--locks-excluded-principals]
                               [--locks-mode {AllResourcesDoNotDelete, AllResourcesReadOnly, None}]
                               [--management-group]
                               [--parameters]
                               [--principal-id]
                               [--resource-group-value]
                               [--subscription]
                               [--tenant-id]
                               [--user-assigned-identities]

Required Parameters

--name -n

Name of the blueprint assignment.

Optional Parameters

--blueprint-version

Resource ID of the published version of a blueprint definition.

--description

Multi-line explain this resource.

--display-name

One-liner string explain this resource.

--identity-type

Type of the managed identity.

accepted values: None, SystemAssigned, UserAssigned
default value: SystemAssigned
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--locks-excluded-principals

List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted.

--locks-mode

Lock mode.

accepted values: AllResourcesDoNotDelete, AllResourcesReadOnly, None
--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--parameters -p

Blueprint assignment parameter values. It can be a JSON string or JSON file path.

--principal-id

Azure Active Directory principal ID associated with this Identity.

--resource-group-value

Key=Value pairs for a resource group. Keys include 'artifact_name'(required), 'name', 'location'.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.

--tenant-id

ID of the Azure Active Directory.

--user-assigned-identities

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

az blueprint assignment wait

Place the CLI in a waiting state until a condition of the Blueprint Assignment is met.

az blueprint assignment wait --name
                             [--created]
                             [--custom]
                             [--deleted]
                             [--exists]
                             [--interval]
                             [--management-group]
                             [--subscription]
                             [--timeout]
                             [--updated]

Examples

Pause executing next line of CLI script until the Blueprint Assignment is successfully provisioned.

az blueprint assignment wait --subscription MySubscription \ --name MyBlueprintAssignment --created

Required Parameters

--name -n

Name of the blueprint assignment.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

az blueprint assignment who

Get Blueprint Servie Principal Name objectId.

az blueprint assignment who --name
                            [--management-group]
                            [--subscription]

Examples

Get SPN objectId

az blueprint assignment who --subscription MySubscription \
--name MyBlueprintAssignment

Required Parameters

--name -n

Name of the blueprint assignment.

Optional Parameters

--management-group -m

Use management group for the target scope of the blueprint assignment. It is reserved for future use. Use --subscription instead.

--subscription -s

Use subscription for the target scope of the blueprint assignment. Default susbcription will be used if option not specified.