View a markdown version of this page

建立群組 - Amazon Elastic Compute Cloud

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

建立群組

您可以建立群組來組織容量保留。在您建立群組之後,可新增容量保留至群組。

Console
建立群組

  1. 前往 https://console.aws.amazon.com/ec2/ 開啟 Amazon EC2 主控台。

  2. 在導覽窗格中,選擇 容量預留

  3. 選擇容量保留資源群組

  4. 選擇 Create Group (建立群組)

  5. 輸入群組名稱,並選擇性地新增描述、容量保留和標籤。

  6. 選擇建立

AWS CLI
為容量保留建立群組

使用 create-group AWS CLI 命令搭配下列請求參數。

  • AWS::EC2::CapacityReservationPool – 確保容量保留資源群組可以成為執行個體啟動的目標。

  • AWS::ResourceGroups::Generic allowed-resource-types設定為 AWS::EC2::CapacityReservation :確保容量保留資源群組僅接受容量保留。

aws resource-groups create-group \ --name MyCRGroup \ --configuration \ '{"Type": "AWS::EC2::CapacityReservationPool"}' \ '{"Type": "AWS::ResourceGroups::Generic", "Parameters": [{"Name": "allowed-resource-types", "Values": ["AWS::EC2::CapacityReservation"]}]}'
PowerShell
為容量保留建立群組

使用 New-RGGroup cmdlet。

New-RGGroup ` -Name MyCRGroup ` -Configuration ` @{"Type"="AWS::EC2::CapacityReservationPool"} ` @{"Type"="AWS::ResourceGroups::Generic"; "Parameters"=@{"allowed-resource-types"=@{"Values"="AWS::EC2::CapacityReservation"}}}

若要建立僅接受特定執行個體類型 UltraServer 容量區塊的群組,請參閱 建立 UltraServer 容量區塊的容量保留資源群組