Update-AzDataBoxJob

Updates the properties of an existing job.

Syntax

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.Api20210301.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 sytem 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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContactDetail

Contact details for notification and shipping. To construct, see NOTES section for CONTACTDETAIL properties and create a hash table.

Type:IContactDetails
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContactDetailContactName

Contact name of the person.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContactDetailMobile

Mobile number of the contact person.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContactDetailPhone

Phone number of the contact person.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContactDetailPhoneExtension

Phone extension number of the contact person.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionPreferenceDoubleEncryption

Defines secondary layer of software-based encryption enablement.

Type:DoubleEncryption
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionPreferenceHardwareEncryption

Defines Hardware level encryption (Only for disk)

Type:HardwareEncryption
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IdentityType

Identity type

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KeyEncryptionKey

Key encryption key for the job. To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table.

Type:IKeyEncryptionKey
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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

Type:String
Aliases:JobName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PreferencePreferredDataCenterRegion

Preferred data center region.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The Resource Group Name

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ReturnToCustomerPackageDetailCarrierAccountNumber

Carrier Account Number of customer for customer disk.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReturnToCustomerPackageDetailCarrierName

Name of the carrier.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReturnToCustomerPackageDetailTrackingId

Tracking Id of shipment.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReverseShippingDetail

Shipping address where customer wishes to receive the device. To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table.

Type:IShippingAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReverseTransportPreferredShipmentType

Indicates Shipment Logistics type that the customer preferred.

Type:TransportShipmentTypes
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ShippingAddress

Shipping address of the customer. To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table.

Type:IShippingAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountAccessTierPreference

Preferences related to the Access Tier of storage accounts.

Type:StorageAccountAccessTier[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The Subscription Id

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters: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).

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TransportPreferredShipmentType

Indicates Shipment Logistics type that the customer preferred.

Type:TransportShipmentTypes
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserAssignedIdentity

User Assigned Identities

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IJobResource