Start-AzBatchPoolResize
语法
Default (默认值)
Start-AzBatchPoolResize
[-Id] <String>
[-TargetDedicatedComputeNodes <Int32>]
[-TargetLowPriorityComputeNodes <Int32>]
[-ResizeTimeout <TimeSpan>]
[-ComputeNodeDeallocationOption <ComputeNodeDeallocationOption>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Start-AzBatchPoolResize cmdlet 在池上启动 Azure Batch 重设大小作。
示例
示例 1:将池大小调整为 12 个节点
Start-AzBatchPoolResize -Id "ContosoPool06" -TargetDedicatedComputeNodes 12 -BatchContext $Context
此命令在 ID 为 ContosoPool06 的池上启动重设大小作。
作的目标为 12 个专用计算节点。
使用 Get-AzBatchAccountKey cmdlet 将上下文分配给$Context变量。
示例 2:使用解除分配选项调整池的大小
Get-AzBatchPool -Id "ContosoPool06" -BatchContext $Context | Start-AzBatchPoolResize -TargetDedicatedComputeNodes 5 -ResizeTimeout ([TimeSpan]::FromHours(1)) -ComputeNodeDeallocationOption ([Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]::Terminate) -BatchContext $Context
此 cmdlet 将池大小调整为五个专用计算节点。
该命令使用 Get-AzBatchPool cmdlet 获取 ID 为 ContosoPool06 的池。
该命令使用管道运算符将该池对象传递到当前 cmdlet。
该命令在池上启动重设大小作。
目标是五个专用计算节点。
该命令指定一小时的超时期限。
该命令指定 Terminate 的解除分配选项。
参数
-BatchContext
指定此 cmdlet 用于与 Batch 服务交互的 BatchAccountContext 实例。
如果使用 Get-AzBatchAccount cmdlet 获取 BatchAccountContext,则在与 Batch 服务交互时将使用Microsoft Entra 身份验证。 若要改用共享密钥身份验证,请使用 Get-AzBatchAccountKey cmdlet 获取填充其访问密钥的 BatchAccountContext 对象。 使用共享密钥身份验证时,默认使用主访问密钥。 若要更改要使用的密钥,请设置 BatchAccountContext.KeyInUse 属性。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ComputeNodeDeallocationOption
指定此 cmdlet 启动的大小调整作的解除分配选项。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Id
指定此 cmdlet 调整大小的池的 ID。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ResizeTimeout
指定调整大小作的超时期限。
如果池此时未达到目标大小,则调整大小作将停止。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-TargetDedicatedComputeNodes
目标专用计算节点数。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-TargetLowPriorityComputeNodes
目标低优先级计算节点数。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出