az changesafety stagemap

Note

This reference is part of the azure-changesafety extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az changesafety stagemap command. Learn more about extensions.

Manage StageMap resources that define rollout stages for orchestrated changes.

Commands

Name Description Type Status
az changesafety stagemap create

Create a StageMap resource.

Extension GA
az changesafety stagemap delete

Delete a StageMap resource.

Extension GA
az changesafety stagemap list

List StageMap resources in a subscription.

Extension GA
az changesafety stagemap show

Get details for a StageMap resource.

Extension GA
az changesafety stagemap update

Update an existing StageMap resource.

Extension GA

az changesafety stagemap create

Create a StageMap resource.

A StageMap defines the stages through which a change progresses during rollout. Each stage has a name and sequence number. Stages are executed in order of their sequence values. StageMap resources can be referenced by ChangeRecord resources to enforce staged rollout patterns.

az changesafety stagemap create --stage-map-name
                                [--acquire-policy-token]
                                [--change-reference]
                                [--management-group-name]
                                [--parameters]
                                [--stages]

Examples

Create a simple two-stage StageMap

az changesafety stagemap create --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name rolloutStageMap --stages "[{name:Canary,sequence:1},{name:Production,sequence:2}]"

Create a StageMap with three stages

az changesafety stagemap create --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name regional-rollout --stages "[{name:WestUS,sequence:1},{name:EastUS,sequence:2},{name:Global,sequence:3}]"

Create a StageMap with parameters

az changesafety stagemap create --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name parameterized-rollout --stages "[{name:Canary,sequence:1},{name:Production,sequence:2}]" --parameters region.string.default-value=westus batchSize.number.default-value=10

Create a StageMap with stage variables

az changesafety stagemap create --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name staged-rollout --stages "[{name:Canary,sequence:1,stage-variables:{region:westus,batchSize:5}},{name:Production,sequence:2,stage-variables:{region:eastus,batchSize:50}}]"

Required Parameters

--stage-map-name

The name of the StageMap resource to create.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--management-group-name

The name of the management group. The name is case insensitive.

--parameters

Optional parameters schema for the StageMap. Define parameters that can be passed when referencing this StageMap from a ChangeRecord. Use AAZ shorthand syntax: paramName.{string|number|array|object}.default-value=value. Run with --parameters paramName.string="??" to see available properties.

Property Value
Parameter group: Properties Arguments
--stages

Array of stage definitions. Each stage requires a name and sequence number. Use shorthand syntax or JSON format.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az changesafety stagemap delete

Delete a StageMap resource.

Delete a StageMap that is no longer needed. Note that StageMap resources that are currently referenced by active ChangeRecord resources cannot be deleted.

az changesafety stagemap delete --stage-map-name
                                [--acquire-policy-token]
                                [--change-reference]
                                [--management-group-name]
                                [--yes]

Examples

Delete a StageMap

az changesafety stagemap delete --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name rolloutStageMap --yes

Required Parameters

--stage-map-name

The name of the StageMap.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--management-group-name

The name of the management group. The name is case insensitive.

--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az changesafety stagemap list

List StageMap resources in a subscription.

az changesafety stagemap list [--management-group-name]
                              [--max-items]
                              [--next-token]

Examples

List all StageMaps in the subscription

az changesafety stagemap list --subscription 00000000-0000-0000-0000-000000000000

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--management-group-name

The name of the management group. The name is case insensitive.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az changesafety stagemap show

Get details for a StageMap resource.

az changesafety stagemap show --stage-map-name
                              [--management-group-name]

Examples

Show a StageMap

az changesafety stagemap show --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name rolloutStageMap

Required Parameters

--stage-map-name

The name of the StageMap.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--management-group-name

The name of the management group. The name is case insensitive.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az changesafety stagemap update

Update an existing StageMap resource.

Modify the stages defined in a StageMap. When updating, provide the complete list of stages as the update replaces the existing stages array.

az changesafety stagemap update --stage-map-name
                                [--acquire-policy-token]
                                [--add]
                                [--change-reference]
                                [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                [--management-group-name]
                                [--parameters]
                                [--remove]
                                [--set]
                                [--stages]

Examples

Add a new stage to an existing StageMap

az changesafety stagemap update --subscription 00000000-0000-0000-0000-000000000000 --stage-map-name rolloutStageMap --stages "[{name:Canary,sequence:1},{name:Pilot,sequence:2},{name:Production,sequence:3}]"

Required Parameters

--stage-map-name

The name of the StageMap.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--management-group-name

The name of the management group. The name is case insensitive.

--parameters

StageMap parameters schema for each stage. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
--stages

Array of stages objects. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False