你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az computeschedule

Note

此参考是 Azure CLI(版本 2.67.0 或更高版本)的 计算计划 扩展的一部分。 该扩展将在首次运行 az computeschedule 命令时自动安装。 了解更多关于扩展的信息。

Computeschedule 批处理虚拟机作。

计算计划作允许客户对一批虚拟机执行一次性作。

命令

名称 说明 类型 Status
az computeschedule vm-cancel-operations

VirtualMachinesCancelOperations:取消以前提交的(start/deallocate/hibernate)请求。

Extension GA
az computeschedule vm-execute-deallocate

VirtualMachinesExecuteDeallocate:执行一批虚拟机的解除分配操作,在 Computeschedule 收到该操作后立即触发此操作。

Extension GA
az computeschedule vm-execute-hibernate

VirtualMachinesExecuteHibernate:对一批虚拟机执行休眠操作,计算计划收到该操作后立即触发此操作。

Extension GA
az computeschedule vm-execute-start

VirtualMachinesExecuteStart:执行一批虚拟机的启动作,计算计划收到该作后立即触发此作。

Extension GA
az computeschedule vm-get-operation-errors

VirtualMachinesGetOperationErrors:获取有关操作错误(如遇到的暂时性错误、其他日志)的错误详细信息(如果存在)。

Extension GA
az computeschedule vm-get-operation-status

VirtualMachinesGetOperationStatus:轮询终结点以读取在虚拟机上执行的作的状态。

Extension GA
az computeschedule vm-submit-deallocate

VirtualMachinesSubmitDeallocate:在将来的日期时间计划一批虚拟机的解除分配操作。

Extension GA
az computeschedule vm-submit-hibernate

VirtualMachinesSubmitHibernate:在将来的日期时间为一批虚拟机计划休眠操作。

Extension GA
az computeschedule vm-submit-start

VirtualMachinesSubmitStart:在将来的日期/时间计划一批虚拟机的启动操作。

Extension GA

az computeschedule vm-cancel-operations

VirtualMachinesCancelOperations:取消以前提交的(start/deallocate/hibernate)请求。

az computeschedule vm-cancel-operations --correlationid
                                        --operation-ids
                                        [--ids]
                                        [--location]
                                        [--subscription]

示例

VirtualMachinesCancelOperations

az computeschedule vm-cancel-operations --location eastus2euap --operation-ids "[23480d2f-1dca-4610-afb4-dd25eec1f34r]" --correlationid 23480d2f-1dca-4610-afb4-gg25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--operation-ids

获取支持速记语法、json-file 和 yaml-file 的状态的作 ID 列表。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-execute-deallocate

VirtualMachinesExecuteDeallocate:执行一批虚拟机的解除分配操作,在 Computeschedule 收到该操作后立即触发此操作。

az computeschedule vm-execute-deallocate --correlationid
                                         --execution-parameters
                                         --resources
                                         [--ids]
                                         [--location]
                                         [--subscription]

示例

VirtualMachinesExecuteDeallocate

az computeschedule vm-execute-deallocate --location eastus2euap --execution-parameters "{retry-policy:{retry-count:4,retry-window-in-minutes:27}}" --resources "{ids:[/subscriptions/fe541807-8c68-475d-976d-f453f9db4d81/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/testResource3]}" --correlationid 23480d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--execution-parameters

请求支持速记语法、json-file 和 yaml-file 的执行参数。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--resources

请求支持速记语法、json-file 和 yaml-file 的资源。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-execute-hibernate

VirtualMachinesExecuteHibernate:对一批虚拟机执行休眠操作,计算计划收到该操作后立即触发此操作。

az computeschedule vm-execute-hibernate --correlationid
                                        --execution-parameters
                                        --resources
                                        [--ids]
                                        [--location]
                                        [--subscription]

示例

VirtualMachinesExecuteHibernate

az computeschedule vm-execute-hibernate --location eastus2euap --execution-parameters "{retry-policy:{retry-count:5,retry-window-in-minutes:27}}" --resources "{ids:[/subscriptions/fe541807-8c68-475d-976d-f453f9db4d81/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/testResource3]}" --correlationid 23480d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--execution-parameters

请求支持速记语法、json-file 和 yaml-file 的执行参数。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--resources

请求支持速记语法、json-file 和 yaml-file 的资源。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-execute-start

VirtualMachinesExecuteStart:执行一批虚拟机的启动作,计算计划收到该作后立即触发此作。

az computeschedule vm-execute-start --correlationid
                                    --execution-parameters
                                    --resources
                                    [--ids]
                                    [--location]
                                    [--subscription]

示例

VirtualMachinesExecuteStart

az computeschedule vm-execute-start --location eastus2euap --execution-parameters "{retry-policy:{retry-count:2,retry-window-in-minutes:27}}" --resources "{ids:[/subscriptions/fe541807-8c68-475d-976d-f453f9db4d81/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/testResource3]}" --correlationid 23480d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--execution-parameters

请求支持速记语法、json-file 和 yaml-file 的执行参数。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--resources

请求支持速记语法、json-file 和 yaml-file 的资源。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-get-operation-errors

VirtualMachinesGetOperationErrors:获取有关操作错误(如遇到的暂时性错误、其他日志)的错误详细信息(如果存在)。

az computeschedule vm-get-operation-errors --operation-ids
                                           [--ids]
                                           [--location]
                                           [--subscription]

示例

VirtualMachinesGetOperationErrors

az computeschedule vm-get-operation-errors --location eastus2euap --operation-ids "[23480d2f-1dca-4610-afb4-dd25eec1f34r]"

必需参数

--operation-ids

获取支持速记语法、json-file 和 yaml-file 的状态的作 ID 列表。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-get-operation-status

VirtualMachinesGetOperationStatus:轮询终结点以读取在虚拟机上执行的作的状态。

az computeschedule vm-get-operation-status --correlationid
                                           --operation-ids
                                           [--ids]
                                           [--location]
                                           [--subscription]

示例

VirtualMachinesGetOperationStatus

az computeschedule vm-get-operation-status --location eastus2euap --operation-ids "[23480d2f-1dca-4610-afb4-dd25eec1f34r]" --correlationid 35780d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--operation-ids

获取支持速记语法、json-file 和 yaml-file 的状态的作 ID 列表。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-submit-deallocate

VirtualMachinesSubmitDeallocate:在将来的日期时间计划一批虚拟机的解除分配操作。

az computeschedule vm-submit-deallocate --correlationid
                                        --execution-parameters
                                        --resources
                                        --schedule
                                        [--ids]
                                        [--location]
                                        [--subscription]

示例

VirtualMachinesSubmitDeallocate

az computeschedule vm-submit-deallocate --location eastus2euap --schedule "{deadline:'2024-11-01T17:52:54.215Z',timezone:UTC,deadline-type:InitiateAt}" --execution-parameters "{retry-policy:{retry-count:4,retry-window-in-minutes:27}}" --resources "{ids:[/subscriptions/fe541807-8c68-475d-976d-f453f9db4d81/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/testResource3]}" --correlationid 23480d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--execution-parameters

请求支持速记语法、json-file 和 yaml-file 的执行参数。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--resources

请求支持速记语法、json-file 和 yaml-file 的资源。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--schedule

请求支持速记语法、json-file 和 yaml-file 的计划。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-submit-hibernate

VirtualMachinesSubmitHibernate:在将来的日期时间为一批虚拟机计划休眠操作。

az computeschedule vm-submit-hibernate --correlationid
                                       --execution-parameters
                                       --resources
                                       --schedule
                                       [--ids]
                                       [--location]
                                       [--subscription]

示例

VirtualMachinesSubmitHibernate

az computeschedule vm-submit-hibernate --location eastus2euap --schedule "{deadline:'2024-11-01T17:52:54.215Z',timezone:UTC,deadline-type:InitiateAt}" --execution-parameters "{retry-policy:{retry-count:2,retry-window-in-minutes:27}}" --resources "{ids:[/subscriptions/fe541807-8c68-475d-976d-f453f9db4d81/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/testResource3]}" --correlationid 23480d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--execution-parameters

请求支持速记语法、json-file 和 yaml-file 的执行参数。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--resources

请求支持速记语法、json-file 和 yaml-file 的资源。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--schedule

请求支持速记语法、json-file 和 yaml-file 的计划。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az computeschedule vm-submit-start

VirtualMachinesSubmitStart:在将来的日期/时间计划一批虚拟机的启动操作。

az computeschedule vm-submit-start --correlationid
                                   --execution-parameters
                                   --resources
                                   --schedule
                                   [--ids]
                                   [--location]
                                   [--subscription]

示例

VirtualMachinesSubmitStart

az computeschedule vm-submit-start --location eastus2euap --schedule "{deadline:'2024-11-01T17:52:54.215Z',timezone:UTC,deadline-type:InitiateAt}" --execution-parameters "{retry-policy:{retry-count:5,retry-window-in-minutes:27}}" --resources "{ids:[/subscriptions/fe541807-8c68-475d-976d-f453f9db4d81/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/testResource3]}" --correlationid 23480d2f-1dca-4610-afb4-dd25eec1f34r

必需参数

--correlationid

CorrelationId 项。

属性
Parameter group: RequestBody Arguments
--execution-parameters

请求支持速记语法、json-file 和 yaml-file 的执行参数。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--resources

请求支持速记语法、json-file 和 yaml-file 的资源。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments
--schedule

请求支持速记语法、json-file 和 yaml-file 的计划。 请尝试“??” 以显示更多内容。

属性
Parameter group: RequestBody Arguments

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--location

Azure 资源的位置。 如果值为空,则从 tty 中询问该值。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False