共用方式為


New-AzNetworkCloudServicesNetwork

建立新的雲端服務網路,或更新現有雲端服務網路的屬性。

語法

New-AzNetworkCloudServicesNetwork
   -CloudServicesNetworkName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -ExtendedLocationName <String>
   -ExtendedLocationType <String>
   -Location <String>
   [-AdditionalEgressEndpoint <IEgressEndpoint[]>]
   [-EnableDefaultEgressEndpoint <CloudServicesNetworkEnableDefaultEgressEndpoints>]
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

建立新的雲端服務網路,或更新現有雲端服務網路的屬性。

範例

範例 1:建立雲端服務網路

$tags = @{
    Tag1 = 'tag1'
}
$endpointEgressList = @{}

New-AzNetworkCloudServicesNetwork -CloudServicesNetworkName cloudNetworkServicesName -ResourceGroupName resourceGroupName -ExtendedLocationName "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/customLocationName" -ExtendedLocationType "CustomLocation" -Location eastus -AdditionalEgressEndpoint $endpointEgressList -EnableDefaultEgressEndpoint false -Tag $tags -SubscriptionId subscriptionId

Location Name                     SystemDataCreatedAt SystemDataCreatedBy    SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy
-------- ----                     ------------------- -------------------    ----------------------- ------------------------ ------------------------
eastus   cloudNetworkServicesName 06/30/2023 13:32:28 User1                  User                    06/30/2023 13:32:39      resourceGroupName

此命令會建立雲端服務網路。

參數

-AdditionalEgressEndpoint

輸出端點的清單。 這允許從混合式 AKS 叢集連線到指定的端點。 若要建構,請參閱ADDITIONALEGRESSENDPOINT屬性的NOTES區段,並建立哈希表。

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

-AsJob

以作業身分執行命令

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

-CloudServicesNetworkName

雲端服務網路的名稱。

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

-Confirm

執行 Cmdlet 之前先提示您確認。

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

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

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

-EnableDefaultEgressEndpoint

輸出流量是否允許平台預設端點的指標。

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

-ExtendedLocationName

要在其中建立資源之擴充位置的資源標識碼。

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

-ExtendedLocationType

擴充位置類型,例如 CustomLocation。

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

-Location

資源所在的地理位置

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

-NoWait

以異步方式執行命令

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

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

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

-SubscriptionId

目標訂用帳戶的標識碼。 此值必須是 UUID。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-Tag

資源標籤。

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

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

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

輸出

ICloudServicesNetwork