Start-AzBatchPoolResize
開始調整集區的大小。
語法
Start-AzBatchPoolResize
[-Id] <String>
[-TargetDedicatedComputeNodes <Int32>]
[-TargetLowPriorityComputeNodes <Int32>]
[-ResizeTimeout <TimeSpan>]
[-ComputeNodeDeallocationOption <ComputeNodeDeallocationOption>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
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 取得標識符為 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 重設大小之集區的識別碼。
類型: | 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 |