แชร์ผ่าน


az import-export

Note

This reference is part of the import-export extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az import-export command. Learn more about extensions.

This command group is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Import Export.

Commands

Name Description Type Status
az import-export bit-locker-key

Import-export bit-locker-key.

Extension Experimental
az import-export bit-locker-key list

Returns the BitLocker Keys for all drives in the specified job.

Extension Experimental
az import-export create

Creates a new job or updates an existing job in the specified subscription.

Extension Experimental
az import-export delete

Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.

Extension Experimental
az import-export list

Returns all active and completed jobs in a subscription.

Extension Experimental
az import-export location

Import-export location.

Extension Experimental
az import-export location list

Returns a list of locations to which you can ship the disks associated with an import or export job. A location is a Microsoft data center region.

Extension Experimental
az import-export location show

Returns the details about a location to which you can ship the disks associated with an import or export job. A location is an Azure region.

Extension Experimental
az import-export show

Gets information about an existing job.

Extension Experimental
az import-export update

Updates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing job.

Extension Experimental

az import-export create

Experimental

Command group 'import-export' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Creates a new job or updates an existing job in the specified subscription.

az import-export create --name
                        --resource-group
                        [--backup-drive-manifest {false, true}]
                        [--cancel-requested {false, true}]
                        [--client-tenant-id]
                        [--delivery-package]
                        [--diagnostics-path]
                        [--drive-list]
                        [--export]
                        [--incomplete-blob-list-uri]
                        [--location]
                        [--log-level]
                        [--percent-complete]
                        [--return-address]
                        [--return-package]
                        [--return-shipping]
                        [--shipping-information]
                        [--state]
                        [--storage-account]
                        [--tags]
                        [--type]

Examples

Create an import job

az import-export create --resource-group "myResourceGroup" --name "myJob"
--location "West US" --backup-drive-manifest true --diagnostics-path "waimportexport"
--drive-list bit-locker-key=238810-662376-448998-450120-652806-203390-606320-483076
drive-header-hash= drive-id=9CA995BB manifest-file=\\DriveManifest.xml
manifest-hash=109B21108597EF36D5785F08303F3638 --type "Import" --log-level "Verbose"
--return-address city=Redmond country-or-region=USA email=Test@contoso.com phone=4250000000
postal-code=98007 recipient-name=Tests state-or-province=wa street-address1=Street1
street-address2=street2 --storage-account "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-\
xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test"

Required Parameters

--name -n

The name of the import/export job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--backup-drive-manifest

Default value is false. Indicates whether the manifest files on the drives should be copied to block blobs.

Accepted values: false, true
--cancel-requested

Indicates whether a request has been submitted to cancel the job.

Accepted values: false, true
--client-tenant-id

The tenant ID of the client making the request.

--delivery-package

Contains information about the package being shipped by the customer to the Microsoft data center.

--diagnostics-path

The virtual blob directory to which the copy logs and backups of drive manifest files (if enabled) will be stored.

--drive-list

List of up to ten drives that comprise the job. The drive list is a required element for an import job; it is not specified for export jobs.

--export

A property containing information about the blobs to be exported for an export job. This property is required for export jobs, but must not be specified for import jobs.

--incomplete-blob-list-uri

A blob path that points to a block blob containing a list of blob names that were not exported due to insufficient drive space. If all blobs were exported successfully, then this element is not included in the response.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--log-level

Default value is Error. Indicates whether error logging or verbose logging will be enabled.

--percent-complete

Overall percentage completed for the job.

--return-address

Specifies the return address information for the job.

--return-package

Contains information about the package being shipped by the customer to the Microsoft data center.

--return-shipping

Specifies the return carrier and customer's account with the carrier.

--shipping-information

Contains information about the Microsoft datacenter to which the drives should be shipped.

--state

Current state of the job.

--storage-account

Name or ID of the storage account where data will be imported to or exported from.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--type

The type of job.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az import-export delete

Experimental

Command group 'import-export' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.

az import-export delete --name
                        --resource-group

Examples

Delete job

az import-export delete --resource-group "myResourceGroup" --name "myJob"

Required Parameters

--name -n

The name of the import/export job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az import-export list

Experimental

Command group 'import-export' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Returns all active and completed jobs in a subscription.

az import-export list [--resource-group]

Examples

List jobs in a resource group

az import-export list --resource-group "myResourceGroup"

List jobs in current subscription

az import-export list

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az import-export show

Experimental

Command group 'import-export' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Gets information about an existing job.

az import-export show --name
                      --resource-group

Examples

Get job

az import-export show --resource-group "myResourceGroup" --name "myJob"

Required Parameters

--name -n

The name of the import/export job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az import-export update

Experimental

Command group 'import-export' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Updates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing job.

az import-export update --name
                        --resource-group
                        [--backup-drive-manifest {false, true}]
                        [--cancel-requested {false, true}]
                        [--delivery-package]
                        [--drive-list]
                        [--log-level]
                        [--return-address]
                        [--return-shipping]
                        [--state]
                        [--tags]

Examples

Update job

az import-export update --resource-group "myResourceGroup" --name "myJob"
--backup-drive-manifest true --log-level "Verbose" --state ""

Required Parameters

--name -n

The name of the import/export job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--backup-drive-manifest

Indicates whether the manifest files on the drives should be copied to block blobs.

Accepted values: false, true
--cancel-requested

If specified, the value must be true. The service will attempt to cancel the job.

Accepted values: false, true
--delivery-package

Contains information about the package being shipped by the customer to the Microsoft data center.

--drive-list

List of drives that comprise the job.

--log-level

Indicates whether error logging or verbose logging is enabled.

--return-address

Specifies the return address information for the job.

--return-shipping

Specifies the return carrier and customer's account with the carrier.

--state

If specified, the value must be Shipping, which tells the Import/Export service that the package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either in this request or in a previous request, otherwise the request will fail.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.