New-AzElasticSanVolumeGroup
建立磁碟區群組。
語法
New-AzElasticSanVolumeGroup
-ElasticSanName <String>
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-Encryption <String>]
[-EncryptionUserAssignedIdentity <String>]
[-IdentityType <String>]
[-IdentityUserAssignedIdentityId <String>]
[-KeyName <String>]
[-KeyVaultUri <String>]
[-KeyVersion <String>]
[-NetworkAclsVirtualNetworkRule <IVirtualNetworkRule[]>]
[-ProtocolType <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzElasticSanVolumeGroup
-Name <String>
-ElasticSanInputObject <IElasticSanIdentity>
[-Encryption <String>]
[-EncryptionUserAssignedIdentity <String>]
[-IdentityType <String>]
[-IdentityUserAssignedIdentityId <String>]
[-KeyName <String>]
[-KeyVaultUri <String>]
[-KeyVersion <String>]
[-NetworkAclsVirtualNetworkRule <IVirtualNetworkRule[]>]
[-ProtocolType <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzElasticSanVolumeGroup
-InputObject <IElasticSanIdentity>
[-Encryption <String>]
[-EncryptionUserAssignedIdentity <String>]
[-IdentityType <String>]
[-IdentityUserAssignedIdentityId <String>]
[-KeyName <String>]
[-KeyVaultUri <String>]
[-KeyVersion <String>]
[-NetworkAclsVirtualNetworkRule <IVirtualNetworkRule[]>]
[-ProtocolType <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
建立磁碟區群組。
範例
範例 1:建立具有網路規則物件的磁碟區群組
$virtualNetworkRule1 = New-AzElasticSanVirtualNetworkRuleObject -VirtualNetworkResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1" -Action Allow
$virtualNetworkRule2 = New-AzElasticSanVirtualNetworkRuleObject -VirtualNetworkResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2" -Action Allow
New-AzElasticSanVolumeGroup -ResourceGroupName myresourcegroup -ElasticSanName myelasticsan -Name myvolumegroup -ProtocolType 'Iscsi' -NetworkAclsVirtualNetworkRule $virtualNetworkRule1,$virtualNetworkRule2
Encryption : EncryptionAtRestWithPlatformKey
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumegroups/myvolumegroup
Name : myvolumegroup
NetworkAclsVirtualNetworkRule : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2}
ProtocolType : iSCSI
ProvisioningState : Succeeded
SystemDataCreatedAt : 9/19/2022 7:05:47 AM
SystemDataCreatedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
SystemDataCreatedByType : Application
SystemDataLastModifiedAt : 9/19/2022 7:05:47 AM
SystemDataLastModifiedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
SystemDataLastModifiedByType : Application
Type : Microsoft.ElasticSan/ElasticSans
此範例會建立兩個 VirtualNetworkRule 對象,然後輸入 物件和其他變數來建立磁碟區群組。
範例 2:使用網路規則 JSON 輸入建立磁碟區群組
New-AzElasticSanVolumeGroup -ResourceGroupName myresourcegroup -ElasticSanName myelasticsan -Name myvolumegroup -ProtocolType 'Iscsi' `
-NetworkAclsVirtualNetworkRule (
@{VirtualNetworkResourceId="/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1";
Action="Allow"},
@{VirtualNetworkResourceId="/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2";
Action="Allow"})
Encryption : EncryptionAtRestWithPlatformKey
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumegroups/myvolumegroup
Name : myvolumegroup
NetworkAclsVirtualNetworkRule : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2}
ProtocolType : iSCSI
ProvisioningState : Succeeded
SystemDataCreatedAt : 9/19/2022 7:05:47 AM
SystemDataCreatedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
SystemDataCreatedByType : Application
SystemDataLastModifiedAt : 9/19/2022 7:05:47 AM
SystemDataLastModifiedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
SystemDataLastModifiedByType : Application
Type : Microsoft.ElasticSan/ElasticSans
此命令會以 json 格式建立 NetworkAclsVirtualNetworkRule 輸入的磁碟區群組。
範例 3:使用平臺管理的密鑰和 SystemAssigned 身分識別類型建立磁碟區群組
New-AzElasticSanVolumeGroup -ResourceGroupName myresourcegroup -ElasticSanName myelasticsan -Name myvolumegroup -IdentityType SystemAssigned -ProtocolType Iscsi -Encryption EncryptionAtRestWithPlatformKey
Encryption : EncryptionAtRestWithPlatformKey
EncryptionIdentityEncryptionUserAssignedIdentity :
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumeGroups/myvolumegroup
IdentityPrincipalId : 00000000-0000-0000-0000-000000000000
IdentityTenantId : 00000000-0000-0000-0000-000000000000
IdentityType : SystemAssigned
IdentityUserAssignedIdentity : {
}
KeyVaultPropertyCurrentVersionedKeyExpirationTimestamp :
KeyVaultPropertyCurrentVersionedKeyIdentifier :
KeyVaultPropertyKeyName :
KeyVaultPropertyKeyVaultUri :
KeyVaultPropertyKeyVersion :
KeyVaultPropertyLastKeyRotationTimestamp :
Name : myvolumegroup
NetworkAclsVirtualNetworkRule :
PrivateEndpointConnection :
ProtocolType : iSCSI
ProvisioningState : Succeeded
ResourceGroupName : myresourcegroup
SystemDataCreatedAt : 10/7/2023 6:20:55 AM
SystemDataCreatedBy : 00000000-0000-0000-0000-000000000000
SystemDataCreatedByType : Application
SystemDataLastModifiedAt : 10/7/2023 6:20:55 AM
SystemDataLastModifiedBy : 00000000-0000-0000-0000-000000000000
SystemDataLastModifiedByType : Application
Type : Microsoft.ElasticSan/elasticSans/volumeGroups
此命令會建立身分識別類型為 「SystemAssigned」 和加密類型 「platform-managed key」 的磁碟區群組。
範例 4:使用平臺管理的密鑰和 SystemAssigned 身分識別類型建立磁碟區群組
$useridentity = Get-AzUserAssignedIdentity -ResourceGroupName myresoucegroup -Name myuai
New-AzElasticSanVolumeGroup -ResourceGroupName myresoucegroup -ElasticSanName myelasticsan -Name myvolumegroup -IdentityType UserAssigned -IdentityUserAssignedIdentityId $useridentity.Id -Encryption EncryptionAtRestWithCustomerManagedKey -KeyName mykey -KeyVaultUri "https://mykeyvault.vault.azure.net:443" -EncryptionUserAssignedIdentity $useridentity.Id -ProtocolType Iscsi
Encryption : EncryptionAtRestWithCustomerManagedKey
EncryptionIdentityEncryptionUserAssignedIdentity : /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myuai
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumeGroups/myvolumegroup
IdentityPrincipalId :
IdentityTenantId :
IdentityType : UserAssigned
IdentityUserAssignedIdentity : {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myuai": {
}
}
KeyVaultPropertyCurrentVersionedKeyExpirationTimestamp : 1/1/1970 12:00:00 AM
KeyVaultPropertyCurrentVersionedKeyIdentifier : https://mykeyvault.vault.azure.net/keys/mykey/37ec78b20f9e4a29b14a0d29d93cb79f
KeyVaultPropertyKeyName : mykey
KeyVaultPropertyKeyVaultUri : https://mykeyvault.vault.azure.net:443
KeyVaultPropertyKeyVersion :
KeyVaultPropertyLastKeyRotationTimestamp : 10/7/2023 6:32:28 AM
Name : myvolumegroup
NetworkAclsVirtualNetworkRule :
PrivateEndpointConnection :
ProtocolType : iSCSI
ProvisioningState : Succeeded
ResourceGroupName : myresourcegroup
SystemDataCreatedAt : 10/7/2023 6:32:27 AM
SystemDataCreatedBy : a000255f-5f09-45e0-a970-9d9ed9cc6453
SystemDataCreatedByType : Application
SystemDataLastModifiedAt : 10/7/2023 6:32:27 AM
SystemDataLastModifiedBy : a000255f-5f09-45e0-a970-9d9ed9cc6453
SystemDataLastModifiedByType : Application
Type : Microsoft.ElasticSan/elasticSans/volumeGroups
此命令會建立身分識別類型為 「SystemAssigned」 和加密類型 「platform-managed key」 的磁碟區群組。
參數
-AsJob
以作業身分執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | 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 |
-ElasticSanInputObject
身分識別參數 若要建構,請參閱 ELASTICSANINPUTOBJECT 屬性的 NOTES 區段,並建立哈希表。
類型: | IElasticSanIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ElasticSanName
ElasticSan 的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Encryption
加密類型
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EncryptionUserAssignedIdentity
要與磁碟區群組上的伺服器端加密相關聯的 UserAssigned 身分識別資源識別碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IdentityType
識別類型。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IdentityUserAssignedIdentityId
取得或設定索引鍵值組的清單,描述將搭配此磁碟區群組使用的一組使用者指派身分識別。 金鑰是身分識別的 ARM 資源識別碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
類型: | IElasticSanIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-KeyName
KeyVault 金鑰的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-KeyVaultUri
KeyVault 的 URI。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-KeyVersion
KeyVault 金鑰的版本。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
VolumeGroup 的名稱。
類型: | String |
別名: | VolumeGroupName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NetworkAclsVirtualNetworkRule
虛擬網路規則的清單。 若要建構,請參閱 NETWORKACLSVIRTUALNETWORKRULE 屬性的 NOTES 區段,並建立哈希表。
類型: | IVirtualNetworkRule[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-NoWait
以異步方式執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ProtocolType
記憶體目標類型
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。
類型: | String |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |