共用方式為


New-AzureAffinityGroup

在目前的訂用帳戶中建立同質群組。

注意

本文件中參考的 Cmdlet 用於管理使用 Azure Service Manager(ASM) API 的舊版 Azure 資源。 建立新的資源時,不建議使用此舊版 PowerShell 模組,因為 ASM 已排定淘汰。 如需詳細資訊,請參閱 Azure Service Manager 淘汰

Az PowerShell 模組是使用 PowerShell 管理 Azure Resource Manager (ARM) 資源的建議 PowerShell 模組。

語法

New-AzureAffinityGroup
   [-Name] <String>
   [-Label <String>]
   [-Description <String>]
   -Location <String>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

New-AzureAffinityGroup Cmdlet 會在目前的 Azure 訂用帳戶中建立 Azure 親和性群組。

同質群組會將您的服務及其資源放在 Azure 資料中心。 同質群組會將成員群組在一起,以獲得最佳效能。 在訂用帳戶層級定義同質群組。 您的同質群組可供您建立的任何後續雲端服務或記憶體帳戶使用。 您只能在建立服務時,將服務新增至同質群組。

範例

範例 1:建立同質群組

PS C:\> New-AzureAffinityGroup -Name "South01" -Location "South Central US" -Label "South Region" -Description "Affinity group for production applications in southern region."

此命令會在美國中南部區域建立名為 South01 的親和性群組。 命令會指定標籤和描述。

參數

-Description

指定同質群組的描述。 描述長度最多可達 1024 個字元。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InformationAction

指定此 Cmdlet 如何回應資訊事件。

此參數可接受的值為:

  • 繼續
  • 忽略
  • 詢問
  • SilentlyContinue
  • 停止
  • 暫止
類型:ActionPreference
別名:infa
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InformationVariable

指定資訊變數。

類型:String
別名:iv
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Label

指定同質群組的標籤。 標籤長度最多可達 100 個字元。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Location

指定此 Cmdlet 建立同質群組之 Azure 資料中心的地理位置。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Name

指定同質群組的名稱。 名稱必須是唯一的訂用帳戶。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Profile

指定此 Cmdlet 從中讀取的 Azure 設定檔。 如果您未指定設定檔,此 Cmdlet 會從本機預設配置檔讀取。

類型:AzureSMProfile
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False