Update-AzDataBoxJob
更新現有作業的屬性。
語法
Update-AzDataBoxJob
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-IfMatch <String>]
[-ContactDetail <IContactDetails>]
[-ContactDetailContactName <String>]
[-ContactDetailMobile <String>]
[-ContactDetailPhone <String>]
[-ContactDetailPhoneExtension <String>]
[-EncryptionPreferenceDoubleEncryption <DoubleEncryption>]
[-EncryptionPreferenceHardwareEncryption <HardwareEncryption>]
[-IdentityType <String>]
[-KeyEncryptionKey <IKeyEncryptionKey>]
[-PreferencePreferredDataCenterRegion <String[]>]
[-ReturnToCustomerPackageDetailCarrierAccountNumber <String>]
[-ReturnToCustomerPackageDetailCarrierName <String>]
[-ReturnToCustomerPackageDetailTrackingId <String>]
[-ReverseShippingDetail <IShippingAddress>]
[-ReverseTransportPreferredShipmentType <TransportShipmentTypes>]
[-ShippingAddress <IShippingAddress>]
[-StorageAccountAccessTierPreference <StorageAccountAccessTier[]>]
[-Tag <Hashtable>]
[-TransportPreferredShipmentType <TransportShipmentTypes>]
[-UserAssignedIdentity <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
更新現有作業的屬性。
範例
範例 1:將由 Microsoft 管理的數據箱作業加密更新為使用使用者指派身分識別管理的客戶
$keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName"} -KekUrl "keyIdentifier" -KekVaultResourceId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"
$DebugPreference = "Continue"
# You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when update command fails.
# {
# "Error": {
# "Code": "StaticValidationGenericCountryCodeHasInvalidLength",
# "Message": "The attribute country code does not meet length constraints.\r\nEnter a value with 2 characters for country code.",
# "Details": [
# null
# ],
# "Target": null
# }
# }
Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}}
$keyEncryptionDetails
KekType KekUrl KekVaultResourceId
------- ------ ------------------
CustomerManaged keyIdentifier /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName
Name Location Status TransferType SkuName IdentityType DeliveryType Detail
---- -------- ------ ------------ ------- ------------ ------------ ------
Powershell10 WestUS DeviceOrdered ImportToAzure DataBox UserAssigned NonScheduled Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20210301.DataBoxJobDetails
從 Microsoft 管理的數據箱作業加密更新為使用使用者指派身分識別管理的客戶。
範例 2:在 2 個更新中使用系統身分識別,將 Microsoft 管理的數據處理箱作業加密更新至客戶
$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned"
$databoxUpdate.Identity
$keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "SystemAssigned"} -KekUrl "keyIdentifier" -KekVaultResourceId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"
$databoxUpdateWithCMK = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails
$databoxUpdateWithCMK.Identity
$databoxUpdateWithCMK.Detail.KeyEncryptionKey
PrincipalId TenantId Type
----------- -------- ----
920850f5-9b6b-4017-a81a-3dcafe348be7 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned
PrincipalId TenantId Type
----------- -------- ----
920850f5-9b6b-4017-a81a-3dcafe348be7 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned
KekType KekUrl KekVaultResourceId
------- ------ ------------------
CustomerManaged keyIdentifier /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName
將數據箱作業加密從 Microsoft 管理更新為使用 sytem 指派身分識別管理的客戶。 針對使用 $DebugPreference = “Continue” 重新執行的任何失敗,如範例 1 中所述
範例 3:將系統指派給使用客戶管理金鑰加密指派的使用者更新資料箱作業
$contactDetail = New-AzDataBoxContactDetailsObject -ContactName "random" -EmailList @("emailId") -Phone "1234567891"
$ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrProvince "CA" -Country "US" -City "San Francisco" -PostalCode "94107" -AddressType "Commercial"
Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned,UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}}
從系統更新指派給使用客戶管理金鑰加密指派的用戶的數據箱作業。 針對使用 $DebugPreference = “Continue” 重新執行的任何失敗,如範例 1 中所述
參數
-AsJob
以作業身分執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContactDetail
通知和寄送的連絡詳細數據。 若要建構,請參閱 CONTACTDETAIL 屬性的 NOTES 區段並建立哈希表。
類型: | IContactDetails |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContactDetailContactName
聯繫人的聯繫人名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContactDetailMobile
聯繫人的行動電話號碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContactDetailPhone
聯繫人的電話號碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContactDetailPhoneExtension
聯繫人的電話號碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EncryptionPreferenceDoubleEncryption
定義軟體型加密啟用的第二層。
類型: | DoubleEncryption |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EncryptionPreferenceHardwareEncryption
定義硬體層級加密 (僅適用於磁碟)
類型: | HardwareEncryption |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IdentityType
識別類型
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IfMatch
定義 If-Match 條件。 只有在伺服器上的作業 ETag 符合此值時,才會執行修補程式。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-KeyEncryptionKey
作業的金鑰加密金鑰。 若要建構,請參閱KEYENCRYPTIONKEY屬性的NOTES區段,並建立哈希表。
類型: | IKeyEncryptionKey |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
指定資源群組內的作業資源名稱。 作業名稱長度必須介於 3 到 24 個字元之間,且只使用任何英數位元和底線
類型: | String |
別名: | JobName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NoWait
以異步方式執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-PreferencePreferredDataCenterRegion
慣用的數據中心區域。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源組名
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ReturnToCustomerPackageDetailCarrierAccountNumber
客戶磁碟的電信業者帳戶號碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReturnToCustomerPackageDetailCarrierName
電信業者的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReturnToCustomerPackageDetailTrackingId
追蹤出貨的標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReverseShippingDetail
客戶想要接收裝置的寄送位址。 若要建構,請參閱 REVERSESHIPPINGDETAIL 屬性的 NOTES 一節,並建立哈希表。
類型: | IShippingAddress |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReverseTransportPreferredShipmentType
指出客戶慣用的出貨物流類型。
類型: | TransportShipmentTypes |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ShippingAddress
客戶的寄送位址。 若要建構,請參閱 SHIPPINGADDRESS 屬性的 NOTES 區段並建立哈希表。
類型: | IShippingAddress |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-StorageAccountAccessTierPreference
與記憶體帳戶存取層相關的喜好設定。
類型: | StorageAccountAccessTier[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
訂用帳戶標識碼
類型: | String |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Tag
描述資源的索引鍵值組清單。 這些標籤可用於檢視和群組此資源(跨資源群組)。
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-TransportPreferredShipmentType
指出客戶慣用的出貨物流類型。
類型: | TransportShipmentTypes |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-UserAssignedIdentity
使用者指派的身分識別
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |