แชร์ผ่าน


az fleet updaterun

Note

This reference is part of the fleet extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az fleet updaterun command. Learn more about extensions.

Commands to manage update runs.

Commands

Name Description Type Status
az fleet updaterun create

Creates or updates an update run.

Extension GA
az fleet updaterun delete

Deletes an update run.

Extension GA
az fleet updaterun list

Lists a fleet's update runs.

Extension GA
az fleet updaterun show

Shows an update run.

Extension GA
az fleet updaterun skip

Sets targets to be skipped within an UpdateRun.

Extension GA
az fleet updaterun start

Starts an update run.

Extension GA
az fleet updaterun stop

Stops an update run.

Extension GA
az fleet updaterun wait

Wait for an update run resource to reach a desired state.

Extension GA

az fleet updaterun create

Creates or updates an update run.

az fleet updaterun create --fleet-name
                          --name
                          --resource-group
                          --upgrade-type {ControlPlaneOnly, Full, NodeImageOnly}
                          [--kubernetes-version]
                          [--no-wait]
                          [--node-image-selection {Consistent, Latest}]
                          [--stages]
                          [--update-strategy-name]

Examples

Create an update run for a fleet with 'Full' upgrade type.

az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type Full --kubernetes-version 1.25.0 --node-image-selection Latest

Create an update run for a fleet with 'NodeImageOnly' upgrade type.

az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type NodeImageOnly --node-image-selection Latest

Create an update run for a fleet with 'Full' upgrade type & stages.

az fleet updaterun create -g MyResourceGroup -f MyFleet -n MyUpdateRun --upgrade-type Full --kubernetes-version 1.25.0 --node-image-selection Latest --stages ./test/stages.json

    The following JSON structure represents example contents of the parameter '--stages ./test/stages.json'.
    A stages array is composed of one or more stages, each containing one or more groups.
    Each group contains the 'name' property, which represents the group to which a cluster belongs (see 'az fleet member create --help').
    Stages have an optional 'afterStageWaitInSeconds' integer property, acting as a delay between stage execution.
    {
        "stages": [
            {
                "name": "stage1",
                "groups": [
                    {
                        "name": "group-a1"
                    },
                    {
                        "name": "group-a2"
                    },
                    {
                        "name": "group-a3"
                    }
                ],
                "afterStageWaitInSeconds": 3600
            },
            {
                "name": "stage2",
                "groups": [
                    {
                        "name": "group-b1"
                    },
                    {
                        "name": "group-b2"
                    },
                    {
                        "name": "group-b3"
                    }
                ]
            },
        ]
    }

Required Parameters

--fleet-name -f

Specify the fleet name.

--name -n

Specify name for the update run.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--upgrade-type

Specify the upgrade type of members. Acceptable values are 'Full', 'ControlPlaneOnly', and 'NodeImageOnly'.

Accepted values: ControlPlaneOnly, Full, NodeImageOnly

Optional Parameters

--kubernetes-version

Specify the kubernetes version to upgrade member(s) to, when --upgrade-type is set to 'Full' or 'ControlPlaneOnly'. Acceptable format is x.x.x (eg. 1.2.3).

--no-wait

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

Default value: False
--node-image-selection

Node Image Selection is an option that lets you choose how your clusters' nodes are upgraded.

Accepted values: Consistent, Latest
--stages

Path to a JSON file that defines stages to upgrade a fleet. See examples for reference.

--update-strategy-name

The name of the update strategy to use for this update run. If not specified, the default update strategy will be used.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun delete

Deletes an update run.

az fleet updaterun delete --fleet-name
                          --name
                          --resource-group
                          [--no-wait]
                          [--yes]

Examples

Delete an update run.

az fleet updaterun delete -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

Required Parameters

--fleet-name -f

Specify the fleet name.

--name -n

Specify name for the update run.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

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

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun list

Lists a fleet's update runs.

az fleet updaterun list --fleet-name
                        --resource-group

Examples

Show the details of an update run.

az fleet updaterun list -g MyFleetResourceGroup -f MyFleetName

Required Parameters

--fleet-name -f

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun show

Shows an update run.

az fleet updaterun show --fleet-name
                        --name
                        --resource-group

Examples

Show the details of an update run.

az fleet updaterun show -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

Required Parameters

--fleet-name -f

Specify the fleet name.

--name -n

Specify name for the update run.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun skip

Sets targets to be skipped within an UpdateRun.

az fleet updaterun skip --fleet-name
                        --name
                        --resource-group
                        [--no-wait]
                        [--targets]

Examples

Set two targets to be skipped.

az fleet updaterun skip -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun --targets Group:my-group-name Stage:my-stage-name

Required Parameters

--fleet-name -f

Specify the fleet name.

--name -n

Specify name for the update run.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

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

Default value: False
--targets
Preview

Space-separated list of targets to skip. Targets must be of the form 'targetType:targetName' such as Group:MyGroup. Valid target types are ('Member', 'Group', 'Stage', 'AfterStageWait'). The target type is case-sensitive.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun start

Starts an update run.

az fleet updaterun start --fleet-name
                         --name
                         --resource-group
                         [--no-wait]

Examples

Start an update run.

az fleet updaterun start -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

Required Parameters

--fleet-name -f

Specify the fleet name.

--name -n

Specify name for the update run.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun stop

Stops an update run.

az fleet updaterun stop --fleet-name
                        --name
                        --resource-group
                        [--no-wait]

Examples

Stop an update run.

az fleet updaterun stop -g MyFleetResourceGroup -f MyFleetName -n NameofUpdateRun

Required Parameters

--fleet-name -f

Specify the fleet name.

--name -n

Specify name for the update run.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az fleet updaterun wait

Wait for an update run resource to reach a desired state.

If an operation on an update run was interrupted or was started with --no-wait, use this command to wait for it to complete.

az fleet updaterun wait --fleet-name
                        --resource-group
                        --update-run-name
                        [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--interval]
                        [--timeout]
                        [--updated]

Required Parameters

--fleet-name -f

Specify the fleet name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--update-run-name

The name of the UpdateRun resource. Required.

Optional Parameters

--created

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

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.