From af64b4d6326b2081c8bc5c3758534c7e262159f2 Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Wed, 11 Jun 2025 16:01:38 +0800 Subject: [PATCH 1/8] Az.DataBox update generation tool version: autorest.powershell v3->v4 --- .../Properties/AssemblyInfo.cs | 6 +- src/DataBox/DataBox.Autorest/README.md | 79 +-- .../custom/Update-AzDataBoxJob.ps1 | 502 ++++++++++++++++++ .../New-AzDataBoxContactDetailsObject.ps1 | 11 +- ...AzDataBoxCustomerDiskJobDetailsObject.ps1} | 58 +- .../New-AzDataBoxDiskJobDetailsObject.ps1 | 34 +- .../New-AzDataBoxHeavyJobDetailsObject.ps1 | 32 +- .../New-AzDataBoxJobDetailsObject.ps1 | 32 +- .../New-AzDataBoxKeyEncryptionKeyObject.ps1 | 15 +- .../New-AzDataBoxManagedDiskDetailsObject.ps1 | 16 +- .../New-AzDataBoxShippingAddressObject.ps1 | 13 +- ...w-AzDataBoxStorageAccountDetailsObject.ps1 | 16 +- ...w-AzDataBoxTransferConfigurationObject.ps1 | 17 +- .../DataBox.Autorest/docs/Az.DataBox.md | 8 +- .../DataBox.Autorest/docs/Get-AzDataBoxJob.md | 2 +- .../docs/Get-AzDataBoxJobCredential.md | 2 +- .../docs/New-AzDataBoxContactDetailsObject.md | 16 +- ...w-AzDataBoxCustomerDiskJobDetailsObject.md | 146 +++-- .../docs/New-AzDataBoxDiskJobDetailsObject.md | 111 ++-- .../New-AzDataBoxHeavyJobDetailsObject.md | 99 ++-- .../DataBox.Autorest/docs/New-AzDataBoxJob.md | 149 ++++-- .../docs/New-AzDataBoxJobDetailsObject.md | 97 ++-- .../New-AzDataBoxKeyEncryptionKeyObject.md | 23 +- .../New-AzDataBoxManagedDiskDetailsObject.md | 31 +- .../New-AzDataBoxShippingAddressObject.md | 23 +- ...ew-AzDataBoxStorageAccountDetailsObject.md | 25 +- ...ew-AzDataBoxTransferConfigurationObject.md | 27 +- .../docs/Stop-AzDataBoxJob.md | 45 +- .../docs/Update-AzDataBoxJob.md | 184 +++++-- .../New-AzDataBoxContactDetailsObject.md | 12 +- ...w-AzDataBoxCustomerDiskJobDetailsObject.md | 70 ++- .../New-AzDataBoxDiskJobDetailsObject.md | 62 ++- .../New-AzDataBoxHeavyJobDetailsObject.md | 53 +- .../examples/New-AzDataBoxJob.md | 42 +- .../examples/New-AzDataBoxJobDetailsObject.md | 51 +- .../New-AzDataBoxKeyEncryptionKeyObject.md | 16 +- .../New-AzDataBoxManagedDiskDetailsObject.md | 11 +- .../New-AzDataBoxShippingAddressObject.md | 18 +- ...ew-AzDataBoxStorageAccountDetailsObject.md | 5 +- ...ew-AzDataBoxTransferConfigurationObject.md | 14 +- .../examples/Update-AzDataBoxJob.md | 4 +- .../DataBox.Autorest/generate-info.json | 2 +- ...aBoxCustomerDiskJobDetailsObject.Tests.ps1 | 10 +- ...ew-AzDataBoxDiskJobDetailsObject.Tests.ps1 | 4 +- ...w-AzDataBoxHeavyJobDetailsObject.Tests.ps1 | 4 +- .../test/New-AzDataBoxJob.Tests.ps1 | 30 +- .../New-AzDataBoxJobDetailsObject.Tests.ps1 | 4 +- ...zDataBoxManagedDiskDetailsObject.Tests.ps1 | 2 +- ...taBoxStorageAccountDetailsObject.Tests.ps1 | 2 +- ...ests.ps1 => Remove-AzDataBoxJob.Tests.ps1} | 0 .../test/Update-AzDataBoxJob.Tests.ps1 | 10 +- src/DataBox/DataBox.sln | 89 +++- src/DataBox/DataBox/Az.DataBox.psd1 | 12 +- src/DataBox/DataBox/ChangeLog.md | 1 + src/DataBox/DataBox/help/Az.DataBox.md | 6 +- src/DataBox/DataBox/help/Get-AzDataBoxJob.md | 2 +- .../help/Get-AzDataBoxJobCredential.md | 2 +- .../help/New-AzDataBoxContactDetailsObject.md | 16 +- ...w-AzDataBoxCustomerDiskJobDetailsObject.md | 150 ++++-- .../help/New-AzDataBoxDiskJobDetailsObject.md | 109 ++-- .../New-AzDataBoxHeavyJobDetailsObject.md | 97 ++-- src/DataBox/DataBox/help/New-AzDataBoxJob.md | 148 ++++-- .../help/New-AzDataBoxJobDetailsObject.md | 95 ++-- .../New-AzDataBoxKeyEncryptionKeyObject.md | 23 +- .../New-AzDataBoxManagedDiskDetailsObject.md | 30 +- .../New-AzDataBoxShippingAddressObject.md | 23 +- ...ew-AzDataBoxStorageAccountDetailsObject.md | 25 +- ...ew-AzDataBoxTransferConfigurationObject.md | 27 +- src/DataBox/DataBox/help/Stop-AzDataBoxJob.md | 47 +- .../DataBox/help/Update-AzDataBoxJob.md | 185 +++++-- 70 files changed, 2333 insertions(+), 999 deletions(-) create mode 100644 src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 rename src/DataBox/DataBox.Autorest/custom/{AzDataBoxCustomerDiskJobDetailsObject.ps1 => autogen-model-cmdlets/New-AzDataBoxCustomerDiskJobDetailsObject.ps1} (67%) rename src/DataBox/DataBox.Autorest/test/{T_Remove-AzDataBoxJob.Tests.ps1 => Remove-AzDataBoxJob.Tests.ps1} (100%) diff --git a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs index 9ea19e33de47..70fdfa028751 100644 --- a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs +++ b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs @@ -20,8 +20,10 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DataBox")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("0.3.3")] -[assembly: System.Reflection.AssemblyVersionAttribute("0.3.3")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.5.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.5.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] + + diff --git a/src/DataBox/DataBox.Autorest/README.md b/src/DataBox/DataBox.Autorest/README.md index 948579f12a6a..3b7aa8974e38 100644 --- a/src/DataBox/DataBox.Autorest/README.md +++ b/src/DataBox/DataBox.Autorest/README.md @@ -44,20 +44,18 @@ title: DataBox subject-prefix: $(service-name) inlining-threshold: 50 -# If there are post APIs for some kinds of actions in the RP, you may need to -# uncomment following line to support viaIdentity for these post APIs -# identity-correction-for-post: true - -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" +disable-transform-identity-type-for-operation: + - Jobs_Update directive: # Following is two common directive which are normally required in all the RPs # 1. Remove the unexpanded parameter set # 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well - where: - variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^UpdateViaIdentityExpanded$|^GetViaIdentity$|^Validate.*$ |^Cancel$|^CancelViaIdentity.*$|^DeleteViaIdentity$ + variant: ^(Create)(?!.*?(Expanded|JsonFilePath|JsonString)) + remove: true + - where: + variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^GetViaIdentity$|^Validate.*$ |^Cancel$|^CancelViaIdentity.*$|^DeleteViaIdentity$ remove: true # Remove the set-* cmdlet - where: @@ -99,17 +97,17 @@ directive: set: subject: JobCredential - - where: - verb: New - parameter-name: IdentityUserAssignedIdentity - set: - parameter-name: UserAssignedIdentity + # - where: + # verb: New + # parameter-name: IdentityUserAssignedIdentity + # set: + # parameter-name: UserAssignedIdentity - - where: - verb: Update - parameter-name: IdentityUserAssignedIdentity - set: - parameter-name: UserAssignedIdentity + # - where: + # verb: Update + # parameter-name: IdentityUserAssignedIdentity + # set: + # parameter-name: UserAssignedIdentity - where: parameter-name: PreferenceStorageAccountAccessTierPreference @@ -146,27 +144,40 @@ directive: - DeliveryType - Detail - - from: source-file-csharp - where: $ - transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobSecrets', 'public Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobSecrets'); + # - from: source-file-csharp + # where: $ + # transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobSecrets', 'public Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobSecrets'); - model-cmdlet: - - DataBoxDiskJobDetails - - DataBoxHeavyJobDetails - - DataBoxJobDetails - - StorageAccountDetails - - ManagedDiskDetails - - KeyEncryptionKey - - ShippingAddress - - ContactDetails - - TransferConfiguration -``` -``` yaml -directive: - no-inline: # the name of the model schema in the swagger file + - model-name: DataBoxDiskJobDetails + cmdlet-name: New-AzDataBoxDiskJobDetailsObject + - model-name: DataBoxHeavyJobDetails + cmdlet-name: New-AzDataBoxHeavyJobDetailsObject + - model-name: DataBoxJobDetails + cmdlet-name: New-AzDataBoxJobDetailsObject + - model-name: StorageAccountDetails + cmdlet-name: New-AzDataBoxStorageAccountDetailsObject + - model-name: ManagedDiskDetails + cmdlet-name: New-AzDataBoxManagedDiskDetailsObject + - model-name: KeyEncryptionKey + cmdlet-name: New-AzDataBoxKeyEncryptionKeyObject + - model-name: ShippingAddress + cmdlet-name: New-AzDataBoxShippingAddressObject + - model-name: ContactDetails + cmdlet-name: New-AzDataBoxContactDetailsObject + - model-name: TransferConfiguration + cmdlet-name: New-AzDataBoxTransferConfigurationObject + - model-name: DataBoxCustomerDiskJobDetails + cmdlet-name: New-AzDataBoxCustomerDiskJobDetailsObject + + - no-inline: # the name of the model schema in the swagger file - KeyEncryptionKey - JobDetails - ShippingAddress - ContactDetails - TransferConfiguration + + - where: + verb: Update + hide: true ``` diff --git a/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 b/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 new file mode 100644 index 000000000000..46a0c85058a3 --- /dev/null +++ b/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 @@ -0,0 +1,502 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update the properties of an existing job. +.Description +Update the properties of an existing job. +.Example +$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 +.Example +$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 +.Example +$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" = @{}} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResourceUpdateParameter +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CONTACTDETAIL : Contact details for notification and shipping. + ContactName : Contact name of the person. + EmailList >: List of Email-ids to be notified about job progress. + Phone : Phone number of the contact person. + [Mobile ]: Mobile number of the contact person. + [NotificationPreference >]: Notification preference for a job stage. + SendNotification : Notification is required or not. + StageName : Name of the stage. + [PhoneExtension ]: Phone extension number of the contact person. + +INPUTOBJECT : Identity Parameter + [Id ]: Resource identity path + [JobName ]: 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 + [Location ]: The location of the resource + [ResourceGroupName ]: The Resource Group Name + [SubscriptionId ]: The Subscription Id + +JOBRESOURCEUPDATEPARAMETER : The JobResourceUpdateParameter. + [ContactDetailContactName ]: Contact name of the person. + [ContactDetailMobile ]: Mobile number of the contact person. + [ContactDetailPhone ]: Phone number of the contact person. + [ContactDetailPhoneExtension ]: Phone extension number of the contact person. + [DetailContactDetail ]: Contact details for notification and shipping. + ContactName : Contact name of the person. + EmailList >: List of Email-ids to be notified about job progress. + Phone : Phone number of the contact person. + [Mobile ]: Mobile number of the contact person. + [NotificationPreference >]: Notification preference for a job stage. + SendNotification : Notification is required or not. + StageName : Name of the stage. + [PhoneExtension ]: Phone extension number of the contact person. + [DetailKeyEncryptionKey ]: Key encryption key for the job. + KekType : Type of encryption key used for key encryption. + [IdentityProperty ]: Managed identity properties used for key encryption. + [Type ]: Managed service identity type. + [UserAssignedResourceId ]: Arm resource id for user assigned identity to be used to fetch MSI token. + [KekUrl ]: Key encryption key. It is required in case of Customer managed KekType. + [KekVaultResourceId ]: Kek vault resource id. It is required in case of Customer managed KekType. + [DetailShippingAddress ]: Shipping address of the customer. + Country : Name of the Country. + StreetAddress1 : Street Address line 1. + [AddressType ]: Type of address. + [City ]: Name of the City. + [CompanyName ]: Name of the company. + [PostalCode ]: Postal code. + [SkipAddressValidation ]: Flag to indicate if customer has chosen to skip default address validation + [StateOrProvince ]: Name of the State or Province. + [StreetAddress2 ]: Street Address line 2. + [StreetAddress3 ]: Street Address line 3. + [TaxIdentificationNumber ]: Tax Identification Number + [ZipExtendedCode ]: Extended Zip Code. + [EncryptionPreferenceDoubleEncryption ]: Defines secondary layer of software-based encryption enablement. + [EncryptionPreferenceHardwareEncryption ]: Defines Hardware level encryption (Only for disk) + [IdentityType ]: Identity type + [IdentityUserAssignedIdentity ]: User Assigned Identities + [(Any) ]: This indicates any property can be added to this object. + [PreferencePreferredDataCenterRegion >]: Preferred data center region. + [PreferenceStorageAccountAccessTierPreference >]: Preferences related to the Access Tier of storage accounts. + [ReturnToCustomerPackageDetailCarrierAccountNumber ]: Carrier Account Number of customer for customer disk. + [ReturnToCustomerPackageDetailCarrierName ]: Name of the carrier. + [ReturnToCustomerPackageDetailTrackingId ]: Tracking Id of shipment. + [ReverseShippingDetailShippingAddress ]: Shipping address where customer wishes to receive the device. + [ReverseTransportPreferencePreferredShipmentType ]: Indicates Shipment Logistics type that the customer preferred. + [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). + [(Any) ]: This indicates any property can be added to this object. + [TransportPreferencePreferredShipmentType ]: Indicates Shipment Logistics type that the customer preferred. + +KEYENCRYPTIONKEY : Key encryption key for the job. + KekType : Type of encryption key used for key encryption. + [IdentityProperty ]: Managed identity properties used for key encryption. + [Type ]: Managed service identity type. + [UserAssignedResourceId ]: Arm resource id for user assigned identity to be used to fetch MSI token. + [KekUrl ]: Key encryption key. It is required in case of Customer managed KekType. + [KekVaultResourceId ]: Kek vault resource id. It is required in case of Customer managed KekType. + +REVERSESHIPPINGDETAIL : Shipping address where customer wishes to receive the device. + Country : Name of the Country. + StreetAddress1 : Street Address line 1. + [AddressType ]: Type of address. + [City ]: Name of the City. + [CompanyName ]: Name of the company. + [PostalCode ]: Postal code. + [SkipAddressValidation ]: Flag to indicate if customer has chosen to skip default address validation + [StateOrProvince ]: Name of the State or Province. + [StreetAddress2 ]: Street Address line 2. + [StreetAddress3 ]: Street Address line 3. + [TaxIdentificationNumber ]: Tax Identification Number + [ZipExtendedCode ]: Extended Zip Code. + +SHIPPINGADDRESS : Shipping address of the customer. + Country : Name of the Country. + StreetAddress1 : Street Address line 1. + [AddressType ]: Type of address. + [City ]: Name of the City. + [CompanyName ]: Name of the company. + [PostalCode ]: Postal code. + [SkipAddressValidation ]: Flag to indicate if customer has chosen to skip default address validation + [StateOrProvince ]: Name of the State or Province. + [StreetAddress2 ]: Street Address line 2. + [StreetAddress3 ]: Street Address line 3. + [TaxIdentificationNumber ]: Tax Identification Number + [ZipExtendedCode ]: Extended Zip Code. +.Link +https://learn.microsoft.com/powershell/module/az.databox/update-azdataboxjob +#> +function Update-AzDataBoxJob { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('JobName')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Path')] + [System.String] + # 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 + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Path')] + [System.String] + # The Resource Group Name + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The Subscription Id + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Header')] + [System.String] + # Defines the If-Match condition. + # The patch will be performed only if the ETag of the job on the server matches this value. + ${IfMatch}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails] + # Contact details for notification and shipping. + ${ContactDetail}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Contact name of the person. + ${ContactDetailContactName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Mobile number of the contact person. + ${ContactDetailMobile}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Phone number of the contact person. + ${ContactDetailPhone}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Phone extension number of the contact person. + ${ContactDetailPhoneExtension}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Defines secondary layer of software-based encryption enablement. + ${EncryptionPreferenceDoubleEncryption}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Defines Hardware level encryption (Only for disk) + ${EncryptionPreferenceHardwareEncryption}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.Nullable[System.Boolean]] + # Decides if enable a system assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey] + # Key encryption key for the job. + ${KeyEncryptionKey}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String[]] + # Preferred data center region. + ${PreferencePreferredDataCenterRegion}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Carrier Account Number of customer for customer disk. + ${ReturnToCustomerPackageDetailCarrierAccountNumber}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Name of the carrier. + ${ReturnToCustomerPackageDetailCarrierName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Tracking Id of shipment. + ${ReturnToCustomerPackageDetailTrackingId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress] + # Shipping address where customer wishes to receive the device. + ${ReverseShippingDetail}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("CustomerManaged", "MicrosoftManaged")] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Indicates Shipment Logistics type that the customer preferred. + ${ReverseTransportPreferredShipmentType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress] + # Shipping address of the customer. + ${ShippingAddress}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("Archive")] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String[]] + # Preferences related to the Access Tier of storage accounts. + ${StorageAccountAccessTierPreference}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResourceUpdateParameterTags]))] + [System.Collections.Hashtable] + # The list of key value pairs that describe the resource. + # These tags can be used in viewing and grouping this resource (across resource groups). + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("CustomerManaged", "MicrosoftManaged")] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Indicates Shipment Logistics type that the customer preferred. + ${TransportPreferredShipmentType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + + process { + if ($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity') -or $PSBoundParameters.ContainsKey('UserAssignedIdentity') ) { + # Get dataBox DataObj + $parameterSet = $PSCmdlet.ParameterSetName + if (('UpdateExpanded') -contains $parameterSet) { + $dataBox = Az.DataBox\Get-AzDataBoxJob -Name $Name -ResourceGroupName $ResourceGroupName + } + elseif (('UpdateViaIdentityExpanded') -contains $parameterSet) { + $dataBox = Az.DataBox\Get-AzDataBoxJob -InputObject $InputObject + } + if ($null -eq $dataBox) { + throw "$Name doesn't exist" + } + + # If user input UserAssignedIdentity + if ($PSBoundParameters.ContainsKey('UserAssignedIdentity')) { + $userIdentityObject = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.UserAssignedIdentity]::New() + $PSBoundParameters.IdentityUserAssignedIdentity = @{} + foreach ($item in $PSBoundParameters.UserAssignedIdentity) { + $PSBoundParameters.IdentityUserAssignedIdentity.Add($item, $userIdentityObject ) + } + + if ($dataBox.IdentityUserAssignedIdentity.Count -gt 0) { + $dataBox.IdentityUserAssignedIdentity.Keys | ForEach-Object { + if (-NOT($_ -in $UserAssignedIdentity)) { + $PSBoundParameters.IdentityUserAssignedIdentity.Add($_, $null) + } + } + } + } + + # calculate IdentityType + $supportsSystemAssignedIdentity = $EnableSystemAssignedIdentity -or (($null -eq $EnableSystemAssignedIdentity) -and ($dataBox.IdentityType.Contains('SystemAssigned'))) + $supportsUserAssignedIdentity = ($PSBoundParameters.ContainsKey('UserAssignedIdentity') -and $UserAssignedIdentity.Length -gt 0) -or ((-not $PSBoundParameters.ContainsKey('UserAssignedIdentity')) -and ($dataBox.IdentityType.Contains('UserAssigned'))); + if (($supportsSystemAssignedIdentity -and $supportsUserAssignedIdentity)) { + $PSBoundParameters.Add("IdentityType", "SystemAssigned,UserAssigned") + } + elseif ($supportsUserAssignedIdentity -and (-not $supportsSystemAssignedIdentity)) { + $PSBoundParameters.Add("IdentityType", "UserAssigned") + } + elseif ((-not $supportsUserAssignedIdentity) -and $supportsSystemAssignedIdentity) { + $PSBoundParameters.Add("IdentityType", "SystemAssigned") + } + else { + $PSBoundParameters.Add("IdentityType", "None") + } + + # remove EnableSystemAssignedIdentity + if ($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity')) { + $null = $PSBoundParameters.Remove("EnableSystemAssignedIdentity") + } + # remove UserAssignedIdentity + if ($PSBoundParameters.ContainsKey('UserAssignedIdentity')) { + $null = $PSBoundParameters.Remove('UserAssignedIdentity') + } + } + Az.DataBox.internal\Update-AzDataBoxJob @PSBoundParameters + } +} \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxContactDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxContactDetailsObject.ps1 index 25812c021aab..fd6f256ba01d 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxContactDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxContactDetailsObject.ps1 @@ -21,12 +21,13 @@ Create an in-memory object for ContactDetails. Create an in-memory object for ContactDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ContactDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxContactDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxcontactdetailsobject #> function New-AzDataBoxContactDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ContactDetails')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -40,7 +41,7 @@ function New-AzDataBoxContactDetailsObject { [string] $Mobile, [Parameter(HelpMessage="Notification preference for a job stage.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.INotificationPreference[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.INotificationPreference[]] $NotificationPreference, [Parameter(Mandatory, HelpMessage="Phone number of the contact person.")] [string] @@ -51,7 +52,7 @@ function New-AzDataBoxContactDetailsObject { ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ContactDetails]::New() if ($PSBoundParameters.ContainsKey('ContactName')) { $Object.ContactName = $ContactName diff --git a/src/DataBox/DataBox.Autorest/custom/AzDataBoxCustomerDiskJobDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxCustomerDiskJobDetailsObject.ps1 similarity index 67% rename from src/DataBox/DataBox.Autorest/custom/AzDataBoxCustomerDiskJobDetailsObject.ps1 rename to src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxCustomerDiskJobDetailsObject.ps1 index 6c85bc8b40a1..c7e8f82336dc 100644 --- a/src/DataBox/DataBox.Autorest/custom/AzDataBoxCustomerDiskJobDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxCustomerDiskJobDetailsObject.ps1 @@ -21,66 +21,75 @@ Create an in-memory object for DataBoxCustomerDiskJobDetails. Create an in-memory object for DataBoxCustomerDiskJobDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxCustomerDiskJobDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxCustomerDiskJobDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxCustomerDiskJobDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxcustomerdiskjobdetailsobject #> function New-AzDataBoxCustomerDiskJobDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxCustomerDiskJobDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxCustomerDiskJobDetails')] [CmdletBinding(PositionalBinding=$false)] Param( + [Parameter(HelpMessage="Flag to indicate if disk manifest should be backed-up in the Storage Account.")] + [bool] + $EnableManifestBackup, [Parameter(HelpMessage="Contains the map of disk serial number to the disk details for import jobs.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxCustomerDiskJobDetailsImportDiskDetailsCollection] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxCustomerDiskJobDetailsImportDiskDetailsCollection] $ImportDiskDetailsCollection, - [Parameter(HelpMessage="Contains the map of disk serial number to the disk details for export jobs.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxCustomerDiskJobDetailsExportDiskDetailsCollection] - $ExportDiskDetailsCollection, [Parameter(HelpMessage="Carrier Account Number of customer for customer disk.")] [string] $ReturnToCustomerPackageDetailCarrierAccountNumber, + [Parameter(HelpMessage="Name of the carrier.")] + [string] + $ReturnToCustomerPackageDetailCarrierName, + [Parameter(HelpMessage="Tracking Id of shipment.")] + [string] + $ReturnToCustomerPackageDetailTrackingId, [Parameter(Mandatory, HelpMessage="Contact details for notification and shipping.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails] $ContactDetail, [Parameter(HelpMessage="Details of the data to be exported from azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[]] $DataExportDetail, [Parameter(HelpMessage="Details of the data to be imported into azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[]] $DataImportDetail, [Parameter(HelpMessage="The expected size of the data, which needs to be transferred in this job, in terabytes.")] [int] $ExpectedDataSizeInTeraByte, [Parameter(HelpMessage="Details about which key encryption type is being used.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey] $KeyEncryptionKey, [Parameter(HelpMessage="Preferences for the order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences] $Preference, [Parameter(HelpMessage="Optional Reverse Shipping details for order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails] $ReverseShippingDetail, [Parameter(HelpMessage="Shipping address of the customer.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress] - $ShippingAddress, - [Parameter(Mandatory, HelpMessage="Indicates the type of job details.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator] - $Type + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress] + $ShippingAddress ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxCustomerDiskJobDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxCustomerDiskJobDetails]::New() + if ($PSBoundParameters.ContainsKey('EnableManifestBackup')) { + $Object.EnableManifestBackup = $EnableManifestBackup + } if ($PSBoundParameters.ContainsKey('ImportDiskDetailsCollection')) { $Object.ImportDiskDetailsCollection = $ImportDiskDetailsCollection } - if ($PSBoundParameters.ContainsKey('ExportDiskDetailsCollection')) { - $Object.ExportDiskDetailsCollection = $ExportDiskDetailsCollection - } if ($PSBoundParameters.ContainsKey('ReturnToCustomerPackageDetailCarrierAccountNumber')) { $Object.ReturnToCustomerPackageDetailCarrierAccountNumber = $ReturnToCustomerPackageDetailCarrierAccountNumber } + if ($PSBoundParameters.ContainsKey('ReturnToCustomerPackageDetailCarrierName')) { + $Object.ReturnToCustomerPackageDetailCarrierName = $ReturnToCustomerPackageDetailCarrierName + } + if ($PSBoundParameters.ContainsKey('ReturnToCustomerPackageDetailTrackingId')) { + $Object.ReturnToCustomerPackageDetailTrackingId = $ReturnToCustomerPackageDetailTrackingId + } if ($PSBoundParameters.ContainsKey('ContactDetail')) { $Object.ContactDetail = $ContactDetail } @@ -105,9 +114,6 @@ function New-AzDataBoxCustomerDiskJobDetailsObject { if ($PSBoundParameters.ContainsKey('ShippingAddress')) { $Object.ShippingAddress = $ShippingAddress } - if ($PSBoundParameters.ContainsKey('Type')) { - $Object.Type = $Type - } return $Object } } diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxDiskJobDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxDiskJobDetailsObject.ps1 index b49206fa6855..074283112933 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxDiskJobDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxDiskJobDetailsObject.ps1 @@ -21,12 +21,13 @@ Create an in-memory object for DataBoxDiskJobDetails. Create an in-memory object for DataBoxDiskJobDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxDiskJobDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxDiskJobDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxdiskjobdetailsobject #> function New-AzDataBoxDiskJobDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxDiskJobDetails')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -34,40 +35,36 @@ function New-AzDataBoxDiskJobDetailsObject { [string] $Passkey, [Parameter(HelpMessage="User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxDiskJobDetailsPreferredDisks] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxDiskJobDetailsPreferredDisks] $PreferredDisk, [Parameter(Mandatory, HelpMessage="Contact details for notification and shipping.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails] $ContactDetail, [Parameter(HelpMessage="Details of the data to be exported from azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[]] $DataExportDetail, [Parameter(HelpMessage="Details of the data to be imported into azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[]] $DataImportDetail, [Parameter(HelpMessage="The expected size of the data, which needs to be transferred in this job, in terabytes.")] [int] $ExpectedDataSizeInTeraByte, [Parameter(HelpMessage="Details about which key encryption type is being used.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey] $KeyEncryptionKey, [Parameter(HelpMessage="Preferences for the order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences] $Preference, [Parameter(HelpMessage="Optional Reverse Shipping details for order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails] $ReverseShippingDetail, [Parameter(HelpMessage="Shipping address of the customer.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress] - $ShippingAddress, - [Parameter(Mandatory, HelpMessage="Indicates the type of job details.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator] - $Type + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress] + $ShippingAddress ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxDiskJobDetails]::New() if ($PSBoundParameters.ContainsKey('Passkey')) { $Object.Passkey = $Passkey @@ -99,9 +96,6 @@ function New-AzDataBoxDiskJobDetailsObject { if ($PSBoundParameters.ContainsKey('ShippingAddress')) { $Object.ShippingAddress = $ShippingAddress } - if ($PSBoundParameters.ContainsKey('Type')) { - $Object.Type = $Type - } return $Object } } diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxHeavyJobDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxHeavyJobDetailsObject.ps1 index f64fabb5c194..d55eab629ff5 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxHeavyJobDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxHeavyJobDetailsObject.ps1 @@ -21,12 +21,13 @@ Create an in-memory object for DataBoxHeavyJobDetails. Create an in-memory object for DataBoxHeavyJobDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxHeavyJobDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxHeavyJobDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxHeavyJobDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxheavyjobdetailsobject #> function New-AzDataBoxHeavyJobDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxHeavyJobDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxHeavyJobDetails')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -34,37 +35,33 @@ function New-AzDataBoxHeavyJobDetailsObject { [string] $DevicePassword, [Parameter(Mandatory, HelpMessage="Contact details for notification and shipping.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails] $ContactDetail, [Parameter(HelpMessage="Details of the data to be exported from azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[]] $DataExportDetail, [Parameter(HelpMessage="Details of the data to be imported into azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[]] $DataImportDetail, [Parameter(HelpMessage="The expected size of the data, which needs to be transferred in this job, in terabytes.")] [int] $ExpectedDataSizeInTeraByte, [Parameter(HelpMessage="Details about which key encryption type is being used.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey] $KeyEncryptionKey, [Parameter(HelpMessage="Preferences for the order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences] $Preference, [Parameter(HelpMessage="Optional Reverse Shipping details for order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails] $ReverseShippingDetail, [Parameter(HelpMessage="Shipping address of the customer.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress] - $ShippingAddress, - [Parameter(Mandatory, HelpMessage="Indicates the type of job details.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator] - $Type + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress] + $ShippingAddress ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxHeavyJobDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxHeavyJobDetails]::New() if ($PSBoundParameters.ContainsKey('DevicePassword')) { $Object.DevicePassword = $DevicePassword @@ -93,9 +90,6 @@ function New-AzDataBoxHeavyJobDetailsObject { if ($PSBoundParameters.ContainsKey('ShippingAddress')) { $Object.ShippingAddress = $ShippingAddress } - if ($PSBoundParameters.ContainsKey('Type')) { - $Object.Type = $Type - } return $Object } } diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxJobDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxJobDetailsObject.ps1 index c5d48e6fe4d7..ed9b02184256 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxJobDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxJobDetailsObject.ps1 @@ -21,12 +21,13 @@ Create an in-memory object for DataBoxJobDetails. Create an in-memory object for DataBoxJobDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxJobDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxJobDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxJobDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxjobdetailsobject #> function New-AzDataBoxJobDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxJobDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxJobDetails')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -34,37 +35,33 @@ function New-AzDataBoxJobDetailsObject { [string] $DevicePassword, [Parameter(Mandatory, HelpMessage="Contact details for notification and shipping.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails] $ContactDetail, [Parameter(HelpMessage="Details of the data to be exported from azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[]] $DataExportDetail, [Parameter(HelpMessage="Details of the data to be imported into azure.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[]] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[]] $DataImportDetail, [Parameter(HelpMessage="The expected size of the data, which needs to be transferred in this job, in terabytes.")] [int] $ExpectedDataSizeInTeraByte, [Parameter(HelpMessage="Details about which key encryption type is being used.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey] $KeyEncryptionKey, [Parameter(HelpMessage="Preferences for the order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences] $Preference, [Parameter(HelpMessage="Optional Reverse Shipping details for order.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails] $ReverseShippingDetail, [Parameter(HelpMessage="Shipping address of the customer.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress] - $ShippingAddress, - [Parameter(Mandatory, HelpMessage="Indicates the type of job details.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator] - $Type + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress] + $ShippingAddress ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxJobDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxJobDetails]::New() if ($PSBoundParameters.ContainsKey('DevicePassword')) { $Object.DevicePassword = $DevicePassword @@ -93,9 +90,6 @@ function New-AzDataBoxJobDetailsObject { if ($PSBoundParameters.ContainsKey('ShippingAddress')) { $Object.ShippingAddress = $ShippingAddress } - if ($PSBoundParameters.ContainsKey('Type')) { - $Object.Type = $Type - } return $Object } } diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxKeyEncryptionKeyObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxKeyEncryptionKeyObject.ps1 index 24478e08fa32..c2eb13c9e671 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxKeyEncryptionKeyObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxKeyEncryptionKeyObject.ps1 @@ -21,21 +21,22 @@ Create an in-memory object for KeyEncryptionKey. Create an in-memory object for KeyEncryptionKey. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.KeyEncryptionKey .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxKeyEncryptionKeyObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxkeyencryptionkeyobject #> function New-AzDataBoxKeyEncryptionKeyObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.KeyEncryptionKey')] [CmdletBinding(PositionalBinding=$false)] Param( [Parameter(HelpMessage="Managed identity properties used for key encryption.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IIdentityProperties] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IIdentityProperties] $IdentityProperty, [Parameter(Mandatory, HelpMessage="Type of encryption key used for key encryption.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.KekType])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.KekType] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("MicrosoftManaged", "CustomerManaged")] + [string] $KekType, [Parameter(HelpMessage="Key encryption key. It is required in case of Customer managed KekType.")] [string] @@ -46,7 +47,7 @@ function New-AzDataBoxKeyEncryptionKeyObject { ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.KeyEncryptionKey]::New() if ($PSBoundParameters.ContainsKey('IdentityProperty')) { $Object.IdentityProperty = $IdentityProperty diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxManagedDiskDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxManagedDiskDetailsObject.ps1 index 78c68683e5c7..4b78ee5ccbd4 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxManagedDiskDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxManagedDiskDetailsObject.ps1 @@ -21,12 +21,13 @@ Create an in-memory object for ManagedDiskDetails. Create an in-memory object for ManagedDiskDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ManagedDiskDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ManagedDiskDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxManagedDiskDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxmanageddiskdetailsobject #> function New-AzDataBoxManagedDiskDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ManagedDiskDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ManagedDiskDetails')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -36,17 +37,13 @@ function New-AzDataBoxManagedDiskDetailsObject { [Parameter(Mandatory, HelpMessage="Resource Id of the storage account that can be used to copy the vhd for staging.")] [string] $StagingStorageAccountId, - [Parameter(Mandatory, HelpMessage="Account Type of the data to be transferred.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType] - $DataAccountType, [Parameter(HelpMessage="Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+.")] [string] $SharePassword ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ManagedDiskDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ManagedDiskDetails]::New() if ($PSBoundParameters.ContainsKey('ResourceGroupId')) { $Object.ResourceGroupId = $ResourceGroupId @@ -54,9 +51,6 @@ function New-AzDataBoxManagedDiskDetailsObject { if ($PSBoundParameters.ContainsKey('StagingStorageAccountId')) { $Object.StagingStorageAccountId = $StagingStorageAccountId } - if ($PSBoundParameters.ContainsKey('DataAccountType')) { - $Object.DataAccountType = $DataAccountType - } if ($PSBoundParameters.ContainsKey('SharePassword')) { $Object.SharePassword = $SharePassword } diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxShippingAddressObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxShippingAddressObject.ps1 index a70b23e10f96..113df90e82aa 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxShippingAddressObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxShippingAddressObject.ps1 @@ -21,18 +21,19 @@ Create an in-memory object for ShippingAddress. Create an in-memory object for ShippingAddress. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ShippingAddress .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxShippingAddressObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxshippingaddressobject #> function New-AzDataBoxShippingAddressObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ShippingAddress')] [CmdletBinding(PositionalBinding=$false)] Param( [Parameter(HelpMessage="Type of address.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.AddressType])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.AddressType] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("None", "Residential", "Commercial")] + [string] $AddressType, [Parameter(HelpMessage="Name of the City.")] [string] @@ -70,7 +71,7 @@ function New-AzDataBoxShippingAddressObject { ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ShippingAddress]::New() if ($PSBoundParameters.ContainsKey('AddressType')) { $Object.AddressType = $AddressType diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxStorageAccountDetailsObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxStorageAccountDetailsObject.ps1 index 9a2949643ee7..32e1a6b835fb 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxStorageAccountDetailsObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxStorageAccountDetailsObject.ps1 @@ -21,36 +21,30 @@ Create an in-memory object for StorageAccountDetails. Create an in-memory object for StorageAccountDetails. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.StorageAccountDetails +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.StorageAccountDetails .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxStorageAccountDetailsObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxstorageaccountdetailsobject #> function New-AzDataBoxStorageAccountDetailsObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.StorageAccountDetails')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.StorageAccountDetails')] [CmdletBinding(PositionalBinding=$false)] Param( [Parameter(Mandatory, HelpMessage="Storage Account Resource Id.")] [string] $StorageAccountId, - [Parameter(Mandatory, HelpMessage="Account Type of the data to be transferred.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType] - $DataAccountType, [Parameter(HelpMessage="Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+.")] [string] $SharePassword ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.StorageAccountDetails]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.StorageAccountDetails]::New() if ($PSBoundParameters.ContainsKey('StorageAccountId')) { $Object.StorageAccountId = $StorageAccountId } - if ($PSBoundParameters.ContainsKey('DataAccountType')) { - $Object.DataAccountType = $DataAccountType - } if ($PSBoundParameters.ContainsKey('SharePassword')) { $Object.SharePassword = $SharePassword } diff --git a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxTransferConfigurationObject.ps1 b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxTransferConfigurationObject.ps1 index 5f0eb24a440e..39d9f082c1cc 100644 --- a/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxTransferConfigurationObject.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxTransferConfigurationObject.ps1 @@ -21,29 +21,30 @@ Create an in-memory object for TransferConfiguration. Create an in-memory object for TransferConfiguration. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.TransferConfiguration +Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.TransferConfiguration .Link -https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxTransferConfigurationObject +https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxtransferconfigurationobject #> function New-AzDataBoxTransferConfigurationObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.TransferConfiguration')] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.ModelCmdletAttribute()] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.TransferConfiguration')] [CmdletBinding(PositionalBinding=$false)] Param( [Parameter(HelpMessage="Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ITransferConfigurationTransferAllDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ITransferConfigurationTransferAllDetails] $TransferAllDetail, [Parameter(HelpMessage="Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter.")] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ITransferConfigurationTransferFilterDetails] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ITransferConfigurationTransferFilterDetails] $TransferFilterDetail, [Parameter(Mandatory, HelpMessage="Type of the configuration for transfer.")] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransferConfigurationType])] - [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransferConfigurationType] + [Microsoft.Azure.PowerShell.Cmdlets.DataBox.PSArgumentCompleterAttribute("TransferAll", "TransferUsingFilter")] + [string] $Type ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.TransferConfiguration]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.TransferConfiguration]::New() if ($PSBoundParameters.ContainsKey('TransferAllDetail')) { $Object.TransferAllDetail = $TransferAllDetail diff --git a/src/DataBox/DataBox.Autorest/docs/Az.DataBox.md b/src/DataBox/DataBox.Autorest/docs/Az.DataBox.md index 764d0faf7497..fd6fdd09b8e2 100644 --- a/src/DataBox/DataBox.Autorest/docs/Az.DataBox.md +++ b/src/DataBox/DataBox.Autorest/docs/Az.DataBox.md @@ -1,6 +1,6 @@ --- Module Name: Az.DataBox -Module Guid: 6d70be0a-2155-4537-a3e8-04b3521e9b22 +Module Guid: 5b8a4f9c-59e3-409f-b250-4ddf95975b46 Download Help Link: https://learn.microsoft.com/powershell/module/az.databox Help Version: 1.0.0.0 Locale: en-US @@ -30,8 +30,8 @@ Create an in-memory object for DataBoxDiskJobDetails. Create an in-memory object for DataBoxHeavyJobDetails. ### [New-AzDataBoxJob](New-AzDataBoxJob.md) -Creates a new job with the specified parameters. -Existing job cannot be updated with this API and should instead be updated with the Update job API. +Create a new job with the specified parameters. +Existing job cannot be updated with this API and should instead be updated with the create job API. ### [New-AzDataBoxJobDetailsObject](New-AzDataBoxJobDetailsObject.md) Create an in-memory object for DataBoxJobDetails. @@ -58,5 +58,5 @@ Deletes a job. CancelJob. ### [Update-AzDataBoxJob](Update-AzDataBoxJob.md) -Updates the properties of an existing job. +Update the properties of an existing job. diff --git a/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJob.md index 0f47d6451cd6..dd72bb3f36f1 100644 --- a/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJob.md @@ -178,7 +178,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobResource +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJobCredential.md b/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJobCredential.md index 6b5664645a05..db5520ab264f 100644 --- a/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJobCredential.md +++ b/src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJobCredential.md @@ -162,7 +162,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IUnencryptedCredentials +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IUnencryptedCredentials ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxContactDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxContactDetailsObject.md index 7e74c4080ab5..c8e28831b42d 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxContactDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxContactDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxContactDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxcontactdetailsobject schema: 2.0.0 --- @@ -29,9 +29,12 @@ New-AzDataBoxContactDetailsObject -ContactName "random" -EmailList @("emailId") ``` ```output -ContactName EmailList Mobile Phone PhoneExtension ------------ --------- ------ ----- -------------- -random {emailId} 1234567891 +ContactName : random +EmailList : {emailId} +Mobile : +NotificationPreference : +Phone : 1234567891 +PhoneExtension : ``` Create a in-memory object for ContactDetails @@ -85,10 +88,9 @@ Accept wildcard characters: False ### -NotificationPreference Notification preference for a job stage. -To construct, see NOTES section for NOTIFICATIONPREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.INotificationPreference[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.INotificationPreference[] Parameter Sets: (All) Aliases: @@ -136,7 +138,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ContactDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxCustomerDiskJobDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxCustomerDiskJobDetailsObject.md index 6cb6a99b4e56..d33da7f18bac 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxCustomerDiskJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxCustomerDiskJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxCustomerDiskJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxcustomerdiskjobdetailsobject schema: 2.0.0 --- @@ -13,13 +13,13 @@ Create an in-memory object for DataBoxCustomerDiskJobDetails. ## SYNTAX ``` -New-AzDataBoxCustomerDiskJobDetailsObject -ContactDetail -Type +New-AzDataBoxCustomerDiskJobDetailsObject -ContactDetail [-DataExportDetail ] [-DataImportDetail ] - [-ExpectedDataSizeInTeraByte ] - [-ExportDiskDetailsCollection ] + [-EnableManifestBackup ] [-ExpectedDataSizeInTeraByte ] [-ImportDiskDetailsCollection ] [-KeyEncryptionKey ] [-Preference ] [-ReturnToCustomerPackageDetailCarrierAccountNumber ] + [-ReturnToCustomerPackageDetailCarrierName ] [-ReturnToCustomerPackageDetailTrackingId ] [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` @@ -30,12 +30,76 @@ Create an in-memory object for DataBoxCustomerDiskJobDetails. ### Example 1: DataBoxCustomerDisk details in-memory object ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} -New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +``` + +```output +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "XXXX XXXX", + "phone": "0000000000", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount", + "storageAccountId": + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + } + }} +DatacenterAddress : { + } +DeliverToDcPackageDetailCarrierName : +DeliverToDcPackageDetailTrackingId : +DeliveryPackage : { + } +DeviceErasureDetail : { + } +EnableManifestBackup : +ExpectedDataSizeInTeraByte : +ExportDiskDetailsCollection : { + } +ImportDiskDetailsCollection : { + "XXXXXX": { + "manifestFile": "xyz.txt", + "manifestHash": "xxxx", + "bitLockerKey": "xxx" + } + } +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } +ReturnToCustomerPackageDetailCarrierAccountNumber : 00000 +ReturnToCustomerPackageDetailCarrierName : +ReturnToCustomerPackageDetailTrackingId : +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "XXXX XXXX", + "city": "XXXX XXXX", + "stateOrProvince": "XX", + "country": "XX", + "postalCode": "00000", + "addressType": "Commercial" + } +Type : DataBoxCustomerDisk ``` DataBoxCustomerDisk details in-memory object @@ -44,10 +108,9 @@ DataBoxCustomerDisk details in-memory object ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -60,10 +123,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -76,10 +138,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -90,11 +151,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ExpectedDataSizeInTeraByte -The expected size of the data, which needs to be transferred in this job, in terabytes. +### -EnableManifestBackup +Flag to indicate if disk manifest should be backed-up in the Storage Account. ```yaml -Type: System.Int32 +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -105,12 +166,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ExportDiskDetailsCollection -Contains the map of disk serial number to the disk details for export jobs. -To construct, see NOTES section for EXPORTDISKDETAILSCOLLECTION properties and create a hash table. +### -ExpectedDataSizeInTeraByte +The expected size of the data, which needs to be transferred in this job, in terabytes. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxCustomerDiskJobDetailsExportDiskDetailsCollection +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -123,10 +183,9 @@ Accept wildcard characters: False ### -ImportDiskDetailsCollection Contains the map of disk serial number to the disk details for import jobs. -To construct, see NOTES section for IMPORTDISKDETAILSCOLLECTION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxCustomerDiskJobDetailsImportDiskDetailsCollection +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxCustomerDiskJobDetailsImportDiskDetailsCollection Parameter Sets: (All) Aliases: @@ -139,10 +198,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -155,10 +213,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -184,12 +241,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ReverseShippingDetail -Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. +### -ReturnToCustomerPackageDetailCarrierName +Name of the carrier. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: System.String Parameter Sets: (All) Aliases: @@ -200,12 +256,26 @@ 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. +### -ReturnToCustomerPackageDetailTrackingId +Tracking Id of shipment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReverseShippingDetail +Optional Reverse Shipping details for order. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -216,15 +286,15 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. +### -ShippingAddress +Shipping address of the customer. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -238,7 +308,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxCustomerDiskJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxCustomerDiskJobDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxDiskJobDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxDiskJobDetailsObject.md index 59fcd3c3b046..25e5c71d446d 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxDiskJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxDiskJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxDiskJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxdiskjobdetailsobject schema: 2.0.0 --- @@ -13,11 +13,11 @@ Create an in-memory object for DataBoxDiskJobDetails. ## SYNTAX ``` -New-AzDataBoxDiskJobDetailsObject -ContactDetail -Type - [-DataExportDetail ] [-DataImportDetail ] - [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] [-Passkey ] - [-Preference ] [-PreferredDisk ] - [-ReverseShippingDetail ] [-ShippingAddress ] [] +New-AzDataBoxDiskJobDetailsObject -ContactDetail [-DataExportDetail ] + [-DataImportDetail ] [-ExpectedDataSizeInTeraByte ] + [-KeyEncryptionKey ] [-Passkey ] [-Preference ] + [-PreferredDisk ] [-ReverseShippingDetail ] + [-ShippingAddress ] [] ``` ## DESCRIPTION @@ -30,13 +30,63 @@ Create an in-memory object for DataBoxDiskJobDetails. $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" -New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 +New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 ``` ```output -Action ChainOfCustodySasKey ExpectedDataSizeInTeraByte ReverseShipmentLabelSasKey Type Passkey ------- -------------------- -------------------------- -------------------------- ---- ------- - 18 DataBoxDisk $password +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } +DisksAndSizeDetail : { + } +ExpectedDataSizeInTeraByte : 18 +GranularCopyLogDetail : +GranularCopyProgress : +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Passkey : +Preference : { + } +PreferredDisk : { + "4": 2, + "8": 8 + } +ReturnPackage : { + } +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } +Type : DataBoxDisk ``` DataBoxDisk details in-memory object @@ -45,10 +95,9 @@ DataBoxDisk details in-memory object ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -61,10 +110,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -77,10 +125,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -108,10 +155,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -139,10 +185,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -159,10 +204,9 @@ The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. -To construct, see NOTES section for PREFERREDDISK properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxDiskJobDetailsPreferredDisks +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxDiskJobDetailsPreferredDisks Parameter Sets: (All) Aliases: @@ -175,10 +219,9 @@ Accept wildcard characters: False ### -ReverseShippingDetail Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -191,10 +234,9 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: @@ -205,21 +247,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -227,7 +254,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxDiskJobDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxHeavyJobDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxHeavyJobDetailsObject.md index 602b1c420401..0884d0fa2c93 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxHeavyJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxHeavyJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxHeavyJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxheavyjobdetailsobject schema: 2.0.0 --- @@ -13,11 +13,10 @@ Create an in-memory object for DataBoxHeavyJobDetails. ## SYNTAX ``` -New-AzDataBoxHeavyJobDetailsObject -ContactDetail -Type - [-DataExportDetail ] [-DataImportDetail ] - [-DevicePassword ] [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] - [-Preference ] [-ReverseShippingDetail ] - [-ShippingAddress ] [] +New-AzDataBoxHeavyJobDetailsObject -ContactDetail [-DataExportDetail ] + [-DataImportDetail ] [-DevicePassword ] [-ExpectedDataSizeInTeraByte ] + [-KeyEncryptionKey ] [-Preference ] + [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` ## DESCRIPTION @@ -30,13 +29,55 @@ Create an in-memory object for DataBoxHeavyJobDetails. $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" -New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 +New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 ``` ```output -Action ChainOfCustodySasKey ExpectedDataSizeInTeraByte ReverseShipmentLabelSasKey Type Passkey ------- -------------------- -------------------------- -------------------------- ---- ------- - 18 DataBoxDisk $password +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } +DevicePassword : +ExpectedDataSizeInTeraByte : 10 +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } +Type : DataBoxHeavy ``` Create a in-memory object for DataBoxHeavyJobDetails @@ -45,10 +86,9 @@ Create a in-memory object for DataBoxHeavyJobDetails ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -61,10 +101,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -77,10 +116,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -129,10 +167,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -145,10 +182,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -161,10 +197,9 @@ Accept wildcard characters: False ### -ReverseShippingDetail Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -177,10 +212,9 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: @@ -191,21 +225,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -213,7 +232,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxHeavyJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxHeavyJobDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md index 9179048356bd..325cf05c5eba 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md @@ -8,31 +8,44 @@ schema: 2.0.0 # New-AzDataBoxJob ## SYNOPSIS -Creates a new job with the specified parameters. -Existing job cannot be updated with this API and should instead be updated with the Update job API. +Create a new job with the specified parameters. +Existing job cannot be updated with this API and should instead be updated with the create job API. ## SYNTAX +### CreateExpanded (Default) ``` -New-AzDataBoxJob -Name -ResourceGroupName -Location -SkuName - -TransferType [-SubscriptionId ] [-DeliveryInfoScheduledDateTime ] - [-DeliveryType ] [-Detail ] [-IdentityType ] [-SkuDisplayName ] - [-SkuFamily ] [-SkuModel ] [-Tag ] [-UserAssignedIdentity ] +New-AzDataBoxJob -Name -ResourceGroupName -Location -SkuName + -TransferType [-SubscriptionId ] [-DeliveryInfoScheduledDateTime ] + [-DeliveryType ] [-Detail ] [-EnableSystemAssignedIdentity] [-SkuDisplayName ] + [-SkuFamily ] [-SkuModel ] [-Tag ] [-UserAssignedIdentity ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzDataBoxJob -Name -ResourceGroupName -JsonFilePath [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzDataBoxJob -Name -ResourceGroupName -JsonString [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Creates a new job with the specified parameters. -Existing job cannot be updated with this API and should instead be updated with the Update job API. +Create a new job with the specified parameters. +Existing job cannot be updated with this API and should instead be updated with the create job API. ## EXAMPLES ### Example 1: Create a databox import job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $DebugPreference = "Continue" # You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation command fails. # { @@ -86,11 +99,11 @@ You can expand and visualize other object in similar way how details and shippin ### Example 2: Creates a databox export job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" $transferConfigurationType = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="True"} -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $resource = New-AzDataBoxJob -Name "ExportTest" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ExportFromAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -105,10 +118,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 3: Creates a databox import job with managed disk account ```powershell -$managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" -DataAccountType "ManagedDisk" +$managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails New-AzDataBoxJob -Name "PwshManagedDisk" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -123,12 +136,12 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 4: Creates a databox import job with user assigned identity ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails -New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}} +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails +New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` ```output @@ -142,10 +155,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 5: Creates a databox job with your own key ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password $resource = New-AzDataBoxJob -Name "PowershellBYOK" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -160,10 +173,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 6: Creates a databoxHeavy job with your own key ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 +$details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 $resource = New-AzDataBoxJob -Name "DbxHeavy" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxHeavy" ``` @@ -178,10 +191,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 7: Creates a databoxDisk job with your own Passkey ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 +$details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 New-AzDataBoxJob -Name "pwshDisk" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxDisk" ``` @@ -196,10 +209,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 8: Creates a databox job with double encryption enabled ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Preference @{EncryptionPreferenceDoubleEncryption="Enabled"} +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Preference @{EncryptionPreferenceDoubleEncryption="Enabled"} New-AzDataBoxJob -Name "pwshDoubEncy" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -214,11 +227,11 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 9: Creates a Data Box Customer Disk import job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} -$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" New-AzDataBoxJob -Name "testJobName1" -SubscriptionId "YourSubscriptionId" -ResourceGroupName "YourResourceGroup" -TransferType "ImportToAzure" -Detail $customerDiskDetails -Location "westus" -SkuName "DataBoxCustomerDisk" ``` @@ -236,11 +249,11 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 10: Creates a Data Box Customer Disk export job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $transferConfiguration = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="False"} -$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataExportDetail @(@{ AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"=$transferConfiguration }) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -DataExportDetail @(@{ AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"=$transferConfiguration }) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" New-AzDataBoxJob -Name "testJobName2" -SubscriptionId "YourSubscriptionId" -ResourceGroupName "YourResourceGroup" -TransferType "ExportFromAzure" -Detail $customerDiskDetails -Location "westus" -SkuName "DataBoxCustomerDisk" ``` @@ -294,7 +307,7 @@ Scheduled date time. ```yaml Type: System.DateTime -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -308,8 +321,8 @@ Accept wildcard characters: False Delivery type of Job. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.JobDeliveryType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -322,11 +335,10 @@ Accept wildcard characters: False ### -Detail Details of a job run. This field will only be sent for expand details filter. -To construct, see NOTES section for DETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobDetails -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobDetails +Parameter Sets: CreateExpanded Aliases: Required: False @@ -336,12 +348,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Identity type +### -EnableSystemAssignedIdentity +Determines whether to enable a system-assigned identity for the resource. ```yaml -Type: System.String -Parameter Sets: (All) +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded Aliases: Required: False @@ -351,6 +363,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The location of the resource. This will be one of the supported and registered Azure Regions (e.g. @@ -359,7 +401,7 @@ The region of a resource cannot be changed once it is created, but if an identic ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -420,7 +462,7 @@ The display name of the sku. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -435,7 +477,7 @@ The sku family. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -451,8 +493,8 @@ This field is necessary only at the time of ordering the newer generation device AzureDataBox120 and AzureDataBox525 as of Feb/2025 ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ModelName -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -466,8 +508,8 @@ Accept wildcard characters: False The sku name. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.SkuName -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: True @@ -498,7 +540,7 @@ These tags can be used in viewing and grouping this resource (across resource gr ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -512,8 +554,8 @@ Accept wildcard characters: False Type of the data transfer. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransferType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: True @@ -524,11 +566,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -User Assigned Identities +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: CreateExpanded Aliases: Required: False @@ -576,7 +619,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobResource +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJobDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJobDetailsObject.md index f9d41a267d2b..f8eed8d73b92 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxjobdetailsobject schema: 2.0.0 --- @@ -13,11 +13,10 @@ Create an in-memory object for DataBoxJobDetails. ## SYNTAX ``` -New-AzDataBoxJobDetailsObject -ContactDetail -Type - [-DataExportDetail ] [-DataImportDetail ] - [-DevicePassword ] [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] - [-Preference ] [-ReverseShippingDetail ] - [-ShippingAddress ] [] +New-AzDataBoxJobDetailsObject -ContactDetail [-DataExportDetail ] + [-DataImportDetail ] [-DevicePassword ] [-ExpectedDataSizeInTeraByte ] + [-KeyEncryptionKey ] [-Preference ] + [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` ## DESCRIPTION @@ -30,27 +29,55 @@ Create an in-memory object for DataBoxJobDetails. $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" -New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails ``` ```output Action : ChainOfCustodySasKey : -ContactDetail : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } CopyLogDetail : CopyProgress : +DataCenterCode : DataExportDetail : -DataImportDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataImportDetails} -DeliveryPackage : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.PackageShippingDetails +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount", + "storageAccountId": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } DevicePassword : -ExpectedDataSizeInTeraByte : 0 +ExpectedDataSizeInTeraByte : JobStage : -KeyEncryptionKey : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey -LastMitigationActionOnJob : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.LastMitigationActionOnJob -Preference : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.Preferences -ReturnPackage : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.PackageShippingDetails +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } ReverseShipmentLabelSasKey : -ShippingAddress : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } Type : DataBox ``` @@ -60,10 +87,9 @@ Create a in-memory object for DataBoxJobDetails ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -76,10 +102,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -92,10 +117,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -144,10 +168,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -160,10 +183,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -176,10 +198,9 @@ Accept wildcard characters: False ### -ReverseShippingDetail Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -192,10 +213,9 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: @@ -206,21 +226,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -228,7 +233,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxJobDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxKeyEncryptionKeyObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxKeyEncryptionKeyObject.md index 3bec9b4c503e..0b7e51a1be6f 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxKeyEncryptionKeyObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxKeyEncryptionKeyObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxKeyEncryptionKeyObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxkeyencryptionkeyobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for KeyEncryptionKey. ## SYNTAX ``` -New-AzDataBoxKeyEncryptionKeyObject -KekType [-IdentityProperty ] +New-AzDataBoxKeyEncryptionKeyObject -KekType [-IdentityProperty ] [-KekUrl ] [-KekVaultResourceId ] [] ``` @@ -28,9 +28,15 @@ New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty ``` ```output -KekType KekUrl KekVaultResourceId -------- ------ ------------------ -CustomerManaged keyIdentifier /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName +IdentityProperty : { + "userAssigned": { + "resourceId": "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" + }, + "type": "UserAssigned" + } +KekType : CustomerManaged +KekUrl : keyIdentifier +KekVaultResourceId : /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName ``` Create a in-memory object for KeyEncryptionKey @@ -39,10 +45,9 @@ Create a in-memory object for KeyEncryptionKey ### -IdentityProperty Managed identity properties used for key encryption. -To construct, see NOTES section for IDENTITYPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IIdentityProperties +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IIdentityProperties Parameter Sets: (All) Aliases: @@ -57,7 +62,7 @@ Accept wildcard characters: False Type of encryption key used for key encryption. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.KekType +Type: System.String Parameter Sets: (All) Aliases: @@ -107,7 +112,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.KeyEncryptionKey ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxManagedDiskDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxManagedDiskDetailsObject.md index 984944353a52..4590957103a0 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxManagedDiskDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxManagedDiskDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxManagedDiskDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxmanageddiskdetailsobject schema: 2.0.0 --- @@ -13,8 +13,8 @@ Create an in-memory object for ManagedDiskDetails. ## SYNTAX ``` -New-AzDataBoxManagedDiskDetailsObject -DataAccountType -ResourceGroupId - -StagingStorageAccountId [-SharePassword ] [] +New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId -StagingStorageAccountId + [-SharePassword ] [] ``` ## DESCRIPTION @@ -24,34 +24,19 @@ Create an in-memory object for ManagedDiskDetails. ### Example 1: ManagedDisk object ```powershell -New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" -DataAccountType "ManagedDisk" +New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" ``` ```output -DataAccountType SharePassword ResourceGroupId StagingStorageAccountId ---------------- ------------- --------------- ----------------------- -ManagedDisk /subscriptions/SubscriptionId/resourceGroups/resourceGroupName /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName +DataAccountType ResourceGroupId SharePassword StagingStorageAccountId +--------------- --------------- ------------- ----------------------- +ManagedDisk /subscriptions/SubscriptionId/resourceGroups/resourceGroupName /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/st ``` Creates a in-memory managed disk object ## PARAMETERS -### -DataAccountType -Account Type of the data to be transferred. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupId Resource Group Id of the compute disks. @@ -110,7 +95,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ManagedDiskDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ManagedDiskDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxShippingAddressObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxShippingAddressObject.md index 5d9bc9bb6398..b011823eee35 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxShippingAddressObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxShippingAddressObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxShippingAddressObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxshippingaddressobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for ShippingAddress. ## SYNTAX ``` -New-AzDataBoxShippingAddressObject -Country -StreetAddress1 [-AddressType ] +New-AzDataBoxShippingAddressObject -Country -StreetAddress1 [-AddressType ] [-City ] [-CompanyName ] [-PostalCode ] [-SkipAddressValidation ] [-StateOrProvince ] [-StreetAddress2 ] [-StreetAddress3 ] [-TaxIdentificationNumber ] [-ZipExtendedCode ] [] @@ -30,9 +30,18 @@ New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrPro ``` ```output -AddressType City CompanyName Country PostalCode StateOrProvince StreetAddress1 StreetAddress2 StreetAddress3 ZipExtendedCode ------------ ---- ----------- ------- ---------- --------------- -------------- -------------- -------------- --------------- -Commercial San Francisco US 94107 CA 101 TOWNSEND ST +AddressType : Commercial +City : San Francisco +CompanyName : +Country : US +PostalCode : 94107 +SkipAddressValidation : +StateOrProvince : CA +StreetAddress1 : 101 TOWNSEND ST +StreetAddress2 : +StreetAddress3 : +TaxIdentificationNumber : +ZipExtendedCode : ``` Creates a in-memory shipping address object @@ -43,7 +52,7 @@ Creates a in-memory shipping address object Type of address. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.AddressType +Type: System.String Parameter Sets: (All) Aliases: @@ -226,7 +235,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ShippingAddress ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxStorageAccountDetailsObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxStorageAccountDetailsObject.md index fa7e148a632f..11b99f19e439 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxStorageAccountDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxStorageAccountDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxStorageAccountDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxstorageaccountdetailsobject schema: 2.0.0 --- @@ -13,8 +13,8 @@ Create an in-memory object for StorageAccountDetails. ## SYNTAX ``` -New-AzDataBoxStorageAccountDetailsObject -DataAccountType -StorageAccountId - [-SharePassword ] [] +New-AzDataBoxStorageAccountDetailsObject -StorageAccountId [-SharePassword ] + [] ``` ## DESCRIPTION @@ -24,7 +24,7 @@ Create an in-memory object for StorageAccountDetails. ### Example 1: Storage account in-memory object ```powershell -New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" ``` ```output @@ -37,21 +37,6 @@ Storage account in-memory object ## PARAMETERS -### -DataAccountType -Account Type of the data to be transferred. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SharePassword Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. @@ -95,7 +80,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.StorageAccountDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.StorageAccountDetails ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxTransferConfigurationObject.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxTransferConfigurationObject.md index d9f84d0c2971..c8ae1748f44c 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxTransferConfigurationObject.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxTransferConfigurationObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxTransferConfigurationObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxtransferconfigurationobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for TransferConfiguration. ## SYNTAX ``` -New-AzDataBoxTransferConfigurationObject -Type +New-AzDataBoxTransferConfigurationObject -Type [-TransferAllDetail ] [-TransferFilterDetail ] [] ``` @@ -28,6 +28,19 @@ Create an in-memory object for TransferConfiguration. New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="True"} ``` +```output +TransferAllDetail : { + "include": { + "dataAccountType": "StorageAccount", + "transferAllBlobs": true, + "transferAllFiles": true + } + } +TransferFilterDetail : { + } +Type : TransferAll +``` + Create a in-memory object for export jobs TransferConfiguration ## PARAMETERS @@ -35,10 +48,9 @@ Create a in-memory object for export jobs TransferConfiguration ### -TransferAllDetail Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. -To construct, see NOTES section for TRANSFERALLDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ITransferConfigurationTransferAllDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ITransferConfigurationTransferAllDetails Parameter Sets: (All) Aliases: @@ -52,10 +64,9 @@ Accept wildcard characters: False ### -TransferFilterDetail Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. -To construct, see NOTES section for TRANSFERFILTERDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ITransferConfigurationTransferFilterDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ITransferConfigurationTransferFilterDetails Parameter Sets: (All) Aliases: @@ -70,7 +81,7 @@ Accept wildcard characters: False Type of the configuration for transfer. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransferConfigurationType +Type: System.String Parameter Sets: (All) Aliases: @@ -88,7 +99,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.TransferConfiguration +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.TransferConfiguration ## NOTES diff --git a/src/DataBox/DataBox.Autorest/docs/Stop-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/Stop-AzDataBoxJob.md index 7b39a08077cc..699a4a25a014 100644 --- a/src/DataBox/DataBox.Autorest/docs/Stop-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/Stop-AzDataBoxJob.md @@ -12,11 +12,24 @@ CancelJob. ## SYNTAX +### CancelExpanded (Default) ``` Stop-AzDataBoxJob -Name -ResourceGroupName -Reason [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] ``` +### CancelViaJsonFilePath +``` +Stop-AzDataBoxJob -Name -ResourceGroupName -JsonFilePath [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### CancelViaJsonString +``` +Stop-AzDataBoxJob -Name -ResourceGroupName -JsonString [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION CancelJob. @@ -54,6 +67,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Cancel operation + +```yaml +Type: System.String +Parameter Sets: CancelViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Cancel operation + +```yaml +Type: System.String +Parameter Sets: CancelViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +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 @@ -90,7 +133,7 @@ Reason for cancellation. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CancelExpanded Aliases: Required: True diff --git a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md index cecd3655206f..0dda8b95aee3 100644 --- a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md @@ -8,28 +8,56 @@ schema: 2.0.0 # Update-AzDataBoxJob ## SYNOPSIS -Updates the properties of an existing job. +Update the properties of an existing job. ## SYNTAX +### UpdateExpanded (Default) ``` Update-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-ContactDetail ] [-ContactDetailContactName ] [-ContactDetailMobile ] [-ContactDetailPhone ] [-ContactDetailPhoneExtension ] - [-EncryptionPreferenceDoubleEncryption ] - [-EncryptionPreferenceHardwareEncryption ] [-IdentityType ] + [-EnableSystemAssignedIdentity ] [-EncryptionPreferenceDoubleEncryption ] + [-EncryptionPreferenceHardwareEncryption ] [-KeyEncryptionKey ] + [-PreferencePreferredDataCenterRegion ] + [-ReturnToCustomerPackageDetailCarrierAccountNumber ] + [-ReturnToCustomerPackageDetailCarrierName ] [-ReturnToCustomerPackageDetailTrackingId ] + [-ReverseShippingDetail ] [-ReverseTransportPreferredShipmentType ] + [-ShippingAddress ] [-StorageAccountAccessTierPreference ] [-Tag ] + [-TransportPreferredShipmentType ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzDataBoxJob -InputObject [-IfMatch ] [-ContactDetail ] + [-ContactDetailContactName ] [-ContactDetailMobile ] [-ContactDetailPhone ] + [-ContactDetailPhoneExtension ] [-EnableSystemAssignedIdentity ] + [-EncryptionPreferenceDoubleEncryption ] [-EncryptionPreferenceHardwareEncryption ] [-KeyEncryptionKey ] [-PreferencePreferredDataCenterRegion ] [-ReturnToCustomerPackageDetailCarrierAccountNumber ] [-ReturnToCustomerPackageDetailCarrierName ] [-ReturnToCustomerPackageDetailTrackingId ] - [-ReverseShippingDetail ] [-ReverseTransportPreferredShipmentType ] - [-ShippingAddress ] [-StorageAccountAccessTierPreference ] - [-Tag ] [-TransportPreferredShipmentType ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-ReverseShippingDetail ] [-ReverseTransportPreferredShipmentType ] + [-ShippingAddress ] [-StorageAccountAccessTierPreference ] [-Tag ] + [-TransportPreferredShipmentType ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzDataBoxJob -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzDataBoxJob -Name -ResourceGroupName -JsonString [-SubscriptionId ] + [-IfMatch ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Updates the properties of an existing job. +Update the properties of an existing job. ## EXAMPLES @@ -51,7 +79,7 @@ $DebugPreference = "Continue" # } # } -Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}} +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails ``` @@ -105,7 +133,7 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl $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-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` Update databox job from system assigned to user assigned with customer managed key encryption. @@ -130,11 +158,10 @@ Accept wildcard characters: False ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -149,7 +176,7 @@ Contact name of the person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -164,7 +191,7 @@ Mobile number of the contact person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -179,7 +206,7 @@ Phone number of the contact person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -194,7 +221,7 @@ Phone extension number of the contact person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -220,12 +247,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EncryptionPreferenceDoubleEncryption -Defines secondary layer of software-based encryption enablement. +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DoubleEncryption -Parameter Sets: (All) +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -235,12 +262,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EncryptionPreferenceHardwareEncryption -Defines Hardware level encryption (Only for disk) +### -EncryptionPreferenceDoubleEncryption +Defines secondary layer of software-based encryption enablement. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.HardwareEncryption -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -250,12 +277,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Identity type +### -EncryptionPreferenceHardwareEncryption +Defines Hardware level encryption (Only for disk) ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -281,13 +308,57 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +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. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -303,7 +374,7 @@ job names must be between 3 and 24 characters in length and use any alphanumeric ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: JobName Required: True @@ -333,7 +404,7 @@ Preferred data center region. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -348,7 +419,7 @@ The Resource Group Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: True @@ -363,7 +434,7 @@ Carrier Account Number of customer for customer disk. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -378,7 +449,7 @@ Name of the carrier. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -393,7 +464,7 @@ Tracking Id of shipment. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -405,11 +476,10 @@ 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. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -423,8 +493,8 @@ Accept wildcard characters: False Indicates Shipment Logistics type that the customer preferred. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransportShipmentTypes -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -436,11 +506,10 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -454,8 +523,8 @@ Accept wildcard characters: False Preferences related to the Access Tier of storage accounts. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.StorageAccountAccessTier[] -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -470,7 +539,7 @@ The Subscription Id ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: False @@ -486,7 +555,7 @@ These tags can be used in viewing and grouping this resource (across resource gr ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -500,8 +569,8 @@ Accept wildcard characters: False Indicates Shipment Logistics type that the customer preferred. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransportShipmentTypes -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -512,11 +581,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -User Assigned Identities +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -562,9 +632,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobResource +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource ## NOTES diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxContactDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxContactDetailsObject.md index 7ed056a91c60..26d9ab784bf5 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxContactDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxContactDetailsObject.md @@ -4,10 +4,12 @@ New-AzDataBoxContactDetailsObject -ContactName "random" -EmailList @("emailId") ``` ```output -ContactName EmailList Mobile Phone PhoneExtension ------------ --------- ------ ----- -------------- -random {emailId} 1234567891 +ContactName : random +EmailList : {emailId} +Mobile : +NotificationPreference : +Phone : 1234567891 +PhoneExtension : ``` -Create a in-memory object for ContactDetails - +Create a in-memory object for ContactDetails \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxCustomerDiskJobDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxCustomerDiskJobDetailsObject.md index 021edaa2e15d..792392b52ffb 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxCustomerDiskJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxCustomerDiskJobDetailsObject.md @@ -1,11 +1,75 @@ ### Example 1: DataBoxCustomerDisk details in-memory object ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} -New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" ``` -DataBoxCustomerDisk details in-memory object +```output +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "XXXX XXXX", + "phone": "0000000000", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount", + "storageAccountId": + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + } + }} +DatacenterAddress : { + } +DeliverToDcPackageDetailCarrierName : +DeliverToDcPackageDetailTrackingId : +DeliveryPackage : { + } +DeviceErasureDetail : { + } +EnableManifestBackup : +ExpectedDataSizeInTeraByte : +ExportDiskDetailsCollection : { + } +ImportDiskDetailsCollection : { + "XXXXXX": { + "manifestFile": "xyz.txt", + "manifestHash": "xxxx", + "bitLockerKey": "xxx" + } + } +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } +ReturnToCustomerPackageDetailCarrierAccountNumber : 00000 +ReturnToCustomerPackageDetailCarrierName : +ReturnToCustomerPackageDetailTrackingId : +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "XXXX XXXX", + "city": "XXXX XXXX", + "stateOrProvince": "XX", + "country": "XX", + "postalCode": "00000", + "addressType": "Commercial" + } +Type : DataBoxCustomerDisk +``` + +DataBoxCustomerDisk details in-memory object \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxDiskJobDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxDiskJobDetailsObject.md index 751701520af7..4994283570df 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxDiskJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxDiskJobDetailsObject.md @@ -3,14 +3,62 @@ $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" -New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 +New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 ``` ```output -Action ChainOfCustodySasKey ExpectedDataSizeInTeraByte ReverseShipmentLabelSasKey Type Passkey ------- -------------------- -------------------------- -------------------------- ---- ------- - 18 DataBoxDisk $password +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } +DisksAndSizeDetail : { + } +ExpectedDataSizeInTeraByte : 18 +GranularCopyLogDetail : +GranularCopyProgress : +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Passkey : +Preference : { + } +PreferredDisk : { + "4": 2, + "8": 8 + } +ReturnPackage : { + } +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } +Type : DataBoxDisk ``` -DataBoxDisk details in-memory object - - +DataBoxDisk details in-memory object \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxHeavyJobDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxHeavyJobDetailsObject.md index 456daaea02a5..89aad5c72daa 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxHeavyJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxHeavyJobDetailsObject.md @@ -3,13 +3,54 @@ $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" -New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 +New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 ``` ```output -Action ChainOfCustodySasKey ExpectedDataSizeInTeraByte ReverseShipmentLabelSasKey Type Passkey ------- -------------------- -------------------------- -------------------------- ---- ------- - 18 DataBoxDisk $password +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } +DevicePassword : +ExpectedDataSizeInTeraByte : 10 +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } +Type : DataBoxHeavy ``` -Create a in-memory object for DataBoxHeavyJobDetails - +Create a in-memory object for DataBoxHeavyJobDetails \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md index d5de901f2bc7..d5b2c13df8b4 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md @@ -1,9 +1,9 @@ ### Example 1: Create a databox import job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $DebugPreference = "Continue" # You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation command fails. # { @@ -57,11 +57,11 @@ You can expand and visualize other object in similar way how details and shippin ### Example 2: Creates a databox export job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" $transferConfigurationType = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="True"} -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $resource = New-AzDataBoxJob -Name "ExportTest" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ExportFromAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -75,10 +75,10 @@ Creates a databox export job. For any failure re-run with $DebugPreference = "Co ### Example 3: Creates a databox import job with managed disk account ```powershell -$managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" -DataAccountType "ManagedDisk" +$managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails New-AzDataBoxJob -Name "PwshManagedDisk" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -93,12 +93,12 @@ Creates a databox import job with managed disk account. For any failure re-run w ### Example 4: Creates a databox import job with user assigned identity ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails -New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}} +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails +New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` ```output @@ -111,10 +111,10 @@ Creates a databox import job with user assigned identity. For any failure re-run ### Example 5: Creates a databox job with your own key ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password $resource = New-AzDataBoxJob -Name "PowershellBYOK" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -128,10 +128,10 @@ Creates a databox job with your own key. For any failure re-run with $DebugPrefe ### Example 6: Creates a databoxHeavy job with your own key ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 +$details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 $resource = New-AzDataBoxJob -Name "DbxHeavy" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxHeavy" ``` @@ -145,10 +145,10 @@ Creates a databoxHeavy job with your own key. For any failure re-run with $Debug ### Example 7: Creates a databoxDisk job with your own Passkey ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 +$details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 New-AzDataBoxJob -Name "pwshDisk" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxDisk" ``` @@ -162,10 +162,10 @@ Creates a databoxDisky job with your own Passkey. For any failure re-run with $D ### Example 8: Creates a databox job with double encryption enabled ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Preference @{EncryptionPreferenceDoubleEncryption="Enabled"} +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Preference @{EncryptionPreferenceDoubleEncryption="Enabled"} New-AzDataBoxJob -Name "pwshDoubEncy" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -179,11 +179,11 @@ Creates a databox job with double encryption enabled. For any failure re-run wit ### Example 9: Creates a Data Box Customer Disk import job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} -$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" New-AzDataBoxJob -Name "testJobName1" -SubscriptionId "YourSubscriptionId" -ResourceGroupName "YourResourceGroup" -TransferType "ImportToAzure" -Detail $customerDiskDetails -Location "westus" -SkuName "DataBoxCustomerDisk" ``` @@ -201,11 +201,11 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 10: Creates a Data Box Customer Disk export job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $transferConfiguration = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="False"} -$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataExportDetail @(@{ AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"=$transferConfiguration }) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -DataExportDetail @(@{ AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"=$transferConfiguration }) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" New-AzDataBoxJob -Name "testJobName2" -SubscriptionId "YourSubscriptionId" -ResourceGroupName "YourResourceGroup" -TransferType "ExportFromAzure" -Detail $customerDiskDetails -Location "westus" -SkuName "DataBoxCustomerDisk" ``` diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJobDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJobDetailsObject.md index 3ccdd04b8455..2bd75d83b9f0 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJobDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJobDetailsObject.md @@ -3,29 +3,56 @@ $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" -New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails ``` ```output Action : ChainOfCustodySasKey : -ContactDetail : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } CopyLogDetail : CopyProgress : +DataCenterCode : DataExportDetail : -DataImportDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataImportDetails} -DeliveryPackage : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.PackageShippingDetails +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount", + "storageAccountId": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } DevicePassword : -ExpectedDataSizeInTeraByte : 0 +ExpectedDataSizeInTeraByte : JobStage : -KeyEncryptionKey : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey -LastMitigationActionOnJob : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.LastMitigationActionOnJob -Preference : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.Preferences -ReturnPackage : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.PackageShippingDetails +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } ReverseShipmentLabelSasKey : -ShippingAddress : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } Type : DataBox ``` -Create a in-memory object for DataBoxJobDetails - +Create a in-memory object for DataBoxJobDetails \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxKeyEncryptionKeyObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxKeyEncryptionKeyObject.md index 574496ff243d..18a6ee22d4ee 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxKeyEncryptionKeyObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxKeyEncryptionKeyObject.md @@ -4,11 +4,15 @@ New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty ``` ```output -KekType KekUrl KekVaultResourceId -------- ------ ------------------ -CustomerManaged keyIdentifier /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName +IdentityProperty : { + "userAssigned": { + "resourceId": "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" + }, + "type": "UserAssigned" + } +KekType : CustomerManaged +KekUrl : keyIdentifier +KekVaultResourceId : /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName ``` -Create a in-memory object for KeyEncryptionKey - - +Create a in-memory object for KeyEncryptionKey \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxManagedDiskDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxManagedDiskDetailsObject.md index 9fcf94e53e53..405cbb2d313e 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxManagedDiskDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxManagedDiskDetailsObject.md @@ -1,12 +1,11 @@ ### Example 1: ManagedDisk object ```powershell -New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" -DataAccountType "ManagedDisk" +New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" ``` ```output -DataAccountType SharePassword ResourceGroupId StagingStorageAccountId ---------------- ------------- --------------- ----------------------- -ManagedDisk /subscriptions/SubscriptionId/resourceGroups/resourceGroupName /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName +DataAccountType ResourceGroupId SharePassword StagingStorageAccountId +--------------- --------------- ------------- ----------------------- +ManagedDisk /subscriptions/SubscriptionId/resourceGroups/resourceGroupName /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/st ``` -Creates a in-memory managed disk object - +Creates a in-memory managed disk object \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxShippingAddressObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxShippingAddressObject.md index 3353e305d4ca..26d88202ac41 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxShippingAddressObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxShippingAddressObject.md @@ -4,10 +4,18 @@ New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrPro ``` ```output -AddressType City CompanyName Country PostalCode StateOrProvince StreetAddress1 StreetAddress2 StreetAddress3 ZipExtendedCode ------------ ---- ----------- ------- ---------- --------------- -------------- -------------- -------------- --------------- -Commercial San Francisco US 94107 CA 101 TOWNSEND ST +AddressType : Commercial +City : San Francisco +CompanyName : +Country : US +PostalCode : 94107 +SkipAddressValidation : +StateOrProvince : CA +StreetAddress1 : 101 TOWNSEND ST +StreetAddress2 : +StreetAddress3 : +TaxIdentificationNumber : +ZipExtendedCode : ``` -Creates a in-memory shipping address object - +Creates a in-memory shipping address object \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxStorageAccountDetailsObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxStorageAccountDetailsObject.md index 71070d1f4a1b..af2a316f38b5 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxStorageAccountDetailsObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxStorageAccountDetailsObject.md @@ -1,6 +1,6 @@ ### Example 1: Storage account in-memory object ```powershell -New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" ``` ```output @@ -9,5 +9,4 @@ DataAccountType SharePassword StorageAccountId StorageAccount /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName ``` -Storage account in-memory object - +Storage account in-memory object \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxTransferConfigurationObject.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxTransferConfigurationObject.md index ba654e3354b1..0bb862df54bc 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxTransferConfigurationObject.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxTransferConfigurationObject.md @@ -3,5 +3,17 @@ New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="True"} ``` -Create a in-memory object for export jobs TransferConfiguration +```output +TransferAllDetail : { + "include": { + "dataAccountType": "StorageAccount", + "transferAllBlobs": true, + "transferAllFiles": true + } + } +TransferFilterDetail : { + } +Type : TransferAll +``` +Create a in-memory object for export jobs TransferConfiguration \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md index 8766cf563d4f..e64e7f233cb3 100644 --- a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md @@ -16,7 +16,7 @@ $DebugPreference = "Continue" # } # } -Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}} +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails ``` @@ -67,7 +67,7 @@ Update databox job encryption from microsoft managed to customer managed to cust $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-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -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 diff --git a/src/DataBox/DataBox.Autorest/generate-info.json b/src/DataBox/DataBox.Autorest/generate-info.json index 5c411a2a31ad..06f906d5be85 100644 --- a/src/DataBox/DataBox.Autorest/generate-info.json +++ b/src/DataBox/DataBox.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "ec44238f-c4db-4be9-8d14-14e23af14ce8" + "generate_Id": "e3f0c1c4-a2a8-4316-9d40-d9762e20884b" } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxCustomerDiskJobDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxCustomerDiskJobDetailsObject.Tests.ps1 index 44bd672b3b0c..2dcc0d107d9c 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxCustomerDiskJobDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxCustomerDiskJobDetailsObject.Tests.ps1 @@ -16,6 +16,14 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzDataBoxCustomerDiskJobD Describe 'New-AzDataBoxCustomerDiskJobDetailsObject' { It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + { + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" + $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" + $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} + + $config = New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" + $config.Type | Should -Be "DataBoxCustomerDisk" + } | Should -Not -Throw } } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxDiskJobDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxDiskJobDetailsObject.Tests.ps1 index 43ab166d133f..da0d2956526d 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxDiskJobDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxDiskJobDetailsObject.Tests.ps1 @@ -17,9 +17,9 @@ Describe 'New-AzDataBoxDiskJobDetailsObject' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "randm@423jarABC" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 + $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "randm@423jarABC" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 $details.ExpectedDataSizeInTeraByte | Should -Be 18 } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 index 7d17781a8ed2..335e8585a464 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 @@ -17,9 +17,9 @@ Describe 'New-AzDataBoxHeavyJobDetailsObject' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = $details = New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "randm@423jarABC" -ExpectedDataSizeInTeraByte 10 + $details = $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "randm@423jarABC" -ExpectedDataSizeInTeraByte 10 $details.ExpectedDataSizeInTeraByte | Should -Be 10 } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 index 8702fdb42012..c3a9df73de9b 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 @@ -17,9 +17,9 @@ Describe 'New-AzDataBoxJob' { $contactDetail = New-AzDataBoxContactDetailsObject -ContactName $env.ContactName -EmailList $env.EmailList -Phone $env.Phone $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails + $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $resource = New-AzDataBoxJob -Name $env.JobNameImport -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" @@ -31,9 +31,9 @@ Describe 'New-AzDataBoxJob' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId $env.ManagedDiskRg -StagingStorageAccountId $env.StagingStorageAccount -DataAccountType "ManagedDisk" + $managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId $env.ManagedDiskRg -StagingStorageAccountId $env.StagingStorageAccount - $details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails + $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $resource = New-AzDataBoxJob -Name $env.JobNameManagedDisk -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" @@ -45,11 +45,11 @@ Describe 'New-AzDataBoxJob' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId $transferConfigurationType = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile" = "True"} - $details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails + $details = New-AzDataBoxJobDetailsObject -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $resource = New-AzDataBoxJob -Name $env.JobNameExport -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.resourceGroup -TransferType "ExportFromAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" @@ -63,14 +63,14 @@ Describe 'New-AzDataBoxJob' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId $keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = $env.UserAssignedResourceId} -KekUrl $env.KekUrl -KekVaultResourceId $env.KekVaultResourceId - $details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails + $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails - $resource = New-AzDataBoxJob -Name $env.JobNameUAI -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -IdentityType "UserAssigned" -UserAssignedIdentity @{$env.UserAssignedResourceId = @{}} + $resource = New-AzDataBoxJob -Name $env.JobNameUAI -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity $env.UserAssignedResourceId $resource.Status | Should -Be 'DeviceOrdered' } @@ -80,9 +80,9 @@ Describe 'New-AzDataBoxJob' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ExpectedDataSizeInTeraByte 10 + $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ExpectedDataSizeInTeraByte 10 $date = Get-Date $scheduleDate = $date.AddDays(15) @@ -100,9 +100,9 @@ Describe 'New-AzDataBoxJob' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "randm@423jarABC" -ExpectedDataSizeInTeraByte 10 + $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "randm@423jarABC" -ExpectedDataSizeInTeraByte 10 $resource = New-AzDataBoxJob -Name $env.JobNameHeavy -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxHeavy" @@ -115,9 +115,9 @@ Describe 'New-AzDataBoxJob' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "randm@423jarABC" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 + $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "randm@423jarABC" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 $resource = New-AzDataBoxJob -Name $env.JobNameDisk -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxDisk" $resource.Status | Should -Be 'DeviceOrdered' } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJobDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJobDetailsObject.Tests.ps1 index 02b82402eb3d..1435dd2d6479 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJobDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJobDetailsObject.Tests.ps1 @@ -17,8 +17,8 @@ Describe 'New-AzDataBoxJobDetailsObject' { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails + $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails } } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxManagedDiskDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxManagedDiskDetailsObject.Tests.ps1 index 2b357846033f..a206d94bf1d4 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxManagedDiskDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxManagedDiskDetailsObject.Tests.ps1 @@ -15,7 +15,7 @@ Describe 'New-AzDataBoxManagedDiskDetailsObject' { It '__AllParameterSets' { $contactDetail = New-AzDataBoxContactDetailsObject -ContactName $env.ContactName -EmailList $env.EmailList -Phone $env.Phone $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - $managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId $env.ManagedDiskRg -StagingStorageAccountId $env.StagingStorageAccount -DataAccountType "ManagedDisk" + $managedDiskAccount = New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId $env.ManagedDiskRg -StagingStorageAccountId $env.StagingStorageAccount $managedDiskAccount.DataAccountType | Should -Be "ManagedDisk" } } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxStorageAccountDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxStorageAccountDetailsObject.Tests.ps1 index 2d0b3721c9e0..b96962b3f6c0 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxStorageAccountDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxStorageAccountDetailsObject.Tests.ps1 @@ -13,7 +13,7 @@ while(-not $mockingPath) { Describe 'New-AzDataBoxStorageAccountDetailsObject' { It '__AllParameterSets' { - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId $env.StorageAccountId + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId $dataAccount.DataAccountType | Should -Be "StorageAccount" } } diff --git a/src/DataBox/DataBox.Autorest/test/T_Remove-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/Remove-AzDataBoxJob.Tests.ps1 similarity index 100% rename from src/DataBox/DataBox.Autorest/test/T_Remove-AzDataBoxJob.Tests.ps1 rename to src/DataBox/DataBox.Autorest/test/Remove-AzDataBoxJob.Tests.ps1 diff --git a/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 index eae3b2f43bf9..3b3cb286dc54 100644 --- a/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 @@ -12,16 +12,16 @@ while(-not $mockingPath) { . ($mockingPath | Select-Object -First 1).FullName Describe 'Update-AzDataBoxJob' { - It 'Microsoft managed to customer managed system assigned'{ + It 'Microsoft managed to customer managed system assigned' -Skip { $contactDetail = New-AzDataBoxContactDetailsObject -ContactName $env.ContactName -EmailList $env.EmailList -Phone $env.Phone $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned" + Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true $keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "SystemAssigned"} -KekUrl $env.KekUrl -KekVaultResourceId $env.KekVaultResourceId - Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned" + Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true } - It 'System assigned to user assigned' { + It 'System assigned to user assigned' -Skip { $keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = $env.UserAssignedResourceId} -KekUrl $env.KekUrl -KekVaultResourceId $env.KekVaultResourceId - Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned,UserAssigned" -UserAssignedIdentity @{$env.UserAssignedResourceId = @{}} + Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity $env.UserAssignedResourceId } } diff --git a/src/DataBox/DataBox.sln b/src/DataBox/DataBox.sln index eb658d2f1843..8e3c39949296 100644 --- a/src/DataBox/DataBox.sln +++ b/src/DataBox/DataBox.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 @@ -19,49 +19,119 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accoun EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBox", "DataBox\DataBox.csproj", "{F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{5520A550-87AB-4312-ACEE-80D8A464A72E}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataBox.Autorest", "DataBox.Autorest", "{5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{388FC11C-763D-4DC9-B793-4515651EC33F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Debug|x64.ActiveCfg = Debug|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Debug|x64.Build.0 = Debug|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Debug|x86.ActiveCfg = Debug|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Debug|x86.Build.0 = Debug|Any CPU {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Release|Any CPU.ActiveCfg = Release|Any CPU {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Release|Any CPU.Build.0 = Release|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Release|x64.ActiveCfg = Release|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Release|x64.Build.0 = Release|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Release|x86.ActiveCfg = Release|Any CPU + {6664B843-BE25-4CAC-B0D3-21217F5DD225}.Release|x86.Build.0 = Release|Any CPU {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Debug|x64.ActiveCfg = Debug|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Debug|x64.Build.0 = Debug|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Debug|x86.ActiveCfg = Debug|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Debug|x86.Build.0 = Debug|Any CPU {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Release|Any CPU.ActiveCfg = Release|Any CPU {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Release|Any CPU.Build.0 = Release|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Release|x64.ActiveCfg = Release|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Release|x64.Build.0 = Release|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Release|x86.ActiveCfg = Release|Any CPU + {D981F77C-FFD3-4056-B4A0-82B6EA5A72DF}.Release|x86.Build.0 = Release|Any CPU {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Debug|x64.ActiveCfg = Debug|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Debug|x64.Build.0 = Debug|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Debug|x86.ActiveCfg = Debug|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Debug|x86.Build.0 = Debug|Any CPU {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Release|Any CPU.Build.0 = Release|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Release|x64.ActiveCfg = Release|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Release|x64.Build.0 = Release|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Release|x86.ActiveCfg = Release|Any CPU + {6C78EA04-2FFC-4107-8288-790DDFB1739C}.Release|x86.Build.0 = Release|Any CPU {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Debug|x64.ActiveCfg = Debug|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Debug|x64.Build.0 = Debug|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Debug|x86.ActiveCfg = Debug|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Debug|x86.Build.0 = Debug|Any CPU {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Release|Any CPU.ActiveCfg = Release|Any CPU {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Release|Any CPU.Build.0 = Release|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Release|x64.ActiveCfg = Release|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Release|x64.Build.0 = Release|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Release|x86.ActiveCfg = Release|Any CPU + {0CBD7F56-9ACE-4D0C-841F-256077AE517A}.Release|x86.Build.0 = Release|Any CPU {2B53E025-DCB9-463E-A405-983D2A666A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2B53E025-DCB9-463E-A405-983D2A666A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Debug|x64.ActiveCfg = Debug|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Debug|x64.Build.0 = Debug|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Debug|x86.ActiveCfg = Debug|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Debug|x86.Build.0 = Debug|Any CPU {2B53E025-DCB9-463E-A405-983D2A666A76}.Release|Any CPU.ActiveCfg = Release|Any CPU {2B53E025-DCB9-463E-A405-983D2A666A76}.Release|Any CPU.Build.0 = Release|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Release|x64.ActiveCfg = Release|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Release|x64.Build.0 = Release|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Release|x86.ActiveCfg = Release|Any CPU + {2B53E025-DCB9-463E-A405-983D2A666A76}.Release|x86.Build.0 = Release|Any CPU {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Debug|x64.ActiveCfg = Debug|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Debug|x64.Build.0 = Debug|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Debug|x86.ActiveCfg = Debug|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Debug|x86.Build.0 = Debug|Any CPU {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Release|Any CPU.ActiveCfg = Release|Any CPU {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Release|Any CPU.Build.0 = Release|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Release|x64.ActiveCfg = Release|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Release|x64.Build.0 = Release|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Release|x86.ActiveCfg = Release|Any CPU + {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320}.Release|x86.Build.0 = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Debug|x64.ActiveCfg = Debug|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Debug|x64.Build.0 = Debug|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Debug|x86.ActiveCfg = Debug|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Debug|x86.Build.0 = Debug|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|Any CPU.ActiveCfg = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|Any CPU.Build.0 = Release|Any CPU - {5520A550-87AB-4312-ACEE-80D8A464A72E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5520A550-87AB-4312-ACEE-80D8A464A72E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5520A550-87AB-4312-ACEE-80D8A464A72E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5520A550-87AB-4312-ACEE-80D8A464A72E}.Release|Any CPU.Build.0 = Release|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x64.ActiveCfg = Release|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x64.Build.0 = Release|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.ActiveCfg = Release|Any CPU + {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.Build.0 = Release|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x64.ActiveCfg = Debug|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x64.Build.0 = Debug|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x86.ActiveCfg = Debug|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x86.Build.0 = Debug|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|Any CPU.Build.0 = Release|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x64.ActiveCfg = Release|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x64.Build.0 = Release|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x86.ActiveCfg = Release|Any CPU + {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {6664B843-BE25-4CAC-B0D3-21217F5DD225} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} @@ -70,5 +140,6 @@ Global {0CBD7F56-9ACE-4D0C-841F-256077AE517A} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {2B53E025-DCB9-463E-A405-983D2A666A76} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} + {388FC11C-763D-4DC9-B793-4515651EC33F} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} EndGlobalSection EndGlobal diff --git a/src/DataBox/DataBox/Az.DataBox.psd1 b/src/DataBox/DataBox/Az.DataBox.psd1 index ed70c14e92d9..5f29d21a173e 100644 --- a/src/DataBox/DataBox/Az.DataBox.psd1 +++ b/src/DataBox/DataBox/Az.DataBox.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/30/2025 +# Generated on: 2025-06-11 # @{ @@ -51,16 +51,16 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '4.2.0'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'DataBox.Autorest/bin/Az.DataBox.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'DataBox.Autorest/Az.DataBox.format.ps1xml' @@ -106,7 +106,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','DataBox' + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DataBox' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -133,7 +133,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/DataBox/DataBox/ChangeLog.md b/src/DataBox/DataBox/ChangeLog.md index 69bb746db0c8..08225085babd 100644 --- a/src/DataBox/DataBox/ChangeLog.md +++ b/src/DataBox/DataBox/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Introduced various new features by upgrading code generator. Please see detail [here](https://github.com/Azure/azure-powershell/blob/main/documentation/Autorest-powershell-v4-new-features.md). ## Version 0.5.0 * Added new optiona parameter -SkuModel to New-AzDataBoxJob cmdlet. diff --git a/src/DataBox/DataBox/help/Az.DataBox.md b/src/DataBox/DataBox/help/Az.DataBox.md index 2da7a9c1f2bd..1d726b9fbbd6 100644 --- a/src/DataBox/DataBox/help/Az.DataBox.md +++ b/src/DataBox/DataBox/help/Az.DataBox.md @@ -30,8 +30,8 @@ Create an in-memory object for DataBoxDiskJobDetails. Create an in-memory object for DataBoxHeavyJobDetails. ### [New-AzDataBoxJob](New-AzDataBoxJob.md) -Creates a new job with the specified parameters. -Existing job cannot be updated with this API and should instead be updated with the Update job API. +Create a new job with the specified parameters. +Existing job cannot be updated with this API and should instead be updated with the create job API. ### [New-AzDataBoxJobDetailsObject](New-AzDataBoxJobDetailsObject.md) Create an in-memory object for DataBoxJobDetails. @@ -58,5 +58,5 @@ Deletes a job. CancelJob. ### [Update-AzDataBoxJob](Update-AzDataBoxJob.md) -Updates the properties of an existing job. +Update the properties of an existing job. diff --git a/src/DataBox/DataBox/help/Get-AzDataBoxJob.md b/src/DataBox/DataBox/help/Get-AzDataBoxJob.md index a6560186f794..f02310a84314 100644 --- a/src/DataBox/DataBox/help/Get-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/Get-AzDataBoxJob.md @@ -178,7 +178,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobResource +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource ## NOTES diff --git a/src/DataBox/DataBox/help/Get-AzDataBoxJobCredential.md b/src/DataBox/DataBox/help/Get-AzDataBoxJobCredential.md index 366697af63e6..f3564a972352 100644 --- a/src/DataBox/DataBox/help/Get-AzDataBoxJobCredential.md +++ b/src/DataBox/DataBox/help/Get-AzDataBoxJobCredential.md @@ -162,7 +162,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IUnencryptedCredentials +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IUnencryptedCredentials ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxContactDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxContactDetailsObject.md index 4b6b8718b365..14b092520ab6 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxContactDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxContactDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxContactDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxcontactdetailsobject schema: 2.0.0 --- @@ -29,9 +29,12 @@ New-AzDataBoxContactDetailsObject -ContactName "random" -EmailList @("emailId") ``` ```output -ContactName EmailList Mobile Phone PhoneExtension ------------ --------- ------ ----- -------------- -random {emailId} 1234567891 +ContactName : random +EmailList : {emailId} +Mobile : +NotificationPreference : +Phone : 1234567891 +PhoneExtension : ``` Create a in-memory object for ContactDetails @@ -85,10 +88,9 @@ Accept wildcard characters: False ### -NotificationPreference Notification preference for a job stage. -To construct, see NOTES section for NOTIFICATIONPREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.INotificationPreference[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.INotificationPreference[] Parameter Sets: (All) Aliases: @@ -136,7 +138,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ContactDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxCustomerDiskJobDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxCustomerDiskJobDetailsObject.md index 60164ab426b6..5d2d92fff9d0 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxCustomerDiskJobDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxCustomerDiskJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxCustomerDiskJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxcustomerdiskjobdetailsobject schema: 2.0.0 --- @@ -13,12 +13,12 @@ Create an in-memory object for DataBoxCustomerDiskJobDetails. ## SYNTAX ``` -New-AzDataBoxCustomerDiskJobDetailsObject -ContactDetail -Type +New-AzDataBoxCustomerDiskJobDetailsObject -ContactDetail [-EnableManifestBackup ] [-ImportDiskDetailsCollection ] - [-ExportDiskDetailsCollection ] - [-ReturnToCustomerPackageDetailCarrierAccountNumber ] [-DataExportDetail ] - [-DataImportDetail ] [-ExpectedDataSizeInTeraByte ] - [-KeyEncryptionKey ] [-Preference ] + [-ReturnToCustomerPackageDetailCarrierAccountNumber ] + [-ReturnToCustomerPackageDetailCarrierName ] [-ReturnToCustomerPackageDetailTrackingId ] + [-DataExportDetail ] [-DataImportDetail ] + [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] [-Preference ] [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` @@ -30,12 +30,76 @@ Create an in-memory object for DataBoxCustomerDiskJobDetails. ### Example 1: DataBoxCustomerDisk details in-memory object ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} -New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +``` + +```output +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "XXXX XXXX", + "phone": "0000000000", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount", + "storageAccountId": + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + } + }} +DatacenterAddress : { + } +DeliverToDcPackageDetailCarrierName : +DeliverToDcPackageDetailTrackingId : +DeliveryPackage : { + } +DeviceErasureDetail : { + } +EnableManifestBackup : +ExpectedDataSizeInTeraByte : +ExportDiskDetailsCollection : { + } +ImportDiskDetailsCollection : { + "XXXXXX": { + "manifestFile": "xyz.txt", + "manifestHash": "xxxx", + "bitLockerKey": "xxx" + } + } +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } +ReturnToCustomerPackageDetailCarrierAccountNumber : 00000 +ReturnToCustomerPackageDetailCarrierName : +ReturnToCustomerPackageDetailTrackingId : +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "XXXX XXXX", + "city": "XXXX XXXX", + "stateOrProvince": "XX", + "country": "XX", + "postalCode": "00000", + "addressType": "Commercial" + } +Type : DataBoxCustomerDisk ``` DataBoxCustomerDisk details in-memory object @@ -44,10 +108,9 @@ DataBoxCustomerDisk details in-memory object ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -60,10 +123,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -76,10 +138,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -90,11 +151,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ExpectedDataSizeInTeraByte -The expected size of the data, which needs to be transferred in this job, in terabytes. +### -EnableManifestBackup +Flag to indicate if disk manifest should be backed-up in the Storage Account. ```yaml -Type: System.Int32 +Type: System.Boolean Parameter Sets: (All) Aliases: @@ -105,12 +166,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ExportDiskDetailsCollection -Contains the map of disk serial number to the disk details for export jobs. -To construct, see NOTES section for EXPORTDISKDETAILSCOLLECTION properties and create a hash table. +### -ExpectedDataSizeInTeraByte +The expected size of the data, which needs to be transferred in this job, in terabytes. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxCustomerDiskJobDetailsExportDiskDetailsCollection +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -123,10 +183,9 @@ Accept wildcard characters: False ### -ImportDiskDetailsCollection Contains the map of disk serial number to the disk details for import jobs. -To construct, see NOTES section for IMPORTDISKDETAILSCOLLECTION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxCustomerDiskJobDetailsImportDiskDetailsCollection +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxCustomerDiskJobDetailsImportDiskDetailsCollection Parameter Sets: (All) Aliases: @@ -139,10 +198,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -155,10 +213,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -184,12 +241,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ReverseShippingDetail -Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. +### -ReturnToCustomerPackageDetailCarrierName +Name of the carrier. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: System.String Parameter Sets: (All) Aliases: @@ -200,12 +256,26 @@ 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. +### -ReturnToCustomerPackageDetailTrackingId +Tracking Id of shipment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReverseShippingDetail +Optional Reverse Shipping details for order. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -216,15 +286,15 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. +### -ShippingAddress +Shipping address of the customer. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -238,7 +308,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxCustomerDiskJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxCustomerDiskJobDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxDiskJobDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxDiskJobDetailsObject.md index fdb8c8a61755..6d2a8fd55c34 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxDiskJobDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxDiskJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxDiskJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxdiskjobdetailsobject schema: 2.0.0 --- @@ -13,10 +13,10 @@ Create an in-memory object for DataBoxDiskJobDetails. ## SYNTAX ``` -New-AzDataBoxDiskJobDetailsObject -ContactDetail -Type - [-Passkey ] [-PreferredDisk ] - [-DataExportDetail ] [-DataImportDetail ] - [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] [-Preference ] +New-AzDataBoxDiskJobDetailsObject -ContactDetail [-Passkey ] + [-PreferredDisk ] [-DataExportDetail ] + [-DataImportDetail ] [-ExpectedDataSizeInTeraByte ] + [-KeyEncryptionKey ] [-Preference ] [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` @@ -31,13 +31,63 @@ Create an in-memory object for DataBoxDiskJobDetails. $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" -New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 +New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 ``` ```output -Action ChainOfCustodySasKey ExpectedDataSizeInTeraByte ReverseShipmentLabelSasKey Type Passkey ------- -------------------- -------------------------- -------------------------- ---- ------- - 18 DataBoxDisk $password +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } +DisksAndSizeDetail : { + } +ExpectedDataSizeInTeraByte : 18 +GranularCopyLogDetail : +GranularCopyProgress : +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Passkey : +Preference : { + } +PreferredDisk : { + "4": 2, + "8": 8 + } +ReturnPackage : { + } +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } +Type : DataBoxDisk ``` DataBoxDisk details in-memory object @@ -46,10 +96,9 @@ DataBoxDisk details in-memory object ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -62,10 +111,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -78,10 +126,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -109,10 +156,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -140,10 +186,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -160,10 +205,9 @@ The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. -To construct, see NOTES section for PREFERREDDISK properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataBoxDiskJobDetailsPreferredDisks +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxDiskJobDetailsPreferredDisks Parameter Sets: (All) Aliases: @@ -176,10 +220,9 @@ Accept wildcard characters: False ### -ReverseShippingDetail Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -192,10 +235,9 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: @@ -206,21 +248,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -228,7 +255,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxDiskJobDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxHeavyJobDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxHeavyJobDetailsObject.md index e74caa9f5f33..6e26df2a9aaf 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxHeavyJobDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxHeavyJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxHeavyJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxheavyjobdetailsobject schema: 2.0.0 --- @@ -13,10 +13,9 @@ Create an in-memory object for DataBoxHeavyJobDetails. ## SYNTAX ``` -New-AzDataBoxHeavyJobDetailsObject -ContactDetail -Type - [-DevicePassword ] [-DataExportDetail ] - [-DataImportDetail ] [-ExpectedDataSizeInTeraByte ] - [-KeyEncryptionKey ] [-Preference ] +New-AzDataBoxHeavyJobDetailsObject -ContactDetail [-DevicePassword ] + [-DataExportDetail ] [-DataImportDetail ] + [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] [-Preference ] [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` @@ -31,13 +30,55 @@ Create an in-memory object for DataBoxHeavyJobDetails. $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" -New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 +New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 ``` ```output -Action ChainOfCustodySasKey ExpectedDataSizeInTeraByte ReverseShipmentLabelSasKey Type Passkey ------- -------------------- -------------------------- -------------------------- ---- ------- - 18 DataBoxDisk $password +Action : +ChainOfCustodySasKey : +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } +CopyLogDetail : +CopyProgress : +DataCenterCode : +DataExportDetail : +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } +DevicePassword : +ExpectedDataSizeInTeraByte : 10 +JobStage : +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } +ReverseShipmentLabelSasKey : +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } +Type : DataBoxHeavy ``` Create a in-memory object for DataBoxHeavyJobDetails @@ -46,10 +87,9 @@ Create a in-memory object for DataBoxHeavyJobDetails ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -62,10 +102,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -78,10 +117,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -130,10 +168,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -146,10 +183,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -162,10 +198,9 @@ Accept wildcard characters: False ### -ReverseShippingDetail Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -178,10 +213,9 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: @@ -192,21 +226,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -214,7 +233,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxHeavyJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxHeavyJobDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxJob.md b/src/DataBox/DataBox/help/New-AzDataBoxJob.md index b108886597b7..1d3b4031d319 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxJob.md @@ -8,32 +8,46 @@ schema: 2.0.0 # New-AzDataBoxJob ## SYNOPSIS -Creates a new job with the specified parameters. -Existing job cannot be updated with this API and should instead be updated with the Update job API. +Create a new job with the specified parameters. +Existing job cannot be updated with this API and should instead be updated with the create job API. ## SYNTAX +### CreateExpanded (Default) ``` New-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] -Location - -SkuName -TransferType [-DeliveryInfoScheduledDateTime ] - [-DeliveryType ] [-Detail ] [-IdentityType ] [-SkuDisplayName ] - [-SkuFamily ] [-SkuModel ] [-Tag ] [-UserAssignedIdentity ] + -SkuName -TransferType [-DeliveryInfoScheduledDateTime ] [-DeliveryType ] + [-Detail ] [-EnableSystemAssignedIdentity] [-SkuDisplayName ] [-SkuFamily ] + [-SkuModel ] [-Tag ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonString +``` +New-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates a new job with the specified parameters. -Existing job cannot be updated with this API and should instead be updated with the Update job API. +Create a new job with the specified parameters. +Existing job cannot be updated with this API and should instead be updated with the create job API. ## EXAMPLES ### Example 1: Create a databox import job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $DebugPreference = "Continue" # You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation command fails. # { @@ -87,11 +101,11 @@ You can expand and visualize other object in similar way how details and shippin ### Example 2: Creates a databox export job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" $transferConfigurationType = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="True"} -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataExportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"= $transferConfigurationType} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails $resource = New-AzDataBoxJob -Name "ExportTest" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ExportFromAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -106,10 +120,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 3: Creates a databox import job with managed disk account ```powershell -$managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" -DataAccountType "ManagedDisk" +$managedDiskAccount=New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$managedDiskAccount; AccountDetailDataAccountType = "ManagedDisk"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails New-AzDataBoxJob -Name "PwshManagedDisk" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -124,12 +138,12 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 4: Creates a databox import job with user assigned identity ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails -New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}} +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails +New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` ```output @@ -143,10 +157,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 5: Creates a databox job with your own key ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password $resource = New-AzDataBoxJob -Name "PowershellBYOK" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -161,10 +175,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 6: Creates a databoxHeavy job with your own key ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxHeavyJobDetailsObject -Type "DataBoxHeavy" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 +$details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword $password -ExpectedDataSizeInTeraByte 10 $resource = New-AzDataBoxJob -Name "DbxHeavy" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxHeavy" ``` @@ -179,10 +193,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 7: Creates a databoxDisk job with your own Passkey ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxDiskJobDetailsObject -Type "DataBoxDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 +$details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey $password -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 New-AzDataBoxJob -Name "pwshDisk" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxDisk" ``` @@ -197,10 +211,10 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 8: Creates a databox job with double encryption enabled ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" $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" -$details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Preference @{EncryptionPreferenceDoubleEncryption="Enabled"} +$details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Preference @{EncryptionPreferenceDoubleEncryption="Enabled"} New-AzDataBoxJob -Name "pwshDoubEncy" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" ``` @@ -215,11 +229,11 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 9: Creates a Data Box Customer Disk import job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $importDiskDetailsCollection = @{"XXXXXX"= @{ManifestFile = "xyz.txt"; ManifestHash = "xxxx"; BitLockerKey = "xxx"}} -$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ImportDiskDetailsCollection $importDiskDetailsCollection -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" New-AzDataBoxJob -Name "testJobName1" -SubscriptionId "YourSubscriptionId" -ResourceGroupName "YourResourceGroup" -TransferType "ImportToAzure" -Detail $customerDiskDetails -Location "westus" -SkuName "DataBoxCustomerDisk" ``` @@ -235,11 +249,11 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl ### Example 10: Creates a Data Box Customer Disk export job ```powershell -$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" +$dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "XXXX XXXX" -EmailList @("emailId") -Phone "0000000000" $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "XXXX XXXX" -StateOrProvince "XX" -Country "XX" -City "XXXX XXXX" -PostalCode "00000" -AddressType "Commercial" $transferConfiguration = New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="False"} -$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -Type "DataBoxCustomerDisk" -DataExportDetail @(@{ AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"=$transferConfiguration }) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" +$customerDiskDetails = New-AzDataBoxCustomerDiskJobDetailsObject -DataExportDetail @(@{ AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"; "TransferConfiguration"=$transferConfiguration }) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -ReturnToCustomerPackageDetailCarrierAccountNumber "00000" New-AzDataBoxJob -Name "testJobName2" -SubscriptionId "YourSubscriptionId" -ResourceGroupName "YourResourceGroup" -TransferType "ExportFromAzure" -Detail $customerDiskDetails -Location "westus" -SkuName "DataBoxCustomerDisk" ``` @@ -291,7 +305,7 @@ Scheduled date time. ```yaml Type: System.DateTime -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -305,8 +319,8 @@ Accept wildcard characters: False Delivery type of Job. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.JobDeliveryType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -319,11 +333,10 @@ Accept wildcard characters: False ### -Detail Details of a job run. This field will only be sent for expand details filter. -To construct, see NOTES section for DETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobDetails -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobDetails +Parameter Sets: CreateExpanded Aliases: Required: False @@ -333,12 +346,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Identity type +### -EnableSystemAssignedIdentity +Determines whether to enable a system-assigned identity for the resource. ```yaml -Type: System.String -Parameter Sets: (All) +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded Aliases: Required: False @@ -348,6 +361,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The location of the resource. This will be one of the supported and registered Azure Regions (e.g. @@ -356,7 +399,7 @@ The region of a resource cannot be changed once it is created, but if an identic ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -417,7 +460,7 @@ The display name of the sku. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -432,7 +475,7 @@ The sku family. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -448,8 +491,8 @@ This field is necessary only at the time of ordering the newer generation device AzureDataBox120 and AzureDataBox525 as of Feb/2025 ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ModelName -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -463,8 +506,8 @@ Accept wildcard characters: False The sku name. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.SkuName -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: True @@ -495,7 +538,7 @@ These tags can be used in viewing and grouping this resource (across resource gr ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -509,8 +552,8 @@ Accept wildcard characters: False Type of the data transfer. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransferType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: True @@ -521,11 +564,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -User Assigned Identities +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: CreateExpanded Aliases: Required: False @@ -573,7 +617,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobResource +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxJobDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxJobDetailsObject.md index bf38c0c7017e..2624a944a573 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxJobDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxJobDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxJobDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxjobdetailsobject schema: 2.0.0 --- @@ -13,10 +13,9 @@ Create an in-memory object for DataBoxJobDetails. ## SYNTAX ``` -New-AzDataBoxJobDetailsObject -ContactDetail -Type - [-DevicePassword ] [-DataExportDetail ] - [-DataImportDetail ] [-ExpectedDataSizeInTeraByte ] - [-KeyEncryptionKey ] [-Preference ] +New-AzDataBoxJobDetailsObject -ContactDetail [-DevicePassword ] + [-DataExportDetail ] [-DataImportDetail ] + [-ExpectedDataSizeInTeraByte ] [-KeyEncryptionKey ] [-Preference ] [-ReverseShippingDetail ] [-ShippingAddress ] [] ``` @@ -31,27 +30,55 @@ Create an in-memory object for DataBoxJobDetails. $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" -New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails +New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails ``` ```output Action : ChainOfCustodySasKey : -ContactDetail : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ContactDetails +ContactDetail : { + "contactName": "random", + "phone": "1234567891", + "emailList": [ "emailId" ] + } CopyLogDetail : CopyProgress : +DataCenterCode : DataExportDetail : -DataImportDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataImportDetails} -DeliveryPackage : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.PackageShippingDetails +DataImportDetail : {{ + "accountDetails": { + "dataAccountType": "StorageAccount", + "storageAccountId": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroup/providers/Microsoft.Storage/storageAccounts/YourStorageAccount" + } + }} +DatacenterAddress : { + } +DeliveryPackage : { + } +DeviceErasureDetail : { + } DevicePassword : -ExpectedDataSizeInTeraByte : 0 +ExpectedDataSizeInTeraByte : JobStage : -KeyEncryptionKey : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey -LastMitigationActionOnJob : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.LastMitigationActionOnJob -Preference : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.Preferences -ReturnPackage : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.PackageShippingDetails +KeyEncryptionKey : { + } +LastMitigationActionOnJob : { + } +Preference : { + } +ReturnPackage : { + } ReverseShipmentLabelSasKey : -ShippingAddress : Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress +ReverseShippingDetail : { + } +ShippingAddress : { + "streetAddress1": "101 TOWNSEND ST", + "city": "San Francisco", + "stateOrProvince": "CA", + "country": "US", + "postalCode": "94107", + "addressType": "Commercial" + } Type : DataBox ``` @@ -61,10 +88,9 @@ Create a in-memory object for DataBoxJobDetails ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails Parameter Sets: (All) Aliases: @@ -77,10 +103,9 @@ Accept wildcard characters: False ### -DataExportDetail Details of the data to be exported from azure. -To construct, see NOTES section for DATAEXPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataExportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataExportDetails[] Parameter Sets: (All) Aliases: @@ -93,10 +118,9 @@ Accept wildcard characters: False ### -DataImportDetail Details of the data to be imported into azure. -To construct, see NOTES section for DATAIMPORTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IDataImportDetails[] +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataImportDetails[] Parameter Sets: (All) Aliases: @@ -145,10 +169,9 @@ Accept wildcard characters: False ### -KeyEncryptionKey Details about which key encryption type is being used. -To construct, see NOTES section for KEYENCRYPTIONKEY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey Parameter Sets: (All) Aliases: @@ -161,10 +184,9 @@ Accept wildcard characters: False ### -Preference Preferences for the order. -To construct, see NOTES section for PREFERENCE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IPreferences +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IPreferences Parameter Sets: (All) Aliases: @@ -177,10 +199,9 @@ Accept wildcard characters: False ### -ReverseShippingDetail Optional Reverse Shipping details for order. -To construct, see NOTES section for REVERSESHIPPINGDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IReverseShippingDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IReverseShippingDetails Parameter Sets: (All) Aliases: @@ -193,10 +214,9 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress Parameter Sets: (All) Aliases: @@ -207,21 +227,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -Indicates the type of job details. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.ClassDiscriminator -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -229,7 +234,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxJobDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.DataBoxJobDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxKeyEncryptionKeyObject.md b/src/DataBox/DataBox/help/New-AzDataBoxKeyEncryptionKeyObject.md index 2b45fb3ae830..11f032637f34 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxKeyEncryptionKeyObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxKeyEncryptionKeyObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxKeyEncryptionKeyObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxkeyencryptionkeyobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for KeyEncryptionKey. ## SYNTAX ``` -New-AzDataBoxKeyEncryptionKeyObject -KekType [-IdentityProperty ] +New-AzDataBoxKeyEncryptionKeyObject -KekType [-IdentityProperty ] [-KekUrl ] [-KekVaultResourceId ] [] ``` @@ -28,9 +28,15 @@ New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty ``` ```output -KekType KekUrl KekVaultResourceId -------- ------ ------------------ -CustomerManaged keyIdentifier /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName +IdentityProperty : { + "userAssigned": { + "resourceId": "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" + }, + "type": "UserAssigned" + } +KekType : CustomerManaged +KekUrl : keyIdentifier +KekVaultResourceId : /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName ``` Create a in-memory object for KeyEncryptionKey @@ -39,10 +45,9 @@ Create a in-memory object for KeyEncryptionKey ### -IdentityProperty Managed identity properties used for key encryption. -To construct, see NOTES section for IDENTITYPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IIdentityProperties +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IIdentityProperties Parameter Sets: (All) Aliases: @@ -57,7 +62,7 @@ Accept wildcard characters: False Type of encryption key used for key encryption. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.KekType +Type: System.String Parameter Sets: (All) Aliases: @@ -107,7 +112,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.KeyEncryptionKey +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.KeyEncryptionKey ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxManagedDiskDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxManagedDiskDetailsObject.md index 40239a37b8f4..4ced01b2f9a0 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxManagedDiskDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxManagedDiskDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxManagedDiskDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxmanageddiskdetailsobject schema: 2.0.0 --- @@ -14,8 +14,7 @@ Create an in-memory object for ManagedDiskDetails. ``` New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId -StagingStorageAccountId - -DataAccountType [-SharePassword ] - [] + [-SharePassword ] [] ``` ## DESCRIPTION @@ -25,34 +24,19 @@ Create an in-memory object for ManagedDiskDetails. ### Example 1: ManagedDisk object ```powershell -New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" -DataAccountType "ManagedDisk" +New-AzDataBoxManagedDiskDetailsObject -ResourceGroupId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName" -StagingStorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName" ``` ```output -DataAccountType SharePassword ResourceGroupId StagingStorageAccountId ---------------- ------------- --------------- ----------------------- -ManagedDisk /subscriptions/SubscriptionId/resourceGroups/resourceGroupName /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/stagingAccountName +DataAccountType ResourceGroupId SharePassword StagingStorageAccountId +--------------- --------------- ------------- ----------------------- +ManagedDisk /subscriptions/SubscriptionId/resourceGroups/resourceGroupName /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/st ``` Creates a in-memory managed disk object ## PARAMETERS -### -DataAccountType -Account Type of the data to be transferred. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupId Resource Group Id of the compute disks. @@ -111,7 +95,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ManagedDiskDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ManagedDiskDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxShippingAddressObject.md b/src/DataBox/DataBox/help/New-AzDataBoxShippingAddressObject.md index 8219b03cb74d..44fc755e2b0a 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxShippingAddressObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxShippingAddressObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxShippingAddressObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxshippingaddressobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for ShippingAddress. ## SYNTAX ``` -New-AzDataBoxShippingAddressObject -Country -StreetAddress1 [-AddressType ] +New-AzDataBoxShippingAddressObject -Country -StreetAddress1 [-AddressType ] [-City ] [-CompanyName ] [-PostalCode ] [-SkipAddressValidation ] [-StateOrProvince ] [-StreetAddress2 ] [-StreetAddress3 ] [-TaxIdentificationNumber ] [-ZipExtendedCode ] @@ -31,9 +31,18 @@ New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrPro ``` ```output -AddressType City CompanyName Country PostalCode StateOrProvince StreetAddress1 StreetAddress2 StreetAddress3 ZipExtendedCode ------------ ---- ----------- ------- ---------- --------------- -------------- -------------- -------------- --------------- -Commercial San Francisco US 94107 CA 101 TOWNSEND ST +AddressType : Commercial +City : San Francisco +CompanyName : +Country : US +PostalCode : 94107 +SkipAddressValidation : +StateOrProvince : CA +StreetAddress1 : 101 TOWNSEND ST +StreetAddress2 : +StreetAddress3 : +TaxIdentificationNumber : +ZipExtendedCode : ``` Creates a in-memory shipping address object @@ -44,7 +53,7 @@ Creates a in-memory shipping address object Type of address. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.AddressType +Type: System.String Parameter Sets: (All) Aliases: @@ -227,7 +236,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ShippingAddress +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ShippingAddress ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxStorageAccountDetailsObject.md b/src/DataBox/DataBox/help/New-AzDataBoxStorageAccountDetailsObject.md index 9efdcb6150d1..da1ae8fbaf18 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxStorageAccountDetailsObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxStorageAccountDetailsObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxStorageAccountDetailsObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxstorageaccountdetailsobject schema: 2.0.0 --- @@ -13,8 +13,8 @@ Create an in-memory object for StorageAccountDetails. ## SYNTAX ``` -New-AzDataBoxStorageAccountDetailsObject -StorageAccountId -DataAccountType - [-SharePassword ] [] +New-AzDataBoxStorageAccountDetailsObject -StorageAccountId [-SharePassword ] + [] ``` ## DESCRIPTION @@ -24,7 +24,7 @@ Create an in-memory object for StorageAccountDetails. ### Example 1: Storage account in-memory object ```powershell -New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" +New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName" ``` ```output @@ -37,21 +37,6 @@ Storage account in-memory object ## PARAMETERS -### -DataAccountType -Account Type of the data to be transferred. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SharePassword Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. @@ -95,7 +80,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.StorageAccountDetails +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.StorageAccountDetails ## NOTES diff --git a/src/DataBox/DataBox/help/New-AzDataBoxTransferConfigurationObject.md b/src/DataBox/DataBox/help/New-AzDataBoxTransferConfigurationObject.md index 7d966ca4f8b4..e53cd45f6c08 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxTransferConfigurationObject.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxTransferConfigurationObject.md @@ -1,7 +1,7 @@ --- external help file: Az.DataBox-help.xml Module Name: Az.DataBox -online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-AzDataBoxTransferConfigurationObject +online version: https://learn.microsoft.com/powershell/module/Az.DataBox/new-azdataboxtransferconfigurationobject schema: 2.0.0 --- @@ -13,7 +13,7 @@ Create an in-memory object for TransferConfiguration. ## SYNTAX ``` -New-AzDataBoxTransferConfigurationObject -Type +New-AzDataBoxTransferConfigurationObject -Type [-TransferAllDetail ] [-TransferFilterDetail ] [] @@ -29,6 +29,19 @@ Create an in-memory object for TransferConfiguration. New-AzDataBoxTransferConfigurationObject -Type "TransferAll" -TransferAllDetail @{"IncludeDataAccountType"="StorageAccount";"IncludeTransferAllBlob"= "True"; "IncludeTransferAllFile"="True"} ``` +```output +TransferAllDetail : { + "include": { + "dataAccountType": "StorageAccount", + "transferAllBlobs": true, + "transferAllFiles": true + } + } +TransferFilterDetail : { + } +Type : TransferAll +``` + Create a in-memory object for export jobs TransferConfiguration ## PARAMETERS @@ -36,10 +49,9 @@ Create a in-memory object for export jobs TransferConfiguration ### -TransferAllDetail Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. -To construct, see NOTES section for TRANSFERALLDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ITransferConfigurationTransferAllDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ITransferConfigurationTransferAllDetails Parameter Sets: (All) Aliases: @@ -53,10 +65,9 @@ Accept wildcard characters: False ### -TransferFilterDetail Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. -To construct, see NOTES section for TRANSFERFILTERDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ITransferConfigurationTransferFilterDetails +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ITransferConfigurationTransferFilterDetails Parameter Sets: (All) Aliases: @@ -71,7 +82,7 @@ Accept wildcard characters: False Type of the configuration for transfer. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransferConfigurationType +Type: System.String Parameter Sets: (All) Aliases: @@ -89,7 +100,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.TransferConfiguration +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.TransferConfiguration ## NOTES diff --git a/src/DataBox/DataBox/help/Stop-AzDataBoxJob.md b/src/DataBox/DataBox/help/Stop-AzDataBoxJob.md index 464356cd1245..76a10b435284 100644 --- a/src/DataBox/DataBox/help/Stop-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/Stop-AzDataBoxJob.md @@ -12,12 +12,27 @@ CancelJob. ## SYNTAX +### CancelExpanded (Default) ``` Stop-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] -Reason [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] [] ``` +### CancelViaJsonFilePath +``` +Stop-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] -JsonFilePath + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + +### CancelViaJsonString +``` +Stop-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] -JsonString + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + ## DESCRIPTION CancelJob. @@ -55,6 +70,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Cancel operation + +```yaml +Type: System.String +Parameter Sets: CancelViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Cancel operation + +```yaml +Type: System.String +Parameter Sets: CancelViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +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 @@ -91,7 +136,7 @@ Reason for cancellation. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CancelExpanded Aliases: Required: True diff --git a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md index c07cea004402..e34e9764a504 100644 --- a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md @@ -8,28 +8,57 @@ schema: 2.0.0 # Update-AzDataBoxJob ## SYNOPSIS -Updates the properties of an existing job. +Update the properties of an existing job. ## SYNTAX +### UpdateExpanded (Default) ``` Update-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] [-ContactDetail ] [-ContactDetailContactName ] [-ContactDetailMobile ] [-ContactDetailPhone ] [-ContactDetailPhoneExtension ] - [-EncryptionPreferenceDoubleEncryption ] - [-EncryptionPreferenceHardwareEncryption ] [-IdentityType ] - [-KeyEncryptionKey ] [-PreferencePreferredDataCenterRegion ] + [-EncryptionPreferenceDoubleEncryption ] [-EncryptionPreferenceHardwareEncryption ] + [-EnableSystemAssignedIdentity ] [-KeyEncryptionKey ] + [-PreferencePreferredDataCenterRegion ] [-ReturnToCustomerPackageDetailCarrierAccountNumber ] [-ReturnToCustomerPackageDetailCarrierName ] [-ReturnToCustomerPackageDetailTrackingId ] - [-ReverseShippingDetail ] [-ReverseTransportPreferredShipmentType ] - [-ShippingAddress ] [-StorageAccountAccessTierPreference ] - [-Tag ] [-TransportPreferredShipmentType ] - [-UserAssignedIdentity ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ReverseShippingDetail ] [-ReverseTransportPreferredShipmentType ] + [-ShippingAddress ] [-StorageAccountAccessTierPreference ] [-Tag ] + [-TransportPreferredShipmentType ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` +### UpdateViaJsonString +``` +Update-AzDataBoxJob -Name -ResourceGroupName [-SubscriptionId ] [-IfMatch ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzDataBoxJob -InputObject [-IfMatch ] [-ContactDetail ] + [-ContactDetailContactName ] [-ContactDetailMobile ] [-ContactDetailPhone ] + [-ContactDetailPhoneExtension ] [-EncryptionPreferenceDoubleEncryption ] + [-EncryptionPreferenceHardwareEncryption ] [-EnableSystemAssignedIdentity ] + [-KeyEncryptionKey ] [-PreferencePreferredDataCenterRegion ] + [-ReturnToCustomerPackageDetailCarrierAccountNumber ] + [-ReturnToCustomerPackageDetailCarrierName ] [-ReturnToCustomerPackageDetailTrackingId ] + [-ReverseShippingDetail ] [-ReverseTransportPreferredShipmentType ] + [-ShippingAddress ] [-StorageAccountAccessTierPreference ] [-Tag ] + [-TransportPreferredShipmentType ] [-UserAssignedIdentity ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Updates the properties of an existing job. +Update the properties of an existing job. ## EXAMPLES @@ -51,7 +80,7 @@ $DebugPreference = "Continue" # } # } -Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "UserAssigned" -UserAssignedIdentity @{"/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}} +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails ``` @@ -105,7 +134,7 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl $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-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` Update databox job from system assigned to user assigned with customer managed key encryption. @@ -130,11 +159,10 @@ Accept wildcard characters: False ### -ContactDetail Contact details for notification and shipping. -To construct, see NOTES section for CONTACTDETAIL properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IContactDetails -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IContactDetails +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -149,7 +177,7 @@ Contact name of the person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -164,7 +192,7 @@ Mobile number of the contact person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -179,7 +207,7 @@ Phone number of the contact person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -194,7 +222,7 @@ Phone extension number of the contact person. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -220,12 +248,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EncryptionPreferenceDoubleEncryption -Defines secondary layer of software-based encryption enablement. +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DoubleEncryption -Parameter Sets: (All) +Type: System.Nullable`1[System.Boolean] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -235,12 +263,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EncryptionPreferenceHardwareEncryption -Defines Hardware level encryption (Only for disk) +### -EncryptionPreferenceDoubleEncryption +Defines secondary layer of software-based encryption enablement. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.HardwareEncryption -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -250,12 +278,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -Identity type +### -EncryptionPreferenceHardwareEncryption +Defines Hardware level encryption (Only for disk) ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -281,13 +309,57 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +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. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IKeyEncryptionKey -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IKeyEncryptionKey +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -303,7 +375,7 @@ job names must be between 3 and 24 characters in length and use any alphanumeric ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: JobName Required: True @@ -333,7 +405,7 @@ Preferred data center region. ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -348,7 +420,7 @@ The Resource Group Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: True @@ -363,7 +435,7 @@ Carrier Account Number of customer for customer disk. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -378,7 +450,7 @@ Name of the carrier. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -393,7 +465,7 @@ Tracking Id of shipment. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -405,11 +477,10 @@ 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. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -423,8 +494,8 @@ Accept wildcard characters: False Indicates Shipment Logistics type that the customer preferred. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransportShipmentTypes -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -436,11 +507,10 @@ Accept wildcard characters: False ### -ShippingAddress Shipping address of the customer. -To construct, see NOTES section for SHIPPINGADDRESS properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IShippingAddress -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IShippingAddress +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -454,8 +524,8 @@ Accept wildcard characters: False Preferences related to the Access Tier of storage accounts. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.StorageAccountAccessTier[] -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -470,7 +540,7 @@ The Subscription Id ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: False @@ -486,7 +556,7 @@ These tags can be used in viewing and grouping this resource (across resource gr ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -500,8 +570,8 @@ Accept wildcard characters: False Indicates Shipment Logistics type that the customer preferred. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.TransportShipmentTypes -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -512,11 +582,12 @@ Accept wildcard characters: False ``` ### -UserAssignedIdentity -User Assigned Identities +The array of user assigned identities associated with the resource. +The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -562,9 +633,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobResource +### Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobResource ## NOTES From 8c82eb38674c589b602eaaf5deea6cbb8f7bd6af Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Wed, 11 Jun 2025 16:29:02 +0800 Subject: [PATCH 2/8] update custom logic --- .../Properties/AssemblyInfo.cs | 3 - .../custom/Update-AzDataBoxJob.ps1 | 88 +++++++------------ .../DataBox.Autorest/generate-info.json | 2 +- src/DataBox/DataBox.sln | 28 +++--- 4 files changed, 49 insertions(+), 72 deletions(-) diff --git a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs index 70fdfa028751..14a3f02e4192 100644 --- a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs +++ b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs @@ -24,6 +24,3 @@ [assembly: System.Reflection.AssemblyVersionAttribute("0.5.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] - - - diff --git a/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 b/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 index 46a0c85058a3..253d3553e4e9 100644 --- a/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 @@ -442,60 +442,40 @@ param( ) process { - if ($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity') -or $PSBoundParameters.ContainsKey('UserAssignedIdentity') ) { - # Get dataBox DataObj - $parameterSet = $PSCmdlet.ParameterSetName - if (('UpdateExpanded') -contains $parameterSet) { - $dataBox = Az.DataBox\Get-AzDataBoxJob -Name $Name -ResourceGroupName $ResourceGroupName - } - elseif (('UpdateViaIdentityExpanded') -contains $parameterSet) { - $dataBox = Az.DataBox\Get-AzDataBoxJob -InputObject $InputObject - } - if ($null -eq $dataBox) { - throw "$Name doesn't exist" - } - - # If user input UserAssignedIdentity - if ($PSBoundParameters.ContainsKey('UserAssignedIdentity')) { - $userIdentityObject = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.UserAssignedIdentity]::New() - $PSBoundParameters.IdentityUserAssignedIdentity = @{} - foreach ($item in $PSBoundParameters.UserAssignedIdentity) { - $PSBoundParameters.IdentityUserAssignedIdentity.Add($item, $userIdentityObject ) - } - - if ($dataBox.IdentityUserAssignedIdentity.Count -gt 0) { - $dataBox.IdentityUserAssignedIdentity.Keys | ForEach-Object { - if (-NOT($_ -in $UserAssignedIdentity)) { - $PSBoundParameters.IdentityUserAssignedIdentity.Add($_, $null) - } - } - } - } - - # calculate IdentityType - $supportsSystemAssignedIdentity = $EnableSystemAssignedIdentity -or (($null -eq $EnableSystemAssignedIdentity) -and ($dataBox.IdentityType.Contains('SystemAssigned'))) - $supportsUserAssignedIdentity = ($PSBoundParameters.ContainsKey('UserAssignedIdentity') -and $UserAssignedIdentity.Length -gt 0) -or ((-not $PSBoundParameters.ContainsKey('UserAssignedIdentity')) -and ($dataBox.IdentityType.Contains('UserAssigned'))); - if (($supportsSystemAssignedIdentity -and $supportsUserAssignedIdentity)) { - $PSBoundParameters.Add("IdentityType", "SystemAssigned,UserAssigned") - } - elseif ($supportsUserAssignedIdentity -and (-not $supportsSystemAssignedIdentity)) { - $PSBoundParameters.Add("IdentityType", "UserAssigned") - } - elseif ((-not $supportsUserAssignedIdentity) -and $supportsSystemAssignedIdentity) { - $PSBoundParameters.Add("IdentityType", "SystemAssigned") - } - else { - $PSBoundParameters.Add("IdentityType", "None") - } - - # remove EnableSystemAssignedIdentity - if ($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity')) { - $null = $PSBoundParameters.Remove("EnableSystemAssignedIdentity") - } - # remove UserAssignedIdentity - if ($PSBoundParameters.ContainsKey('UserAssignedIdentity')) { - $null = $PSBoundParameters.Remove('UserAssignedIdentity') - } + if($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity') -or $PSBoundParameters.ContainsKey('UserAssignedIdentity') ){ + $parameterSet = $PSCmdlet.ParameterSetName + # get existing dataBoxObj + if(('UpdateExpanded') -contains $parameterSet){ + $dataBoxObj = Az.DataBox.exports\Get-AzDataBoxJob -Name $Name -ResourceGroupName $ResourceGroupName + }elseif(('UpdateViaIdentityExpanded') -contains $parameterSet) + { + $dataBoxObj = Az.DataBox.exports\Get-AzDataBoxJob -InputObject $InputObject + } + if($null -eq $dataBoxObj) + { + throw "$Name doesn't exist" + } + + # calculate IdentityType + $supportsSystemAssignedIdentity = $EnableSystemAssignedIdentity -or (($null -eq $EnableSystemAssignedIdentity) -and ($dataBoxObj.IdentityType -Contains "SystemAssigned")) + $supportsUserAssignedIdentity = ($PSBoundParameters.ContainsKey('UserAssignedIdentity') -and $UserAssignedIdentity.Length -gt 0) -or ((-not $PSBoundParameters.ContainsKey('UserAssignedIdentity')) -and ($dataBoxObj.IdentityType -Contains "UserAssigned")); + if (($supportsSystemAssignedIdentity -and $supportsUserAssignedIdentity)) { + $PSBoundParameters.Add("IdentityType", "SystemAssigned,UserAssigned") + } + elseif ($supportsUserAssignedIdentity -and (-not $supportsSystemAssignedIdentity)) { + $PSBoundParameters.Add("IdentityType", "UserAssigned") + } + elseif ((-not $supportsUserAssignedIdentity) -and $supportsSystemAssignedIdentity) { + $PSBoundParameters.Add("IdentityType", "SystemAssigned") + } + else { + $PSBoundParameters.Add("IdentityType", "None") + } + + # remove EnableSystemAssignedIdentity + if($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity')) { + $null = $PSBoundParameters.Remove("EnableSystemAssignedIdentity") + } } Az.DataBox.internal\Update-AzDataBoxJob @PSBoundParameters } diff --git a/src/DataBox/DataBox.Autorest/generate-info.json b/src/DataBox/DataBox.Autorest/generate-info.json index 06f906d5be85..fc24b7b27525 100644 --- a/src/DataBox/DataBox.Autorest/generate-info.json +++ b/src/DataBox/DataBox.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "e3f0c1c4-a2a8-4316-9d40-d9762e20884b" + "generate_Id": "baf0dec0-a30d-4ccf-89a9-3edc1aebb539" } diff --git a/src/DataBox/DataBox.sln b/src/DataBox/DataBox.sln index 8e3c39949296..6f7863d433cc 100644 --- a/src/DataBox/DataBox.sln +++ b/src/DataBox/DataBox.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBox", "DataBox\DataBox. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataBox.Autorest", "DataBox.Autorest", "{5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{388FC11C-763D-4DC9-B793-4515651EC33F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{9C186F7E-6D79-42D3-9673-0424BAB7B29B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x64.Build.0 = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.ActiveCfg = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.Build.0 = Release|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x64.ActiveCfg = Debug|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x64.Build.0 = Debug|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x86.ActiveCfg = Debug|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Debug|x86.Build.0 = Debug|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|Any CPU.Build.0 = Release|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x64.ActiveCfg = Release|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x64.Build.0 = Release|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x86.ActiveCfg = Release|Any CPU - {388FC11C-763D-4DC9-B793-4515651EC33F}.Release|x86.Build.0 = Release|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x64.Build.0 = Debug|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x86.Build.0 = Debug|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|Any CPU.Build.0 = Release|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x64.ActiveCfg = Release|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x64.Build.0 = Release|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x86.ActiveCfg = Release|Any CPU + {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {0CBD7F56-9ACE-4D0C-841F-256077AE517A} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {2B53E025-DCB9-463E-A405-983D2A666A76} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} - {388FC11C-763D-4DC9-B793-4515651EC33F} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} + {9C186F7E-6D79-42D3-9673-0424BAB7B29B} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} EndGlobalSection EndGlobal From 7ade8dd4ca68ea307f868d93679cd0101327a955 Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Wed, 11 Jun 2025 17:12:16 +0800 Subject: [PATCH 3/8] update --- .../docs/Update-AzDataBoxJob.md | 8 +++--- .../examples/Update-AzDataBoxJob.md | 8 +++--- .../DataBox.Autorest/generate-info.json | 2 +- src/DataBox/DataBox.sln | 28 +++++++++---------- .../DataBox/help/Update-AzDataBoxJob.md | 8 +++--- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md index 0dda8b95aee3..5f127922724c 100644 --- a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md @@ -79,7 +79,7 @@ $DebugPreference = "Continue" # } # } -Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails ``` @@ -98,13 +98,13 @@ Update databox job encryption from microsoft managed to customer managed with us ### Example 2: Update databox job encryption from microsoft managed to customer managed with system identities in 2 updates ```powershell -$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned" +$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true $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 = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails $databoxUpdateWithCMK.Identity @@ -133,7 +133,7 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl $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 -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` Update databox job from system assigned to user assigned with customer managed key encryption. diff --git a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md index e64e7f233cb3..410d2168b989 100644 --- a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md @@ -16,7 +16,7 @@ $DebugPreference = "Continue" # } # } -Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails ``` @@ -34,13 +34,13 @@ Update databox job encryption from microsoft managed to customer managed with us ### Example 2: Update databox job encryption from microsoft managed to customer managed with system identities in 2 updates ```powershell -$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned" +$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true $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 = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails $databoxUpdateWithCMK.Identity @@ -67,7 +67,7 @@ Update databox job encryption from microsoft managed to customer managed to cust $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 -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -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 diff --git a/src/DataBox/DataBox.Autorest/generate-info.json b/src/DataBox/DataBox.Autorest/generate-info.json index fc24b7b27525..5c372263e6c5 100644 --- a/src/DataBox/DataBox.Autorest/generate-info.json +++ b/src/DataBox/DataBox.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "baf0dec0-a30d-4ccf-89a9-3edc1aebb539" + "generate_Id": "c7b3fe42-cc21-405f-999c-3b14271aba04" } diff --git a/src/DataBox/DataBox.sln b/src/DataBox/DataBox.sln index 6f7863d433cc..b343588354d1 100644 --- a/src/DataBox/DataBox.sln +++ b/src/DataBox/DataBox.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBox", "DataBox\DataBox. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataBox.Autorest", "DataBox.Autorest", "{5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{9C186F7E-6D79-42D3-9673-0424BAB7B29B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x64.Build.0 = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.ActiveCfg = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.Build.0 = Release|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x64.ActiveCfg = Debug|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x64.Build.0 = Debug|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x86.ActiveCfg = Debug|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Debug|x86.Build.0 = Debug|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|Any CPU.Build.0 = Release|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x64.ActiveCfg = Release|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x64.Build.0 = Release|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x86.ActiveCfg = Release|Any CPU - {9C186F7E-6D79-42D3-9673-0424BAB7B29B}.Release|x86.Build.0 = Release|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x64.ActiveCfg = Debug|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x64.Build.0 = Debug|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x86.ActiveCfg = Debug|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x86.Build.0 = Debug|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|Any CPU.Build.0 = Release|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x64.ActiveCfg = Release|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x64.Build.0 = Release|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x86.ActiveCfg = Release|Any CPU + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {0CBD7F56-9ACE-4D0C-841F-256077AE517A} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {2B53E025-DCB9-463E-A405-983D2A666A76} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} - {9C186F7E-6D79-42D3-9673-0424BAB7B29B} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} + {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} EndGlobalSection EndGlobal diff --git a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md index e34e9764a504..1e5c0ef9c38b 100644 --- a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md @@ -80,7 +80,7 @@ $DebugPreference = "Continue" # } # } -Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails ``` @@ -99,13 +99,13 @@ Update databox job encryption from microsoft managed to customer managed with us ### Example 2: Update databox job encryption from microsoft managed to customer managed with system identities in 2 updates ```powershell -$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned" +$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true $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 = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails $databoxUpdateWithCMK.Identity @@ -134,7 +134,7 @@ For any failure re-run with $DebugPreference = "Continue" as mentioned in exampl $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 -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` Update databox job from system assigned to user assigned with customer managed key encryption. From f6e09793090f2f2990d3fbca87b8de8ed5a8f440 Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Wed, 11 Jun 2025 17:33:34 +0800 Subject: [PATCH 4/8] update test case --- .../test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 index 335e8585a464..5cbd1f5d76e4 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxHeavyJobDetailsObject.Tests.ps1 @@ -19,7 +19,7 @@ Describe 'New-AzDataBoxHeavyJobDetailsObject' { $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "randm@423jarABC" -ExpectedDataSizeInTeraByte 10 + $details = $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "*****" -ExpectedDataSizeInTeraByte 10 $details.ExpectedDataSizeInTeraByte | Should -Be 10 } From 9870dac024f78bb06686e2d1456eedbcc4ae5c75 Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Wed, 11 Jun 2025 17:38:39 +0800 Subject: [PATCH 5/8] update test case --- .../DataBox.Autorest/test/New-AzDataBoxJob.Recording.json | 4 ++-- src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Recording.json b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Recording.json index 3f87dad9438e..1e32f72d9f70 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Recording.json +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Recording.json @@ -658,7 +658,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databox-pwsh-rg-hx/providers/Microsoft.DataBox/jobs/PwshHeavyvog4?api-version=2025-02-01", - "Content": "{\r\n \"sku\": {\r\n \"name\": \"DataBoxHeavy\"\r\n },\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"transferType\": \"ImportToAzure\",\r\n \"details\": {\r\n \"contactDetails\": {\r\n \"contactName\": \"random\",\r\n \"phone\": \"1234567891\",\r\n \"emailList\": [ \"dhja@microsoft.com\" ]\r\n },\r\n \"shippingAddress\": {\r\n \"streetAddress1\": \"101 TOWNSEND ST\",\r\n \"city\": \"San Francisco\",\r\n \"stateOrProvince\": \"CA\",\r\n \"country\": \"US\",\r\n \"postalCode\": \"94107\",\r\n \"addressType\": \"Commercial\"\r\n },\r\n \"dataImportDetails\": [\r\n {\r\n \"accountDetails\": {\r\n \"dataAccountType\": \"StorageAccount\",\r\n \"storageAccountId\": \"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dhja/providers/Microsoft.Storage/storageAccounts/dhjapowershellstorage\"\r\n }\r\n }\r\n ],\r\n \"jobDetailsType\": \"DataBoxHeavy\",\r\n \"expectedDataSizeInTeraBytes\": 10,\r\n \"devicePassword\": \"randm@423jarABC\"\r\n }\r\n }\r\n}", + "Content": "{\r\n \"sku\": {\r\n \"name\": \"DataBoxHeavy\"\r\n },\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"transferType\": \"ImportToAzure\",\r\n \"details\": {\r\n \"contactDetails\": {\r\n \"contactName\": \"random\",\r\n \"phone\": \"1234567891\",\r\n \"emailList\": [ \"dhja@microsoft.com\" ]\r\n },\r\n \"shippingAddress\": {\r\n \"streetAddress1\": \"101 TOWNSEND ST\",\r\n \"city\": \"San Francisco\",\r\n \"stateOrProvince\": \"CA\",\r\n \"country\": \"US\",\r\n \"postalCode\": \"94107\",\r\n \"addressType\": \"Commercial\"\r\n },\r\n \"dataImportDetails\": [\r\n {\r\n \"accountDetails\": {\r\n \"dataAccountType\": \"StorageAccount\",\r\n \"storageAccountId\": \"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dhja/providers/Microsoft.Storage/storageAccounts/dhjapowershellstorage\"\r\n }\r\n }\r\n ],\r\n \"jobDetailsType\": \"DataBoxHeavy\",\r\n \"expectedDataSizeInTeraBytes\": 10,\r\n \"devicePassword\": \"*****\"\r\n }\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -789,7 +789,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databox-pwsh-rg-hx/providers/Microsoft.DataBox/jobs/PwshDiskoi75?api-version=2025-02-01", - "Content": "{\r\n \"sku\": {\r\n \"name\": \"DataBoxDisk\"\r\n },\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"transferType\": \"ImportToAzure\",\r\n \"details\": {\r\n \"contactDetails\": {\r\n \"contactName\": \"random\",\r\n \"phone\": \"1234567891\",\r\n \"emailList\": [ \"dhja@microsoft.com\" ]\r\n },\r\n \"shippingAddress\": {\r\n \"streetAddress1\": \"101 TOWNSEND ST\",\r\n \"city\": \"San Francisco\",\r\n \"stateOrProvince\": \"CA\",\r\n \"country\": \"US\",\r\n \"postalCode\": \"94107\",\r\n \"addressType\": \"Commercial\"\r\n },\r\n \"dataImportDetails\": [\r\n {\r\n \"accountDetails\": {\r\n \"dataAccountType\": \"StorageAccount\",\r\n \"storageAccountId\": \"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dhja/providers/Microsoft.Storage/storageAccounts/dhjapowershellstorage\"\r\n }\r\n }\r\n ],\r\n \"jobDetailsType\": \"DataBoxDisk\",\r\n \"expectedDataSizeInTeraBytes\": 18,\r\n \"preferredDisks\": {\r\n \"8\": 8,\r\n \"4\": 2\r\n },\r\n \"passkey\": \"randm@423jarABC\"\r\n }\r\n }\r\n}", + "Content": "{\r\n \"sku\": {\r\n \"name\": \"DataBoxDisk\"\r\n },\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"transferType\": \"ImportToAzure\",\r\n \"details\": {\r\n \"contactDetails\": {\r\n \"contactName\": \"random\",\r\n \"phone\": \"1234567891\",\r\n \"emailList\": [ \"dhja@microsoft.com\" ]\r\n },\r\n \"shippingAddress\": {\r\n \"streetAddress1\": \"101 TOWNSEND ST\",\r\n \"city\": \"San Francisco\",\r\n \"stateOrProvince\": \"CA\",\r\n \"country\": \"US\",\r\n \"postalCode\": \"94107\",\r\n \"addressType\": \"Commercial\"\r\n },\r\n \"dataImportDetails\": [\r\n {\r\n \"accountDetails\": {\r\n \"dataAccountType\": \"StorageAccount\",\r\n \"storageAccountId\": \"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dhja/providers/Microsoft.Storage/storageAccounts/dhjapowershellstorage\"\r\n }\r\n }\r\n ],\r\n \"jobDetailsType\": \"DataBoxDisk\",\r\n \"expectedDataSizeInTeraBytes\": 18,\r\n \"preferredDisks\": {\r\n \"8\": 8,\r\n \"4\": 2\r\n },\r\n \"passkey\": \"*****\"\r\n }\r\n }\r\n}", "isContentBase64": false, "Headers": { }, diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 index c3a9df73de9b..2f70ee7b5cfb 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 @@ -102,7 +102,7 @@ Describe 'New-AzDataBoxJob' { $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "randm@423jarABC" -ExpectedDataSizeInTeraByte 10 + $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "*****" -ExpectedDataSizeInTeraByte 10 $resource = New-AzDataBoxJob -Name $env.JobNameHeavy -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxHeavy" @@ -117,7 +117,7 @@ Describe 'New-AzDataBoxJob' { $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "randm@423jarABC" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 + $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "*****" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 $resource = New-AzDataBoxJob -Name $env.JobNameDisk -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxDisk" $resource.Status | Should -Be 'DeviceOrdered' } From 7cac6ee042ce6153a29e9770bfa490d02bf5a5ed Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Thu, 12 Jun 2025 17:49:52 +0800 Subject: [PATCH 6/8] update examples --- .../Properties/AssemblyInfo.cs | 1 + src/DataBox/DataBox.Autorest/README.md | 18 +----------- .../custom/Update-AzDataBoxJob.ps1 | 22 +++------------ .../DataBox.Autorest/docs/New-AzDataBoxJob.md | 14 +--------- .../docs/Update-AzDataBoxJob.md | 14 ---------- .../examples/New-AzDataBoxJob.md | 14 +--------- .../examples/Update-AzDataBoxJob.md | 17 +---------- .../DataBox.Autorest/generate-info.json | 2 +- .../test/New-AzDataBoxJob.Tests.ps1 | 6 ++-- .../test/Update-AzDataBoxJob.Tests.ps1 | 6 ++-- src/DataBox/DataBox.Autorest/test/utils.ps1 | 4 +-- src/DataBox/DataBox.sln | 28 +++++++++---------- src/DataBox/DataBox/Az.DataBox.psd1 | 2 +- src/DataBox/DataBox/help/New-AzDataBoxJob.md | 14 +--------- .../DataBox/help/Update-AzDataBoxJob.md | 14 ---------- 15 files changed, 34 insertions(+), 142 deletions(-) diff --git a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs index 14a3f02e4192..e2015f97ff4a 100644 --- a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs +++ b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs @@ -24,3 +24,4 @@ [assembly: System.Reflection.AssemblyVersionAttribute("0.5.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] + diff --git a/src/DataBox/DataBox.Autorest/README.md b/src/DataBox/DataBox.Autorest/README.md index 3b7aa8974e38..84c0aec38218 100644 --- a/src/DataBox/DataBox.Autorest/README.md +++ b/src/DataBox/DataBox.Autorest/README.md @@ -97,18 +97,6 @@ directive: set: subject: JobCredential - # - where: - # verb: New - # parameter-name: IdentityUserAssignedIdentity - # set: - # parameter-name: UserAssignedIdentity - - # - where: - # verb: Update - # parameter-name: IdentityUserAssignedIdentity - # set: - # parameter-name: UserAssignedIdentity - - where: parameter-name: PreferenceStorageAccountAccessTierPreference set: @@ -143,11 +131,7 @@ directive: - IdentityType - DeliveryType - Detail - - # - from: source-file-csharp - # where: $ - # transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobSecrets', 'public Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobSecrets'); - + - model-cmdlet: - model-name: DataBoxDiskJobDetails cmdlet-name: New-AzDataBoxDiskJobDetailsObject diff --git a/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 b/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 index 253d3553e4e9..ec981032d10f 100644 --- a/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 +++ b/src/DataBox/DataBox.Autorest/custom/Update-AzDataBoxJob.ps1 @@ -22,31 +22,17 @@ Update the properties of an existing job. .Example $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" = @{}} +Update-AzDataBoxJob -Name "powershell10" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails .Example -$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned" +$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true $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 = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails $databoxUpdateWithCMK.Identity @@ -55,7 +41,7 @@ $databoxUpdateWithCMK.Detail.KeyEncryptionKey $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-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IDataBoxIdentity diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md index 325cf05c5eba..49d83f3fa6ee 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md @@ -46,18 +46,6 @@ $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subs $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" $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -$DebugPreference = "Continue" -# You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation 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 -# } -# } $resource = New-AzDataBoxJob -Name "ImportTest" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" $resource $resource.Detail @@ -141,7 +129,7 @@ $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "random" -EmailL $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrProvince "CA" -Country "US" -City "San Francisco" -PostalCode "94107" -AddressType "Commercial" $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" $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails -New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` ```output diff --git a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md index 5f127922724c..505fed2fa89f 100644 --- a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md @@ -65,20 +65,6 @@ Update the properties of an existing job. ```powershell $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 -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md index d5b2c13df8b4..7ed3a7de3972 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md @@ -4,18 +4,6 @@ $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subs $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" $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -$DebugPreference = "Continue" -# You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation 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 -# } -# } $resource = New-AzDataBoxJob -Name "ImportTest" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" $resource $resource.Detail @@ -98,7 +86,7 @@ $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "random" -EmailL $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrProvince "CA" -Country "US" -City "San Francisco" -PostalCode "94107" -AddressType "Commercial" $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" $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails -New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` ```output diff --git a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md index 410d2168b989..dd071d0d63b1 100644 --- a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md @@ -2,20 +2,6 @@ ```powershell $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 -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails @@ -70,5 +56,4 @@ $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNS Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -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 - +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 \ No newline at end of file diff --git a/src/DataBox/DataBox.Autorest/generate-info.json b/src/DataBox/DataBox.Autorest/generate-info.json index 5c372263e6c5..afc4c83040ac 100644 --- a/src/DataBox/DataBox.Autorest/generate-info.json +++ b/src/DataBox/DataBox.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "c7b3fe42-cc21-405f-999c-3b14271aba04" + "generate_Id": "edb519b8-7b67-4986-bca9-bebb7837263e" } diff --git a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 index 2f70ee7b5cfb..569f123fdedd 100644 --- a/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/New-AzDataBoxJob.Tests.ps1 @@ -70,7 +70,7 @@ Describe 'New-AzDataBoxJob' { $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails - $resource = New-AzDataBoxJob -Name $env.JobNameUAI -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity $env.UserAssignedResourceId + $resource = New-AzDataBoxJob -Name $env.JobNameUAI -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity -UserAssignedIdentity $env.UserAssignedResourceId $resource.Status | Should -Be 'DeviceOrdered' } @@ -102,7 +102,7 @@ Describe 'New-AzDataBoxJob' { $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "*****" -ExpectedDataSizeInTeraByte 10 + $details = New-AzDataBoxHeavyJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -DevicePassword "1234abcd" -ExpectedDataSizeInTeraByte 10 $resource = New-AzDataBoxJob -Name $env.JobNameHeavy -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxHeavy" @@ -117,7 +117,7 @@ Describe 'New-AzDataBoxJob' { $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId $env.StorageAccountId - $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "*****" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 + $details = New-AzDataBoxDiskJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -Passkey "1234abcd" -PreferredDisk @{"8" = 8; "4" = 2} -ExpectedDataSizeInTeraByte 18 $resource = New-AzDataBoxJob -Name $env.JobNameDisk -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.ResourceGroup -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBoxDisk" $resource.Status | Should -Be 'DeviceOrdered' } diff --git a/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 index 3b3cb286dc54..57fa5d70b288 100644 --- a/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 @@ -15,13 +15,13 @@ Describe 'Update-AzDataBoxJob' { It 'Microsoft managed to customer managed system assigned' -Skip { $contactDetail = New-AzDataBoxContactDetailsObject -ContactName $env.ContactName -EmailList $env.EmailList -Phone $env.Phone $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType - Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true + Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true $keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "SystemAssigned"} -KekUrl $env.KekUrl -KekVaultResourceId $env.KekVaultResourceId - Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true + Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true } It 'System assigned to user assigned' -Skip { $keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = $env.UserAssignedResourceId} -KekUrl $env.KekUrl -KekVaultResourceId $env.KekVaultResourceId - Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity:$true -UserAssignedIdentity $env.UserAssignedResourceId + Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity $env.UserAssignedResourceId } } diff --git a/src/DataBox/DataBox.Autorest/test/utils.ps1 b/src/DataBox/DataBox.Autorest/test/utils.ps1 index ad1256decc8c..eea22745a47f 100644 --- a/src/DataBox/DataBox.Autorest/test/utils.ps1 +++ b/src/DataBox/DataBox.Autorest/test/utils.ps1 @@ -55,9 +55,9 @@ function setupEnv() { $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrProvince "CA" -Country "US" -City "San Francisco" -PostalCode "94107" -AddressType "Commercial" - $dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dhja/providers/Microsoft.Storage/storageAccounts/dhjapowershellstorage" + $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dhja/providers/Microsoft.Storage/storageAccounts/dhjapowershellstorage" - $details = New-AzDataBoxJobDetailsObject -Type "DataBox" -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} )-ContactDetail $contactDetail -ShippingAddress $ShippingDetails + $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} )-ContactDetail $contactDetail -ShippingAddress $ShippingDetails Write-Host -ForegroundColor Green "Just did " + $jobName diff --git a/src/DataBox/DataBox.sln b/src/DataBox/DataBox.sln index b343588354d1..ec70a08cd900 100644 --- a/src/DataBox/DataBox.sln +++ b/src/DataBox/DataBox.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBox", "DataBox\DataBox. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataBox.Autorest", "DataBox.Autorest", "{5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{0DA1BE97-09EF-4069-8803-4B15594F1148}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x64.Build.0 = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.ActiveCfg = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.Build.0 = Release|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x64.ActiveCfg = Debug|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x64.Build.0 = Debug|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x86.ActiveCfg = Debug|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Debug|x86.Build.0 = Debug|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|Any CPU.Build.0 = Release|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x64.ActiveCfg = Release|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x64.Build.0 = Release|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x86.ActiveCfg = Release|Any CPU - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254}.Release|x86.Build.0 = Release|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x64.ActiveCfg = Debug|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x64.Build.0 = Debug|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x86.ActiveCfg = Debug|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x86.Build.0 = Debug|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|Any CPU.Build.0 = Release|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x64.ActiveCfg = Release|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x64.Build.0 = Release|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x86.ActiveCfg = Release|Any CPU + {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {0CBD7F56-9ACE-4D0C-841F-256077AE517A} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {2B53E025-DCB9-463E-A405-983D2A666A76} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} - {DFEB26D5-D82E-4A44-B165-4F2DEE6B4254} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} + {0DA1BE97-09EF-4069-8803-4B15594F1148} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} EndGlobalSection EndGlobal diff --git a/src/DataBox/DataBox/Az.DataBox.psd1 b/src/DataBox/DataBox/Az.DataBox.psd1 index 5f29d21a173e..dda28caa7659 100644 --- a/src/DataBox/DataBox/Az.DataBox.psd1 +++ b/src/DataBox/DataBox/Az.DataBox.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 2025-06-11 +# Generated on: 2025-06-12 # @{ diff --git a/src/DataBox/DataBox/help/New-AzDataBoxJob.md b/src/DataBox/DataBox/help/New-AzDataBoxJob.md index 1d3b4031d319..d96268099c49 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxJob.md @@ -48,18 +48,6 @@ $dataAccount = New-AzDataBoxStorageAccountDetailsObject -StorageAccountId "/subs $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" $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -$DebugPreference = "Continue" -# You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation 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 -# } -# } $resource = New-AzDataBoxJob -Name "ImportTest" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" $resource $resource.Detail @@ -143,7 +131,7 @@ $contactDetail = New-AzDataBoxContactDetailsObject -ContactName "random" -EmailL $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrProvince "CA" -Country "US" -City "San Francisco" -PostalCode "94107" -AddressType "Commercial" $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" $details = New-AzDataBoxJobDetailsObject -DataImportDetail @(@{AccountDetail=$dataAccount; AccountDetailDataAccountType = "StorageAccount"} ) -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -KeyEncryptionKey $keyEncryptionDetails -New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity:$true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" +New-AzDataBoxJob -Name "PowershellMSI" -SubscriptionId "SubscriptionId" -ResourceGroupName "resourceGroupName" -TransferType "ImportToAzure" -Detail $details -Location "WestUS" -SkuName "DataBox" -EnableSystemAssignedIdentity -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" ``` ```output diff --git a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md index 1e5c0ef9c38b..fccf81bf9a6c 100644 --- a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md @@ -66,20 +66,6 @@ Update the properties of an existing job. ```powershell $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 -EnableSystemAssignedIdentity $true -UserAssignedIdentity "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" $keyEncryptionDetails From a73e75bfb2a0800e7a9e94b157eb5f49f2deff99 Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Thu, 12 Jun 2025 17:50:29 +0800 Subject: [PATCH 7/8] update examples --- .../DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 b/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 index 57fa5d70b288..ee45910acf83 100644 --- a/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 +++ b/src/DataBox/DataBox.Autorest/test/Update-AzDataBoxJob.Tests.ps1 @@ -12,7 +12,7 @@ while(-not $mockingPath) { . ($mockingPath | Select-Object -First 1).FullName Describe 'Update-AzDataBoxJob' { - It 'Microsoft managed to customer managed system assigned' -Skip { + It 'Microsoft managed to customer managed system assigned' { $contactDetail = New-AzDataBoxContactDetailsObject -ContactName $env.ContactName -EmailList $env.EmailList -Phone $env.Phone $ShippingDetails = New-AzDataBoxShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true @@ -20,7 +20,7 @@ Describe 'Update-AzDataBoxJob' { Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true } - It 'System assigned to user assigned' -Skip { + It 'System assigned to user assigned' { $keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = $env.UserAssignedResourceId} -KekUrl $env.KekUrl -KekVaultResourceId $env.KekVaultResourceId Update-AzDataBoxJob -Name $env.JobName -ResourceGroupName $env.ResourceGroup -SubscriptionId $env.SubscriptionId -KeyEncryptionKey $keyEncryptionDetails -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -EnableSystemAssignedIdentity $true -UserAssignedIdentity $env.UserAssignedResourceId } From e6c8912b8a520edf97268bf5584e54f9cf2bc373 Mon Sep 17 00:00:00 2001 From: Jinpei Li Date: Thu, 12 Jun 2025 18:14:50 +0800 Subject: [PATCH 8/8] update examples --- .../Properties/AssemblyInfo.cs | 1 + .../DataBox.Autorest/docs/New-AzDataBoxJob.md | 2 +- .../docs/Update-AzDataBoxJob.md | 2 +- .../examples/New-AzDataBoxJob.md | 2 +- .../examples/Update-AzDataBoxJob.md | 2 +- .../DataBox.Autorest/generate-info.json | 2 +- src/DataBox/DataBox.sln | 28 +++++++++---------- src/DataBox/DataBox/help/New-AzDataBoxJob.md | 2 +- .../DataBox/help/Update-AzDataBoxJob.md | 2 +- 9 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs index e2015f97ff4a..fb1778b17044 100644 --- a/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs +++ b/src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs @@ -25,3 +25,4 @@ [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] + diff --git a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md index 49d83f3fa6ee..5fd6f71f3cf1 100644 --- a/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md @@ -192,7 +192,7 @@ Name Location Status TransferType SkuName IdentityType DeliveryT pwshDisk WestUS DeviceOrdered ImportToAzure DataBoxDisk None NonScheduled Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails ``` -Creates a databoxDisky job with your own Passkey. +Creates a databoxDisk job with your own Passkey. For any failure re-run with $DebugPreference = "Continue" as mentioned in example 1 ### Example 8: Creates a databox job with double encryption enabled diff --git a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md index 505fed2fa89f..830187ecbd7b 100644 --- a/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md @@ -111,7 +111,7 @@ KekType KekUrl KekVaultResourc 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. +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 diff --git a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md index 7ed3a7de3972..c74812550a54 100644 --- a/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/New-AzDataBoxJob.md @@ -146,7 +146,7 @@ Name Location Status TransferType SkuName IdentityType DeliveryT pwshDisk WestUS DeviceOrdered ImportToAzure DataBoxDisk None NonScheduled Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails ``` -Creates a databoxDisky job with your own Passkey. For any failure re-run with $DebugPreference = "Continue" as mentioned in example 1 +Creates a databoxDisk job with your own Passkey. For any failure re-run with $DebugPreference = "Continue" as mentioned in example 1 ### Example 8: Creates a databox job with double encryption enabled ```powershell diff --git a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md index dd071d0d63b1..12d92b618762 100644 --- a/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox.Autorest/examples/Update-AzDataBoxJob.md @@ -46,7 +46,7 @@ KekType KekUrl KekVaultResourc 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 +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 ```powershell diff --git a/src/DataBox/DataBox.Autorest/generate-info.json b/src/DataBox/DataBox.Autorest/generate-info.json index afc4c83040ac..c57b2ca7453f 100644 --- a/src/DataBox/DataBox.Autorest/generate-info.json +++ b/src/DataBox/DataBox.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "edb519b8-7b67-4986-bca9-bebb7837263e" + "generate_Id": "e3b4c064-aa17-4099-adce-15c8f1770fe2" } diff --git a/src/DataBox/DataBox.sln b/src/DataBox/DataBox.sln index ec70a08cd900..8ab23d411eef 100644 --- a/src/DataBox/DataBox.sln +++ b/src/DataBox/DataBox.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBox", "DataBox\DataBox. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataBox.Autorest", "DataBox.Autorest", "{5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{0DA1BE97-09EF-4069-8803-4B15594F1148}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataBox", "..\..\generated\DataBox\DataBox.Autorest\Az.DataBox.csproj", "{8B01915F-9A39-4233-825F-4887880409A4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x64.Build.0 = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.ActiveCfg = Release|Any CPU {F09CECC4-94D4-4BC2-82D6-8CBCA83A834A}.Release|x86.Build.0 = Release|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x64.ActiveCfg = Debug|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x64.Build.0 = Debug|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x86.ActiveCfg = Debug|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Debug|x86.Build.0 = Debug|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|Any CPU.Build.0 = Release|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x64.ActiveCfg = Release|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x64.Build.0 = Release|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x86.ActiveCfg = Release|Any CPU - {0DA1BE97-09EF-4069-8803-4B15594F1148}.Release|x86.Build.0 = Release|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Debug|x64.ActiveCfg = Debug|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Debug|x64.Build.0 = Debug|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Debug|x86.ActiveCfg = Debug|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Debug|x86.Build.0 = Debug|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Release|Any CPU.Build.0 = Release|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Release|x64.ActiveCfg = Release|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Release|x64.Build.0 = Release|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Release|x86.ActiveCfg = Release|Any CPU + {8B01915F-9A39-4233-825F-4887880409A4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {0CBD7F56-9ACE-4D0C-841F-256077AE517A} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {2B53E025-DCB9-463E-A405-983D2A666A76} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} {9D84884F-7FA3-404D-9FBF-8DE6CB4A7320} = {8FCA943C-A853-4DCB-AF3A-E3848949D629} - {0DA1BE97-09EF-4069-8803-4B15594F1148} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} + {8B01915F-9A39-4233-825F-4887880409A4} = {5F76ED46-72CC-F435-F4B7-31B1A1EB1AB3} EndGlobalSection EndGlobal diff --git a/src/DataBox/DataBox/help/New-AzDataBoxJob.md b/src/DataBox/DataBox/help/New-AzDataBoxJob.md index d96268099c49..8c7a3ab1cd2b 100644 --- a/src/DataBox/DataBox/help/New-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/New-AzDataBoxJob.md @@ -194,7 +194,7 @@ Name Location Status TransferType SkuName IdentityType DeliveryT pwshDisk WestUS DeviceOrdered ImportToAzure DataBoxDisk None NonScheduled Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.DataBoxDiskJobDetails ``` -Creates a databoxDisky job with your own Passkey. +Creates a databoxDisk job with your own Passkey. For any failure re-run with $DebugPreference = "Continue" as mentioned in example 1 ### Example 8: Creates a databox job with double encryption enabled diff --git a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md index fccf81bf9a6c..0a0552e0926d 100644 --- a/src/DataBox/DataBox/help/Update-AzDataBoxJob.md +++ b/src/DataBox/DataBox/help/Update-AzDataBoxJob.md @@ -112,7 +112,7 @@ KekType KekUrl KekVaultResourc 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. +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