az resiliency goal-assignment

Note

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

Manage Goal Assignment.

Commands

Name Description Type Status
az resiliency goal-assignment create

Create a goal assignment.

Extension GA
az resiliency goal-assignment delete

Delete a goal assignment.

Extension GA
az resiliency goal-assignment goal-resource

Manage Goal Resource.

Extension GA
az resiliency goal-assignment goal-resource list

List goal resources under a goal assignment.

Extension GA
az resiliency goal-assignment goal-resource show

Get a goal resource.

Extension GA
az resiliency goal-assignment list

List goal assignments in a service group.

Extension GA
az resiliency goal-assignment recommend-capacity

Recommends capacity improvements for resources under the goal assignment's scope. Returns AI-powered capacity assessments and recommendations.

Extension GA
az resiliency goal-assignment refresh-goal-resource

Refreshes the goal resources under a goal assignment. This operation scans for new resources under the scope of the assignment.

Extension GA
az resiliency goal-assignment show

Get a goal assignment.

Extension GA
az resiliency goal-assignment update

Update a goal assignment.

Extension GA
az resiliency goal-assignment update-goal-resource

Updates goal resources under a goal assignment.

Extension GA
az resiliency goal-assignment wait

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

Extension GA

az resiliency goal-assignment create

Create a goal assignment.

az resiliency goal-assignment create --goal-assignment-name
                                     --service-group-name
                                     [--acquire-policy-token]
                                     [--change-reference]
                                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                     [--require-zonal --require-zonal-resiliency {0, 1, f, false, n, no, t, true, y, yes}]
                                     [--service-level-resources --service-resources --sli-resources]

Examples

Create a goal assignment that requires zonal resiliency

az resiliency goal-assignment create --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal --require-zonal-resiliency true

Create a goal assignment for specific service level indicator resources

az resiliency goal-assignment create --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal --sli-resources "[{service-level-indicator-resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1}]" --require-zonal-resiliency true

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--service-group-name

The name of the service group.

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
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--require-zonal --require-zonal-resiliency

Whether zonal resiliency is required for this goal assignment.

Property Value
Parameter group: Properties Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--service-level-resources --service-resources --sli-resources

List of service level resources. 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

az resiliency goal-assignment delete

Delete a goal assignment.

az resiliency goal-assignment delete --goal-assignment-name
                                     --service-group-name
                                     [--acquire-policy-token]
                                     [--change-reference]
                                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                     [--yes]

Examples

GoalAssignments_Delete_MaximumSet

az resiliency goal-assignment delete --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--service-group-name

The name of the service group.

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
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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 resiliency goal-assignment list

List goal assignments in a service group.

az resiliency goal-assignment list --service-group-name
                                   [--max-items]
                                   [--next-token]
                                   [--skip-token]
                                   [--top]

Examples

GoalAssignments_List_MaximumSet

az resiliency goal-assignment list --service-group-name production-sg --skip-token xntbyoswztnmvitj --top 69

GoalAssignments_List_MinimumSet

az resiliency goal-assignment list --service-group-name production-sg --skip-token xntbyoswztnmvitj --top 69 --service-group-name production-sg

Required Parameters

--service-group-name

The name of the service group.

Optional Parameters

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

--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
--skip-token

Skip over when retrieving results.

--top

Number of elements to return when retrieving results.

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 resiliency goal-assignment recommend-capacity

Recommends capacity improvements for resources under the goal assignment's scope. Returns AI-powered capacity assessments and recommendations.

az resiliency goal-assignment recommend-capacity --goal-assignment-name
                                                 --resource-ids
                                                 --service-group-name
                                                 [--acquire-policy-token]
                                                 [--change-reference]
                                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

GoalAssignments_RecommendCapacity_MaximumSet

az resiliency goal-assignment recommend-capacity --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal --resource-ids "[/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft.Storage/storageAccounts/sa1]"

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--resource-ids

Azure resource IDs to evaluate for resiliency. Pass an empty array to automatically discover and evaluate non-resilient resources in the service group. Maximum 50 resources per request. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Body Arguments
--service-group-name

The name of the service group.

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
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
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 resiliency goal-assignment refresh-goal-resource

Refreshes the goal resources under a goal assignment. This operation scans for new resources under the scope of the assignment.

az resiliency goal-assignment refresh-goal-resource --goal-assignment-name
                                                    --service-group-name
                                                    [--acquire-policy-token]
                                                    [--change-reference]
                                                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

GoalAssignments_RefreshGoalResources_MaximumSet

az resiliency goal-assignment refresh-goal-resource --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--service-group-name

The name of the service group.

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
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
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 resiliency goal-assignment show

Get a goal assignment.

az resiliency goal-assignment show --goal-assignment-name
                                   --service-group-name

Examples

GoalAssignments_Get_MaximumSet

az resiliency goal-assignment show --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--service-group-name

The name of the service group.

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 resiliency goal-assignment update

Update a goal assignment.

az resiliency goal-assignment update --goal-assignment-name
                                     --service-group-name
                                     [--acquire-policy-token]
                                     [--change-reference]
                                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                     [--require-zonal --require-zonal-resiliency {0, 1, f, false, n, no, t, true, y, yes}]
                                     [--service-level-resources --service-resources --sli-resources]

Examples

Require zonal resiliency for an existing goal assignment

az resiliency goal-assignment update --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal --require-zonal-resiliency true

Change the service level indicator resources of a goal assignment

az resiliency goal-assignment update --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal --sli-resources "[{service-level-indicator-resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1}]"

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--service-group-name

The name of the service group.

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
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--require-zonal --require-zonal-resiliency

Whether zonal resiliency is required for this goal assignment.

Property Value
Parameter group: Properties Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--service-level-resources --service-resources --sli-resources

List of service level resources. 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

az resiliency goal-assignment update-goal-resource

Updates goal resources under a goal assignment.

Each item needs the goal resource ID (id), as returned by az resiliency goal-assignment goal-resource list.

az resiliency goal-assignment update-goal-resource --goal-assignment-name
                                                   --resources
                                                   --service-group-name
                                                   [--acquire-policy-token]
                                                   [--change-reference]
                                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Exclude a goal resource from zonal resiliency recommendations

az resiliency goal-assignment update-goal-resource --service-group-name production-sg --goal-assignment-name zonal-resiliency-goal --resources "[{id:/providers/Microsoft.Management/serviceGroups/production-sg/providers/Microsoft.AzureResilienceManagement/goalAssignments/zonal-resiliency-goal/goalResources/vm-goal-resource,resource-arm-id:/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVirtualMachine,zonal-resiliency:{goal-participation:Excluded,attestation-status:ManuallyAttested}}]"

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--resources

The goal resources to update. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Body Arguments
--service-group-name

The name of the service group.

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
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
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 resiliency goal-assignment wait

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

az resiliency goal-assignment wait --goal-assignment-name
                                   --service-group-name
                                   [--acquire-policy-token]
                                   [--change-reference]
                                   [--created]
                                   [--custom]
                                   [--deleted]
                                   [--exists]
                                   [--interval]
                                   [--timeout]
                                   [--updated]

Required Parameters

--goal-assignment-name

The name of the goal assignment.

--service-group-name

The name of the service group.

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
--created

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

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
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