你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Start-AzBatchPoolResize
开始调整池的大小。
语法
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 属性。
类型: | BatchAccountContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ComputeNodeDeallocationOption
指定此 cmdlet 启动的大小调整作的解除分配选项。
类型: | Nullable<T>[ComputeNodeDeallocationOption] |
接受的值: | Requeue, Terminate, TaskCompletion, RetainedData |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Id
指定此 cmdlet 调整大小的池的 ID。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResizeTimeout
指定调整大小作的超时期限。 如果池此时未达到目标大小,则调整大小作将停止。
类型: | Nullable<T>[TimeSpan] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-TargetDedicatedComputeNodes
目标专用计算节点数。
类型: | Nullable<T>[Int32] |
别名: | TargetDedicated |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-TargetLowPriorityComputeNodes
目标低优先级计算节点数。
类型: | Nullable<T>[Int32] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |