Update-AzDataBoxJob
This cmdlet is part of a Preview module. Preview versions aren't recommended for use in production environments. For more information, see https://aka.ms/azps-refstatus .
Updates the properties of an existing job.
Syntax
Default (Default)
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
Updates the properties of an existing job.
Examples
Example 1: Update databox job encryption from microsoft managed to customer managed with user assigned identities
$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.Api20250201.DataBoxJobDetails
Update databox job encryption from microsoft managed to customer managed with user assigned identities.
Example 2: Update databox job encryption from microsoft managed to customer managed with system identities in 2 updates
$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
Update databox job encryption from microsoft managed to customer managed to customer managed with system assigned identity.
For any failure re-run with $DebugPreference = "Continue" as mentioned in example 1
Example 3: Update databox job from system assigned to user assigned with customer managed key encryption
$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" = @{}}
Update databox job from system assigned to user assigned with customer managed key encryption.
For any failure re-run with $DebugPreference = "Continue" as mentioned in example 1
Parameters
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Contact details for notification and shipping.
To construct, see NOTES section for CONTACTDETAIL properties and create a hash table.
Type: IContactDetails
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Contact name of the person.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Mobile number of the contact person.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Phone number of the contact person.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Phone extension number of the contact person.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EncryptionPreferenceDoubleEncryption
Defines secondary layer of software-based encryption enablement.
Parameter properties
Type: DoubleEncryption
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EncryptionPreferenceHardwareEncryption
Defines Hardware level encryption (Only for disk)
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IdentityType
Identity type
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IfMatch
Defines the If-Match condition.
The patch will be performed only if the ETag of the job on the server matches this value.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyEncryptionKey
Key encryption key for the job.
To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the job Resource within the specified resource group.
job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: JobName
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PreferencePreferredDataCenterRegion
Preferred data center region.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The Resource Group Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReturnToCustomerPackageDetailCarrierAccountNumber
Carrier Account Number of customer for customer disk.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReturnToCustomerPackageDetailCarrierName
Name of the carrier.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReturnToCustomerPackageDetailTrackingId
Tracking Id of shipment.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReverseShippingDetail
Shipping address where customer wishes to receive the device.
To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table.
Parameter properties
Type: IShippingAddress
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReverseTransportPreferredShipmentType
Indicates Shipment Logistics type that the customer preferred.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ShippingAddress
Shipping address of the customer.
To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table.
Parameter properties
Type: IShippingAddress
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageAccountAccessTierPreference
Preferences related to the Access Tier of storage accounts.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The Subscription Id
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
The list of key value pairs that describe the resource.
These tags can be used in viewing and grouping this resource (across resource groups).
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TransportPreferredShipmentType
Indicates Shipment Logistics type that the customer preferred.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UserAssignedIdentity
User Assigned Identities
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs