diff --git a/src/databox/HISTORY.rst b/src/databox/HISTORY.rst index 7eec834fab6..c3e5d4838ef 100644 --- a/src/databox/HISTORY.rst +++ b/src/databox/HISTORY.rst @@ -2,6 +2,11 @@ Release History =============== + +0.1.2 +++++++ +* Migrate to track2 SDK + 0.1.1 ++++++ * GA databox module. diff --git a/src/databox/azext_databox/custom.py b/src/databox/azext_databox/custom.py index 37ccab20460..6c84c133626 100644 --- a/src/databox/azext_databox/custom.py +++ b/src/databox/azext_databox/custom.py @@ -51,7 +51,7 @@ def create_databox_job(client, body.setdefault('details', {})['destination_account_details'] = destination_account_details - return client.create(resource_group_name=resource_group_name, job_name=job_name, job_resource=body) + return client.begin_create(resource_group_name=resource_group_name, job_name=job_name, job_resource=body) def update_databox_job(client, @@ -100,13 +100,13 @@ def update_databox_job(client, body.setdefault('details', {}).setdefault('shipping_address', {})[ 'company_name'] = shipping_address.company_name if company_name is None else company_name # str - return client.update(resource_group_name=resource_group_name, job_name=job_name, job_resource_update_parameter=body) + return client.begin_update(resource_group_name=resource_group_name, job_name=job_name, job_resource_update_parameter=body) def delete_databox_job(client, resource_group_name, job_name): - return client.delete(resource_group_name=resource_group_name, job_name=job_name) + return client.begin_delete(resource_group_name=resource_group_name, job_name=job_name) def get_databox_job(client, @@ -126,7 +126,7 @@ def cancel_databox_job(client, resource_group_name, job_name, reason): - return client.cancel(resource_group_name=resource_group_name, job_name=job_name, reason=reason) + return client.cancel(resource_group_name=resource_group_name, job_name=job_name, cancellation_reason={'reason': reason}) def list_credentials_databox_job(client, diff --git a/src/databox/azext_databox/tests/latest/recordings/test_databox.yaml b/src/databox/azext_databox/tests/latest/recordings/test_databox.yaml index a4828f5cac3..3c4012f1999 100644 --- a/src/databox/azext_databox/tests/latest/recordings/test_databox.yaml +++ b/src/databox/azext_databox/tests/latest/recordings/test_databox.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: 'b''b\''b\\\''{"location": "westus", "sku": {"name": "DataBox"}, "properties": - {"details": {"contactDetails": {"contactName": "Public SDK Test", "phone": "14258828080", + body: '{"location": "westus", "sku": {"name": "DataBox"}, "properties": {"details": + {"contactDetails": {"contactName": "Public SDK Test", "phone": "14258828080", "emailList": ["testing@microsoft.com"]}, "shippingAddress": {"streetAddress1": "1 MICROSOFT WAY", "city": "Redmond", "stateOrProvince": "WA", "country": "US", "postalCode": "98052", "companyName": "Microsoft"}, "destinationAccountDetails": @@ -9,7 +9,7 @@ interactions: {"dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003"}, {"dataDestinationType": "ManagedDisk", "resourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk", "stagingStorageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002"}], - "jobDetailsType": "DataBox"}}}\\\''\''''' + "jobDetailsType": "DataBox"}}}' headers: Accept: - application/json @@ -22,16 +22,13 @@ interactions: Content-Length: - '1374' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --location --sku --contact-name --phone --email-list --street-address1 --city --state-or-province --country --postal-code --company-name --storage-account --staging-storage-account --resource-group-for-managed-disk User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 response: @@ -43,21 +40,21 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:34:22 GMT + - Fri, 07 May 2021 06:49:46 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - '1199' - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -65,7 +62,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -77,10 +74,9 @@ interactions: --street-address1 --city --state-or-province --country --postal-code --company-name --storage-account --staging-storage-account --resource-group-for-managed-disk User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f?api-version=2019-09-01 response: body: string: '' @@ -90,19 +86,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:34:48 GMT + - Fri, 07 May 2021 06:49:56 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -110,7 +106,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -122,17 +118,42 @@ interactions: --street-address1 --city --state-or-province --country --postal-code --company-name --storage-account --staging-storage-account --resource-group-for-managed-disk User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 response: body: string: "{\r\n \"properties\": {\r\n \"isCancellable\": true,\r\n \"isDeletable\": - false,\r\n \"isShippingAddressEditable\": true,\r\n \"isPrepareToShipEnabled\": - false,\r\n \"status\": \"DeviceOrdered\",\r\n \"startTime\": \"2020-03-06T14:34:22.569476+00:00\",\r\n - \ \"deliveryType\": \"NonScheduled\",\r\n \"deliveryInfo\": {\r\n \"scheduledDateTime\": - \"0001-01-01T00:00:00+00:00\"\r\n },\r\n \"isCancellableWithoutFee\": + false,\r\n \"isShippingAddressEditable\": true,\r\n \"status\": \"DeviceOrdered\",\r\n + \ \"startTime\": \"2021-05-07T06:49:46.4515191+00:00\",\r\n \"details\": + {\r\n \"contactDetails\": {\r\n \"contactName\": \"Public SDK + Test\",\r\n \"phone\": \"14258828080\",\r\n \"emailList\": [\r\n + \ \"testing@microsoft.com\"\r\n ],\r\n \"notificationPreference\": + [\r\n {\r\n \"stageName\": \"DevicePrepared\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"Dispatched\",\r\n + \ \"sendNotification\": true\r\n },\r\n {\r\n + \ \"stageName\": \"Delivered\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"PickedUp\",\r\n + \ \"sendNotification\": true\r\n },\r\n {\r\n + \ \"stageName\": \"AtAzureDC\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"DataCopy\",\r\n + \ \"sendNotification\": true\r\n }\r\n ]\r\n },\r\n + \ \"shippingAddress\": {\r\n \"streetAddress1\": \"1 MICROSOFT + WAY\",\r\n \"city\": \"Redmond\",\r\n \"stateOrProvince\": \"WA\",\r\n + \ \"country\": \"US\",\r\n \"postalCode\": \"98052\",\r\n \"companyName\": + \"Microsoft\",\r\n \"addressType\": \"None\"\r\n },\r\n \"destinationAccountDetails\": + [\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n + \ },\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\"\r\n + \ },\r\n {\r\n \"resourceGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\",\r\n + \ \"stagingStorageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"ManagedDisk\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\"\r\n + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBox\",\r\n \"preferences\": + {}\r\n },\r\n \"deliveryType\": \"NonScheduled\",\r\n \"isCancellableWithoutFee\": true\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"DataBox\"\r\n },\r\n \"name\": \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n @@ -141,15 +162,17 @@ interactions: cache-control: - no-cache content-length: - - '778' + - '3595' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:34:59 GMT + - Fri, 07 May 2021 06:50:07 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -158,8 +181,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -177,21 +198,18 @@ interactions: ParameterSetName: - --resource-group --name --contact-name --email-list User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01&$expand=details response: body: string: "{\r\n \"properties\": {\r\n \"isCancellable\": true,\r\n \"isDeletable\": - false,\r\n \"isShippingAddressEditable\": true,\r\n \"isPrepareToShipEnabled\": - false,\r\n \"status\": \"DeviceOrdered\",\r\n \"startTime\": \"2020-03-06T14:34:22.569476+00:00\",\r\n - \ \"details\": {\r\n \"copyProgress\": [],\r\n \"jobStages\": - [\r\n {\r\n \"stageName\": \"DeviceOrdered\",\r\n \"displayName\": + false,\r\n \"isShippingAddressEditable\": true,\r\n \"status\": \"DeviceOrdered\",\r\n + \ \"startTime\": \"2021-05-07T06:49:46.4515191+00:00\",\r\n \"details\": + {\r\n \"copyProgress\": [],\r\n \"jobStages\": [\r\n {\r\n + \ \"stageName\": \"DeviceOrdered\",\r\n \"displayName\": \"Ordered\",\r\n \"stageStatus\": \"Succeeded\",\r\n \"stageTime\": - \"2020-03-06T14:34:26.6154788+00:00\"\r\n },\r\n {\r\n \"stageName\": + \"2021-05-07T06:49:51.7645955+00:00\"\r\n },\r\n {\r\n \"stageName\": \"DevicePrepared\",\r\n \"displayName\": \"Processed\",\r\n \"stageStatus\": \"None\"\r\n },\r\n {\r\n \"stageName\": \"Dispatched\",\r\n \ \"displayName\": \"Dispatched\",\r\n \"stageStatus\": \"None\"\r\n @@ -220,11 +238,11 @@ interactions: WAY\",\r\n \"city\": \"Redmond\",\r\n \"stateOrProvince\": \"WA\",\r\n \ \"country\": \"US\",\r\n \"postalCode\": \"98052\",\r\n \"companyName\": \"Microsoft\",\r\n \"addressType\": \"None\"\r\n },\r\n \"deliveryPackage\": - {\r\n \"carrierName\": \"\",\r\n \"trackingId\": \"\",\r\n \"trackingUrl\": - \"\"\r\n },\r\n \"returnPackage\": {\r\n \"carrierName\": - \"\",\r\n \"trackingId\": \"\",\r\n \"trackingUrl\": \"\"\r\n - \ },\r\n \"destinationAccountDetails\": [\r\n {\r\n \"storageAccountId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + {\r\n \"trackingUrl\": \"\",\r\n \"carrierName\": \"\",\r\n + \ \"trackingId\": \"\"\r\n },\r\n \"returnPackage\": {\r\n + \ \"trackingUrl\": \"\",\r\n \"carrierName\": \"\",\r\n \"trackingId\": + \"\"\r\n },\r\n \"destinationAccountDetails\": [\r\n {\r\n + \ \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n \ },\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\",\r\n @@ -234,10 +252,10 @@ interactions: \ \"stagingStorageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"dataDestinationType\": \"ManagedDisk\",\r\n \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\"\r\n - \ }\r\n ],\r\n \"errorDetails\": [],\r\n \"jobDetailsType\": - \"DataBox\",\r\n \"copyLogDetails\": []\r\n },\r\n \"deliveryType\": - \"NonScheduled\",\r\n \"deliveryInfo\": {\r\n \"scheduledDateTime\": - \"0001-01-01T00:00:00+00:00\"\r\n },\r\n \"isCancellableWithoutFee\": + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBox\",\r\n \"preferences\": + {},\r\n \"copyLogDetails\": [],\r\n \"reverseShipmentLabelSasKey\": + \"FakeKey\"\r\n + \ },\r\n \"deliveryType\": \"NonScheduled\",\r\n \"isCancellableWithoutFee\": true\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"DataBox\"\r\n },\r\n \"name\": \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n @@ -246,15 +264,17 @@ interactions: cache-control: - no-cache content-length: - - '5185' + - '5374' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:35:08 GMT + - Fri, 07 May 2021 06:50:09 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -263,8 +283,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -285,14 +303,11 @@ interactions: Content-Length: - '320' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --contact-name --email-list User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 response: @@ -304,21 +319,21 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:35:09 GMT + - Fri, 07 May 2021 06:50:10 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/6dc78456-b33e-4adc-87a6-14ad101154bc?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b260bec2-d619-4d10-aac2-a48fbcf318c4?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET + - '1198' status: code: 202 message: Accepted @@ -326,7 +341,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -336,10 +351,9 @@ interactions: ParameterSetName: - --resource-group --name --contact-name --email-list User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/6dc78456-b33e-4adc-87a6-14ad101154bc?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b260bec2-d619-4d10-aac2-a48fbcf318c4?api-version=2019-09-01 response: body: string: '' @@ -349,19 +363,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:35:23 GMT + - Fri, 07 May 2021 06:50:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -369,7 +383,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -379,17 +393,42 @@ interactions: ParameterSetName: - --resource-group --name --contact-name --email-list User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 response: body: string: "{\r\n \"properties\": {\r\n \"isCancellable\": true,\r\n \"isDeletable\": - false,\r\n \"isShippingAddressEditable\": true,\r\n \"isPrepareToShipEnabled\": - false,\r\n \"status\": \"DeviceOrdered\",\r\n \"startTime\": \"2020-03-06T14:34:22.569476+00:00\",\r\n - \ \"deliveryType\": \"NonScheduled\",\r\n \"deliveryInfo\": {\r\n \"scheduledDateTime\": - \"0001-01-01T00:00:00+00:00\"\r\n },\r\n \"isCancellableWithoutFee\": + false,\r\n \"isShippingAddressEditable\": true,\r\n \"status\": \"DeviceOrdered\",\r\n + \ \"startTime\": \"2021-05-07T06:49:46.4515191+00:00\",\r\n \"details\": + {\r\n \"contactDetails\": {\r\n \"contactName\": \"Public SDK + Test 1\",\r\n \"phone\": \"14258828080\",\r\n \"emailList\": + [\r\n \"testing1@microsoft.com\"\r\n ],\r\n \"notificationPreference\": + [\r\n {\r\n \"stageName\": \"DevicePrepared\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"Dispatched\",\r\n + \ \"sendNotification\": true\r\n },\r\n {\r\n + \ \"stageName\": \"Delivered\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"PickedUp\",\r\n + \ \"sendNotification\": true\r\n },\r\n {\r\n + \ \"stageName\": \"AtAzureDC\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"DataCopy\",\r\n + \ \"sendNotification\": true\r\n }\r\n ]\r\n },\r\n + \ \"shippingAddress\": {\r\n \"streetAddress1\": \"1 MICROSOFT + WAY\",\r\n \"city\": \"Redmond\",\r\n \"stateOrProvince\": \"WA\",\r\n + \ \"country\": \"US\",\r\n \"postalCode\": \"98052\",\r\n \"companyName\": + \"Microsoft\",\r\n \"addressType\": \"None\"\r\n },\r\n \"destinationAccountDetails\": + [\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n + \ },\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\"\r\n + \ },\r\n {\r\n \"resourceGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\",\r\n + \ \"stagingStorageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"ManagedDisk\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\"\r\n + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBox\",\r\n \"preferences\": + {}\r\n },\r\n \"deliveryType\": \"NonScheduled\",\r\n \"isCancellableWithoutFee\": true\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"DataBox\"\r\n },\r\n \"name\": \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n @@ -398,15 +437,17 @@ interactions: cache-control: - no-cache content-length: - - '778' + - '3598' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:35:33 GMT + - Fri, 07 May 2021 06:50:31 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -415,8 +456,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -434,21 +473,18 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01&$expand=details response: body: string: "{\r\n \"properties\": {\r\n \"isCancellable\": true,\r\n \"isDeletable\": - false,\r\n \"isShippingAddressEditable\": true,\r\n \"isPrepareToShipEnabled\": - false,\r\n \"status\": \"DeviceOrdered\",\r\n \"startTime\": \"2020-03-06T14:34:22.569476+00:00\",\r\n - \ \"details\": {\r\n \"copyProgress\": [],\r\n \"jobStages\": - [\r\n {\r\n \"stageName\": \"DeviceOrdered\",\r\n \"displayName\": + false,\r\n \"isShippingAddressEditable\": true,\r\n \"status\": \"DeviceOrdered\",\r\n + \ \"startTime\": \"2021-05-07T06:49:46.4515191+00:00\",\r\n \"details\": + {\r\n \"copyProgress\": [],\r\n \"jobStages\": [\r\n {\r\n + \ \"stageName\": \"DeviceOrdered\",\r\n \"displayName\": \"Ordered\",\r\n \"stageStatus\": \"Succeeded\",\r\n \"stageTime\": - \"2020-03-06T14:34:26.6154788+00:00\"\r\n },\r\n {\r\n \"stageName\": + \"2021-05-07T06:49:51.7645955+00:00\"\r\n },\r\n {\r\n \"stageName\": \"DevicePrepared\",\r\n \"displayName\": \"Processed\",\r\n \"stageStatus\": \"None\"\r\n },\r\n {\r\n \"stageName\": \"Dispatched\",\r\n \ \"displayName\": \"Dispatched\",\r\n \"stageStatus\": \"None\"\r\n @@ -477,11 +513,11 @@ interactions: WAY\",\r\n \"city\": \"Redmond\",\r\n \"stateOrProvince\": \"WA\",\r\n \ \"country\": \"US\",\r\n \"postalCode\": \"98052\",\r\n \"companyName\": \"Microsoft\",\r\n \"addressType\": \"None\"\r\n },\r\n \"deliveryPackage\": - {\r\n \"carrierName\": \"\",\r\n \"trackingId\": \"\",\r\n \"trackingUrl\": - \"\"\r\n },\r\n \"returnPackage\": {\r\n \"carrierName\": - \"\",\r\n \"trackingId\": \"\",\r\n \"trackingUrl\": \"\"\r\n - \ },\r\n \"destinationAccountDetails\": [\r\n {\r\n \"storageAccountId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + {\r\n \"trackingUrl\": \"\",\r\n \"carrierName\": \"\",\r\n + \ \"trackingId\": \"\"\r\n },\r\n \"returnPackage\": {\r\n + \ \"trackingUrl\": \"\",\r\n \"carrierName\": \"\",\r\n \"trackingId\": + \"\"\r\n },\r\n \"destinationAccountDetails\": [\r\n {\r\n + \ \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n \ },\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\",\r\n @@ -491,10 +527,10 @@ interactions: \ \"stagingStorageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"dataDestinationType\": \"ManagedDisk\",\r\n \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\"\r\n - \ }\r\n ],\r\n \"errorDetails\": [],\r\n \"jobDetailsType\": - \"DataBox\",\r\n \"copyLogDetails\": []\r\n },\r\n \"deliveryType\": - \"NonScheduled\",\r\n \"deliveryInfo\": {\r\n \"scheduledDateTime\": - \"0001-01-01T00:00:00+00:00\"\r\n },\r\n \"isCancellableWithoutFee\": + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBox\",\r\n \"preferences\": + {},\r\n \"copyLogDetails\": [],\r\n \"reverseShipmentLabelSasKey\": + \"FakeKey\"\r\n + \ },\r\n \"deliveryType\": \"NonScheduled\",\r\n \"isCancellableWithoutFee\": true\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"DataBox\"\r\n },\r\n \"name\": \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n @@ -503,15 +539,17 @@ interactions: cache-control: - no-cache content-length: - - '5188' + - '5375' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:35:36 GMT + - Fri, 07 May 2021 06:50:34 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -520,8 +558,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -539,38 +575,82 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs?api-version=2019-09-01 response: body: string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"isCancellable\": true,\r\n \"isDeletable\": false,\r\n \"isShippingAddressEditable\": - true,\r\n \"isPrepareToShipEnabled\": false,\r\n \"status\": - \"DeviceOrdered\",\r\n \"startTime\": \"2020-03-06T14:34:22.569476+00:00\",\r\n - \ \"deliveryType\": \"NonScheduled\",\r\n \"deliveryInfo\": {\r\n - \ \"scheduledDateTime\": \"0001-01-01T00:00:00+00:00\"\r\n },\r\n - \ \"isCancellableWithoutFee\": true\r\n },\r\n \"location\": - \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": - \"DataBox\"\r\n },\r\n \"name\": \"job000004\",\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n + true,\r\n \"status\": \"DeviceOrdered\",\r\n \"startTime\": + \"2021-05-07T06:49:46.4515191+00:00\",\r\n \"details\": {\r\n \"copyProgress\": + [],\r\n \"jobStages\": [\r\n {\r\n \"stageName\": + \"DeviceOrdered\",\r\n \"stageStatus\": \"Succeeded\",\r\n \"stageTime\": + \"2021-05-07T06:49:51.7645955+00:00\"\r\n },\r\n {\r\n + \ \"stageName\": \"DevicePrepared\",\r\n \"stageStatus\": + \"None\"\r\n },\r\n {\r\n \"stageName\": + \"Dispatched\",\r\n \"stageStatus\": \"None\"\r\n },\r\n + \ {\r\n \"stageName\": \"Delivered\",\r\n \"stageStatus\": + \"None\"\r\n },\r\n {\r\n \"stageName\": + \"PickedUp\",\r\n \"stageStatus\": \"None\"\r\n },\r\n + \ {\r\n \"stageName\": \"AtAzureDC\",\r\n \"stageStatus\": + \"None\"\r\n },\r\n {\r\n \"stageName\": + \"DataCopy\",\r\n \"stageStatus\": \"None\"\r\n },\r\n + \ {\r\n \"stageName\": \"Completed\",\r\n \"stageStatus\": + \"None\"\r\n }\r\n ],\r\n \"contactDetails\": + {\r\n \"contactName\": \"Public SDK Test 1\",\r\n \"phone\": + \"14258828080\",\r\n \"emailList\": [\r\n \"testing1@microsoft.com\"\r\n + \ ],\r\n \"notificationPreference\": [\r\n {\r\n + \ \"stageName\": \"DevicePrepared\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": + \"Dispatched\",\r\n \"sendNotification\": true\r\n },\r\n + \ {\r\n \"stageName\": \"Delivered\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": + \"PickedUp\",\r\n \"sendNotification\": true\r\n },\r\n + \ {\r\n \"stageName\": \"AtAzureDC\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": + \"DataCopy\",\r\n \"sendNotification\": true\r\n }\r\n + \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"streetAddress1\": + \"1 MICROSOFT WAY\",\r\n \"city\": \"Redmond\",\r\n \"stateOrProvince\": + \"WA\",\r\n \"country\": \"US\",\r\n \"postalCode\": + \"98052\",\r\n \"companyName\": \"Microsoft\",\r\n \"addressType\": + \"None\"\r\n },\r\n \"deliveryPackage\": {\r\n \"trackingUrl\": + \"\",\r\n \"carrierName\": \"\",\r\n \"trackingId\": + \"\"\r\n },\r\n \"returnPackage\": {\r\n \"trackingUrl\": + \"\",\r\n \"carrierName\": \"\",\r\n \"trackingId\": + \"\"\r\n },\r\n \"destinationAccountDetails\": [\r\n {\r\n + \ \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n + \ },\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\"\r\n + \ },\r\n {\r\n \"resourceGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\",\r\n + \ \"stagingStorageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"ManagedDisk\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\"\r\n + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBox\",\r\n + \ \"preferences\": {},\r\n \"copyLogDetails\": []\r\n },\r\n + \ \"deliveryType\": \"NonScheduled\",\r\n \"isCancellableWithoutFee\": + true\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n + \ \"sku\": {\r\n \"name\": \"DataBox\"\r\n },\r\n \"name\": + \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n \ \"type\": \"Microsoft.DataBox/jobs\"\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '895' + - '5286' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:35:39 GMT + - Fri, 07 May 2021 06:50:36 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -579,8 +659,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -598,14 +676,11 @@ interactions: Content-Length: - '24' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --reason -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004/cancel?api-version=2019-09-01 response: @@ -615,19 +690,19 @@ interactions: cache-control: - no-cache date: - - Fri, 06 Mar 2020 14:35:42 GMT + - Fri, 07 May 2021 06:50:39 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - '1199' - x-powered-by: - - ASP.NET status: code: 204 message: No Content @@ -645,18 +720,15 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01&$expand=details response: body: string: "{\r\n \"properties\": {\r\n \"isCancellable\": false,\r\n \"isDeletable\": - true,\r\n \"isShippingAddressEditable\": false,\r\n \"isPrepareToShipEnabled\": - false,\r\n \"status\": \"Cancelled\",\r\n \"startTime\": \"2020-03-06T14:34:22.569476+00:00\",\r\n - \ \"details\": {\r\n \"copyProgress\": [\r\n {\r\n \"storageAccountName\": + true,\r\n \"isShippingAddressEditable\": false,\r\n \"status\": \"Cancelled\",\r\n + \ \"startTime\": \"2021-05-07T06:49:46.4515191+00:00\",\r\n \"details\": + {\r\n \"copyProgress\": [\r\n {\r\n \"storageAccountName\": \"clitest000002\",\r\n \"dataDestinationType\": \"StorageAccount\",\r\n \ \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"bytesSentToCloud\": 0,\r\n \"totalBytesToProcess\": 0\r\n @@ -669,10 +741,10 @@ interactions: \ \"bytesSentToCloud\": 0,\r\n \"totalBytesToProcess\": 0\r\n \ }\r\n ],\r\n \"jobStages\": [\r\n {\r\n \"stageName\": \"DeviceOrdered\",\r\n \"displayName\": \"Ordered\",\r\n \"stageStatus\": - \"Succeeded\",\r\n \"stageTime\": \"2020-03-06T14:34:26.6154788+00:00\"\r\n + \"Succeeded\",\r\n \"stageTime\": \"2021-05-07T06:49:51.7645955+00:00\"\r\n \ },\r\n {\r\n \"stageName\": \"Cancelled\",\r\n \"displayName\": \"Canceled\",\r\n \"stageStatus\": \"Succeeded\",\r\n \"stageTime\": - \"2020-03-06T14:35:43.0099473+00:00\"\r\n }\r\n ],\r\n \"contactDetails\": + \"2021-05-07T06:50:39.2020916+00:00\"\r\n }\r\n ],\r\n \"contactDetails\": {\r\n \"contactName\": \"Public SDK Test 1\",\r\n \"phone\": \"14258828080\",\r\n \"emailList\": [\r\n \"testing1@microsoft.com\"\r\n \ ],\r\n \"notificationPreference\": [\r\n {\r\n \"stageName\": @@ -689,11 +761,11 @@ interactions: \"Redmond\",\r\n \"stateOrProvince\": \"WA\",\r\n \"country\": \"US\",\r\n \"postalCode\": \"98052\",\r\n \"companyName\": \"Microsoft\",\r\n \"addressType\": \"None\"\r\n },\r\n \"deliveryPackage\": - {\r\n \"carrierName\": \"\",\r\n \"trackingId\": \"\",\r\n \"trackingUrl\": - \"\"\r\n },\r\n \"returnPackage\": {\r\n \"carrierName\": - \"\",\r\n \"trackingId\": \"\",\r\n \"trackingUrl\": \"\"\r\n - \ },\r\n \"destinationAccountDetails\": [\r\n {\r\n \"storageAccountId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + {\r\n \"trackingUrl\": \"\",\r\n \"carrierName\": \"\",\r\n + \ \"trackingId\": \"\"\r\n },\r\n \"returnPackage\": {\r\n + \ \"trackingUrl\": \"\",\r\n \"carrierName\": \"\",\r\n \"trackingId\": + \"\"\r\n },\r\n \"destinationAccountDetails\": [\r\n {\r\n + \ \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n \ },\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003\",\r\n @@ -703,27 +775,29 @@ interactions: \ \"stagingStorageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n \ \"dataDestinationType\": \"ManagedDisk\",\r\n \"accountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-for-managed-disk\"\r\n - \ }\r\n ],\r\n \"errorDetails\": [],\r\n \"jobDetailsType\": - \"DataBox\",\r\n \"copyLogDetails\": []\r\n },\r\n \"cancellationReason\": - \"CancelTest\",\r\n \"deliveryType\": \"NonScheduled\",\r\n \"deliveryInfo\": - {\r\n \"scheduledDateTime\": \"0001-01-01T00:00:00+00:00\"\r\n },\r\n - \ \"isCancellableWithoutFee\": false\r\n },\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"DataBox\"\r\n },\r\n \"name\": - \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBox\",\r\n \"preferences\": + {},\r\n \"copyLogDetails\": [],\r\n \"reverseShipmentLabelSasKey\": + \"FakeKey\"\r\n + \ },\r\n \"cancellationReason\": \"CancelTest\",\r\n \"deliveryType\": + \"NonScheduled\",\r\n \"isCancellableWithoutFee\": false\r\n },\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"DataBox\"\r\n + \ },\r\n \"name\": \"job000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n \ \"type\": \"Microsoft.DataBox/jobs\"\r\n}" headers: cache-control: - no-cache content-length: - - '5637' + - '5826' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:35:46 GMT + - Fri, 07 May 2021 06:50:41 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -732,8 +806,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -741,24 +813,275 @@ interactions: body: null headers: Accept: - - application/json + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:50:45 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:50:55 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:51:05 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:51:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:51:26 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:51:36 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - databox job delete Connection: - keep-alive - Content-Length: - - '0' ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -768,21 +1091,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:35:53 GMT + - Fri, 07 May 2021 06:51:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14998' - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -790,7 +1111,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -800,10 +1121,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -813,19 +1133,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:36:09 GMT + - Fri, 07 May 2021 06:51:57 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -833,7 +1153,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -843,10 +1163,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -856,19 +1175,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:36:19 GMT + - Fri, 07 May 2021 06:52:07 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -876,7 +1195,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -886,10 +1205,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -899,19 +1217,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:36:30 GMT + - Fri, 07 May 2021 06:52:18 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -919,7 +1237,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -929,10 +1247,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -942,19 +1259,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:36:40 GMT + - Fri, 07 May 2021 06:52:28 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -962,7 +1279,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -972,10 +1289,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -985,19 +1301,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:36:51 GMT + - Fri, 07 May 2021 06:52:39 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1005,7 +1321,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1015,10 +1331,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1028,19 +1343,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:37:03 GMT + - Fri, 07 May 2021 06:52:49 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1048,7 +1363,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1058,10 +1373,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1071,19 +1385,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:37:13 GMT + - Fri, 07 May 2021 06:52:59 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1091,7 +1405,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1101,10 +1415,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1114,19 +1427,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:37:25 GMT + - Fri, 07 May 2021 06:53:11 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1134,7 +1447,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1144,10 +1457,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1157,19 +1469,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:37:35 GMT + - Fri, 07 May 2021 06:53:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1177,7 +1489,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1187,10 +1499,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/769f0db1-ff52-47b3-ba84-b0da28cbac04-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/b5ccfe1c-c8fc-45fd-8304-da898e07d61f-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1198,17 +1509,17 @@ interactions: cache-control: - no-cache date: - - Fri, 06 Mar 2020 14:37:45 GMT + - Fri, 07 May 2021 06:53:31 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 204 message: No Content @@ -1226,47 +1537,45 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01&$expand=details response: body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DataBox/jobs/job000004'' - under resource group ''cli_test_databox000001'' was not found."}}' + string: "{\r\n \"code\": \"SsemUserErrorEntityNotFound\",\r\n \"message\": + \"Could not find the entity job000004.\\r\\nProvide a valid entity name and + retry the operation.\",\r\n \"details\": [],\r\n \"additionalInfo\": []\r\n}" headers: cache-control: - no-cache content-length: - - '226' + - '213' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:37:51 GMT + - Fri, 07 May 2021 06:53:33 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-failure-cause: - - gateway status: code: 404 message: Not Found - request: - body: 'b''b\''{"location": "westus", "sku": {"name": "DataBoxDisk"}, "properties": - {"details": {"expectedDataSizeInTerabytes": 1, "contactDetails": {"contactName": - "Public SDK Test", "phone": "14258828080", "emailList": ["testing@microsoft.com"]}, + body: '{"location": "westus", "sku": {"name": "DataBoxDisk"}, "properties": {"details": + {"expectedDataSizeInTerabytes": 1, "contactDetails": {"contactName": "Public + SDK Test", "phone": "14258828080", "emailList": ["testing@microsoft.com"]}, "shippingAddress": {"streetAddress1": "1 MICROSOFT WAY", "city": "Redmond", "stateOrProvince": "WA", "country": "US", "postalCode": "98052", "companyName": "Microsoft"}, "destinationAccountDetails": [{"dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002"}], - "jobDetailsType": "DataBoxDisk"}}}\''''' + "jobDetailsType": "DataBoxDisk"}}}' headers: Accept: - application/json @@ -1279,18 +1588,15 @@ interactions: Content-Length: - '747' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --location --sku --expected-data-size --contact-name --phone --email-list --street-address1 --city --state-or-province --country --postal-code --company-name --storage-account User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005?api-version=2019-09-01 response: body: string: '' @@ -1300,21 +1606,21 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:37:57 GMT + - Fri, 07 May 2021 06:53:42 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' - x-powered-by: - - ASP.NET + - '1199' status: code: 202 message: Accepted @@ -1322,7 +1628,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1334,10 +1640,9 @@ interactions: --phone --email-list --street-address1 --city --state-or-province --country --postal-code --company-name --storage-account User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8?api-version=2019-09-01 response: body: string: '' @@ -1347,19 +1652,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:38:09 GMT + - Fri, 07 May 2021 06:53:52 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1367,7 +1672,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1379,34 +1684,55 @@ interactions: --phone --email-list --street-address1 --city --state-or-province --country --postal-code --company-name --storage-account User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005?api-version=2019-09-01 response: body: string: "{\r\n \"properties\": {\r\n \"isCancellable\": true,\r\n \"isDeletable\": - false,\r\n \"isShippingAddressEditable\": true,\r\n \"isPrepareToShipEnabled\": - false,\r\n \"status\": \"DeviceOrdered\",\r\n \"startTime\": \"2020-03-06T14:37:57.9932207+00:00\",\r\n - \ \"deliveryType\": \"NonScheduled\",\r\n \"deliveryInfo\": {\r\n \"scheduledDateTime\": - \"0001-01-01T00:00:00+00:00\"\r\n },\r\n \"isCancellableWithoutFee\": + false,\r\n \"isShippingAddressEditable\": true,\r\n \"status\": \"DeviceOrdered\",\r\n + \ \"startTime\": \"2021-05-07T06:53:42.3958227+00:00\",\r\n \"details\": + {\r\n \"expectedDataSizeInTeraBytes\": 1,\r\n \"contactDetails\": + {\r\n \"contactName\": \"Public SDK Test\",\r\n \"phone\": \"14258828080\",\r\n + \ \"emailList\": [\r\n \"testing@microsoft.com\"\r\n ],\r\n + \ \"notificationPreference\": [\r\n {\r\n \"stageName\": + \"DevicePrepared\",\r\n \"sendNotification\": true\r\n },\r\n + \ {\r\n \"stageName\": \"Dispatched\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"Delivered\",\r\n + \ \"sendNotification\": true\r\n },\r\n {\r\n + \ \"stageName\": \"PickedUp\",\r\n \"sendNotification\": + true\r\n },\r\n {\r\n \"stageName\": \"AtAzureDC\",\r\n + \ \"sendNotification\": true\r\n },\r\n {\r\n + \ \"stageName\": \"DataCopy\",\r\n \"sendNotification\": + true\r\n }\r\n ]\r\n },\r\n \"shippingAddress\": + {\r\n \"streetAddress1\": \"1 MICROSOFT WAY\",\r\n \"city\": + \"Redmond\",\r\n \"stateOrProvince\": \"WA\",\r\n \"country\": + \"US\",\r\n \"postalCode\": \"98052\",\r\n \"companyName\": + \"Microsoft\",\r\n \"addressType\": \"None\"\r\n },\r\n \"destinationAccountDetails\": + [\r\n {\r\n \"storageAccountId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\",\r\n + \ \"dataDestinationType\": \"StorageAccount\",\r\n \"accountId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n + \ }\r\n ],\r\n \"jobDetailsType\": \"DataBoxDisk\",\r\n \"preferences\": + {}\r\n },\r\n \"deliveryType\": \"NonScheduled\",\r\n \"isCancellableWithoutFee\": true\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"sku\": - {\r\n \"name\": \"DataBoxDisk\"\r\n },\r\n \"name\": \"job000004\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004\",\r\n + {\r\n \"name\": \"DataBoxDisk\"\r\n },\r\n \"name\": \"job000005\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005\",\r\n \ \"type\": \"Microsoft.DataBox/jobs\"\r\n}" headers: cache-control: - no-cache content-length: - - '783' + - '2527' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:38:19 GMT + - Fri, 07 May 2021 06:54:03 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1415,8 +1741,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -1434,16 +1758,13 @@ interactions: Content-Length: - '24' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --reason -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004/cancel?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005/cancel?api-version=2019-09-01 response: body: string: '' @@ -1451,19 +1772,19 @@ interactions: cache-control: - no-cache date: - - Fri, 06 Mar 2020 14:38:24 GMT + - Fri, 07 May 2021 06:54:06 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' - x-powered-by: - - ASP.NET + - '1199' status: code: 204 message: No Content @@ -1483,12 +1804,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005?api-version=2019-09-01 response: body: string: '' @@ -1498,21 +1816,21 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:38:28 GMT + - Fri, 07 May 2021 06:54:11 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14996' - x-powered-by: - - ASP.NET + - '14999' status: code: 202 message: Accepted @@ -1520,7 +1838,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1530,10 +1848,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1543,19 +1860,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:38:42 GMT + - Fri, 07 May 2021 06:54:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1563,7 +1880,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1573,10 +1890,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1586,19 +1902,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:38:53 GMT + - Fri, 07 May 2021 06:54:31 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1606,7 +1922,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1616,10 +1932,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1629,19 +1944,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:39:03 GMT + - Fri, 07 May 2021 06:54:42 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1649,7 +1964,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1659,10 +1974,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1672,19 +1986,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:39:13 GMT + - Fri, 07 May 2021 06:54:52 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1692,7 +2006,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1702,10 +2016,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1715,19 +2028,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:39:25 GMT + - Fri, 07 May 2021 06:55:03 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1735,7 +2048,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1745,10 +2058,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1758,19 +2070,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:39:35 GMT + - Fri, 07 May 2021 06:55:13 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1778,7 +2090,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1788,10 +2100,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1801,19 +2112,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:39:45 GMT + - Fri, 07 May 2021 06:55:24 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1821,7 +2132,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1831,10 +2142,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1844,19 +2154,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:39:56 GMT + - Fri, 07 May 2021 06:55:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1864,7 +2174,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1874,10 +2184,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1887,19 +2196,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:40:06 GMT + - Fri, 07 May 2021 06:55:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1907,7 +2216,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1917,10 +2226,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1930,19 +2238,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:40:17 GMT + - Fri, 07 May 2021 06:55:55 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1950,7 +2258,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1960,10 +2268,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -1973,19 +2280,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:40:27 GMT + - Fri, 07 May 2021 06:56:06 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -1993,7 +2300,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2003,10 +2310,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2016,19 +2322,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:40:38 GMT + - Fri, 07 May 2021 06:56:16 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2036,7 +2342,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2046,10 +2352,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2059,19 +2364,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:40:49 GMT + - Fri, 07 May 2021 06:56:26 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2079,7 +2384,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2089,10 +2394,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2102,19 +2406,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:40:59 GMT + - Fri, 07 May 2021 06:56:37 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2122,7 +2426,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2132,10 +2436,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2145,19 +2448,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:41:10 GMT + - Fri, 07 May 2021 06:56:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2165,7 +2468,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2175,10 +2478,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2188,19 +2490,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:41:20 GMT + - Fri, 07 May 2021 06:56:57 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2208,7 +2510,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2218,10 +2520,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2231,19 +2532,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:41:32 GMT + - Fri, 07 May 2021 06:57:08 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2251,7 +2552,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2261,10 +2562,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2274,19 +2574,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:41:42 GMT + - Fri, 07 May 2021 06:57:18 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2294,7 +2594,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2304,10 +2604,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2317,19 +2616,19 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:41:53 GMT + - Fri, 07 May 2021 06:57:28 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 202 message: Accepted @@ -2337,7 +2636,217 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:57:39 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:57:49 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:57:59 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:58:10 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databox job delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -y + User-Agent: + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 07 May 2021 06:58:21 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2347,10 +2856,9 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/653a0a85-2258-4760-accc-a6a157a859f9-deleteorder?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBox/locations/westus/operationResults/25073361-d073-4efa-a48c-3357ab047de8-deleteorder?api-version=2019-09-01 response: body: string: '' @@ -2358,17 +2866,17 @@ interactions: cache-control: - no-cache date: - - Fri, 06 Mar 2020 14:42:03 GMT + - Fri, 07 May 2021 06:58:31 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 204 message: No Content @@ -2386,37 +2894,33 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-databox/0.2.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-azure-mgmt-databox/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000004?api-version=2019-09-01&$expand=details + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox000001/providers/Microsoft.DataBox/jobs/job000005?api-version=2019-09-01&$expand=details response: body: - string: "{\r\n \"error\": {\r\n \"code\": \"SsemUserErrorEntityNotFound\",\r\n - \ \"message\": \"Could not find the entity job000004.\\r\\nProvide a valid - entity name and retry the operation.\",\r\n \"details\": [\r\n null\r\n - \ ]\r\n }\r\n}" + string: "{\r\n \"code\": \"SsemUserErrorEntityNotFound\",\r\n \"message\": + \"Could not find the entity job000005.\\r\\nProvide a valid entity name and + retry the operation.\",\r\n \"details\": [],\r\n \"additionalInfo\": []\r\n}" headers: cache-control: - no-cache content-length: - - '231' + - '213' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:42:09 GMT + - Fri, 07 May 2021 06:58:34 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-powered-by: - - ASP.NET status: code: 404 message: Not Found @@ -2434,8 +2938,8 @@ interactions: ParameterSetName: - --name -g --resource-name --resource-type User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.1.0 + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.1.0 Azure-SDK-For-Python AZURECLI/2.23.0 accept-language: - en-US method: GET @@ -2443,49 +2947,21 @@ interactions: response: body: string: '{"value":[{"properties":{"level":"CanNotDelete","notes":"Data Box Service - to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw/providers/Microsoft.Storage/storageAccounts/clitestmap7c2xyjf3gsd7yg/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa/providers/Microsoft.Storage/storageAccounts/clitestnxsheqf5s5rcht46h/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"for - Asir"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/emerald-city-bookstore/providers/Microsoft.Authorization/locks/No-DELETE","type":"Microsoft.Authorization/locks","name":"No-DELETE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn/providers/Microsoft.Storage/storageAccounts/clitestm7nikx6sld4npo42d/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn/providers/Microsoft.Storage/storageAccounts/clitestqsel4b35pkfyubvyx/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuhcentral/providers/Microsoft.Authorization/locks/delete","type":"Microsoft.Authorization/locks","name":"delete"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2/providers/Microsoft.Storage/storageAccounts/clitestgdfhjpgc2wgbrddlq/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg/providers/Microsoft.Authorization/locks/lock","type":"Microsoft.Authorization/locks","name":"lock"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y/providers/Microsoft.Authorization/locks/lock","type":"Microsoft.Authorization/locks","name":"lock"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi/providers/Microsoft.Storage/storageAccounts/clitest6yrafi3cntx2cngw3/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi/providers/Microsoft.Storage/storageAccounts/clitestl6h6fa53d2gbmohn3/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ygmanual3/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/fengsa/providers/Microsoft.Authorization/locks/no-delete","type":"Microsoft.Authorization/locks","name":"no-delete"},{"properties":{"level":"CanNotDelete","notes":"Auto-created - by Azure Backup for storage accounts registered with a Recovery Services Vault. - This lock is intended to guard against deletion of backups due to accidental - deletion of the storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg6i4hl6iakg/providers/microsoft.storage/storageAccounts/clitestu3p7a7ib4n4y7gt4m/providers/Microsoft.Authorization/locks/AzureBackupProtectionLock","type":"Microsoft.Authorization/locks","name":"AzureBackupProtectionLock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/new-experiences/providers/Microsoft.Authorization/locks/NO-DELETE","type":"Microsoft.Authorization/locks","name":"NO-DELETE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Authorization/locks/delete","type":"Microsoft.Authorization/locks","name":"delete"},{"properties":{"level":"CanNotDelete","notes":"wait - until 2019.1.10"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-core-poc/providers/Microsoft.Authorization/locks/keep","type":"Microsoft.Authorization/locks","name":"keep"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/microsoft.storage/storageaccounts/azhoxingtest9851/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.KeyVault/vaults/zhoxingtest9ac53638/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.KeyVault/vaults/zhoxingtest9393/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.Network/virtualNetworks/zhoxing-test/providers/Microsoft.Authorization/locks/vnetlock","type":"Microsoft.Authorization/locks","name":"vnetlock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.Network/virtualNetworks/Dtlzhoxing-test/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault4848/providers/Microsoft.Authorization/locks/l","type":"Microsoft.Authorization/locks","name":"l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.Compute/diskEncryptionSets/des1/providers/Microsoft.Authorization/locks/l","type":"Microsoft.Authorization/locks","name":"l"},{"properties":{"level":"CanNotDelete","notes":"In - case of deleting by incident"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azuresdktest_reserved/providers/Microsoft.Authorization/locks/LockReservedResources","type":"Microsoft.Authorization/locks","name":"LockReservedResources"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-test-rg/providers/Microsoft.Authorization/locks/lock_test_resources","type":"Microsoft.Authorization/locks","name":"lock_test_resources"},{"properties":{"level":"CanNotDelete","notes":"for - msal test"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yeming/providers/Microsoft.Authorization/locks/yeliu","type":"Microsoft.Authorization/locks","name":"yeliu"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p/providers/Microsoft.Storage/storageAccounts/clitest75g6r5uwkj7ker7wu/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Authorization/locks/donotdelete","type":"Microsoft.Authorization/locks","name":"donotdelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlvm2rg/providers/Microsoft.Compute/virtualMachines/jlvm2/providers/Microsoft.Authorization/locks/dl","type":"Microsoft.Authorization/locks","name":"dl"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk/providers/Microsoft.Storage/storageAccounts/clitest7b5n3o4aahl5rafju/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"for - customer issue repro (snowflake)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/storage-v2rt-repro/providers/Microsoft.Authorization/locks/DontDelete","type":"Microsoft.Authorization/locks","name":"DontDelete"},{"properties":{"level":"CanNotDelete","notes":"using - bastion"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fanqiu-vm/providers/Microsoft.Authorization/locks/person - vm","type":"Microsoft.Authorization/locks","name":"person vm"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlrg1/providers/Microsoft.Authorization/locks/dl","type":"Microsoft.Authorization/locks","name":"dl"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme/providers/Microsoft.Storage/storageAccounts/clitestcu3wv45lektdc3whs/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Authorization/locks/lock","type":"Microsoft.Authorization/locks","name":"lock"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/sfsfsfsssf/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/stststeset/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bim-rg/providers/Microsoft.Authorization/locks/bim-lock","type":"Microsoft.Authorization/locks","name":"bim-lock"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bim-rg/providers/Microsoft.Storage/storageAccounts/bimstorageacc/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3/providers/Microsoft.Storage/storageAccounts/clitestldg5uo7ika27utek4/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"}]}' + to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000002/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data + Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Please + do not delete this User Assigned Identity in the AzSecPackAutoConfigRG resource + group as AzSecPack AutoConfig depends on this."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzSecPackAutoConfigRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/AzSecPackAutoConfigUA-eastus2/providers/Microsoft.Authorization/locks/CanNotDeleteLock-AzSecPackAutoConfigUA-eastus2","type":"Microsoft.Authorization/locks","name":"CanNotDeleteLock-AzSecPackAutoConfigUA-eastus2"},{"properties":{"level":"CanNotDelete","notes":"Please + do not delete this User Assigned Identity in the AzSecPackAutoConfigRG resource + group as AzSecPack AutoConfig depends on this."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzSecPackAutoConfigRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/AzSecPackAutoConfigUA-eastus/providers/Microsoft.Authorization/locks/CanNotDeleteLock-AzSecPackAutoConfigUA-eastus","type":"Microsoft.Authorization/locks","name":"CanNotDeleteLock-AzSecPackAutoConfigUA-eastus"}]}' headers: cache-control: - no-cache content-length: - - '14599' + - '2012' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:42:12 GMT + - Fri, 07 May 2021 06:58:34 GMT expires: - '-1' pragma: @@ -2517,8 +2993,8 @@ interactions: ParameterSetName: - --name -g --resource-name --resource-type User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.1.0 + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.1.0 Azure-SDK-For-Python AZURECLI/2.23.0 accept-language: - en-US method: DELETE @@ -2532,7 +3008,7 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:42:14 GMT + - Fri, 07 May 2021 06:58:35 GMT expires: - '-1' pragma: @@ -2542,7 +3018,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14995' + - '14999' status: code: 200 message: OK @@ -2560,8 +3036,8 @@ interactions: ParameterSetName: - --name -g --resource-name --resource-type User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.1.0 + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.1.0 Azure-SDK-For-Python AZURECLI/2.23.0 accept-language: - en-US method: GET @@ -2569,48 +3045,20 @@ interactions: response: body: string: '{"value":[{"properties":{"level":"CanNotDelete","notes":"Data Box Service - to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw/providers/Microsoft.Storage/storageAccounts/clitestmap7c2xyjf3gsd7yg/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa/providers/Microsoft.Storage/storageAccounts/clitestnxsheqf5s5rcht46h/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"for - Asir"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/emerald-city-bookstore/providers/Microsoft.Authorization/locks/No-DELETE","type":"Microsoft.Authorization/locks","name":"No-DELETE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn/providers/Microsoft.Storage/storageAccounts/clitestm7nikx6sld4npo42d/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn/providers/Microsoft.Storage/storageAccounts/clitestqsel4b35pkfyubvyx/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuhcentral/providers/Microsoft.Authorization/locks/delete","type":"Microsoft.Authorization/locks","name":"delete"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2/providers/Microsoft.Storage/storageAccounts/clitestgdfhjpgc2wgbrddlq/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg/providers/Microsoft.Authorization/locks/lock","type":"Microsoft.Authorization/locks","name":"lock"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y/providers/Microsoft.Authorization/locks/lock","type":"Microsoft.Authorization/locks","name":"lock"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi/providers/Microsoft.Storage/storageAccounts/clitest6yrafi3cntx2cngw3/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi/providers/Microsoft.Storage/storageAccounts/clitestl6h6fa53d2gbmohn3/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ygmanual3/providers/Microsoft.Authorization/locks/nodel","type":"Microsoft.Authorization/locks","name":"nodel"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/fengsa/providers/Microsoft.Authorization/locks/no-delete","type":"Microsoft.Authorization/locks","name":"no-delete"},{"properties":{"level":"CanNotDelete","notes":"Auto-created - by Azure Backup for storage accounts registered with a Recovery Services Vault. - This lock is intended to guard against deletion of backups due to accidental - deletion of the storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg6i4hl6iakg/providers/microsoft.storage/storageAccounts/clitestu3p7a7ib4n4y7gt4m/providers/Microsoft.Authorization/locks/AzureBackupProtectionLock","type":"Microsoft.Authorization/locks","name":"AzureBackupProtectionLock"},{"properties":{"level":"CanNotDelete","notes":""},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/new-experiences/providers/Microsoft.Authorization/locks/NO-DELETE","type":"Microsoft.Authorization/locks","name":"NO-DELETE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Authorization/locks/delete","type":"Microsoft.Authorization/locks","name":"delete"},{"properties":{"level":"CanNotDelete","notes":"wait - until 2019.1.10"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-core-poc/providers/Microsoft.Authorization/locks/keep","type":"Microsoft.Authorization/locks","name":"keep"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/microsoft.storage/storageaccounts/azhoxingtest9851/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.KeyVault/vaults/zhoxingtest9ac53638/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.KeyVault/vaults/zhoxingtest9393/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.Network/virtualNetworks/zhoxing-test/providers/Microsoft.Authorization/locks/vnetlock","type":"Microsoft.Authorization/locks","name":"vnetlock"},{"properties":{"level":"CanNotDelete","notes":"Reserved - resource locked by ''zhoxing-test'' lab."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.Network/virtualNetworks/Dtlzhoxing-test/providers/Microsoft.Authorization/locks/DevTestLabs - Lock","type":"Microsoft.Authorization/locks","name":"DevTestLabs Lock"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault4848/providers/Microsoft.Authorization/locks/l","type":"Microsoft.Authorization/locks","name":"l"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.Compute/diskEncryptionSets/des1/providers/Microsoft.Authorization/locks/l","type":"Microsoft.Authorization/locks","name":"l"},{"properties":{"level":"CanNotDelete","notes":"In - case of deleting by incident"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azuresdktest_reserved/providers/Microsoft.Authorization/locks/LockReservedResources","type":"Microsoft.Authorization/locks","name":"LockReservedResources"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-test-rg/providers/Microsoft.Authorization/locks/lock_test_resources","type":"Microsoft.Authorization/locks","name":"lock_test_resources"},{"properties":{"level":"CanNotDelete","notes":"for - msal test"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yeming/providers/Microsoft.Authorization/locks/yeliu","type":"Microsoft.Authorization/locks","name":"yeliu"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p/providers/Microsoft.Storage/storageAccounts/clitest75g6r5uwkj7ker7wu/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Authorization/locks/donotdelete","type":"Microsoft.Authorization/locks","name":"donotdelete"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlvm2rg/providers/Microsoft.Compute/virtualMachines/jlvm2/providers/Microsoft.Authorization/locks/dl","type":"Microsoft.Authorization/locks","name":"dl"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk/providers/Microsoft.Storage/storageAccounts/clitest7b5n3o4aahl5rafju/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"for - customer issue repro (snowflake)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/storage-v2rt-repro/providers/Microsoft.Authorization/locks/DontDelete","type":"Microsoft.Authorization/locks","name":"DontDelete"},{"properties":{"level":"CanNotDelete","notes":"using - bastion"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fanqiu-vm/providers/Microsoft.Authorization/locks/person - vm","type":"Microsoft.Authorization/locks","name":"person vm"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlrg1/providers/Microsoft.Authorization/locks/dl","type":"Microsoft.Authorization/locks","name":"dl"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme/providers/Microsoft.Storage/storageAccounts/clitestcu3wv45lektdc3whs/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Authorization/locks/lock","type":"Microsoft.Authorization/locks","name":"lock"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/sfsfsfsssf/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/stststeset/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bim-rg/providers/Microsoft.Authorization/locks/bim-lock","type":"Microsoft.Authorization/locks","name":"bim-lock"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bim-rg/providers/Microsoft.Storage/storageAccounts/bimstorageacc/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Data - Box Service to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3/providers/Microsoft.Storage/storageAccounts/clitestldg5uo7ika27utek4/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"}]}' + to copy data from device to storage account."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_databox000001/providers/Microsoft.Storage/storageAccounts/clitest000003/providers/Microsoft.Authorization/locks/DATABOX_SERVICE","type":"Microsoft.Authorization/locks","name":"DATABOX_SERVICE"},{"properties":{"level":"CanNotDelete","notes":"Please + do not delete this User Assigned Identity in the AzSecPackAutoConfigRG resource + group as AzSecPack AutoConfig depends on this."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzSecPackAutoConfigRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/AzSecPackAutoConfigUA-eastus2/providers/Microsoft.Authorization/locks/CanNotDeleteLock-AzSecPackAutoConfigUA-eastus2","type":"Microsoft.Authorization/locks","name":"CanNotDeleteLock-AzSecPackAutoConfigUA-eastus2"},{"properties":{"level":"CanNotDelete","notes":"Please + do not delete this User Assigned Identity in the AzSecPackAutoConfigRG resource + group as AzSecPack AutoConfig depends on this."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzSecPackAutoConfigRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/AzSecPackAutoConfigUA-eastus/providers/Microsoft.Authorization/locks/CanNotDeleteLock-AzSecPackAutoConfigUA-eastus","type":"Microsoft.Authorization/locks","name":"CanNotDeleteLock-AzSecPackAutoConfigUA-eastus"}]}' headers: cache-control: - no-cache content-length: - - '14148' + - '1561' content-type: - application/json; charset=utf-8 date: - - Fri, 06 Mar 2020 14:42:18 GMT + - Fri, 07 May 2021 06:58:36 GMT expires: - '-1' pragma: @@ -2642,8 +3090,8 @@ interactions: ParameterSetName: - --name -g --resource-name --resource-type User-Agent: - - python/3.7.6 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.1.0 + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.1.0 Azure-SDK-For-Python AZURECLI/2.23.0 accept-language: - en-US method: DELETE @@ -2657,7 +3105,7 @@ interactions: content-length: - '0' date: - - Fri, 06 Mar 2020 14:42:20 GMT + - Fri, 07 May 2021 06:58:37 GMT expires: - '-1' pragma: diff --git a/src/databox/azext_databox/tests/latest/test_databox_scenario.py b/src/databox/azext_databox/tests/latest/test_databox_scenario.py index 40d34369c2b..a19ecfbd149 100644 --- a/src/databox/azext_databox/tests/latest/test_databox_scenario.py +++ b/src/databox/azext_databox/tests/latest/test_databox_scenario.py @@ -17,8 +17,10 @@ class DataBoxScenarioTest(ScenarioTest): @StorageAccountPreparer(parameter_name='storage_account_2') def test_databox(self, storage_account_1, storage_account_2): job_name = self.create_random_name('job', 24) + job_name_2 = self.create_random_name('job', 24) self.kwargs.update({ 'job_name': job_name, + 'job_name_2': job_name_2, 'storage_account_1': storage_account_1, 'storage_account_2': storage_account_2 }) @@ -93,7 +95,7 @@ def test_databox(self, storage_account_1, storage_account_2): # Create another databox job with sku 'DataBoxDisk'. self.cmd('databox job create ' '--resource-group {rg} ' - '--name {job_name} ' + '--name {job_name_2} ' '--location westus ' '--sku DataBoxDisk ' '--expected-data-size 1 ' @@ -111,20 +113,20 @@ def test_databox(self, storage_account_1, storage_account_2): self.cmd('databox job cancel ' '--resource-group {rg} ' - '--name {job_name} ' + '--name {job_name_2} ' '--reason "CancelTest" ' '-y', checks=[]) self.cmd('databox job delete ' '--resource-group {rg} ' - '--name {job_name} ' + '--name {job_name_2} ' '-y', checks=[]) self.cmd('databox job show ' '--resource-group {rg} ' - '--name {job_name}', + '--name {job_name_2}', expect_failure=True) # DataBox service will create a lock 'DATABOX_SERVICE' on the storage account under the resource group when creating a job. In order to clean up the resource group, we need delete the lock first. diff --git a/src/databox/azext_databox/vendored_sdks/databox/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/__init__.py index 1c85885ae27..f2d0b24d67c 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/__init__.py +++ b/src/databox/azext_databox/vendored_sdks/databox/__init__.py @@ -1,19 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import DataBoxManagementClientConfiguration from ._data_box_management_client import DataBoxManagementClient -__all__ = ['DataBoxManagementClient', 'DataBoxManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION +__all__ = ['DataBoxManagementClient'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/databox/azext_databox/vendored_sdks/databox/_configuration.py b/src/databox/azext_databox/vendored_sdks/databox/_configuration.py index adf67e024e2..5b8f07cf262 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/_configuration.py +++ b/src/databox/azext_databox/vendored_sdks/databox/_configuration.py @@ -8,41 +8,59 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration +from typing import Any -from .version import VERSION +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. -class DataBoxManagementClientConfiguration(AzureConfiguration): - """Configuration for DataBoxManagementClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The Subscription Id + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DataBoxManagementClientConfiguration, self).__init__(base_url) + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-databox/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-databox/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/databox/azext_databox/vendored_sdks/databox/_data_box_management_client.py b/src/databox/azext_databox/vendored_sdks/databox/_data_box_management_client.py index 7c2f11f5e82..aa0fa23980a 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/_data_box_management_client.py +++ b/src/databox/azext_databox/vendored_sdks/databox/_data_box_management_client.py @@ -9,51 +9,167 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient +from azure.mgmt.core import ARMPipelineClient from msrest import Serializer, Deserializer +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin from ._configuration import DataBoxManagementClientConfiguration -from .operations import Operations -from .operations import JobsOperations -from .operations import ServiceOperations -from . import models +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass -class DataBoxManagementClient(SDKClient): - """DataBoxManagementClient +class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): + """The DataBox Client. - :ivar config: Configuration for client. - :vartype config: DataBoxManagementClientConfiguration + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. - :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.operations.Operations - :ivar jobs: Jobs operations - :vartype jobs: azure.mgmt.databox.operations.JobsOperations - :ivar service: Service operations - :vartype service: azure.mgmt.databox.operations.ServiceOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The Subscription Id + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. :type subscription_id: str + :param str api_version: API version to use if no profile is provided, or if + missing in profile. :param str base_url: Service URL + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ + DEFAULT_API_VERSION = '2019-09-01' + _PROFILE_TAG = "azure.mgmt.databox.DataBoxManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DataBoxManagementClientConfiguration(credentials, subscription_id, base_url) - super(DataBoxManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-09-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self.config, self._serialize, self._deserialize) + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + api_version=None, + base_url=None, + profile=KnownProfiles.default, + **kwargs # type: Any + ): + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(DataBoxManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2018-01-01: :mod:`v2018_01_01.models` + * 2019-09-01: :mod:`v2019_09_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + """ + if api_version == '2018-01-01': + from .v2018_01_01 import models + return models + elif api_version == '2019-09-01': + from .v2019_09_01 import models + return models + elif api_version == '2020-04-01': + from .v2020_04_01 import models + return models + elif api_version == '2020-11-01': + from .v2020_11_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def jobs(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`JobsOperations` + * 2019-09-01: :class:`JobsOperations` + * 2020-04-01: :class:`JobsOperations` + * 2020-11-01: :class:`JobsOperations` + """ + api_version = self._get_api_version('jobs') + if api_version == '2018-01-01': + from .v2018_01_01.operations import JobsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import JobsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import JobsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import JobsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'jobs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2020-04-01: :class:`Operations` + * 2020-11-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2018-01-01': + from .v2018_01_01.operations import Operations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import Operations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import Operations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import Operations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`ServiceOperations` + * 2019-09-01: :class:`ServiceOperations` + * 2020-04-01: :class:`ServiceOperations` + * 2020-11-01: :class:`ServiceOperations` + """ + api_version = self._get_api_version('service') + if api_version == '2018-01-01': + from .v2018_01_01.operations import ServiceOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/src/databox/azext_databox/vendored_sdks/databox/version.py b/src/databox/azext_databox/vendored_sdks/databox/_version.py similarity index 84% rename from src/databox/azext_databox/vendored_sdks/databox/version.py rename to src/databox/azext_databox/vendored_sdks/databox/_version.py index c995f7836ce..c47f66669f1 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/version.py +++ b/src/databox/azext_databox/vendored_sdks/databox/_version.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "1.0.0" diff --git a/src/databox/azext_databox/vendored_sdks/databox/aio/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/aio/__init__.py new file mode 100644 index 00000000000..bb6b75a72db --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient'] diff --git a/src/databox/azext_databox/vendored_sdks/databox/aio/_configuration.py b/src/databox/azext_databox/vendored_sdks/databox/aio/_configuration.py new file mode 100644 index 00000000000..71fd4699f32 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/aio/_configuration.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "AsyncTokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-databox/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/databox/azext_databox/vendored_sdks/databox/aio/_data_box_management_client.py b/src/databox/azext_databox/vendored_sdks/databox/aio/_data_box_management_client.py new file mode 100644 index 00000000000..3d3baff1574 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/aio/_data_box_management_client.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Serializer, Deserializer + +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin +from ._configuration import DataBoxManagementClientConfiguration + +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): + """The DataBox Client. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str api_version: API version to use if no profile is provided, or if + missing in profile. + :param str base_url: Service URL + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '2020-11-01' + _PROFILE_TAG = "azure.mgmt.databox.DataBoxManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + credential, # type: "AsyncTokenCredential" + subscription_id, # type: str + api_version=None, + base_url=None, + profile=KnownProfiles.default, + **kwargs # type: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(DataBoxManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2018-01-01: :mod:`v2018_01_01.models` + * 2019-09-01: :mod:`v2019_09_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + """ + if api_version == '2018-01-01': + from ..v2018_01_01 import models + return models + elif api_version == '2019-09-01': + from ..v2019_09_01 import models + return models + elif api_version == '2020-04-01': + from ..v2020_04_01 import models + return models + elif api_version == '2020-11-01': + from ..v2020_11_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def jobs(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`JobsOperations` + * 2019-09-01: :class:`JobsOperations` + * 2020-04-01: :class:`JobsOperations` + * 2020-11-01: :class:`JobsOperations` + """ + api_version = self._get_api_version('jobs') + if api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import JobsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import JobsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import JobsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import JobsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'jobs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2020-04-01: :class:`Operations` + * 2020-11-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import Operations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import Operations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import Operations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import Operations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`ServiceOperations` + * 2019-09-01: :class:`ServiceOperations` + * 2020-04-01: :class:`ServiceOperations` + * 2020-11-01: :class:`ServiceOperations` + """ + api_version = self._get_api_version('service') + if api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ServiceOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ServiceOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ServiceOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ServiceOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + async def close(self): + await self._client.close() + async def __aenter__(self): + await self._client.__aenter__() + return self + async def __aexit__(self, *exc_details): + await self._client.__aexit__(*exc_details) diff --git a/src/databox/azext_databox/vendored_sdks/databox/models.py b/src/databox/azext_databox/vendored_sdks/databox/models.py new file mode 100644 index 00000000000..1d5d79558e5 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/models.py @@ -0,0 +1,7 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from .v2019_09_01.models import * diff --git a/src/databox/azext_databox/vendored_sdks/databox/models/_data_box_management_client_enums.py b/src/databox/azext_databox/vendored_sdks/databox/models/_data_box_management_client_enums.py deleted file mode 100644 index 4cbea094a21..00000000000 --- a/src/databox/azext_databox/vendored_sdks/databox/models/_data_box_management_client_enums.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DataDestinationType(str, Enum): - - storage_account = "StorageAccount" #: Storage Accounts . - managed_disk = "ManagedDisk" #: Azure Managed disk storage. - - -class ShareDestinationFormatType(str, Enum): - - unknown_type = "UnknownType" #: Unknown format. - hcs = "HCS" #: Storsimple data format. - block_blob = "BlockBlob" #: Azure storage block blob format. - page_blob = "PageBlob" #: Azure storage page blob format. - azure_file = "AzureFile" #: Azure storage file format. - managed_disk = "ManagedDisk" #: Azure Compute Disk. - - -class AccessProtocol(str, Enum): - - smb = "SMB" #: Server Message Block protocol(SMB). - nfs = "NFS" #: Network File System protocol(NFS). - - -class AddressValidationStatus(str, Enum): - - valid = "Valid" #: Address provided is valid. - invalid = "Invalid" #: Address provided is invalid or not supported. - ambiguous = "Ambiguous" #: Address provided is ambiguous, please choose one of the alternate addresses returned. - - -class AddressType(str, Enum): - - none = "None" #: Address type not known. - residential = "Residential" #: Residential Address. - commercial = "Commercial" #: Commercial Address. - - -class SkuName(str, Enum): - - data_box = "DataBox" #: Databox. - data_box_disk = "DataBoxDisk" #: DataboxDisk. - data_box_heavy = "DataBoxHeavy" #: DataboxHeavy. - - -class SkuDisabledReason(str, Enum): - - none = "None" #: SKU is not disabled. - country = "Country" #: SKU is not available in the requested country. - region = "Region" #: SKU is not available to push data to the requested Azure region. - feature = "Feature" #: Required features are not enabled for the SKU. - offer_type = "OfferType" #: Subscription does not have required offer types for the SKU. - no_subscription_info = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. - - -class NotificationStageName(str, Enum): - - device_prepared = "DevicePrepared" #: Notification at device prepared stage. - dispatched = "Dispatched" #: Notification at device dispatched stage. - delivered = "Delivered" #: Notification at device delivered stage. - picked_up = "PickedUp" #: Notification at device picked up from user stage. - at_azure_dc = "AtAzureDC" #: Notification at device received at azure datacenter stage. - data_copy = "DataCopy" #: Notification at data copy started stage. - - -class ValidationStatus(str, Enum): - - valid = "Valid" #: Validation is successful - invalid = "Invalid" #: Validation is not successful - skipped = "Skipped" #: Validation is skipped - - -class CopyStatus(str, Enum): - - not_started = "NotStarted" #: Data copy hasn't started yet. - in_progress = "InProgress" #: Data copy is in progress. - completed = "Completed" #: Data copy completed. - completed_with_errors = "CompletedWithErrors" #: Data copy completed with errors. - failed = "Failed" #: Data copy failed. No data was copied. - not_returned = "NotReturned" #: No copy triggered as device was not returned. - hardware_error = "HardwareError" #: The Device has hit hardware issues. - device_formatted = "DeviceFormatted" #: Data copy failed. The Device was formatted by user. - device_metadata_modified = "DeviceMetadataModified" #: Data copy failed. Device metadata was modified by user. - storage_account_not_accessible = "StorageAccountNotAccessible" #: Data copy failed. Storage Account was not accessible during copy. - unsupported_data = "UnsupportedData" #: Data copy failed. The Device data content is not supported. - - -class StageName(str, Enum): - - device_ordered = "DeviceOrdered" #: An order has been created. - device_prepared = "DevicePrepared" #: A device has been prepared for the order. - dispatched = "Dispatched" #: Device has been dispatched to the user of the order. - delivered = "Delivered" #: Device has been delivered to the user of the order. - picked_up = "PickedUp" #: Device has been picked up from user and in transit to azure datacenter. - at_azure_dc = "AtAzureDC" #: Device has been received at azure datacenter from the user. - data_copy = "DataCopy" #: Data copy from the device at azure datacenter. - completed = "Completed" #: Order has completed. - completed_with_errors = "CompletedWithErrors" #: Order has completed with errors. - cancelled = "Cancelled" #: Order has been cancelled. - failed_issue_reported_at_customer = "Failed_IssueReportedAtCustomer" #: Order has failed due to issue reported by user. - failed_issue_detected_at_azure_dc = "Failed_IssueDetectedAtAzureDC" #: Order has failed due to issue detected at azure datacenter. - aborted = "Aborted" #: Order has been aborted. - completed_with_warnings = "CompletedWithWarnings" #: Order has completed with warnings. - ready_to_dispatch_from_azure_dc = "ReadyToDispatchFromAzureDC" #: Device is ready to be handed to customer from Azure DC. - ready_to_receive_at_azure_dc = "ReadyToReceiveAtAzureDC" #: Device can be dropped off at Azure DC. - - -class StageStatus(str, Enum): - - none = "None" #: No status available yet. - in_progress = "InProgress" #: Stage is in progress. - succeeded = "Succeeded" #: Stage has succeeded. - failed = "Failed" #: Stage has failed. - cancelled = "Cancelled" #: Stage has been cancelled. - cancelling = "Cancelling" #: Stage is cancelling. - succeeded_with_errors = "SucceededWithErrors" #: Stage has succeeded with errors. - - -class TransportShipmentTypes(str, Enum): - - customer_managed = "CustomerManaged" #: Shipment Logistics is handled by the customer. - microsoft_managed = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. - - -class JobDeliveryType(str, Enum): - - non_scheduled = "NonScheduled" #: Non Scheduled job. - scheduled = "Scheduled" #: Scheduled job. - - -class OverallValidationStatus(str, Enum): - - all_valid_to_proceed = "AllValidToProceed" #: Every input request is valid. - inputs_revisit_required = "InputsRevisitRequired" #: Some input requests are not valid. - certain_input_validations_skipped = "CertainInputValidationsSkipped" #: Certain input validations skipped. diff --git a/src/databox/azext_databox/vendored_sdks/databox/models/_paged_models.py b/src/databox/azext_databox/vendored_sdks/databox/models/_paged_models.py deleted file mode 100644 index 0396852889e..00000000000 --- a/src/databox/azext_databox/vendored_sdks/databox/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) -class JobResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`JobResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobResource]'} - } - - def __init__(self, *args, **kwargs): - - super(JobResourcePaged, self).__init__(*args, **kwargs) -class UnencryptedCredentialsPaged(Paged): - """ - A paging container for iterating over a list of :class:`UnencryptedCredentials ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UnencryptedCredentials]'} - } - - def __init__(self, *args, **kwargs): - - super(UnencryptedCredentialsPaged, self).__init__(*args, **kwargs) -class SkuInformationPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInformation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInformation]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInformationPaged, self).__init__(*args, **kwargs) diff --git a/src/databox/azext_databox/vendored_sdks/databox/operations/_jobs_operations.py b/src/databox/azext_databox/vendored_sdks/databox/operations/_jobs_operations.py deleted file mode 100644 index a923de9b251..00000000000 --- a/src/databox/azext_databox/vendored_sdks/databox/operations/_jobs_operations.py +++ /dev/null @@ -1,758 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class JobsOperations(object): - """JobsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API Version. Constant value: "2019-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-09-01" - - self.config = config - - def list( - self, skip_token=None, custom_headers=None, raw=False, **operation_config): - """Lists all the jobs available under the subscription. - - :param skip_token: $skipToken is supported on Get list of jobs, which - provides the next page in the list of jobs. - :type skip_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JobResource - :rtype: - ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} - - def list_by_resource_group( - self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config): - """Lists all the jobs available under the given resource group. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param skip_token: $skipToken is supported on Get list of jobs, which - provides the next page in the list of jobs. - :type skip_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JobResource - :rtype: - ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} - - def get( - self, resource_group_name, job_name, expand=None, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified job. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param expand: $expand is supported on details parameter for job, - which provides details on the job stages. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JobResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.databox.models.JobResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('JobResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} - - - def _create_initial( - self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(job_resource, 'JobResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JobResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, polling=True, **operation_config): - """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. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns JobResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - job_name=job_name, - job_resource=job_resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('JobResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} - - - def _delete_initial( - self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a job. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - job_name=job_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} - - - def _update_initial( - self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JobResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the properties of an existing job. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param job_resource_update_parameter: Job update parameters from - request body. - :type job_resource_update_parameter: - ~azure.mgmt.databox.models.JobResourceUpdateParameter - :param if_match: Defines the If-Match condition. The patch will be - performed only if the ETag of the job on the server matches this - value. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns JobResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - job_name=job_name, - job_resource_update_parameter=job_resource_update_parameter, - if_match=if_match, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('JobResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} - - def book_shipment_pick_up( - self, resource_group_name, job_name, shipment_pick_up_request, custom_headers=None, raw=False, **operation_config): - """Book shipment pick up. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: - ~azure.mgmt.databox.models.ShipmentPickUpRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ShipmentPickUpResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.book_shipment_pick_up.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ShipmentPickUpResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} - - def cancel( - self, resource_group_name, job_name, reason, custom_headers=None, raw=False, **operation_config): - """CancelJob. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param reason: Reason for cancellation. - :type reason: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - cancellation_reason = models.CancellationReason(reason=reason) - - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(cancellation_reason, 'CancellationReason') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} - - def list_credentials( - self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): - """This method gets the unencrypted secrets related to the job. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param job_name: The name of the job Resource within the specified - resource group. job names must be between 3 and 24 characters in - length and use any alphanumeric and underscore only - :type job_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of UnencryptedCredentials - :rtype: - ~azure.mgmt.databox.models.UnencryptedCredentialsPaged[~azure.mgmt.databox.models.UnencryptedCredentials] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UnencryptedCredentialsPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} diff --git a/src/databox/azext_databox/vendored_sdks/databox/operations/_operations.py b/src/databox/azext_databox/vendored_sdks/databox/operations/_operations.py deleted file mode 100644 index 41166de18d1..00000000000 --- a/src/databox/azext_databox/vendored_sdks/databox/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API Version. Constant value: "2019-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """This method gets all the operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.databox.models.OperationPaged[~azure.mgmt.databox.models.Operation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} diff --git a/src/databox/azext_databox/vendored_sdks/databox/operations/_service_operations.py b/src/databox/azext_databox/vendored_sdks/databox/operations/_service_operations.py deleted file mode 100644 index c595d5511f4..00000000000 --- a/src/databox/azext_databox/vendored_sdks/databox/operations/_service_operations.py +++ /dev/null @@ -1,469 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ServiceOperations(object): - """ServiceOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API Version. Constant value: "2019-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-09-01" - - self.config = config - - def list_available_skus( - self, location, available_sku_request, custom_headers=None, raw=False, **operation_config): - """This method provides the list of available skus for the given - subscription and location. - - :param location: The location of the resource - :type location: str - :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: - ~azure.mgmt.databox.models.AvailableSkuRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInformation - :rtype: - ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_available_skus.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_available_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} - - def list_available_skus_by_resource_group( - self, resource_group_name, location, available_sku_request, custom_headers=None, raw=False, **operation_config): - """This method provides the list of available skus for the given - subscription, resource group and location. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param location: The location of the resource - :type location: str - :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: - ~azure.mgmt.databox.models.AvailableSkuRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInformation - :rtype: - ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_available_skus_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} - - def validate_address_method( - self, location, validate_address, custom_headers=None, raw=False, **operation_config): - """[DEPRECATED NOTICE: This operation will soon be removed] This method - validates the customer shipping address and provide alternate addresses - if any. - - :param location: The location of the resource - :type location: str - :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressValidationOutput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_address_method.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_address, 'ValidateAddress') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressValidationOutput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate_address_method.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} - - def validate_inputs_by_resource_group( - self, resource_group_name, location, validation_request, custom_headers=None, raw=False, **operation_config): - """This method does all necessary pre-job creation validation under - resource group. - - :param resource_group_name: The Resource Group Name - :type resource_group_name: str - :param location: The location of the resource - :type location: str - :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidationResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.databox.models.ValidationResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_inputs_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validation_request, 'ValidationRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} - - def validate_inputs( - self, location, validation_request, custom_headers=None, raw=False, **operation_config): - """This method does all necessary pre-job creation validation under - subscription. - - :param location: The location of the resource - :type location: str - :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidationResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.databox.models.ValidationResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_inputs.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validation_request, 'ValidationRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} - - def region_configuration( - self, location, schedule_availability_request=None, transport_availability_request=None, custom_headers=None, raw=False, **operation_config): - """This API provides configuration details specific to given - region/location. - - :param location: The location of the resource - :type location: str - :param schedule_availability_request: Request body to get the - availability for scheduling orders. - :type schedule_availability_request: - ~azure.mgmt.databox.models.ScheduleAvailabilityRequest - :param transport_availability_request: Request body to get the - transport availability for given sku. - :type transport_availability_request: - ~azure.mgmt.databox.models.TransportAvailabilityRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RegionConfigurationResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - region_configuration_request = models.RegionConfigurationRequest(schedule_availability_request=schedule_availability_request, transport_availability_request=transport_availability_request) - - # Construct URL - url = self.region_configuration.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RegionConfigurationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} diff --git a/src/databox/azext_databox/vendored_sdks/databox/py.typed b/src/databox/azext_databox/vendored_sdks/databox/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/__init__.py new file mode 100644 index 00000000000..ae972ed54f8 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_box_management_client import DataBoxManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DataBoxManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_configuration.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_configuration.py new file mode 100644 index 00000000000..ff931804797 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-09-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_data_box_management_client.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_data_box_management_client.py new file mode 100644 index 00000000000..e696cb06a78 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_data_box_management_client.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(object): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataBoxManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_metadata.json b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_metadata.json new file mode 100644 index 00000000000..10c0c55446a --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_metadata.json @@ -0,0 +1,63 @@ +{ + "chosen_version": "2019-09-01", + "total_api_version_list": ["2019-09-01"], + "client": { + "name": "DataBoxManagementClient", + "filename": "_data_box_management_client", + "description": "The DataBox Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null + }, + "operation_groups": { + "operations": "Operations", + "jobs": "JobsOperations", + "service": "ServiceOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ No newline at end of file diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_version.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/__init__.py new file mode 100644 index 00000000000..bb6b75a72db --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient'] diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/_configuration.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/_configuration.py new file mode 100644 index 00000000000..bd265586067 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-09-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/_data_box_management_client.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/_data_box_management_client.py new file mode 100644 index 00000000000..b192ff7cd77 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/_data_box_management_client.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import ServiceOperations +from .. import models + + +class DataBoxManagementClient(object): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.aio.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.aio.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.aio.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataBoxManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/databox/azext_databox/vendored_sdks/databox/operations/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/__init__.py similarity index 91% rename from src/databox/azext_databox/vendored_sdks/databox/operations/__init__.py rename to src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/__init__.py index 034974abbcc..9c8fa7a8253 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/operations/__init__.py +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_jobs_operations.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_jobs_operations.py new file mode 100644 index 00000000000..f01a52d0a1a --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_jobs_operations.py @@ -0,0 +1,835 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.databox.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + skip_token: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + async def get( + self, + resource_group_name: str, + job_name: str, + expand: Optional[str] = None, + **kwargs + ) -> "_models.JobResource": + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs + ) -> AsyncLROPoller["_models.JobResource"]: + """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. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + job_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + job_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs + ) -> AsyncLROPoller["_models.JobResource"]: + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def book_shipment_pick_up( + self, + resource_group_name: str, + job_name: str, + shipment_pick_up_request: "_models.ShipmentPickUpRequest", + **kwargs + ) -> "_models.ShipmentPickUpResponse": + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + async def cancel( + self, + resource_group_name: str, + job_name: str, + cancellation_reason: "_models.CancellationReason", + **kwargs + ) -> None: + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name: str, + job_name: str, + **kwargs + ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_operations.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_operations.py new file mode 100644 index 00000000000..bd99838be8c --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.databox.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.OperationList"]: + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_service_operations.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_service_operations.py new file mode 100644 index 00000000000..a07ce55b508 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/aio/operations/_service_operations.py @@ -0,0 +1,462 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations: + """ServiceOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.databox.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_available_skus( + self, + location: str, + available_sku_request: "_models.AvailableSkuRequest", + **kwargs + ) -> AsyncIterable["_models.AvailableSkusResult"]: + """This method provides the list of available skus for the given subscription and location. + + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_available_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + def list_available_skus_by_resource_group( + self, + resource_group_name: str, + location: str, + available_sku_request: "_models.AvailableSkuRequest", + **kwargs + ) -> AsyncIterable["_models.AvailableSkusResult"]: + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + async def validate_address( + self, + location: str, + validate_address: "_models.ValidateAddress", + **kwargs + ) -> "_models.AddressValidationOutput": + """[DEPRECATED NOTICE: This operation will soon be removed] This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + async def validate_inputs_by_resource_group( + self, + resource_group_name: str, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def validate_inputs( + self, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def region_configuration( + self, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/src/databox/azext_databox/vendored_sdks/databox/models/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/__init__.py similarity index 59% rename from src/databox/azext_databox/vendored_sdks/databox/models/__init__.py rename to src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/__init__.py index ade07b1ec9a..84b34d519a6 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/models/__init__.py +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/__init__.py @@ -1,21 +1,21 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import AccountCredentialDetails from ._models_py3 import AddressValidationOutput + from ._models_py3 import AddressValidationProperties from ._models_py3 import ApplianceNetworkConfiguration from ._models_py3 import ArmBaseObject from ._models_py3 import AvailableSkuRequest + from ._models_py3 import AvailableSkusResult from ._models_py3 import CancellationReason + from ._models_py3 import CloudError from ._models_py3 import ContactDetails from ._models_py3 import CopyLogDetails from ._models_py3 import CopyProgress @@ -32,11 +32,11 @@ from ._models_py3 import DataBoxHeavyJobSecrets from ._models_py3 import DataBoxHeavySecret from ._models_py3 import DataBoxJobDetails - from ._models_py3 import DataboxJobSecrets from ._models_py3 import DataBoxScheduleAvailabilityRequest from ._models_py3 import DataBoxSecret from ._models_py3 import DataDestinationDetailsValidationRequest from ._models_py3 import DataDestinationDetailsValidationResponseProperties + from ._models_py3 import DataboxJobSecrets from ._models_py3 import DcAccessSecurityCode from ._models_py3 import DestinationAccountDetails from ._models_py3 import DestinationManagedDiskDetails @@ -50,12 +50,14 @@ from ._models_py3 import JobDetails from ._models_py3 import JobErrorDetails from ._models_py3 import JobResource + from ._models_py3 import JobResourceList from ._models_py3 import JobResourceUpdateParameter from ._models_py3 import JobSecrets from ._models_py3 import JobStages from ._models_py3 import NotificationPreference from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import OperationList from ._models_py3 import PackageShippingDetails from ._models_py3 import Preferences from ._models_py3 import PreferencesValidationRequest @@ -82,6 +84,7 @@ from ._models_py3 import TransportAvailabilityResponse from ._models_py3 import TransportPreferences from ._models_py3 import UnencryptedCredentials + from ._models_py3 import UnencryptedCredentialsList from ._models_py3 import UpdateJobDetails from ._models_py3 import ValidateAddress from ._models_py3 import ValidationInputRequest @@ -89,113 +92,121 @@ from ._models_py3 import ValidationRequest from ._models_py3 import ValidationResponse except (SyntaxError, ImportError): - from ._models import AccountCredentialDetails - from ._models import AddressValidationOutput - from ._models import ApplianceNetworkConfiguration - from ._models import ArmBaseObject - from ._models import AvailableSkuRequest - from ._models import CancellationReason - from ._models import ContactDetails - from ._models import CopyLogDetails - from ._models import CopyProgress - from ._models import CreateJobValidations - from ._models import CreateOrderLimitForSubscriptionValidationRequest - from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties - from ._models import DataBoxAccountCopyLogDetails - from ._models import DataBoxDiskCopyLogDetails - from ._models import DataBoxDiskCopyProgress - from ._models import DataBoxDiskJobDetails - from ._models import DataBoxDiskJobSecrets - from ._models import DataBoxHeavyAccountCopyLogDetails - from ._models import DataBoxHeavyJobDetails - from ._models import DataBoxHeavyJobSecrets - from ._models import DataBoxHeavySecret - from ._models import DataBoxJobDetails - from ._models import DataboxJobSecrets - from ._models import DataBoxScheduleAvailabilityRequest - from ._models import DataBoxSecret - from ._models import DataDestinationDetailsValidationRequest - from ._models import DataDestinationDetailsValidationResponseProperties - from ._models import DcAccessSecurityCode - from ._models import DestinationAccountDetails - from ._models import DestinationManagedDiskDetails - from ._models import DestinationStorageAccountDetails - from ._models import DestinationToServiceLocationMap - from ._models import DiskScheduleAvailabilityRequest - from ._models import DiskSecret - from ._models import Error - from ._models import HeavyScheduleAvailabilityRequest - from ._models import JobDeliveryInfo - from ._models import JobDetails - from ._models import JobErrorDetails - from ._models import JobResource - from ._models import JobResourceUpdateParameter - from ._models import JobSecrets - from ._models import JobStages - from ._models import NotificationPreference - from ._models import Operation - from ._models import OperationDisplay - from ._models import PackageShippingDetails - from ._models import Preferences - from ._models import PreferencesValidationRequest - from ._models import PreferencesValidationResponseProperties - from ._models import RegionConfigurationRequest - from ._models import RegionConfigurationResponse - from ._models import Resource - from ._models import ScheduleAvailabilityRequest - from ._models import ScheduleAvailabilityResponse - from ._models import ShareCredentialDetails - from ._models import ShipmentPickUpRequest - from ._models import ShipmentPickUpResponse - from ._models import ShippingAddress - from ._models import Sku - from ._models import SkuAvailabilityValidationRequest - from ._models import SkuAvailabilityValidationResponseProperties - from ._models import SkuCapacity - from ._models import SkuCost - from ._models import SkuInformation - from ._models import SubscriptionIsAllowedToCreateJobValidationRequest - from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties - from ._models import TransportAvailabilityDetails - from ._models import TransportAvailabilityRequest - from ._models import TransportAvailabilityResponse - from ._models import TransportPreferences - from ._models import UnencryptedCredentials - from ._models import UpdateJobDetails - from ._models import ValidateAddress - from ._models import ValidationInputRequest - from ._models import ValidationInputResponse - from ._models import ValidationRequest - from ._models import ValidationResponse -from ._paged_models import JobResourcePaged -from ._paged_models import OperationPaged -from ._paged_models import SkuInformationPaged -from ._paged_models import UnencryptedCredentialsPaged + from ._models import AccountCredentialDetails # type: ignore + from ._models import AddressValidationOutput # type: ignore + from ._models import AddressValidationProperties # type: ignore + from ._models import ApplianceNetworkConfiguration # type: ignore + from ._models import ArmBaseObject # type: ignore + from ._models import AvailableSkuRequest # type: ignore + from ._models import AvailableSkusResult # type: ignore + from ._models import CancellationReason # type: ignore + from ._models import CloudError # type: ignore + from ._models import ContactDetails # type: ignore + from ._models import CopyLogDetails # type: ignore + from ._models import CopyProgress # type: ignore + from ._models import CreateJobValidations # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationRequest # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties # type: ignore + from ._models import DataBoxAccountCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyProgress # type: ignore + from ._models import DataBoxDiskJobDetails # type: ignore + from ._models import DataBoxDiskJobSecrets # type: ignore + from ._models import DataBoxHeavyAccountCopyLogDetails # type: ignore + from ._models import DataBoxHeavyJobDetails # type: ignore + from ._models import DataBoxHeavyJobSecrets # type: ignore + from ._models import DataBoxHeavySecret # type: ignore + from ._models import DataBoxJobDetails # type: ignore + from ._models import DataBoxScheduleAvailabilityRequest # type: ignore + from ._models import DataBoxSecret # type: ignore + from ._models import DataDestinationDetailsValidationRequest # type: ignore + from ._models import DataDestinationDetailsValidationResponseProperties # type: ignore + from ._models import DataboxJobSecrets # type: ignore + from ._models import DcAccessSecurityCode # type: ignore + from ._models import DestinationAccountDetails # type: ignore + from ._models import DestinationManagedDiskDetails # type: ignore + from ._models import DestinationStorageAccountDetails # type: ignore + from ._models import DestinationToServiceLocationMap # type: ignore + from ._models import DiskScheduleAvailabilityRequest # type: ignore + from ._models import DiskSecret # type: ignore + from ._models import Error # type: ignore + from ._models import HeavyScheduleAvailabilityRequest # type: ignore + from ._models import JobDeliveryInfo # type: ignore + from ._models import JobDetails # type: ignore + from ._models import JobErrorDetails # type: ignore + from ._models import JobResource # type: ignore + from ._models import JobResourceList # type: ignore + from ._models import JobResourceUpdateParameter # type: ignore + from ._models import JobSecrets # type: ignore + from ._models import JobStages # type: ignore + from ._models import NotificationPreference # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationList # type: ignore + from ._models import PackageShippingDetails # type: ignore + from ._models import Preferences # type: ignore + from ._models import PreferencesValidationRequest # type: ignore + from ._models import PreferencesValidationResponseProperties # type: ignore + from ._models import RegionConfigurationRequest # type: ignore + from ._models import RegionConfigurationResponse # type: ignore + from ._models import Resource # type: ignore + from ._models import ScheduleAvailabilityRequest # type: ignore + from ._models import ScheduleAvailabilityResponse # type: ignore + from ._models import ShareCredentialDetails # type: ignore + from ._models import ShipmentPickUpRequest # type: ignore + from ._models import ShipmentPickUpResponse # type: ignore + from ._models import ShippingAddress # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuAvailabilityValidationRequest # type: ignore + from ._models import SkuAvailabilityValidationResponseProperties # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuCost # type: ignore + from ._models import SkuInformation # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationRequest # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties # type: ignore + from ._models import TransportAvailabilityDetails # type: ignore + from ._models import TransportAvailabilityRequest # type: ignore + from ._models import TransportAvailabilityResponse # type: ignore + from ._models import TransportPreferences # type: ignore + from ._models import UnencryptedCredentials # type: ignore + from ._models import UnencryptedCredentialsList # type: ignore + from ._models import UpdateJobDetails # type: ignore + from ._models import ValidateAddress # type: ignore + from ._models import ValidationInputRequest # type: ignore + from ._models import ValidationInputResponse # type: ignore + from ._models import ValidationRequest # type: ignore + from ._models import ValidationResponse # type: ignore + from ._data_box_management_client_enums import ( - DataDestinationType, - ShareDestinationFormatType, AccessProtocol, - AddressValidationStatus, AddressType, - SkuName, - SkuDisabledReason, - NotificationStageName, - ValidationStatus, + AddressValidationStatus, + ClassDiscriminator, CopyStatus, + DataDestinationType, + JobDeliveryType, + NotificationStageName, + OverallValidationStatus, + ShareDestinationFormatType, + SkuDisabledReason, + SkuName, StageName, StageStatus, TransportShipmentTypes, - JobDeliveryType, - OverallValidationStatus, + ValidationInputDiscriminator, + ValidationStatus, ) __all__ = [ 'AccountCredentialDetails', 'AddressValidationOutput', + 'AddressValidationProperties', 'ApplianceNetworkConfiguration', 'ArmBaseObject', 'AvailableSkuRequest', + 'AvailableSkusResult', 'CancellationReason', + 'CloudError', 'ContactDetails', 'CopyLogDetails', 'CopyProgress', @@ -212,11 +223,11 @@ 'DataBoxHeavyJobSecrets', 'DataBoxHeavySecret', 'DataBoxJobDetails', - 'DataboxJobSecrets', 'DataBoxScheduleAvailabilityRequest', 'DataBoxSecret', 'DataDestinationDetailsValidationRequest', 'DataDestinationDetailsValidationResponseProperties', + 'DataboxJobSecrets', 'DcAccessSecurityCode', 'DestinationAccountDetails', 'DestinationManagedDiskDetails', @@ -230,12 +241,14 @@ 'JobDetails', 'JobErrorDetails', 'JobResource', + 'JobResourceList', 'JobResourceUpdateParameter', 'JobSecrets', 'JobStages', 'NotificationPreference', 'Operation', 'OperationDisplay', + 'OperationList', 'PackageShippingDetails', 'Preferences', 'PreferencesValidationRequest', @@ -262,29 +275,28 @@ 'TransportAvailabilityResponse', 'TransportPreferences', 'UnencryptedCredentials', + 'UnencryptedCredentialsList', 'UpdateJobDetails', 'ValidateAddress', 'ValidationInputRequest', 'ValidationInputResponse', 'ValidationRequest', 'ValidationResponse', - 'OperationPaged', - 'JobResourcePaged', - 'UnencryptedCredentialsPaged', - 'SkuInformationPaged', - 'DataDestinationType', - 'ShareDestinationFormatType', 'AccessProtocol', - 'AddressValidationStatus', 'AddressType', - 'SkuName', - 'SkuDisabledReason', - 'NotificationStageName', - 'ValidationStatus', + 'AddressValidationStatus', + 'ClassDiscriminator', 'CopyStatus', + 'DataDestinationType', + 'JobDeliveryType', + 'NotificationStageName', + 'OverallValidationStatus', + 'ShareDestinationFormatType', + 'SkuDisabledReason', + 'SkuName', 'StageName', 'StageStatus', 'TransportShipmentTypes', - 'JobDeliveryType', - 'OverallValidationStatus', + 'ValidationInputDiscriminator', + 'ValidationStatus', ] diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_data_box_management_client_enums.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_data_box_management_client_enums.py new file mode 100644 index 00000000000..e3da769b08c --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_data_box_management_client_enums.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + SMB = "SMB" #: Server Message Block protocol(SMB). + NFS = "NFS" #: Network File System protocol(NFS). + +class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of address. + """ + + NONE = "None" #: Address type not known. + RESIDENTIAL = "Residential" #: Residential Address. + COMMERCIAL = "Commercial" #: Commercial Address. + +class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The address validation status. + """ + + VALID = "Valid" #: Address provided is valid. + INVALID = "Invalid" #: Address provided is invalid or not supported. + AMBIGUOUS = "Ambiguous" #: Address provided is ambiguous, please choose one of the alternate addresses returned. + +class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates the type of job details. + """ + + DATA_BOX = "DataBox" #: Databox orders. + DATA_BOX_DISK = "DataBoxDisk" #: DataboxDisk orders. + DATA_BOX_HEAVY = "DataBoxHeavy" #: DataboxHeavy orders. + +class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Status of the copy + """ + + NOT_STARTED = "NotStarted" #: Data copy hasn't started yet. + IN_PROGRESS = "InProgress" #: Data copy is in progress. + COMPLETED = "Completed" #: Data copy completed. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Data copy completed with errors. + FAILED = "Failed" #: Data copy failed. No data was copied. + NOT_RETURNED = "NotReturned" #: No copy triggered as device was not returned. + HARDWARE_ERROR = "HardwareError" #: The Device has hit hardware issues. + DEVICE_FORMATTED = "DeviceFormatted" #: Data copy failed. The Device was formatted by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" #: Data copy failed. Device metadata was modified by user. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" #: Data copy failed. Storage Account was not accessible during copy. + UNSUPPORTED_DATA = "UnsupportedData" #: Data copy failed. The Device data content is not supported. + +class DataDestinationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Data Destination Type. + """ + + STORAGE_ACCOUNT = "StorageAccount" #: Storage Accounts . + MANAGED_DISK = "ManagedDisk" #: Azure Managed disk storage. + +class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Delivery type of Job. + """ + + NON_SCHEDULED = "NonScheduled" #: Non Scheduled job. + SCHEDULED = "Scheduled" #: Scheduled job. + +class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage. + """ + + DEVICE_PREPARED = "DevicePrepared" #: Notification at device prepared stage. + DISPATCHED = "Dispatched" #: Notification at device dispatched stage. + DELIVERED = "Delivered" #: Notification at device delivered stage. + PICKED_UP = "PickedUp" #: Notification at device picked up from user stage. + AT_AZURE_DC = "AtAzureDC" #: Notification at device received at azure datacenter stage. + DATA_COPY = "DataCopy" #: Notification at data copy started stage. + +class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Overall validation status. + """ + + ALL_VALID_TO_PROCEED = "AllValidToProceed" #: Every input request is valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" #: Some input requests are not valid. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" #: Certain input validations skipped. + +class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the share. + """ + + UNKNOWN_TYPE = "UnknownType" #: Unknown format. + HCS = "HCS" #: Storsimple data format. + BLOCK_BLOB = "BlockBlob" #: Azure storage block blob format. + PAGE_BLOB = "PageBlob" #: Azure storage page blob format. + AZURE_FILE = "AzureFile" #: Azure storage file format. + MANAGED_DISK = "ManagedDisk" #: Azure Compute Disk. + +class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Reason why the Sku is disabled. + """ + + NONE = "None" #: SKU is not disabled. + COUNTRY = "Country" #: SKU is not available in the requested country. + REGION = "Region" #: SKU is not available to push data to the requested Azure region. + FEATURE = "Feature" #: Required features are not enabled for the SKU. + OFFER_TYPE = "OfferType" #: Subscription does not have required offer types for the SKU. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + DATA_BOX = "DataBox" #: Databox. + DATA_BOX_DISK = "DataBoxDisk" #: DataboxDisk. + DATA_BOX_HEAVY = "DataBoxHeavy" #: DataboxHeavy. + +class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage which is in progress. + """ + + DEVICE_ORDERED = "DeviceOrdered" #: An order has been created. + DEVICE_PREPARED = "DevicePrepared" #: A device has been prepared for the order. + DISPATCHED = "Dispatched" #: Device has been dispatched to the user of the order. + DELIVERED = "Delivered" #: Device has been delivered to the user of the order. + PICKED_UP = "PickedUp" #: Device has been picked up from user and in transit to azure datacenter. + AT_AZURE_DC = "AtAzureDC" #: Device has been received at azure datacenter from the user. + DATA_COPY = "DataCopy" #: Data copy from the device at azure datacenter. + COMPLETED = "Completed" #: Order has completed. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Order has completed with errors. + CANCELLED = "Cancelled" #: Order has been cancelled. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" #: Order has failed due to issue reported by user. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" #: Order has failed due to issue detected at azure datacenter. + ABORTED = "Aborted" #: Order has been aborted. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" #: Order has completed with warnings. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" #: Device is ready to be handed to customer from Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" #: Device can be dropped off at Azure DC. + +class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the job stage. + """ + + NONE = "None" #: No status available yet. + IN_PROGRESS = "InProgress" #: Stage is in progress. + SUCCEEDED = "Succeeded" #: Stage has succeeded. + FAILED = "Failed" #: Stage has failed. + CANCELLED = "Cancelled" #: Stage has been cancelled. + CANCELLING = "Cancelling" #: Stage is cancelling. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" #: Stage has succeeded with errors. + +class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Transport Shipment Type supported for given region. + """ + + CUSTOMER_MANAGED = "CustomerManaged" #: Shipment Logistics is handled by the customer. + MICROSOFT_MANAGED = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. + +class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Identifies the type of validation request. + """ + + VALIDATE_ADDRESS = "ValidateAddress" #: Identify request and response of address validation. + VALIDATE_DATA_DESTINATION_DETAILS = "ValidateDataDestinationDetails" #: Identify request and response of data destination details validation. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" #: Identify request and response for validation of subscription permission to create job. + VALIDATE_PREFERENCES = "ValidatePreferences" #: Identify request and response of preference validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" #: Identify request and response of create order limit for subscription validation. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" #: Identify request and response of active job limit for sku availability. + +class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Create order limit validation status. + """ + + VALID = "Valid" #: Validation is successful. + INVALID = "Invalid" #: Validation is not successful. + SKIPPED = "Skipped" #: Validation is skipped. diff --git a/src/databox/azext_databox/vendored_sdks/databox/models/_models.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_models.py similarity index 67% rename from src/databox/azext_databox/vendored_sdks/databox/models/_models.py rename to src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_models.py index 34a4d7aa419..0d62bb7ec20 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/models/_models.py +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_models.py @@ -1,37 +1,29 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import msrest.serialization -class AccountCredentialDetails(Model): +class AccountCredentialDetails(msrest.serialization.Model): """Credential details of the account. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar account_name: Name of the account. :vartype account_name: str - :ivar data_destination_type: Data Destination Type. Possible values - include: 'StorageAccount', 'ManagedDisk' - :vartype data_destination_type: str or - ~azure.mgmt.databox.models.DataDestinationType - :ivar account_connection_string: Connection string of the account endpoint - to use the account as a storage endpoint on the device. + :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. :vartype account_connection_string: str - :ivar share_credential_details: Per share level unencrypted access - credentials. - :vartype share_credential_details: - list[~azure.mgmt.databox.models.ShareCredentialDetails] + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] """ _validation = { @@ -43,12 +35,15 @@ class AccountCredentialDetails(Model): _attribute_map = { 'account_name': {'key': 'accountName', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'DataDestinationType'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AccountCredentialDetails, self).__init__(**kwargs) self.account_name = None self.data_destination_type = None @@ -56,21 +51,23 @@ def __init__(self, **kwargs): self.share_credential_details = None -class AddressValidationOutput(Model): +class AddressValidationOutput(msrest.serialization.Model): """Output of the address validation api. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :ivar validation_status: The address validation status. Possible values - include: 'Valid', 'Invalid', 'Ambiguous' - :vartype validation_status: str or - ~azure.mgmt.databox.models.AddressValidationStatus + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: - list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] """ _validation = { @@ -80,23 +77,114 @@ class AddressValidationOutput(Model): } _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, 'error': {'key': 'properties.error', 'type': 'Error'}, - 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataDestinationDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.Error + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.Error + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str self.validation_status = None self.alternate_addresses = None -class ApplianceNetworkConfiguration(Model): +class ApplianceNetworkConfiguration(msrest.serialization.Model): """The Network Adapter configuration of a DataBox. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the network. :vartype name: str @@ -114,17 +202,19 @@ class ApplianceNetworkConfiguration(Model): 'mac_address': {'key': 'macAddress', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ApplianceNetworkConfiguration, self).__init__(**kwargs) self.name = None self.mac_address = None -class ArmBaseObject(Model): +class ArmBaseObject(msrest.serialization.Model): """Base class for all objects under resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the object. :vartype name: str @@ -146,33 +236,32 @@ class ArmBaseObject(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ArmBaseObject, self).__init__(**kwargs) self.name = None self.id = None self.type = None -class AvailableSkuRequest(Model): +class AvailableSkuRequest(msrest.serialization.Model): """The filters for showing the available skus. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar transfer_type: Required. Type of the transfer. Default value: - "ImportToAzure" . + :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". :vartype transfer_type: str - :param country: Required. ISO country code. Country for hardware shipment. - For codes check: - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str - :param location: Required. Location for data transfer. For locations - check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str - :param sku_names: Sku Names to filter for available skus + :param sku_names: Sku Names to filter for available skus. :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] """ @@ -186,19 +275,51 @@ class AvailableSkuRequest(Model): 'transfer_type': {'key': 'transferType', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'sku_names': {'key': 'skuNames', 'type': '[SkuName]'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, } transfer_type = "ImportToAzure" - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AvailableSkuRequest, self).__init__(**kwargs) - self.country = kwargs.get('country', None) - self.location = kwargs.get('location', None) + self.country = kwargs['country'] + self.location = kwargs['location'] self.sku_names = kwargs.get('sku_names', None) -class CancellationReason(Model): +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class CancellationReason(msrest.serialization.Model): """Reason for cancellation. All required parameters must be populated in order to send to Azure. @@ -215,22 +336,24 @@ class CancellationReason(Model): 'reason': {'key': 'reason', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CancellationReason, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) + self.reason = kwargs['reason'] -class CloudError(Model): +class CloudError(msrest.serialization.Model): """The error information object. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar code: Error code string. :vartype code: str :ivar message: Descriptive error information. :vartype message: str - :param target: Error target + :param target: Error target. :type target: str :param details: More detailed error information. :type details: list[~azure.mgmt.databox.models.CloudError] @@ -248,7 +371,10 @@ class CloudError(Model): 'details': {'key': 'details', 'type': '[CloudError]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.code = None self.message = None @@ -256,19 +382,7 @@ def __init__(self, **kwargs): self.details = kwargs.get('details', None) -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ContactDetails(Model): +class ContactDetails(msrest.serialization.Model): """Contact Details. All required parameters must be populated in order to send to Azure. @@ -281,12 +395,10 @@ class ContactDetails(Model): :type phone_extension: str :param mobile: Mobile number of the contact person. :type mobile: str - :param email_list: Required. List of Email-ids to be notified about job - progress. + :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: - list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] """ _validation = { @@ -304,27 +416,30 @@ class ContactDetails(Model): 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContactDetails, self).__init__(**kwargs) - self.contact_name = kwargs.get('contact_name', None) - self.phone = kwargs.get('phone', None) + self.contact_name = kwargs['contact_name'] + self.phone = kwargs['phone'] self.phone_extension = kwargs.get('phone_extension', None) self.mobile = kwargs.get('mobile', None) - self.email_list = kwargs.get('email_list', None) + self.email_list = kwargs['email_list'] self.notification_preference = kwargs.get('notification_preference', None) -class CopyLogDetails(Model): +class CopyLogDetails(msrest.serialization.Model): """Details for log generated during copy. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, - DataBoxHeavyAccountCopyLogDetails + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator """ _validation = { @@ -339,46 +454,44 @@ class CopyLogDetails(Model): 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CopyLogDetails, self).__init__(**kwargs) - self.copy_log_details_type = None + self.copy_log_details_type = None # type: Optional[str] -class CopyProgress(Model): +class CopyProgress(msrest.serialization.Model): """Copy progress. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar storage_account_name: Name of the storage account where the data - needs to be uploaded. + :ivar storage_account_name: Name of the storage account where the data needs to be uploaded. :vartype storage_account_name: str - :ivar data_destination_type: Data Destination Type. Possible values - include: 'StorageAccount', 'ManagedDisk' - :vartype data_destination_type: str or - ~azure.mgmt.databox.models.DataDestinationType + :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_sent_to_cloud: Amount of data uploaded by the job as of now. :vartype bytes_sent_to_cloud: long - :ivar total_bytes_to_process: Total amount of data to be processed by the - job. + :ivar total_bytes_to_process: Total amount of data to be processed by the job. :vartype total_bytes_to_process: long :ivar files_processed: Number of files processed by the job as of now. :vartype files_processed: long - :ivar total_files_to_process: Total number of files to be processed by the - job. + :ivar total_files_to_process: Total number of files to be processed by the job. :vartype total_files_to_process: long - :ivar invalid_files_processed: Number of files not adhering to azure - naming conventions which were processed by automatic renaming + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. :vartype invalid_files_processed: long - :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to - azure naming conventions which were processed by automatic renaming + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. :vartype invalid_file_bytes_uploaded: long - :ivar renamed_container_count: Number of folders not adhering to azure - naming conventions which were processed by automatic renaming + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. :vartype renamed_container_count: long - :ivar files_errored_out: Number of files which could not be copied + :ivar files_errored_out: Number of files which could not be copied. :vartype files_errored_out: long """ @@ -398,7 +511,7 @@ class CopyProgress(Model): _attribute_map = { 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'DataDestinationType'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'bytes_sent_to_cloud': {'key': 'bytesSentToCloud', 'type': 'long'}, 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, @@ -410,7 +523,10 @@ class CopyProgress(Model): 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CopyProgress, self).__init__(**kwargs) self.storage_account_name = None self.data_destination_type = None @@ -425,19 +541,19 @@ def __init__(self, **kwargs): self.files_errored_out = None -class ValidationRequest(Model): +class ValidationRequest(msrest.serialization.Model): """Input request for all pre job creation validation. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CreateJobValidations + sub-classes are: CreateJobValidations. All required parameters must be populated in order to send to Azure. - :param individual_request_details: Required. List of request details - contain validationType and its request as key and value respectively. - :type individual_request_details: - list[~azure.mgmt.databox.models.ValidationInputRequest] - :param validation_category: Required. Constant filled by server. + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. :type validation_category: str """ @@ -455,10 +571,13 @@ class ValidationRequest(Model): 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ValidationRequest, self).__init__(**kwargs) - self.individual_request_details = kwargs.get('individual_request_details', None) - self.validation_category = None + self.individual_request_details = kwargs['individual_request_details'] + self.validation_category = None # type: Optional[str] class CreateJobValidations(ValidationRequest): @@ -466,11 +585,11 @@ class CreateJobValidations(ValidationRequest): All required parameters must be populated in order to send to Azure. - :param individual_request_details: Required. List of request details - contain validationType and its request as key and value respectively. - :type individual_request_details: - list[~azure.mgmt.databox.models.ValidationInputRequest] - :param validation_category: Required. Constant filled by server. + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. :type validation_category: str """ @@ -484,24 +603,27 @@ class CreateJobValidations(ValidationRequest): 'validation_category': {'key': 'validationCategory', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CreateJobValidations, self).__init__(**kwargs) - self.validation_category = 'JobCreationValidation' + self.validation_category = 'JobCreationValidation' # type: str -class ValidationInputRequest(Model): +class ValidationInputRequest(msrest.serialization.Model): """Minimum fields that must be present in any type of validation request. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CreateOrderLimitForSubscriptionValidationRequest, - DataDestinationDetailsValidationRequest, PreferencesValidationRequest, - SkuAvailabilityValidationRequest, - SubscriptionIsAllowedToCreateJobValidationRequest, ValidateAddress + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataDestinationDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator """ _validation = { @@ -513,12 +635,15 @@ class ValidationInputRequest(Model): } _subtype_map = { - 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest', 'ValidateAddress': 'ValidateAddress'} + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ValidationInputRequest, self).__init__(**kwargs) - self.validation_type = None + self.validation_type = None # type: Optional[str] class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): @@ -526,10 +651,13 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName """ @@ -540,103 +668,68 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) - self.device_type = kwargs.get('device_type', None) - self.validation_type = 'ValidateCreateOrderLimit' - - -class ValidationInputResponse(Model): - """Minimum properties that should be present in each individual validation - response. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - CreateOrderLimitForSubscriptionValidationResponseProperties, - DataDestinationDetailsValidationResponseProperties, - PreferencesValidationResponseProperties, - SkuAvailabilityValidationResponseProperties, - SubscriptionIsAllowedToCreateJobValidationResponseProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - """ - - _validation = { - 'error': {'readonly': True}, - 'validation_type': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, - 'validation_type': {'key': 'validationType', 'type': 'str'}, - } - - _subtype_map = { - 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} - } - - def __init__(self, **kwargs): - super(ValidationInputResponse, self).__init__(**kwargs) - self.error = None - self.validation_type = None + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = kwargs['device_type'] class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): """Properties of create order limit for subscription validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Create order limit validation status. Possible values - include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str self.status = None - self.validation_type = 'ValidateCreateOrderLimit' class DataBoxAccountCopyLogDetails(CopyLogDetails): """Copy log details for a storage account of a DataBox job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -655,23 +748,26 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str self.account_name = None self.copy_log_link = None - self.copy_log_details_type = 'DataBox' class DataBoxDiskCopyLogDetails(CopyLogDetails): """Copy Log Details for a disk. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -694,31 +790,31 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str self.disk_serial_number = None self.error_log_link = None self.verbose_log_link = None - self.copy_log_details_type = 'DataBoxDisk' -class DataBoxDiskCopyProgress(Model): +class DataBoxDiskCopyProgress(msrest.serialization.Model): """DataBox Disk Copy Progress. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar serial_number: The serial number of the disk + :ivar serial_number: The serial number of the disk. :vartype serial_number: str :ivar bytes_copied: Bytes copied during the copy of disk. :vartype bytes_copied: long - :ivar percent_complete: Indicates the percentage completed for the copy of - the disk. + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. :vartype percent_complete: int - :ivar status: The Status of the copy. Possible values include: - 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', - 'NotReturned', 'HardwareError', 'DeviceFormatted', - 'DeviceMetadataModified', 'StorageAccountNotAccessible', 'UnsupportedData' + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". :vartype status: str or ~azure.mgmt.databox.models.CopyStatus """ @@ -733,10 +829,13 @@ class DataBoxDiskCopyProgress(Model): 'serial_number': {'key': 'serialNumber', 'type': 'str'}, 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CopyStatus'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxDiskCopyProgress, self).__init__(**kwargs) self.serial_number = None self.bytes_copied = None @@ -744,50 +843,44 @@ def __init__(self, **kwargs): self.status = None -class JobDetails(Model): +class JobDetails(msrest.serialization.Model): """Job details. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, - DataBoxJobDetails + sub-classes are: DataBoxJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str """ _validation = { @@ -798,10 +891,10 @@ class JobDetails(Model): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, } _attribute_map = { @@ -813,84 +906,80 @@ class JobDetails(Model): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, } _subtype_map = { - 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobDetails, self).__init__(**kwargs) self.expected_data_size_in_terabytes = kwargs.get('expected_data_size_in_terabytes', None) self.job_stages = None - self.contact_details = kwargs.get('contact_details', None) - self.shipping_address = kwargs.get('shipping_address', None) + self.contact_details = kwargs['contact_details'] + self.shipping_address = kwargs['shipping_address'] self.delivery_package = None self.return_package = None - self.destination_account_details = kwargs.get('destination_account_details', None) + self.destination_account_details = kwargs['destination_account_details'] self.error_details = None + self.job_details_type = None # type: Optional[str] self.preferences = kwargs.get('preferences', None) self.copy_log_details = None self.reverse_shipment_label_sas_key = None self.chain_of_custody_sas_key = None - self.job_details_type = None class DataBoxDiskJobDetails(JobDetails): """DataBox Disk Job Details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str - :param preferred_disks: 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. + :param preferred_disks: 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. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: - list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] - :ivar disks_and_size_details: Contains the map of disk serial number to - the disk size being used for the job. Is returned only after the disks are - shipped to the customer. + :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] :param passkey: User entered passkey for DataBox Disk job. :type passkey: str @@ -904,10 +993,10 @@ class DataBoxDiskJobDetails(JobDetails): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, 'copy_progress': {'readonly': True}, 'disks_and_size_details': {'readonly': True}, } @@ -921,41 +1010,42 @@ class DataBoxDiskJobDetails(JobDetails): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, 'passkey': {'key': 'passkey', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxDiskJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxDisk' # type: str self.preferred_disks = kwargs.get('preferred_disks', None) self.copy_progress = None self.disks_and_size_details = None self.passkey = kwargs.get('passkey', None) - self.job_details_type = 'DataBoxDisk' -class JobSecrets(Model): +class JobSecrets(msrest.serialization.Model): """The base class for the secrets. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, - DataboxJobSecrets + sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode """ _validation = { @@ -963,34 +1053,35 @@ class JobSecrets(Model): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, } _subtype_map = { - 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] self.dc_access_security_code = kwargs.get('dc_access_security_code', None) - self.job_secrets_type = None class DataBoxDiskJobSecrets(JobSecrets): """The secrets related to disk job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode :ivar disk_secrets: Contains the list of secrets object for that device. :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. @@ -1007,31 +1098,34 @@ class DataBoxDiskJobSecrets(JobSecrets): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, 'pass_key': {'key': 'passKey', 'type': 'str'}, 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str self.disk_secrets = None self.pass_key = None self.is_passkey_user_defined = None - self.job_secrets_type = 'DataBoxDisk' class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): """Copy log details for a storage account for Databox heavy. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1050,56 +1144,54 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str self.account_name = None self.copy_log_link = None - self.copy_log_details_type = 'DataBoxHeavy' class DataBoxHeavyJobDetails(JobDetails): """Databox Heavy Device Job Details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str :ivar copy_progress: Copy progress per account. :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] - :param device_password: Set Device password for unlocking Databox Heavy + :param device_password: Set Device password for unlocking Databox Heavy. :type device_password: str """ @@ -1111,10 +1203,10 @@ class DataBoxHeavyJobDetails(JobDetails): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, 'copy_progress': {'readonly': True}, } @@ -1127,40 +1219,39 @@ class DataBoxHeavyJobDetails(JobDetails): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str self.copy_progress = None self.device_password = kwargs.get('device_password', None) - self.job_details_type = 'DataBoxHeavy' class DataBoxHeavyJobSecrets(JobSecrets): """The secrets related to a databox heavy job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str - :ivar cabinet_pod_secrets: Contains the list of secret objects for a - databox heavy job. - :vartype cabinet_pod_secrets: - list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] """ _validation = { @@ -1169,36 +1260,36 @@ class DataBoxHeavyJobSecrets(JobSecrets): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str self.cabinet_pod_secrets = None - self.job_secrets_type = 'DataBoxHeavy' -class DataBoxHeavySecret(Model): +class DataBoxHeavySecret(msrest.serialization.Model): """The secrets related to a databox heavy. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar device_serial_number: Serial number of the assigned device. :vartype device_serial_number: str :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: - list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] - :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to - authenticate with the device + :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: - list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] """ _validation = { @@ -1217,7 +1308,10 @@ class DataBoxHeavySecret(Model): 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxHeavySecret, self).__init__(**kwargs) self.device_serial_number = None self.device_password = None @@ -1229,46 +1323,41 @@ def __init__(self, **kwargs): class DataBoxJobDetails(JobDetails): """Databox Job Details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str :ivar copy_progress: Copy progress per storage account. :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] - :param device_password: Set Device password for unlocking Databox + :param device_password: Set Device password for unlocking Databox. :type device_password: str """ @@ -1280,10 +1369,10 @@ class DataBoxJobDetails(JobDetails): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, 'copy_progress': {'readonly': True}, } @@ -1296,20 +1385,23 @@ class DataBoxJobDetails(JobDetails): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBox' # type: str self.copy_progress = None self.device_password = kwargs.get('device_password', None) - self.job_details_type = 'DataBox' class DataboxJobSecrets(JobSecrets): @@ -1317,12 +1409,11 @@ class DataboxJobSecrets(JobSecrets): All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode :param pod_secrets: Contains the list of secret objects for a job. :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] """ @@ -1332,32 +1423,35 @@ class DataboxJobSecrets(JobSecrets): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str self.pod_secrets = kwargs.get('pod_secrets', None) - self.job_secrets_type = 'DataBox' -class ScheduleAvailabilityRequest(Model): +class ScheduleAvailabilityRequest(msrest.serialization.Model): """Request body to get the availability for scheduling orders. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxScheduleAvailabilityRequest, - DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _validation = { @@ -1374,10 +1468,13 @@ class ScheduleAvailabilityRequest(Model): 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ScheduleAvailabilityRequest, self).__init__(**kwargs) - self.storage_location = kwargs.get('storage_location', None) - self.sku_name = None + self.storage_location = kwargs['storage_location'] + self.sku_name = None # type: Optional[str] class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): @@ -1386,11 +1483,12 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _validation = { @@ -1403,30 +1501,30 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): 'sku_name': {'key': 'skuName', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxScheduleAvailabilityRequest, self).__init__(**kwargs) - self.sku_name = 'DataBox' + self.sku_name = 'DataBox' # type: str -class DataBoxSecret(Model): +class DataBoxSecret(msrest.serialization.Model): """The secrets related to a DataBox. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar device_serial_number: Serial number of the assigned device. :vartype device_serial_number: str :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: - list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] - :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to - authenticate with the device + :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: - list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] """ _validation = { @@ -1445,7 +1543,10 @@ class DataBoxSecret(Model): 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataBoxSecret, self).__init__(**kwargs) self.device_serial_number = None self.device_password = None @@ -1459,12 +1560,13 @@ class DataDestinationDetailsValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param destination_account_details: Required. Destination account details - list. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param destination_account_details: Required. Destination account details list. + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :param location: Required. Location of stamp or geo. :type location: str """ @@ -1481,49 +1583,57 @@ class DataDestinationDetailsValidationRequest(ValidationInputRequest): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataDestinationDetailsValidationRequest, self).__init__(**kwargs) - self.destination_account_details = kwargs.get('destination_account_details', None) - self.location = kwargs.get('location', None) - self.validation_type = 'ValidateDataDestinationDetails' + self.validation_type = 'ValidateDataDestinationDetails' # type: str + self.destination_account_details = kwargs['destination_account_details'] + self.location = kwargs['location'] class DataDestinationDetailsValidationResponseProperties(ValidationInputResponse): """Properties of data destination details validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Data destination details validation status. Possible values - include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Data destination details validation status. Possible values include: "Valid", + "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DataDestinationDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataDestinationDetails' # type: str self.status = None - self.validation_type = 'ValidateDataDestinationDetails' -class DcAccessSecurityCode(Model): +class DcAccessSecurityCode(msrest.serialization.Model): """Dc Access Security code for device. :param forward_dc_access_code: Dc Access Code for dispatching from DC. @@ -1537,28 +1647,30 @@ class DcAccessSecurityCode(Model): 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DcAccessSecurityCode, self).__init__(**kwargs) self.forward_dc_access_code = kwargs.get('forward_dc_access_code', None) self.reverse_dc_access_code = kwargs.get('reverse_dc_access_code', None) -class DestinationAccountDetails(Model): +class DestinationAccountDetails(msrest.serialization.Model): """Details of the destination storage accounts. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DestinationManagedDiskDetails, - DestinationStorageAccountDetails + sub-classes are: DestinationManagedDiskDetails, DestinationStorageAccountDetails. All required parameters must be populated in order to send to Azure. - :param account_id: Arm Id of the destination where the data has to be - moved. + :param data_destination_type: Required. Data Destination Type.Constant filled by server. + Possible values include: "StorageAccount", "ManagedDisk". + :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. :type share_password: str - :param data_destination_type: Required. Constant filled by server. - :type data_destination_type: str """ _validation = { @@ -1566,20 +1678,23 @@ class DestinationAccountDetails(Model): } _attribute_map = { + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'share_password': {'key': 'sharePassword', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, } _subtype_map = { 'data_destination_type': {'ManagedDisk': 'DestinationManagedDiskDetails', 'StorageAccount': 'DestinationStorageAccountDetails'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DestinationAccountDetails, self).__init__(**kwargs) + self.data_destination_type = None # type: Optional[str] self.account_id = kwargs.get('account_id', None) self.share_password = kwargs.get('share_password', None) - self.data_destination_type = None class DestinationManagedDiskDetails(DestinationAccountDetails): @@ -1587,18 +1702,18 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): All required parameters must be populated in order to send to Azure. - :param account_id: Arm Id of the destination where the data has to be - moved. + :param data_destination_type: Required. Data Destination Type.Constant filled by server. + Possible values include: "StorageAccount", "ManagedDisk". + :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. :type share_password: str - :param data_destination_type: Required. Constant filled by server. - :type data_destination_type: str - :param resource_group_id: Required. Destination Resource Group Id where - the Compute disks should be created. + :param resource_group_id: Required. Destination Resource Group Id where the Compute disks + should be created. :type resource_group_id: str - :param staging_storage_account_id: Required. Arm Id of the storage account - that can be used to copy the vhd for staging. + :param staging_storage_account_id: Required. Arm Id of the storage account that can be used to + copy the vhd for staging. :type staging_storage_account_id: str """ @@ -1609,18 +1724,21 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): } _attribute_map = { + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'share_password': {'key': 'sharePassword', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DestinationManagedDiskDetails, self).__init__(**kwargs) - self.resource_group_id = kwargs.get('resource_group_id', None) - self.staging_storage_account_id = kwargs.get('staging_storage_account_id', None) - self.data_destination_type = 'ManagedDisk' + self.data_destination_type = 'ManagedDisk' # type: str + self.resource_group_id = kwargs['resource_group_id'] + self.staging_storage_account_id = kwargs['staging_storage_account_id'] class DestinationStorageAccountDetails(DestinationAccountDetails): @@ -1628,13 +1746,13 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): All required parameters must be populated in order to send to Azure. - :param account_id: Arm Id of the destination where the data has to be - moved. + :param data_destination_type: Required. Data Destination Type.Constant filled by server. + Possible values include: "StorageAccount", "ManagedDisk". + :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. :type share_password: str - :param data_destination_type: Required. Constant filled by server. - :type data_destination_type: str :param storage_account_id: Required. Destination Storage Account Arm Id. :type storage_account_id: str """ @@ -1645,23 +1763,25 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): } _attribute_map = { + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'share_password': {'key': 'sharePassword', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DestinationStorageAccountDetails, self).__init__(**kwargs) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.data_destination_type = 'StorageAccount' + self.data_destination_type = 'StorageAccount' # type: str + self.storage_account_id = kwargs['storage_account_id'] -class DestinationToServiceLocationMap(Model): +class DestinationToServiceLocationMap(msrest.serialization.Model): """Map of destination location to service location. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar destination_location: Location of the destination. :vartype destination_location: str @@ -1679,7 +1799,10 @@ class DestinationToServiceLocationMap(Model): 'service_location': {'key': 'serviceLocation', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DestinationToServiceLocationMap, self).__init__(**kwargs) self.destination_location = None self.service_location = None @@ -1691,13 +1814,14 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str - :param expected_data_size_in_terabytes: Required. The expected size of the - data, which needs to be transferred in this job, in terabytes. + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to + be transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int """ @@ -1713,22 +1837,24 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) - self.expected_data_size_in_terabytes = kwargs.get('expected_data_size_in_terabytes', None) - self.sku_name = 'DataBoxDisk' + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_terabytes = kwargs['expected_data_size_in_terabytes'] -class DiskSecret(Model): +class DiskSecret(msrest.serialization.Model): """Contains all the secrets of a Disk. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar disk_serial_number: Serial number of the assigned disk. :vartype disk_serial_number: str - :ivar bit_locker_key: Bit Locker key of the disk which can be used to - unlock the disk to copy data. + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. :vartype bit_locker_key: str """ @@ -1742,23 +1868,23 @@ class DiskSecret(Model): 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DiskSecret, self).__init__(**kwargs) self.disk_serial_number = None self.bit_locker_key = None -class Error(Model): +class Error(msrest.serialization.Model): """Top level error for the job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code that can be used to programmatically identify the - error. + :ivar code: Error code that can be used to programmatically identify the error. :vartype code: str - :ivar message: Describes the error in detail and provides debugging - information. + :ivar message: Describes the error in detail and provides debugging information. :vartype message: str """ @@ -1772,7 +1898,10 @@ class Error(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Error, self).__init__(**kwargs) self.code = None self.message = None @@ -1784,11 +1913,12 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _validation = { @@ -1801,32 +1931,37 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): 'sku_name': {'key': 'skuName', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(HeavyScheduleAvailabilityRequest, self).__init__(**kwargs) - self.sku_name = 'DataBoxHeavy' + self.sku_name = 'DataBoxHeavy' # type: str -class JobDeliveryInfo(Model): +class JobDeliveryInfo(msrest.serialization.Model): """Additional delivery info. :param scheduled_date_time: Scheduled date time. - :type scheduled_date_time: datetime + :type scheduled_date_time: ~datetime.datetime """ _attribute_map = { 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobDeliveryInfo, self).__init__(**kwargs) self.scheduled_date_time = kwargs.get('scheduled_date_time', None) -class JobErrorDetails(Model): +class JobErrorDetails(msrest.serialization.Model): """Job Error Details for providing the information and recommended action. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar error_message: Message for the error. :vartype error_message: str @@ -1834,7 +1969,7 @@ class JobErrorDetails(Model): :vartype error_code: int :ivar recommended_action: Recommended action for the error. :vartype recommended_action: str - :ivar exception_message: Contains the non localized exception message + :ivar exception_message: Contains the non localized exception message. :vartype exception_message: str """ @@ -1852,7 +1987,10 @@ class JobErrorDetails(Model): 'exception_message': {'key': 'exceptionMessage', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobErrorDetails, self).__init__(**kwargs) self.error_message = None self.error_code = None @@ -1860,20 +1998,18 @@ def __init__(self, **kwargs): self.exception_message = None -class Resource(Model): +class Resource(msrest.serialization.Model): """Model of the Resource. All required parameters must be populated in order to send to Azure. - :param location: Required. The location of the resource. This will be one - of the supported and registered Azure Regions (e.g. West US, East US, - Southeast Asia, etc.). The region of a resource cannot be changed once it - is created, but if an identical region is specified on update the request - will succeed. + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. :type location: str - :param tags: The list of key value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource - groups). + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. :type sku: ~azure.mgmt.databox.models.Sku @@ -1890,76 +2026,74 @@ class Resource(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) + self.location = kwargs['location'] self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) + self.sku = kwargs['sku'] class JobResource(Resource): """Job Resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param location: Required. The location of the resource. This will be one - of the supported and registered Azure Regions (e.g. West US, East US, - Southeast Asia, etc.). The region of a resource cannot be changed once it - is created, but if an identical region is specified on update the request - will succeed. + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. :type location: str - :param tags: The list of key value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource - groups). + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. :type sku: ~azure.mgmt.databox.models.Sku + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str :ivar is_cancellable: Describes whether the job is cancellable or not. :vartype is_cancellable: bool :ivar is_deletable: Describes whether the job is deletable or not. :vartype is_deletable: bool - :ivar is_shipping_address_editable: Describes whether the shipping address - is editable or not. + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. :vartype is_shipping_address_editable: bool - :ivar status: Name of the stage which is in progress. Possible values - include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', - 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', - 'Cancelled', 'Failed_IssueReportedAtCustomer', - 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', - 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC' + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". :vartype status: str or ~azure.mgmt.databox.models.StageName - :ivar start_time: Time at which the job was started in UTC ISO 8601 - format. - :vartype start_time: datetime + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. :vartype error: ~azure.mgmt.databox.models.Error - :param details: Details of a job run. This field will only be sent for - expand details filter. + :param details: Details of a job run. This field will only be sent for expand details filter. :type details: ~azure.mgmt.databox.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str - :param delivery_type: Delivery type of Job. Possible values include: - 'NonScheduled', 'Scheduled' + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType :param delivery_info: Delivery Info of Job. :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo - :ivar is_cancellable_without_fee: Flag to indicate cancellation of - scheduled job. + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool - :ivar name: Name of the object. - :vartype name: str - :ivar id: Id of the object. - :vartype id: str - :ivar type: Type of the object. - :vartype type: str """ _validation = { 'location': {'required': True}, 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, 'is_cancellable': {'readonly': True}, 'is_deletable': {'readonly': True}, 'is_shipping_address_editable': {'readonly': True}, @@ -1968,33 +2102,36 @@ class JobResource(Resource): 'error': {'readonly': True}, 'cancellation_reason': {'readonly': True}, 'is_cancellable_without_fee': {'readonly': True}, - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, - 'status': {'key': 'properties.status', 'type': 'StageName'}, + 'status': {'key': 'properties.status', 'type': 'str'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 'error': {'key': 'properties.error', 'type': 'Error'}, 'details': {'key': 'properties.details', 'type': 'JobDetails'}, 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, - 'delivery_type': {'key': 'properties.deliveryType', 'type': 'JobDeliveryType'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobResource, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None self.is_cancellable = None self.is_deletable = None self.is_shipping_address_editable = None @@ -2006,60 +2143,78 @@ def __init__(self, **kwargs): self.delivery_type = kwargs.get('delivery_type', None) self.delivery_info = kwargs.get('delivery_info', None) self.is_cancellable_without_fee = None - self.name = None - self.id = None - self.type = None -class JobResourceUpdateParameter(Model): +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class JobResourceUpdateParameter(msrest.serialization.Model): """The JobResourceUpdateParameter. + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] :param details: Details of a job to be updated. :type details: ~azure.mgmt.databox.models.UpdateJobDetails :param destination_account_details: Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] - :param tags: The list of key value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource - groups). - :type tags: dict[str, str] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] """ _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, 'destination_account_details': {'key': 'properties.destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) self.details = kwargs.get('details', None) self.destination_account_details = kwargs.get('destination_account_details', None) - self.tags = kwargs.get('tags', None) -class JobStages(Model): +class JobStages(msrest.serialization.Model): """Job stages. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar stage_name: Name of the job stage. Possible values include: - 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', - 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', - 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', - 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', - 'ReadyToReceiveAtAzureDC' + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". :vartype stage_name: str or ~azure.mgmt.databox.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str - :ivar stage_status: Status of the job stage. Possible values include: - 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', - 'SucceededWithErrors' + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors". :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. - :vartype stage_time: datetime - :ivar job_stage_details: Job Stage Details + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. :vartype job_stage_details: object :ivar error_details: Error details for the stage. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] @@ -2075,15 +2230,18 @@ class JobStages(Model): } _attribute_map = { - 'stage_name': {'key': 'stageName', 'type': 'StageName'}, + 'stage_name': {'key': 'stageName', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, - 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(JobStages, self).__init__(**kwargs) self.stage_name = None self.display_name = None @@ -2093,14 +2251,13 @@ def __init__(self, **kwargs): self.error_details = None -class NotificationPreference(Model): +class NotificationPreference(msrest.serialization.Model): """Notification preference for a job stage. All required parameters must be populated in order to send to Azure. - :param stage_name: Required. Name of the stage. Possible values include: - 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', - 'DataCopy' + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool @@ -2112,30 +2269,32 @@ class NotificationPreference(Model): } _attribute_map = { - 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'stage_name': {'key': 'stageName', 'type': 'str'}, 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(NotificationPreference, self).__init__(**kwargs) - self.stage_name = kwargs.get('stage_name', None) - self.send_notification = kwargs.get('send_notification', None) + self.stage_name = kwargs['stage_name'] + self.send_notification = kwargs['send_notification'] -class Operation(Model): +class Operation(msrest.serialization.Model): """Operation entity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the operation. Format: - {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. :vartype display: ~azure.mgmt.databox.models.OperationDisplay :ivar properties: Operation properties. :vartype properties: object - :ivar origin: Origin of the operation. Can be : user|system|user,system + :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str """ @@ -2153,7 +2312,10 @@ class Operation(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Operation, self).__init__(**kwargs) self.name = None self.display = None @@ -2161,7 +2323,7 @@ def __init__(self, **kwargs): self.origin = None -class OperationDisplay(Model): +class OperationDisplay(msrest.serialization.Model): """Operation display. :param provider: Provider name. @@ -2170,8 +2332,7 @@ class OperationDisplay(Model): :type resource: str :param operation: Localized name of the operation for display purpose. :type operation: str - :param description: Localized description of the operation for display - purpose. + :param description: Localized description of the operation for display purpose. :type description: str """ @@ -2182,7 +2343,10 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OperationDisplay, self).__init__(**kwargs) self.provider = kwargs.get('provider', None) self.resource = kwargs.get('resource', None) @@ -2190,11 +2354,39 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) -class PackageShippingDetails(Model): +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class PackageShippingDetails(msrest.serialization.Model): """Shipping details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar carrier_name: Name of the carrier. :vartype carrier_name: str @@ -2216,22 +2408,23 @@ class PackageShippingDetails(Model): 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PackageShippingDetails, self).__init__(**kwargs) self.carrier_name = None self.tracking_id = None self.tracking_url = None -class Preferences(Model): +class Preferences(msrest.serialization.Model): """Preferences related to the order. :param preferred_data_center_region: Preferred Data Center Region. :type preferred_data_center_region: list[str] - :param transport_preferences: Preferences related to the shipment - logistics of the sku. - :type transport_preferences: - ~azure.mgmt.databox.models.TransportPreferences + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences """ _attribute_map = { @@ -2239,7 +2432,10 @@ class Preferences(Model): 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Preferences, self).__init__(**kwargs) self.preferred_data_center_region = kwargs.get('preferred_data_center_region', None) self.transport_preferences = kwargs.get('transport_preferences', None) @@ -2250,13 +2446,15 @@ class PreferencesValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param preference: Preference requested with respect to transport type and - data center + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param preference: Preference requested with respect to transport type and data center. :type preference: ~azure.mgmt.databox.models.Preferences - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName """ @@ -2268,62 +2466,68 @@ class PreferencesValidationRequest(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, 'preference': {'key': 'preference', 'type': 'Preferences'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str self.preference = kwargs.get('preference', None) - self.device_type = kwargs.get('device_type', None) - self.validation_type = 'ValidatePreferences' + self.device_type = kwargs['device_type'] class PreferencesValidationResponseProperties(ValidationInputResponse): """Properties of data center and transport preference validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Validation status of requested data center and transport. - Possible values include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str self.status = None - self.validation_type = 'ValidatePreferences' -class RegionConfigurationRequest(Model): +class RegionConfigurationRequest(msrest.serialization.Model): """Request body to get the configuration for the region. - :param schedule_availability_request: Request body to get the availability - for scheduling orders. - :type schedule_availability_request: - ~azure.mgmt.databox.models.ScheduleAvailabilityRequest - :param transport_availability_request: Request body to get the transport - availability for given sku. - :type transport_availability_request: - ~azure.mgmt.databox.models.TransportAvailabilityRequest + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest """ _attribute_map = { @@ -2331,24 +2535,24 @@ class RegionConfigurationRequest(Model): 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RegionConfigurationRequest, self).__init__(**kwargs) self.schedule_availability_request = kwargs.get('schedule_availability_request', None) self.transport_availability_request = kwargs.get('transport_availability_request', None) -class RegionConfigurationResponse(Model): +class RegionConfigurationResponse(msrest.serialization.Model): """Configuration response specific to a region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar schedule_availability_response: Schedule availability for given sku - in a region. + :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: ~azure.mgmt.databox.models.ScheduleAvailabilityResponse - :ivar transport_availability_response: Transport options available for - given sku in a region. + :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: ~azure.mgmt.databox.models.TransportAvailabilityResponse """ @@ -2363,20 +2567,22 @@ class RegionConfigurationResponse(Model): 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RegionConfigurationResponse, self).__init__(**kwargs) self.schedule_availability_response = None self.transport_availability_response = None -class ScheduleAvailabilityResponse(Model): +class ScheduleAvailabilityResponse(msrest.serialization.Model): """Schedule availability response for given sku in a region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar available_dates: List of dates available to schedule - :vartype available_dates: list[datetime] + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] """ _validation = { @@ -2387,31 +2593,30 @@ class ScheduleAvailabilityResponse(Model): 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ScheduleAvailabilityResponse, self).__init__(**kwargs) self.available_dates = None -class ShareCredentialDetails(Model): +class ShareCredentialDetails(msrest.serialization.Model): """Credential details of the shares in account. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar share_name: Name of the share. :vartype share_name: str - :ivar share_type: Type of the share. Possible values include: - 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' - :vartype share_type: str or - ~azure.mgmt.databox.models.ShareDestinationFormatType + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str - :ivar supported_access_protocols: Access protocols supported on the - device. - :vartype supported_access_protocols: list[str or - ~azure.mgmt.databox.models.AccessProtocol] + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] """ _validation = { @@ -2424,13 +2629,16 @@ class ShareCredentialDetails(Model): _attribute_map = { 'share_name': {'key': 'shareName', 'type': 'str'}, - 'share_type': {'key': 'shareType', 'type': 'ShareDestinationFormatType'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, 'user_name': {'key': 'userName', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, - 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ShareCredentialDetails, self).__init__(**kwargs) self.share_name = None self.share_type = None @@ -2439,19 +2647,18 @@ def __init__(self, **kwargs): self.supported_access_protocols = None -class ShipmentPickUpRequest(Model): +class ShipmentPickUpRequest(msrest.serialization.Model): """Shipment pick up request details. All required parameters must be populated in order to send to Azure. - :param start_time: Required. Minimum date after which the pick up should - commence, this must be in local time of pick up area. - :type start_time: datetime - :param end_time: Required. Maximum date before which the pick up should - commence, this must be in local time of pick up area. - :type end_time: datetime - :param shipment_location: Required. Shipment Location in the pickup place. - Eg.front desk + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. :type shipment_location: str """ @@ -2467,24 +2674,26 @@ class ShipmentPickUpRequest(Model): 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ShipmentPickUpRequest, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.shipment_location = kwargs.get('shipment_location', None) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + self.shipment_location = kwargs['shipment_location'] -class ShipmentPickUpResponse(Model): +class ShipmentPickUpResponse(msrest.serialization.Model): """Shipment pick up response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar confirmation_number: Confirmation number for the pick up request. :vartype confirmation_number: str - :ivar ready_by_time: Time by which shipment should be ready for pick up, - this is in local time of pick up area. - :vartype ready_by_time: datetime + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime """ _validation = { @@ -2497,13 +2706,16 @@ class ShipmentPickUpResponse(Model): 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ShipmentPickUpResponse, self).__init__(**kwargs) self.confirmation_number = None self.ready_by_time = None -class ShippingAddress(Model): +class ShippingAddress(msrest.serialization.Model): """Shipping address where customer wishes to receive the device. All required parameters must be populated in order to send to Azure. @@ -2526,8 +2738,8 @@ class ShippingAddress(Model): :type zip_extended_code: str :param company_name: Name of the company. :type company_name: str - :param address_type: Type of address. Possible values include: 'None', - 'Residential', 'Commercial' + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". :type address_type: str or ~azure.mgmt.databox.models.AddressType """ @@ -2547,30 +2759,33 @@ class ShippingAddress(Model): 'postal_code': {'key': 'postalCode', 'type': 'str'}, 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, 'company_name': {'key': 'companyName', 'type': 'str'}, - 'address_type': {'key': 'addressType', 'type': 'AddressType'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ShippingAddress, self).__init__(**kwargs) - self.street_address1 = kwargs.get('street_address1', None) + self.street_address1 = kwargs['street_address1'] self.street_address2 = kwargs.get('street_address2', None) self.street_address3 = kwargs.get('street_address3', None) self.city = kwargs.get('city', None) self.state_or_province = kwargs.get('state_or_province', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) + self.country = kwargs['country'] + self.postal_code = kwargs['postal_code'] self.zip_extended_code = kwargs.get('zip_extended_code', None) self.company_name = kwargs.get('company_name', None) self.address_type = kwargs.get('address_type', None) -class Sku(Model): +class Sku(msrest.serialization.Model): """The Sku. All required parameters must be populated in order to send to Azure. - :param name: Required. The sku name. Possible values include: 'DataBox', - 'DataBoxDisk', 'DataBoxHeavy' + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". :type name: str or ~azure.mgmt.databox.models.SkuName :param display_name: The display name of the sku. :type display_name: str @@ -2583,14 +2798,17 @@ class Sku(Model): } _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, + 'name': {'key': 'name', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs['name'] self.display_name = kwargs.get('display_name', None) self.family = kwargs.get('family', None) @@ -2598,26 +2816,25 @@ def __init__(self, **kwargs): class SkuAvailabilityValidationRequest(ValidationInputRequest): """Request to validate sku availability. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName - :ivar transfer_type: Required. Type of the transfer. Default value: - "ImportToAzure" . + :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". :vartype transfer_type: str - :param country: Required. ISO country code. Country for hardware shipment. - For codes check: - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str - :param location: Required. Location for data transfer. For locations - check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str """ @@ -2631,7 +2848,7 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, 'transfer_type': {'key': 'transferType', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, @@ -2639,54 +2856,61 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): transfer_type = "ImportToAzure" - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) - self.device_type = kwargs.get('device_type', None) - self.country = kwargs.get('country', None) - self.location = kwargs.get('location', None) - self.validation_type = 'ValidateSkuAvailability' + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = kwargs['device_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): """Properties of sku availability validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Sku availability validation status. Possible values include: - 'Valid', 'Invalid', 'Skipped' + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str self.status = None - self.validation_type = 'ValidateSkuAvailability' -class SkuCapacity(Model): +class SkuCapacity(msrest.serialization.Model): """Capacity of the sku. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar usable: Usable capacity in TB. :vartype usable: str @@ -2704,17 +2928,19 @@ class SkuCapacity(Model): 'maximum': {'key': 'maximum', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuCapacity, self).__init__(**kwargs) self.usable = None self.maximum = None -class SkuCost(Model): +class SkuCost(msrest.serialization.Model): """Describes metadata for retrieving price info. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar meter_id: Meter id of the Sku. :vartype meter_id: str @@ -2732,24 +2958,25 @@ class SkuCost(Model): 'meter_type': {'key': 'meterType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuCost, self).__init__(**kwargs) self.meter_id = None self.meter_type = None -class SkuInformation(Model): +class SkuInformation(msrest.serialization.Model): """Information of the sku. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. :vartype sku: ~azure.mgmt.databox.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool - :ivar destination_to_service_location_map: The map of destination location - to service location. + :ivar destination_to_service_location_map: The map of destination location to service location. :vartype destination_to_service_location_map: list[~azure.mgmt.databox.models.DestinationToServiceLocationMap] :ivar capacity: Capacity of the Sku. @@ -2758,11 +2985,9 @@ class SkuInformation(Model): :vartype costs: list[~azure.mgmt.databox.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] - :ivar disabled_reason: Reason why the Sku is disabled. Possible values - include: 'None', 'Country', 'Region', 'Feature', 'OfferType', - 'NoSubscriptionInfo' - :vartype disabled_reason: str or - ~azure.mgmt.databox.models.SkuDisabledReason + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -2788,12 +3013,15 @@ class SkuInformation(Model): 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, - 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'SkuDisabledReason'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuInformation, self).__init__(**kwargs) self.sku = None self.enabled = None @@ -2811,8 +3039,11 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator """ _validation = { @@ -2823,56 +3054,62 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): 'validation_type': {'key': 'validationType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) - self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): """Properties of subscription permission to create job validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Validation status of subscription permission to create job. - Possible values include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str self.status = None - self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' -class TransportAvailabilityDetails(Model): +class TransportAvailabilityDetails(msrest.serialization.Model): """Transport options availability details for given region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar shipment_type: Transport Shipment Type supported for given region. - Possible values include: 'CustomerManaged', 'MicrosoftManaged' - :vartype shipment_type: str or - ~azure.mgmt.databox.models.TransportShipmentTypes + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes """ _validation = { @@ -2880,39 +3117,43 @@ class TransportAvailabilityDetails(Model): } _attribute_map = { - 'shipment_type': {'key': 'shipmentType', 'type': 'TransportShipmentTypes'}, + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TransportAvailabilityDetails, self).__init__(**kwargs) self.shipment_type = None -class TransportAvailabilityRequest(Model): +class TransportAvailabilityRequest(msrest.serialization.Model): """Request body to get the transport availability for given sku. - :param sku_name: Type of the device. Possible values include: 'DataBox', - 'DataBoxDisk', 'DataBoxHeavy' + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _attribute_map = { - 'sku_name': {'key': 'skuName', 'type': 'SkuName'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TransportAvailabilityRequest, self).__init__(**kwargs) self.sku_name = kwargs.get('sku_name', None) -class TransportAvailabilityResponse(Model): +class TransportAvailabilityResponse(msrest.serialization.Model): """Transport options available for given sku in a region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar transport_availability_details: List of transport availability - details for given region + :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: list[~azure.mgmt.databox.models.TransportAvailabilityDetails] """ @@ -2925,21 +3166,22 @@ class TransportAvailabilityResponse(Model): 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TransportAvailabilityResponse, self).__init__(**kwargs) self.transport_availability_details = None -class TransportPreferences(Model): +class TransportPreferences(msrest.serialization.Model): """Preferences related to the shipment logistics of the sku. All required parameters must be populated in order to send to Azure. - :param preferred_shipment_type: Required. Indicates Shipment Logistics - type that the customer preferred. Possible values include: - 'CustomerManaged', 'MicrosoftManaged' - :type preferred_shipment_type: str or - ~azure.mgmt.databox.models.TransportShipmentTypes + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes """ _validation = { @@ -2947,19 +3189,21 @@ class TransportPreferences(Model): } _attribute_map = { - 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'TransportShipmentTypes'}, + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TransportPreferences, self).__init__(**kwargs) - self.preferred_shipment_type = kwargs.get('preferred_shipment_type', None) + self.preferred_shipment_type = kwargs['preferred_shipment_type'] -class UnencryptedCredentials(Model): +class UnencryptedCredentials(msrest.serialization.Model): """Unencrypted credentials for accessing device. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar job_name: Name of the job. :vartype job_name: str @@ -2977,13 +3221,39 @@ class UnencryptedCredentials(Model): 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(UnencryptedCredentials, self).__init__(**kwargs) self.job_name = None self.job_secrets = None -class UpdateJobDetails(Model): +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. @@ -2997,29 +3267,32 @@ class UpdateJobDetails(Model): 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(UpdateJobDetails, self).__init__(**kwargs) self.contact_details = kwargs.get('contact_details', None) self.shipping_address = kwargs.get('shipping_address', None) class ValidateAddress(ValidationInputRequest): - """The requirements to validate customer address where the device needs to be - shipped. + """The requirements to validate customer address where the device needs to be shipped. All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName - :param transport_preferences: Preferences related to the shipment - logistics of the sku. - :type transport_preferences: - ~azure.mgmt.databox.models.TransportPreferences + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences """ _validation = { @@ -3031,32 +3304,32 @@ class ValidateAddress(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ValidateAddress, self).__init__(**kwargs) - self.shipping_address = kwargs.get('shipping_address', None) - self.device_type = kwargs.get('device_type', None) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = kwargs['shipping_address'] + self.device_type = kwargs['device_type'] self.transport_preferences = kwargs.get('transport_preferences', None) - self.validation_type = 'ValidateAddress' -class ValidationResponse(Model): +class ValidationResponse(msrest.serialization.Model): """Response of pre job creation validations. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar status: Overall validation status. Possible values include: - 'AllValidToProceed', 'InputsRevisitRequired', - 'CertainInputValidationsSkipped' + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus - :ivar individual_response_details: List of response details contain - validationType and its response as key and value respectively. - :vartype individual_response_details: - list[~azure.mgmt.databox.models.ValidationInputResponse] + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] """ _validation = { @@ -3065,11 +3338,14 @@ class ValidationResponse(Model): } _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'OverallValidationStatus'}, + 'status': {'key': 'properties.status', 'type': 'str'}, 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ValidationResponse, self).__init__(**kwargs) self.status = None self.individual_response_details = None diff --git a/src/databox/azext_databox/vendored_sdks/databox/models/_models_py3.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_models_py3.py similarity index 66% rename from src/databox/azext_databox/vendored_sdks/databox/models/_models_py3.py rename to src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_models_py3.py index a96c0dc5c49..89c41698459 100644 --- a/src/databox/azext_databox/vendored_sdks/databox/models/_models_py3.py +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/models/_models_py3.py @@ -1,37 +1,34 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import datetime +from typing import Dict, List, Optional, Union +import msrest.serialization -class AccountCredentialDetails(Model): +from ._data_box_management_client_enums import * + + +class AccountCredentialDetails(msrest.serialization.Model): """Credential details of the account. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar account_name: Name of the account. :vartype account_name: str - :ivar data_destination_type: Data Destination Type. Possible values - include: 'StorageAccount', 'ManagedDisk' - :vartype data_destination_type: str or - ~azure.mgmt.databox.models.DataDestinationType - :ivar account_connection_string: Connection string of the account endpoint - to use the account as a storage endpoint on the device. + :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. :vartype account_connection_string: str - :ivar share_credential_details: Per share level unencrypted access - credentials. - :vartype share_credential_details: - list[~azure.mgmt.databox.models.ShareCredentialDetails] + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] """ _validation = { @@ -43,12 +40,15 @@ class AccountCredentialDetails(Model): _attribute_map = { 'account_name': {'key': 'accountName', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'DataDestinationType'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(AccountCredentialDetails, self).__init__(**kwargs) self.account_name = None self.data_destination_type = None @@ -56,21 +56,23 @@ def __init__(self, **kwargs) -> None: self.share_credential_details = None -class AddressValidationOutput(Model): +class AddressValidationOutput(msrest.serialization.Model): """Output of the address validation api. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :ivar validation_status: The address validation status. Possible values - include: 'Valid', 'Invalid', 'Ambiguous' - :vartype validation_status: str or - ~azure.mgmt.databox.models.AddressValidationStatus + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: - list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] """ _validation = { @@ -80,23 +82,114 @@ class AddressValidationOutput(Model): } _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, 'error': {'key': 'properties.error', 'type': 'Error'}, - 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataDestinationDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.Error + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.Error + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str self.validation_status = None self.alternate_addresses = None -class ApplianceNetworkConfiguration(Model): +class ApplianceNetworkConfiguration(msrest.serialization.Model): """The Network Adapter configuration of a DataBox. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the network. :vartype name: str @@ -114,17 +207,19 @@ class ApplianceNetworkConfiguration(Model): 'mac_address': {'key': 'macAddress', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ApplianceNetworkConfiguration, self).__init__(**kwargs) self.name = None self.mac_address = None -class ArmBaseObject(Model): +class ArmBaseObject(msrest.serialization.Model): """Base class for all objects under resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the object. :vartype name: str @@ -146,33 +241,32 @@ class ArmBaseObject(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ArmBaseObject, self).__init__(**kwargs) self.name = None self.id = None self.type = None -class AvailableSkuRequest(Model): +class AvailableSkuRequest(msrest.serialization.Model): """The filters for showing the available skus. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar transfer_type: Required. Type of the transfer. Default value: - "ImportToAzure" . + :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". :vartype transfer_type: str - :param country: Required. ISO country code. Country for hardware shipment. - For codes check: - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str - :param location: Required. Location for data transfer. For locations - check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str - :param sku_names: Sku Names to filter for available skus + :param sku_names: Sku Names to filter for available skus. :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] """ @@ -186,19 +280,57 @@ class AvailableSkuRequest(Model): 'transfer_type': {'key': 'transferType', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'sku_names': {'key': 'skuNames', 'type': '[SkuName]'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, } transfer_type = "ImportToAzure" - def __init__(self, *, country: str, location: str, sku_names=None, **kwargs) -> None: + def __init__( + self, + *, + country: str, + location: str, + sku_names: Optional[List[Union[str, "SkuName"]]] = None, + **kwargs + ): super(AvailableSkuRequest, self).__init__(**kwargs) self.country = country self.location = location self.sku_names = sku_names -class CancellationReason(Model): +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class CancellationReason(msrest.serialization.Model): """Reason for cancellation. All required parameters must be populated in order to send to Azure. @@ -215,22 +347,26 @@ class CancellationReason(Model): 'reason': {'key': 'reason', 'type': 'str'}, } - def __init__(self, *, reason: str, **kwargs) -> None: + def __init__( + self, + *, + reason: str, + **kwargs + ): super(CancellationReason, self).__init__(**kwargs) self.reason = reason -class CloudError(Model): +class CloudError(msrest.serialization.Model): """The error information object. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar code: Error code string. :vartype code: str :ivar message: Descriptive error information. :vartype message: str - :param target: Error target + :param target: Error target. :type target: str :param details: More detailed error information. :type details: list[~azure.mgmt.databox.models.CloudError] @@ -248,7 +384,13 @@ class CloudError(Model): 'details': {'key': 'details', 'type': '[CloudError]'}, } - def __init__(self, *, target: str=None, details=None, **kwargs) -> None: + def __init__( + self, + *, + target: Optional[str] = None, + details: Optional[List["CloudError"]] = None, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.code = None self.message = None @@ -256,19 +398,7 @@ def __init__(self, *, target: str=None, details=None, **kwargs) -> None: self.details = details -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ContactDetails(Model): +class ContactDetails(msrest.serialization.Model): """Contact Details. All required parameters must be populated in order to send to Azure. @@ -281,12 +411,10 @@ class ContactDetails(Model): :type phone_extension: str :param mobile: Mobile number of the contact person. :type mobile: str - :param email_list: Required. List of Email-ids to be notified about job - progress. + :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: - list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] """ _validation = { @@ -304,7 +432,17 @@ class ContactDetails(Model): 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, } - def __init__(self, *, contact_name: str, phone: str, email_list, phone_extension: str=None, mobile: str=None, notification_preference=None, **kwargs) -> None: + def __init__( + self, + *, + contact_name: str, + phone: str, + email_list: List[str], + phone_extension: Optional[str] = None, + mobile: Optional[str] = None, + notification_preference: Optional[List["NotificationPreference"]] = None, + **kwargs + ): super(ContactDetails, self).__init__(**kwargs) self.contact_name = contact_name self.phone = phone @@ -314,17 +452,17 @@ def __init__(self, *, contact_name: str, phone: str, email_list, phone_extension self.notification_preference = notification_preference -class CopyLogDetails(Model): +class CopyLogDetails(msrest.serialization.Model): """Details for log generated during copy. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, - DataBoxHeavyAccountCopyLogDetails + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator """ _validation = { @@ -339,46 +477,44 @@ class CopyLogDetails(Model): 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CopyLogDetails, self).__init__(**kwargs) - self.copy_log_details_type = None + self.copy_log_details_type = None # type: Optional[str] -class CopyProgress(Model): +class CopyProgress(msrest.serialization.Model): """Copy progress. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar storage_account_name: Name of the storage account where the data - needs to be uploaded. + :ivar storage_account_name: Name of the storage account where the data needs to be uploaded. :vartype storage_account_name: str - :ivar data_destination_type: Data Destination Type. Possible values - include: 'StorageAccount', 'ManagedDisk' - :vartype data_destination_type: str or - ~azure.mgmt.databox.models.DataDestinationType + :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_sent_to_cloud: Amount of data uploaded by the job as of now. :vartype bytes_sent_to_cloud: long - :ivar total_bytes_to_process: Total amount of data to be processed by the - job. + :ivar total_bytes_to_process: Total amount of data to be processed by the job. :vartype total_bytes_to_process: long :ivar files_processed: Number of files processed by the job as of now. :vartype files_processed: long - :ivar total_files_to_process: Total number of files to be processed by the - job. + :ivar total_files_to_process: Total number of files to be processed by the job. :vartype total_files_to_process: long - :ivar invalid_files_processed: Number of files not adhering to azure - naming conventions which were processed by automatic renaming + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. :vartype invalid_files_processed: long - :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to - azure naming conventions which were processed by automatic renaming + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. :vartype invalid_file_bytes_uploaded: long - :ivar renamed_container_count: Number of folders not adhering to azure - naming conventions which were processed by automatic renaming + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. :vartype renamed_container_count: long - :ivar files_errored_out: Number of files which could not be copied + :ivar files_errored_out: Number of files which could not be copied. :vartype files_errored_out: long """ @@ -398,7 +534,7 @@ class CopyProgress(Model): _attribute_map = { 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'DataDestinationType'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'bytes_sent_to_cloud': {'key': 'bytesSentToCloud', 'type': 'long'}, 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, @@ -410,7 +546,10 @@ class CopyProgress(Model): 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CopyProgress, self).__init__(**kwargs) self.storage_account_name = None self.data_destination_type = None @@ -425,19 +564,19 @@ def __init__(self, **kwargs) -> None: self.files_errored_out = None -class ValidationRequest(Model): +class ValidationRequest(msrest.serialization.Model): """Input request for all pre job creation validation. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CreateJobValidations + sub-classes are: CreateJobValidations. All required parameters must be populated in order to send to Azure. - :param individual_request_details: Required. List of request details - contain validationType and its request as key and value respectively. - :type individual_request_details: - list[~azure.mgmt.databox.models.ValidationInputRequest] - :param validation_category: Required. Constant filled by server. + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. :type validation_category: str """ @@ -455,10 +594,15 @@ class ValidationRequest(Model): 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} } - def __init__(self, *, individual_request_details, **kwargs) -> None: + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): super(ValidationRequest, self).__init__(**kwargs) self.individual_request_details = individual_request_details - self.validation_category = None + self.validation_category = None # type: Optional[str] class CreateJobValidations(ValidationRequest): @@ -466,11 +610,11 @@ class CreateJobValidations(ValidationRequest): All required parameters must be populated in order to send to Azure. - :param individual_request_details: Required. List of request details - contain validationType and its request as key and value respectively. - :type individual_request_details: - list[~azure.mgmt.databox.models.ValidationInputRequest] - :param validation_category: Required. Constant filled by server. + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. :type validation_category: str """ @@ -484,24 +628,29 @@ class CreateJobValidations(ValidationRequest): 'validation_category': {'key': 'validationCategory', 'type': 'str'}, } - def __init__(self, *, individual_request_details, **kwargs) -> None: + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): super(CreateJobValidations, self).__init__(individual_request_details=individual_request_details, **kwargs) - self.validation_category = 'JobCreationValidation' + self.validation_category = 'JobCreationValidation' # type: str -class ValidationInputRequest(Model): +class ValidationInputRequest(msrest.serialization.Model): """Minimum fields that must be present in any type of validation request. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CreateOrderLimitForSubscriptionValidationRequest, - DataDestinationDetailsValidationRequest, PreferencesValidationRequest, - SkuAvailabilityValidationRequest, - SubscriptionIsAllowedToCreateJobValidationRequest, ValidateAddress + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataDestinationDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator """ _validation = { @@ -513,12 +662,15 @@ class ValidationInputRequest(Model): } _subtype_map = { - 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest', 'ValidateAddress': 'ValidateAddress'} + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ValidationInputRequest, self).__init__(**kwargs) - self.validation_type = None + self.validation_type = None # type: Optional[str] class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): @@ -526,10 +678,13 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName """ @@ -540,103 +695,70 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, } - def __init__(self, *, device_type, **kwargs) -> None: + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + **kwargs + ): super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str self.device_type = device_type - self.validation_type = 'ValidateCreateOrderLimit' - - -class ValidationInputResponse(Model): - """Minimum properties that should be present in each individual validation - response. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - CreateOrderLimitForSubscriptionValidationResponseProperties, - DataDestinationDetailsValidationResponseProperties, - PreferencesValidationResponseProperties, - SkuAvailabilityValidationResponseProperties, - SubscriptionIsAllowedToCreateJobValidationResponseProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - """ - - _validation = { - 'error': {'readonly': True}, - 'validation_type': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, - 'validation_type': {'key': 'validationType', 'type': 'str'}, - } - - _subtype_map = { - 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataDestinationDetails': 'DataDestinationDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} - } - - def __init__(self, **kwargs) -> None: - super(ValidationInputResponse, self).__init__(**kwargs) - self.error = None - self.validation_type = None class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): """Properties of create order limit for subscription validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Create order limit validation status. Possible values - include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str self.status = None - self.validation_type = 'ValidateCreateOrderLimit' class DataBoxAccountCopyLogDetails(CopyLogDetails): """Copy log details for a storage account of a DataBox job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -655,23 +777,26 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str self.account_name = None self.copy_log_link = None - self.copy_log_details_type = 'DataBox' class DataBoxDiskCopyLogDetails(CopyLogDetails): """Copy Log Details for a disk. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -694,31 +819,31 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str self.disk_serial_number = None self.error_log_link = None self.verbose_log_link = None - self.copy_log_details_type = 'DataBoxDisk' -class DataBoxDiskCopyProgress(Model): +class DataBoxDiskCopyProgress(msrest.serialization.Model): """DataBox Disk Copy Progress. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar serial_number: The serial number of the disk + :ivar serial_number: The serial number of the disk. :vartype serial_number: str :ivar bytes_copied: Bytes copied during the copy of disk. :vartype bytes_copied: long - :ivar percent_complete: Indicates the percentage completed for the copy of - the disk. + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. :vartype percent_complete: int - :ivar status: The Status of the copy. Possible values include: - 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', - 'NotReturned', 'HardwareError', 'DeviceFormatted', - 'DeviceMetadataModified', 'StorageAccountNotAccessible', 'UnsupportedData' + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". :vartype status: str or ~azure.mgmt.databox.models.CopyStatus """ @@ -733,10 +858,13 @@ class DataBoxDiskCopyProgress(Model): 'serial_number': {'key': 'serialNumber', 'type': 'str'}, 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CopyStatus'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataBoxDiskCopyProgress, self).__init__(**kwargs) self.serial_number = None self.bytes_copied = None @@ -744,50 +872,44 @@ def __init__(self, **kwargs) -> None: self.status = None -class JobDetails(Model): +class JobDetails(msrest.serialization.Model): """Job details. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, - DataBoxJobDetails + sub-classes are: DataBoxJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str """ _validation = { @@ -798,10 +920,10 @@ class JobDetails(Model): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, } _attribute_map = { @@ -813,18 +935,27 @@ class JobDetails(Model): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, } _subtype_map = { - 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} - } - - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, **kwargs) -> None: + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: "ShippingAddress", + destination_account_details: List["DestinationAccountDetails"], + expected_data_size_in_terabytes: Optional[int] = None, + preferences: Optional["Preferences"] = None, + **kwargs + ): super(JobDetails, self).__init__(**kwargs) self.expected_data_size_in_terabytes = expected_data_size_in_terabytes self.job_stages = None @@ -834,63 +965,56 @@ def __init__(self, *, contact_details, shipping_address, destination_account_det self.return_package = None self.destination_account_details = destination_account_details self.error_details = None + self.job_details_type = None # type: Optional[str] self.preferences = preferences self.copy_log_details = None self.reverse_shipment_label_sas_key = None self.chain_of_custody_sas_key = None - self.job_details_type = None class DataBoxDiskJobDetails(JobDetails): """DataBox Disk Job Details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str - :param preferred_disks: 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. + :param preferred_disks: 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. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: - list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] - :ivar disks_and_size_details: Contains the map of disk serial number to - the disk size being used for the job. Is returned only after the disks are - shipped to the customer. + :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] :param passkey: User entered passkey for DataBox Disk job. :type passkey: str @@ -904,10 +1028,10 @@ class DataBoxDiskJobDetails(JobDetails): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, 'copy_progress': {'readonly': True}, 'disks_and_size_details': {'readonly': True}, } @@ -921,41 +1045,50 @@ class DataBoxDiskJobDetails(JobDetails): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, 'passkey': {'key': 'passkey', 'type': 'str'}, } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, preferred_disks=None, passkey: str=None, **kwargs) -> None: + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: "ShippingAddress", + destination_account_details: List["DestinationAccountDetails"], + expected_data_size_in_terabytes: Optional[int] = None, + preferences: Optional["Preferences"] = None, + preferred_disks: Optional[Dict[str, int]] = None, + passkey: Optional[str] = None, + **kwargs + ): super(DataBoxDiskJobDetails, self).__init__(expected_data_size_in_terabytes=expected_data_size_in_terabytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) + self.job_details_type = 'DataBoxDisk' # type: str self.preferred_disks = preferred_disks self.copy_progress = None self.disks_and_size_details = None self.passkey = passkey - self.job_details_type = 'DataBoxDisk' -class JobSecrets(Model): +class JobSecrets(msrest.serialization.Model): """The base class for the secrets. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, - DataboxJobSecrets + sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode """ _validation = { @@ -963,34 +1096,37 @@ class JobSecrets(Model): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, } _subtype_map = { - 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} } - def __init__(self, *, dc_access_security_code=None, **kwargs) -> None: + def __init__( + self, + *, + dc_access_security_code: Optional["DcAccessSecurityCode"] = None, + **kwargs + ): super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] self.dc_access_security_code = dc_access_security_code - self.job_secrets_type = None class DataBoxDiskJobSecrets(JobSecrets): """The secrets related to disk job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode :ivar disk_secrets: Contains the list of secrets object for that device. :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. @@ -1007,31 +1143,36 @@ class DataBoxDiskJobSecrets(JobSecrets): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, 'pass_key': {'key': 'passKey', 'type': 'str'}, 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, } - def __init__(self, *, dc_access_security_code=None, **kwargs) -> None: + def __init__( + self, + *, + dc_access_security_code: Optional["DcAccessSecurityCode"] = None, + **kwargs + ): super(DataBoxDiskJobSecrets, self).__init__(dc_access_security_code=dc_access_security_code, **kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str self.disk_secrets = None self.pass_key = None self.is_passkey_user_defined = None - self.job_secrets_type = 'DataBoxDisk' class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): """Copy log details for a storage account for Databox heavy. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param copy_log_details_type: Required. Constant filled by server. - :type copy_log_details_type: str + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1050,56 +1191,54 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str self.account_name = None self.copy_log_link = None - self.copy_log_details_type = 'DataBoxHeavy' class DataBoxHeavyJobDetails(JobDetails): """Databox Heavy Device Job Details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str :ivar copy_progress: Copy progress per account. :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] - :param device_password: Set Device password for unlocking Databox Heavy + :param device_password: Set Device password for unlocking Databox Heavy. :type device_password: str """ @@ -1111,10 +1250,10 @@ class DataBoxHeavyJobDetails(JobDetails): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, 'copy_progress': {'readonly': True}, } @@ -1127,40 +1266,46 @@ class DataBoxHeavyJobDetails(JobDetails): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, device_password: str=None, **kwargs) -> None: + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: "ShippingAddress", + destination_account_details: List["DestinationAccountDetails"], + expected_data_size_in_terabytes: Optional[int] = None, + preferences: Optional["Preferences"] = None, + device_password: Optional[str] = None, + **kwargs + ): super(DataBoxHeavyJobDetails, self).__init__(expected_data_size_in_terabytes=expected_data_size_in_terabytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str self.copy_progress = None self.device_password = device_password - self.job_details_type = 'DataBoxHeavy' class DataBoxHeavyJobSecrets(JobSecrets): """The secrets related to a databox heavy job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str - :ivar cabinet_pod_secrets: Contains the list of secret objects for a - databox heavy job. - :vartype cabinet_pod_secrets: - list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] """ _validation = { @@ -1169,36 +1314,38 @@ class DataBoxHeavyJobSecrets(JobSecrets): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, } - def __init__(self, *, dc_access_security_code=None, **kwargs) -> None: + def __init__( + self, + *, + dc_access_security_code: Optional["DcAccessSecurityCode"] = None, + **kwargs + ): super(DataBoxHeavyJobSecrets, self).__init__(dc_access_security_code=dc_access_security_code, **kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str self.cabinet_pod_secrets = None - self.job_secrets_type = 'DataBoxHeavy' -class DataBoxHeavySecret(Model): +class DataBoxHeavySecret(msrest.serialization.Model): """The secrets related to a databox heavy. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar device_serial_number: Serial number of the assigned device. :vartype device_serial_number: str :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: - list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] - :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to - authenticate with the device + :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: - list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] """ _validation = { @@ -1217,7 +1364,10 @@ class DataBoxHeavySecret(Model): 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataBoxHeavySecret, self).__init__(**kwargs) self.device_serial_number = None self.device_password = None @@ -1229,46 +1379,41 @@ def __init__(self, **kwargs) -> None: class DataBoxJobDetails(JobDetails): """Databox Job Details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, - which needs to be transferred in this job, in terabytes. + :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int :ivar job_stages: List of stages that run in the job. :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] - :param contact_details: Required. Contact details for notification and - shipping. + :param contact_details: Required. Contact details for notification and shipping. :type contact_details: ~azure.mgmt.databox.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: - ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails :ivar return_package: Return package shipping details. :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator :param preferences: Preferences for the order. :type preferences: ~azure.mgmt.databox.models.Preferences :ivar copy_log_details: List of copy log details. :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] - :ivar reverse_shipment_label_sas_key: Shared access key to download the - return shipment label + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str - :ivar chain_of_custody_sas_key: Shared access key to download the chain of - custody logs + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :param job_details_type: Required. Constant filled by server. - :type job_details_type: str :ivar copy_progress: Copy progress per storage account. :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] - :param device_password: Set Device password for unlocking Databox + :param device_password: Set Device password for unlocking Databox. :type device_password: str """ @@ -1280,10 +1425,10 @@ class DataBoxJobDetails(JobDetails): 'return_package': {'readonly': True}, 'destination_account_details': {'required': True}, 'error_details': {'readonly': True}, + 'job_details_type': {'required': True}, 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'job_details_type': {'required': True}, 'copy_progress': {'readonly': True}, } @@ -1296,20 +1441,30 @@ class DataBoxJobDetails(JobDetails): 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'preferences': {'key': 'preferences', 'type': 'Preferences'}, 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, - 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, device_password: str=None, **kwargs) -> None: + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: "ShippingAddress", + destination_account_details: List["DestinationAccountDetails"], + expected_data_size_in_terabytes: Optional[int] = None, + preferences: Optional["Preferences"] = None, + device_password: Optional[str] = None, + **kwargs + ): super(DataBoxJobDetails, self).__init__(expected_data_size_in_terabytes=expected_data_size_in_terabytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) + self.job_details_type = 'DataBox' # type: str self.copy_progress = None self.device_password = device_password - self.job_details_type = 'DataBox' class DataboxJobSecrets(JobSecrets): @@ -1317,12 +1472,11 @@ class DataboxJobSecrets(JobSecrets): All required parameters must be populated in order to send to Azure. - :param dc_access_security_code: Dc Access Security Code for Customer - Managed Shipping - :type dc_access_security_code: - ~azure.mgmt.databox.models.DcAccessSecurityCode - :param job_secrets_type: Required. Constant filled by server. - :type job_secrets_type: str + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode :param pod_secrets: Contains the list of secret objects for a job. :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] """ @@ -1332,32 +1486,38 @@ class DataboxJobSecrets(JobSecrets): } _attribute_map = { - 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, } - def __init__(self, *, dc_access_security_code=None, pod_secrets=None, **kwargs) -> None: + def __init__( + self, + *, + dc_access_security_code: Optional["DcAccessSecurityCode"] = None, + pod_secrets: Optional[List["DataBoxSecret"]] = None, + **kwargs + ): super(DataboxJobSecrets, self).__init__(dc_access_security_code=dc_access_security_code, **kwargs) + self.job_secrets_type = 'DataBox' # type: str self.pod_secrets = pod_secrets - self.job_secrets_type = 'DataBox' -class ScheduleAvailabilityRequest(Model): +class ScheduleAvailabilityRequest(msrest.serialization.Model): """Request body to get the availability for scheduling orders. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataBoxScheduleAvailabilityRequest, - DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _validation = { @@ -1374,10 +1534,15 @@ class ScheduleAvailabilityRequest(Model): 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} } - def __init__(self, *, storage_location: str, **kwargs) -> None: + def __init__( + self, + *, + storage_location: str, + **kwargs + ): super(ScheduleAvailabilityRequest, self).__init__(**kwargs) self.storage_location = storage_location - self.sku_name = None + self.sku_name = None # type: Optional[str] class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): @@ -1386,11 +1551,12 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _validation = { @@ -1403,30 +1569,32 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): 'sku_name': {'key': 'skuName', 'type': 'str'}, } - def __init__(self, *, storage_location: str, **kwargs) -> None: + def __init__( + self, + *, + storage_location: str, + **kwargs + ): super(DataBoxScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, **kwargs) - self.sku_name = 'DataBox' + self.sku_name = 'DataBox' # type: str -class DataBoxSecret(Model): +class DataBoxSecret(msrest.serialization.Model): """The secrets related to a DataBox. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar device_serial_number: Serial number of the assigned device. :vartype device_serial_number: str :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: - list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] - :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to - authenticate with the device + :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: - list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] """ _validation = { @@ -1445,7 +1613,10 @@ class DataBoxSecret(Model): 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataBoxSecret, self).__init__(**kwargs) self.device_serial_number = None self.device_password = None @@ -1459,12 +1630,13 @@ class DataDestinationDetailsValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param destination_account_details: Required. Destination account details - list. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param destination_account_details: Required. Destination account details list. + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] :param location: Required. Location of stamp or geo. :type location: str """ @@ -1481,49 +1653,60 @@ class DataDestinationDetailsValidationRequest(ValidationInputRequest): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, *, destination_account_details, location: str, **kwargs) -> None: + def __init__( + self, + *, + destination_account_details: List["DestinationAccountDetails"], + location: str, + **kwargs + ): super(DataDestinationDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataDestinationDetails' # type: str self.destination_account_details = destination_account_details self.location = location - self.validation_type = 'ValidateDataDestinationDetails' class DataDestinationDetailsValidationResponseProperties(ValidationInputResponse): """Properties of data destination details validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Data destination details validation status. Possible values - include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Data destination details validation status. Possible values include: "Valid", + "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DataDestinationDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataDestinationDetails' # type: str self.status = None - self.validation_type = 'ValidateDataDestinationDetails' -class DcAccessSecurityCode(Model): +class DcAccessSecurityCode(msrest.serialization.Model): """Dc Access Security code for device. :param forward_dc_access_code: Dc Access Code for dispatching from DC. @@ -1537,28 +1720,33 @@ class DcAccessSecurityCode(Model): 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, } - def __init__(self, *, forward_dc_access_code: str=None, reverse_dc_access_code: str=None, **kwargs) -> None: + def __init__( + self, + *, + forward_dc_access_code: Optional[str] = None, + reverse_dc_access_code: Optional[str] = None, + **kwargs + ): super(DcAccessSecurityCode, self).__init__(**kwargs) self.forward_dc_access_code = forward_dc_access_code self.reverse_dc_access_code = reverse_dc_access_code -class DestinationAccountDetails(Model): +class DestinationAccountDetails(msrest.serialization.Model): """Details of the destination storage accounts. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DestinationManagedDiskDetails, - DestinationStorageAccountDetails + sub-classes are: DestinationManagedDiskDetails, DestinationStorageAccountDetails. All required parameters must be populated in order to send to Azure. - :param account_id: Arm Id of the destination where the data has to be - moved. + :param data_destination_type: Required. Data Destination Type.Constant filled by server. + Possible values include: "StorageAccount", "ManagedDisk". + :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. :type share_password: str - :param data_destination_type: Required. Constant filled by server. - :type data_destination_type: str """ _validation = { @@ -1566,20 +1754,26 @@ class DestinationAccountDetails(Model): } _attribute_map = { + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'share_password': {'key': 'sharePassword', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, } _subtype_map = { 'data_destination_type': {'ManagedDisk': 'DestinationManagedDiskDetails', 'StorageAccount': 'DestinationStorageAccountDetails'} } - def __init__(self, *, account_id: str=None, share_password: str=None, **kwargs) -> None: + def __init__( + self, + *, + account_id: Optional[str] = None, + share_password: Optional[str] = None, + **kwargs + ): super(DestinationAccountDetails, self).__init__(**kwargs) + self.data_destination_type = None # type: Optional[str] self.account_id = account_id self.share_password = share_password - self.data_destination_type = None class DestinationManagedDiskDetails(DestinationAccountDetails): @@ -1587,18 +1781,18 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): All required parameters must be populated in order to send to Azure. - :param account_id: Arm Id of the destination where the data has to be - moved. + :param data_destination_type: Required. Data Destination Type.Constant filled by server. + Possible values include: "StorageAccount", "ManagedDisk". + :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. :type share_password: str - :param data_destination_type: Required. Constant filled by server. - :type data_destination_type: str - :param resource_group_id: Required. Destination Resource Group Id where - the Compute disks should be created. + :param resource_group_id: Required. Destination Resource Group Id where the Compute disks + should be created. :type resource_group_id: str - :param staging_storage_account_id: Required. Arm Id of the storage account - that can be used to copy the vhd for staging. + :param staging_storage_account_id: Required. Arm Id of the storage account that can be used to + copy the vhd for staging. :type staging_storage_account_id: str """ @@ -1609,18 +1803,26 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): } _attribute_map = { + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'share_password': {'key': 'sharePassword', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, } - def __init__(self, *, resource_group_id: str, staging_storage_account_id: str, account_id: str=None, share_password: str=None, **kwargs) -> None: + def __init__( + self, + *, + resource_group_id: str, + staging_storage_account_id: str, + account_id: Optional[str] = None, + share_password: Optional[str] = None, + **kwargs + ): super(DestinationManagedDiskDetails, self).__init__(account_id=account_id, share_password=share_password, **kwargs) + self.data_destination_type = 'ManagedDisk' # type: str self.resource_group_id = resource_group_id self.staging_storage_account_id = staging_storage_account_id - self.data_destination_type = 'ManagedDisk' class DestinationStorageAccountDetails(DestinationAccountDetails): @@ -1628,13 +1830,13 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): All required parameters must be populated in order to send to Azure. - :param account_id: Arm Id of the destination where the data has to be - moved. + :param data_destination_type: Required. Data Destination Type.Constant filled by server. + Possible values include: "StorageAccount", "ManagedDisk". + :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. :type share_password: str - :param data_destination_type: Required. Constant filled by server. - :type data_destination_type: str :param storage_account_id: Required. Destination Storage Account Arm Id. :type storage_account_id: str """ @@ -1645,23 +1847,29 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): } _attribute_map = { + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, 'share_password': {'key': 'sharePassword', 'type': 'str'}, - 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, *, storage_account_id: str, account_id: str=None, share_password: str=None, **kwargs) -> None: + def __init__( + self, + *, + storage_account_id: str, + account_id: Optional[str] = None, + share_password: Optional[str] = None, + **kwargs + ): super(DestinationStorageAccountDetails, self).__init__(account_id=account_id, share_password=share_password, **kwargs) + self.data_destination_type = 'StorageAccount' # type: str self.storage_account_id = storage_account_id - self.data_destination_type = 'StorageAccount' -class DestinationToServiceLocationMap(Model): +class DestinationToServiceLocationMap(msrest.serialization.Model): """Map of destination location to service location. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar destination_location: Location of the destination. :vartype destination_location: str @@ -1679,7 +1887,10 @@ class DestinationToServiceLocationMap(Model): 'service_location': {'key': 'serviceLocation', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DestinationToServiceLocationMap, self).__init__(**kwargs) self.destination_location = None self.service_location = None @@ -1691,13 +1902,14 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str - :param expected_data_size_in_terabytes: Required. The expected size of the - data, which needs to be transferred in this job, in terabytes. + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to + be transferred in this job, in terabytes. :type expected_data_size_in_terabytes: int """ @@ -1713,22 +1925,27 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, } - def __init__(self, *, storage_location: str, expected_data_size_in_terabytes: int, **kwargs) -> None: + def __init__( + self, + *, + storage_location: str, + expected_data_size_in_terabytes: int, + **kwargs + ): super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, **kwargs) + self.sku_name = 'DataBoxDisk' # type: str self.expected_data_size_in_terabytes = expected_data_size_in_terabytes - self.sku_name = 'DataBoxDisk' -class DiskSecret(Model): +class DiskSecret(msrest.serialization.Model): """Contains all the secrets of a Disk. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar disk_serial_number: Serial number of the assigned disk. :vartype disk_serial_number: str - :ivar bit_locker_key: Bit Locker key of the disk which can be used to - unlock the disk to copy data. + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. :vartype bit_locker_key: str """ @@ -1742,23 +1959,23 @@ class DiskSecret(Model): 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(DiskSecret, self).__init__(**kwargs) self.disk_serial_number = None self.bit_locker_key = None -class Error(Model): +class Error(msrest.serialization.Model): """Top level error for the job. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code that can be used to programmatically identify the - error. + :ivar code: Error code that can be used to programmatically identify the error. :vartype code: str - :ivar message: Describes the error in detail and provides debugging - information. + :ivar message: Describes the error in detail and provides debugging information. :vartype message: str """ @@ -1772,7 +1989,10 @@ class Error(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(Error, self).__init__(**kwargs) self.code = None self.message = None @@ -1784,11 +2004,12 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- + version=2018-01-01. :type storage_location: str - :param sku_name: Required. Constant filled by server. - :type sku_name: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _validation = { @@ -1801,32 +2022,41 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): 'sku_name': {'key': 'skuName', 'type': 'str'}, } - def __init__(self, *, storage_location: str, **kwargs) -> None: + def __init__( + self, + *, + storage_location: str, + **kwargs + ): super(HeavyScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, **kwargs) - self.sku_name = 'DataBoxHeavy' + self.sku_name = 'DataBoxHeavy' # type: str -class JobDeliveryInfo(Model): +class JobDeliveryInfo(msrest.serialization.Model): """Additional delivery info. :param scheduled_date_time: Scheduled date time. - :type scheduled_date_time: datetime + :type scheduled_date_time: ~datetime.datetime """ _attribute_map = { 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, } - def __init__(self, *, scheduled_date_time=None, **kwargs) -> None: + def __init__( + self, + *, + scheduled_date_time: Optional[datetime.datetime] = None, + **kwargs + ): super(JobDeliveryInfo, self).__init__(**kwargs) self.scheduled_date_time = scheduled_date_time -class JobErrorDetails(Model): +class JobErrorDetails(msrest.serialization.Model): """Job Error Details for providing the information and recommended action. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar error_message: Message for the error. :vartype error_message: str @@ -1834,7 +2064,7 @@ class JobErrorDetails(Model): :vartype error_code: int :ivar recommended_action: Recommended action for the error. :vartype recommended_action: str - :ivar exception_message: Contains the non localized exception message + :ivar exception_message: Contains the non localized exception message. :vartype exception_message: str """ @@ -1852,7 +2082,10 @@ class JobErrorDetails(Model): 'exception_message': {'key': 'exceptionMessage', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(JobErrorDetails, self).__init__(**kwargs) self.error_message = None self.error_code = None @@ -1860,20 +2093,18 @@ def __init__(self, **kwargs) -> None: self.exception_message = None -class Resource(Model): +class Resource(msrest.serialization.Model): """Model of the Resource. All required parameters must be populated in order to send to Azure. - :param location: Required. The location of the resource. This will be one - of the supported and registered Azure Regions (e.g. West US, East US, - Southeast Asia, etc.). The region of a resource cannot be changed once it - is created, but if an identical region is specified on update the request - will succeed. + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. :type location: str - :param tags: The list of key value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource - groups). + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. :type sku: ~azure.mgmt.databox.models.Sku @@ -1890,7 +2121,14 @@ class Resource(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + sku: "Sku", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.location = location self.tags = tags @@ -1900,66 +2138,61 @@ def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: class JobResource(Resource): """Job Resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param location: Required. The location of the resource. This will be one - of the supported and registered Azure Regions (e.g. West US, East US, - Southeast Asia, etc.). The region of a resource cannot be changed once it - is created, but if an identical region is specified on update the request - will succeed. + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. :type location: str - :param tags: The list of key value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource - groups). + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. :type sku: ~azure.mgmt.databox.models.Sku + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str :ivar is_cancellable: Describes whether the job is cancellable or not. :vartype is_cancellable: bool :ivar is_deletable: Describes whether the job is deletable or not. :vartype is_deletable: bool - :ivar is_shipping_address_editable: Describes whether the shipping address - is editable or not. + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. :vartype is_shipping_address_editable: bool - :ivar status: Name of the stage which is in progress. Possible values - include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', - 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', - 'Cancelled', 'Failed_IssueReportedAtCustomer', - 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', - 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC' + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". :vartype status: str or ~azure.mgmt.databox.models.StageName - :ivar start_time: Time at which the job was started in UTC ISO 8601 - format. - :vartype start_time: datetime + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. :vartype error: ~azure.mgmt.databox.models.Error - :param details: Details of a job run. This field will only be sent for - expand details filter. + :param details: Details of a job run. This field will only be sent for expand details filter. :type details: ~azure.mgmt.databox.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str - :param delivery_type: Delivery type of Job. Possible values include: - 'NonScheduled', 'Scheduled' + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType :param delivery_info: Delivery Info of Job. :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo - :ivar is_cancellable_without_fee: Flag to indicate cancellation of - scheduled job. + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool - :ivar name: Name of the object. - :vartype name: str - :ivar id: Id of the object. - :vartype id: str - :ivar type: Type of the object. - :vartype type: str """ _validation = { 'location': {'required': True}, 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, 'is_cancellable': {'readonly': True}, 'is_deletable': {'readonly': True}, 'is_shipping_address_editable': {'readonly': True}, @@ -1968,33 +2201,43 @@ class JobResource(Resource): 'error': {'readonly': True}, 'cancellation_reason': {'readonly': True}, 'is_cancellable_without_fee': {'readonly': True}, - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, - 'status': {'key': 'properties.status', 'type': 'StageName'}, + 'status': {'key': 'properties.status', 'type': 'str'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 'error': {'key': 'properties.error', 'type': 'Error'}, 'details': {'key': 'properties.details', 'type': 'JobDetails'}, 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, - 'delivery_type': {'key': 'properties.deliveryType', 'type': 'JobDeliveryType'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, location: str, sku, tags=None, details=None, delivery_type=None, delivery_info=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + sku: "Sku", + tags: Optional[Dict[str, str]] = None, + details: Optional["JobDetails"] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = None, + delivery_info: Optional["JobDeliveryInfo"] = None, + **kwargs + ): super(JobResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.name = None + self.id = None + self.type = None self.is_cancellable = None self.is_deletable = None self.is_shipping_address_editable = None @@ -2006,60 +2249,85 @@ def __init__(self, *, location: str, sku, tags=None, details=None, delivery_type self.delivery_type = delivery_type self.delivery_info = delivery_info self.is_cancellable_without_fee = None - self.name = None - self.id = None - self.type = None -class JobResourceUpdateParameter(Model): +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["JobResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class JobResourceUpdateParameter(msrest.serialization.Model): """The JobResourceUpdateParameter. + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] :param details: Details of a job to be updated. :type details: ~azure.mgmt.databox.models.UpdateJobDetails :param destination_account_details: Destination account details. - :type destination_account_details: - list[~azure.mgmt.databox.models.DestinationAccountDetails] - :param tags: The list of key value pairs that describe the resource. These - tags can be used in viewing and grouping this resource (across resource - groups). - :type tags: dict[str, str] + :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] """ _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, 'destination_account_details': {'key': 'properties.destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, details=None, destination_account_details=None, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + details: Optional["UpdateJobDetails"] = None, + destination_account_details: Optional[List["DestinationAccountDetails"]] = None, + **kwargs + ): super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = tags self.details = details self.destination_account_details = destination_account_details - self.tags = tags -class JobStages(Model): +class JobStages(msrest.serialization.Model): """Job stages. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar stage_name: Name of the job stage. Possible values include: - 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', - 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', - 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', - 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', - 'ReadyToReceiveAtAzureDC' + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". :vartype stage_name: str or ~azure.mgmt.databox.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str - :ivar stage_status: Status of the job stage. Possible values include: - 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', - 'SucceededWithErrors' + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors". :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. - :vartype stage_time: datetime - :ivar job_stage_details: Job Stage Details + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. :vartype job_stage_details: object :ivar error_details: Error details for the stage. :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] @@ -2075,15 +2343,18 @@ class JobStages(Model): } _attribute_map = { - 'stage_name': {'key': 'stageName', 'type': 'StageName'}, + 'stage_name': {'key': 'stageName', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, - 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(JobStages, self).__init__(**kwargs) self.stage_name = None self.display_name = None @@ -2093,14 +2364,13 @@ def __init__(self, **kwargs) -> None: self.error_details = None -class NotificationPreference(Model): +class NotificationPreference(msrest.serialization.Model): """Notification preference for a job stage. All required parameters must be populated in order to send to Azure. - :param stage_name: Required. Name of the stage. Possible values include: - 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', - 'DataCopy' + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool @@ -2112,30 +2382,35 @@ class NotificationPreference(Model): } _attribute_map = { - 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'stage_name': {'key': 'stageName', 'type': 'str'}, 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, } - def __init__(self, *, stage_name, send_notification: bool, **kwargs) -> None: + def __init__( + self, + *, + stage_name: Union[str, "NotificationStageName"], + send_notification: bool, + **kwargs + ): super(NotificationPreference, self).__init__(**kwargs) self.stage_name = stage_name self.send_notification = send_notification -class Operation(Model): +class Operation(msrest.serialization.Model): """Operation entity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the operation. Format: - {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. :vartype display: ~azure.mgmt.databox.models.OperationDisplay :ivar properties: Operation properties. :vartype properties: object - :ivar origin: Origin of the operation. Can be : user|system|user,system + :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str """ @@ -2153,7 +2428,10 @@ class Operation(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(Operation, self).__init__(**kwargs) self.name = None self.display = None @@ -2161,7 +2439,7 @@ def __init__(self, **kwargs) -> None: self.origin = None -class OperationDisplay(Model): +class OperationDisplay(msrest.serialization.Model): """Operation display. :param provider: Provider name. @@ -2170,8 +2448,7 @@ class OperationDisplay(Model): :type resource: str :param operation: Localized name of the operation for display purpose. :type operation: str - :param description: Localized description of the operation for display - purpose. + :param description: Localized description of the operation for display purpose. :type description: str """ @@ -2182,7 +2459,15 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.resource = resource @@ -2190,11 +2475,41 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non self.description = description -class PackageShippingDetails(Model): +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class PackageShippingDetails(msrest.serialization.Model): """Shipping details. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar carrier_name: Name of the carrier. :vartype carrier_name: str @@ -2216,22 +2531,23 @@ class PackageShippingDetails(Model): 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(PackageShippingDetails, self).__init__(**kwargs) self.carrier_name = None self.tracking_id = None self.tracking_url = None -class Preferences(Model): +class Preferences(msrest.serialization.Model): """Preferences related to the order. :param preferred_data_center_region: Preferred Data Center Region. :type preferred_data_center_region: list[str] - :param transport_preferences: Preferences related to the shipment - logistics of the sku. - :type transport_preferences: - ~azure.mgmt.databox.models.TransportPreferences + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences """ _attribute_map = { @@ -2239,7 +2555,13 @@ class Preferences(Model): 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, } - def __init__(self, *, preferred_data_center_region=None, transport_preferences=None, **kwargs) -> None: + def __init__( + self, + *, + preferred_data_center_region: Optional[List[str]] = None, + transport_preferences: Optional["TransportPreferences"] = None, + **kwargs + ): super(Preferences, self).__init__(**kwargs) self.preferred_data_center_region = preferred_data_center_region self.transport_preferences = transport_preferences @@ -2250,13 +2572,15 @@ class PreferencesValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param preference: Preference requested with respect to transport type and - data center + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param preference: Preference requested with respect to transport type and data center. :type preference: ~azure.mgmt.databox.models.Preferences - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName """ @@ -2268,62 +2592,71 @@ class PreferencesValidationRequest(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, 'preference': {'key': 'preference', 'type': 'Preferences'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, } - def __init__(self, *, device_type, preference=None, **kwargs) -> None: + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + preference: Optional["Preferences"] = None, + **kwargs + ): super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str self.preference = preference self.device_type = device_type - self.validation_type = 'ValidatePreferences' class PreferencesValidationResponseProperties(ValidationInputResponse): """Properties of data center and transport preference validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Validation status of requested data center and transport. - Possible values include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str self.status = None - self.validation_type = 'ValidatePreferences' -class RegionConfigurationRequest(Model): +class RegionConfigurationRequest(msrest.serialization.Model): """Request body to get the configuration for the region. - :param schedule_availability_request: Request body to get the availability - for scheduling orders. - :type schedule_availability_request: - ~azure.mgmt.databox.models.ScheduleAvailabilityRequest - :param transport_availability_request: Request body to get the transport - availability for given sku. - :type transport_availability_request: - ~azure.mgmt.databox.models.TransportAvailabilityRequest + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest """ _attribute_map = { @@ -2331,24 +2664,27 @@ class RegionConfigurationRequest(Model): 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, } - def __init__(self, *, schedule_availability_request=None, transport_availability_request=None, **kwargs) -> None: + def __init__( + self, + *, + schedule_availability_request: Optional["ScheduleAvailabilityRequest"] = None, + transport_availability_request: Optional["TransportAvailabilityRequest"] = None, + **kwargs + ): super(RegionConfigurationRequest, self).__init__(**kwargs) self.schedule_availability_request = schedule_availability_request self.transport_availability_request = transport_availability_request -class RegionConfigurationResponse(Model): +class RegionConfigurationResponse(msrest.serialization.Model): """Configuration response specific to a region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar schedule_availability_response: Schedule availability for given sku - in a region. + :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: ~azure.mgmt.databox.models.ScheduleAvailabilityResponse - :ivar transport_availability_response: Transport options available for - given sku in a region. + :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: ~azure.mgmt.databox.models.TransportAvailabilityResponse """ @@ -2363,20 +2699,22 @@ class RegionConfigurationResponse(Model): 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(RegionConfigurationResponse, self).__init__(**kwargs) self.schedule_availability_response = None self.transport_availability_response = None -class ScheduleAvailabilityResponse(Model): +class ScheduleAvailabilityResponse(msrest.serialization.Model): """Schedule availability response for given sku in a region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar available_dates: List of dates available to schedule - :vartype available_dates: list[datetime] + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] """ _validation = { @@ -2387,31 +2725,30 @@ class ScheduleAvailabilityResponse(Model): 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ScheduleAvailabilityResponse, self).__init__(**kwargs) self.available_dates = None -class ShareCredentialDetails(Model): +class ShareCredentialDetails(msrest.serialization.Model): """Credential details of the shares in account. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar share_name: Name of the share. :vartype share_name: str - :ivar share_type: Type of the share. Possible values include: - 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' - :vartype share_type: str or - ~azure.mgmt.databox.models.ShareDestinationFormatType + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str - :ivar supported_access_protocols: Access protocols supported on the - device. - :vartype supported_access_protocols: list[str or - ~azure.mgmt.databox.models.AccessProtocol] + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] """ _validation = { @@ -2424,13 +2761,16 @@ class ShareCredentialDetails(Model): _attribute_map = { 'share_name': {'key': 'shareName', 'type': 'str'}, - 'share_type': {'key': 'shareType', 'type': 'ShareDestinationFormatType'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, 'user_name': {'key': 'userName', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, - 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ShareCredentialDetails, self).__init__(**kwargs) self.share_name = None self.share_type = None @@ -2439,19 +2779,18 @@ def __init__(self, **kwargs) -> None: self.supported_access_protocols = None -class ShipmentPickUpRequest(Model): +class ShipmentPickUpRequest(msrest.serialization.Model): """Shipment pick up request details. All required parameters must be populated in order to send to Azure. - :param start_time: Required. Minimum date after which the pick up should - commence, this must be in local time of pick up area. - :type start_time: datetime - :param end_time: Required. Maximum date before which the pick up should - commence, this must be in local time of pick up area. - :type end_time: datetime - :param shipment_location: Required. Shipment Location in the pickup place. - Eg.front desk + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. :type shipment_location: str """ @@ -2467,24 +2806,30 @@ class ShipmentPickUpRequest(Model): 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, } - def __init__(self, *, start_time, end_time, shipment_location: str, **kwargs) -> None: + def __init__( + self, + *, + start_time: datetime.datetime, + end_time: datetime.datetime, + shipment_location: str, + **kwargs + ): super(ShipmentPickUpRequest, self).__init__(**kwargs) self.start_time = start_time self.end_time = end_time self.shipment_location = shipment_location -class ShipmentPickUpResponse(Model): +class ShipmentPickUpResponse(msrest.serialization.Model): """Shipment pick up response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar confirmation_number: Confirmation number for the pick up request. :vartype confirmation_number: str - :ivar ready_by_time: Time by which shipment should be ready for pick up, - this is in local time of pick up area. - :vartype ready_by_time: datetime + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime """ _validation = { @@ -2497,13 +2842,16 @@ class ShipmentPickUpResponse(Model): 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ShipmentPickUpResponse, self).__init__(**kwargs) self.confirmation_number = None self.ready_by_time = None -class ShippingAddress(Model): +class ShippingAddress(msrest.serialization.Model): """Shipping address where customer wishes to receive the device. All required parameters must be populated in order to send to Azure. @@ -2526,8 +2874,8 @@ class ShippingAddress(Model): :type zip_extended_code: str :param company_name: Name of the company. :type company_name: str - :param address_type: Type of address. Possible values include: 'None', - 'Residential', 'Commercial' + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". :type address_type: str or ~azure.mgmt.databox.models.AddressType """ @@ -2547,10 +2895,24 @@ class ShippingAddress(Model): 'postal_code': {'key': 'postalCode', 'type': 'str'}, 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, 'company_name': {'key': 'companyName', 'type': 'str'}, - 'address_type': {'key': 'addressType', 'type': 'AddressType'}, - } - - def __init__(self, *, street_address1: str, country: str, postal_code: str, street_address2: str=None, street_address3: str=None, city: str=None, state_or_province: str=None, zip_extended_code: str=None, company_name: str=None, address_type=None, **kwargs) -> None: + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + *, + street_address1: str, + country: str, + postal_code: str, + street_address2: Optional[str] = None, + street_address3: Optional[str] = None, + city: Optional[str] = None, + state_or_province: Optional[str] = None, + zip_extended_code: Optional[str] = None, + company_name: Optional[str] = None, + address_type: Optional[Union[str, "AddressType"]] = None, + **kwargs + ): super(ShippingAddress, self).__init__(**kwargs) self.street_address1 = street_address1 self.street_address2 = street_address2 @@ -2564,13 +2926,13 @@ def __init__(self, *, street_address1: str, country: str, postal_code: str, stre self.address_type = address_type -class Sku(Model): +class Sku(msrest.serialization.Model): """The Sku. All required parameters must be populated in order to send to Azure. - :param name: Required. The sku name. Possible values include: 'DataBox', - 'DataBoxDisk', 'DataBoxHeavy' + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". :type name: str or ~azure.mgmt.databox.models.SkuName :param display_name: The display name of the sku. :type display_name: str @@ -2583,12 +2945,19 @@ class Sku(Model): } _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, + 'name': {'key': 'name', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, } - def __init__(self, *, name, display_name: str=None, family: str=None, **kwargs) -> None: + def __init__( + self, + *, + name: Union[str, "SkuName"], + display_name: Optional[str] = None, + family: Optional[str] = None, + **kwargs + ): super(Sku, self).__init__(**kwargs) self.name = name self.display_name = display_name @@ -2598,26 +2967,25 @@ def __init__(self, *, name, display_name: str=None, family: str=None, **kwargs) class SkuAvailabilityValidationRequest(ValidationInputRequest): """Request to validate sku availability. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName - :ivar transfer_type: Required. Type of the transfer. Default value: - "ImportToAzure" . + :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". :vartype transfer_type: str - :param country: Required. ISO country code. Country for hardware shipment. - For codes check: - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str - :param location: Required. Location for data transfer. For locations - check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str """ @@ -2631,7 +2999,7 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, 'transfer_type': {'key': 'transferType', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, @@ -2639,54 +3007,65 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): transfer_type = "ImportToAzure" - def __init__(self, *, device_type, country: str, location: str, **kwargs) -> None: + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + country: str, + location: str, + **kwargs + ): super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str self.device_type = device_type self.country = country self.location = location - self.validation_type = 'ValidateSkuAvailability' class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): """Properties of sku availability validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Sku availability validation status. Possible values include: - 'Valid', 'Invalid', 'Skipped' + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str self.status = None - self.validation_type = 'ValidateSkuAvailability' -class SkuCapacity(Model): +class SkuCapacity(msrest.serialization.Model): """Capacity of the sku. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar usable: Usable capacity in TB. :vartype usable: str @@ -2704,17 +3083,19 @@ class SkuCapacity(Model): 'maximum': {'key': 'maximum', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SkuCapacity, self).__init__(**kwargs) self.usable = None self.maximum = None -class SkuCost(Model): +class SkuCost(msrest.serialization.Model): """Describes metadata for retrieving price info. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar meter_id: Meter id of the Sku. :vartype meter_id: str @@ -2732,24 +3113,25 @@ class SkuCost(Model): 'meter_type': {'key': 'meterType', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SkuCost, self).__init__(**kwargs) self.meter_id = None self.meter_type = None -class SkuInformation(Model): +class SkuInformation(msrest.serialization.Model): """Information of the sku. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. :vartype sku: ~azure.mgmt.databox.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool - :ivar destination_to_service_location_map: The map of destination location - to service location. + :ivar destination_to_service_location_map: The map of destination location to service location. :vartype destination_to_service_location_map: list[~azure.mgmt.databox.models.DestinationToServiceLocationMap] :ivar capacity: Capacity of the Sku. @@ -2758,11 +3140,9 @@ class SkuInformation(Model): :vartype costs: list[~azure.mgmt.databox.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] - :ivar disabled_reason: Reason why the Sku is disabled. Possible values - include: 'None', 'Country', 'Region', 'Feature', 'OfferType', - 'NoSubscriptionInfo' - :vartype disabled_reason: str or - ~azure.mgmt.databox.models.SkuDisabledReason + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -2788,12 +3168,15 @@ class SkuInformation(Model): 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, - 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'SkuDisabledReason'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SkuInformation, self).__init__(**kwargs) self.sku = None self.enabled = None @@ -2811,8 +3194,11 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator """ _validation = { @@ -2823,56 +3209,62 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): 'validation_type': {'key': 'validationType', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) - self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): """Properties of subscription permission to create job validation response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. :vartype error: ~azure.mgmt.databox.models.Error - :param validation_type: Required. Constant filled by server. - :type validation_type: str - :ivar status: Validation status of subscription permission to create job. - Possible values include: 'Valid', 'Invalid', 'Skipped' + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus """ _validation = { - 'error': {'readonly': True}, 'validation_type': {'required': True}, + 'error': {'readonly': True}, 'status': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, 'validation_type': {'key': 'validationType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ValidationStatus'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str self.status = None - self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' -class TransportAvailabilityDetails(Model): +class TransportAvailabilityDetails(msrest.serialization.Model): """Transport options availability details for given region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar shipment_type: Transport Shipment Type supported for given region. - Possible values include: 'CustomerManaged', 'MicrosoftManaged' - :vartype shipment_type: str or - ~azure.mgmt.databox.models.TransportShipmentTypes + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes """ _validation = { @@ -2880,39 +3272,45 @@ class TransportAvailabilityDetails(Model): } _attribute_map = { - 'shipment_type': {'key': 'shipmentType', 'type': 'TransportShipmentTypes'}, + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(TransportAvailabilityDetails, self).__init__(**kwargs) self.shipment_type = None -class TransportAvailabilityRequest(Model): +class TransportAvailabilityRequest(msrest.serialization.Model): """Request body to get the transport availability for given sku. - :param sku_name: Type of the device. Possible values include: 'DataBox', - 'DataBoxDisk', 'DataBoxHeavy' + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". :type sku_name: str or ~azure.mgmt.databox.models.SkuName """ _attribute_map = { - 'sku_name': {'key': 'skuName', 'type': 'SkuName'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, } - def __init__(self, *, sku_name=None, **kwargs) -> None: + def __init__( + self, + *, + sku_name: Optional[Union[str, "SkuName"]] = None, + **kwargs + ): super(TransportAvailabilityRequest, self).__init__(**kwargs) self.sku_name = sku_name -class TransportAvailabilityResponse(Model): +class TransportAvailabilityResponse(msrest.serialization.Model): """Transport options available for given sku in a region. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar transport_availability_details: List of transport availability - details for given region + :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: list[~azure.mgmt.databox.models.TransportAvailabilityDetails] """ @@ -2925,21 +3323,22 @@ class TransportAvailabilityResponse(Model): 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(TransportAvailabilityResponse, self).__init__(**kwargs) self.transport_availability_details = None -class TransportPreferences(Model): +class TransportPreferences(msrest.serialization.Model): """Preferences related to the shipment logistics of the sku. All required parameters must be populated in order to send to Azure. - :param preferred_shipment_type: Required. Indicates Shipment Logistics - type that the customer preferred. Possible values include: - 'CustomerManaged', 'MicrosoftManaged' - :type preferred_shipment_type: str or - ~azure.mgmt.databox.models.TransportShipmentTypes + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes """ _validation = { @@ -2947,19 +3346,23 @@ class TransportPreferences(Model): } _attribute_map = { - 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'TransportShipmentTypes'}, + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, } - def __init__(self, *, preferred_shipment_type, **kwargs) -> None: + def __init__( + self, + *, + preferred_shipment_type: Union[str, "TransportShipmentTypes"], + **kwargs + ): super(TransportPreferences, self).__init__(**kwargs) self.preferred_shipment_type = preferred_shipment_type -class UnencryptedCredentials(Model): +class UnencryptedCredentials(msrest.serialization.Model): """Unencrypted credentials for accessing device. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar job_name: Name of the job. :vartype job_name: str @@ -2977,13 +3380,42 @@ class UnencryptedCredentials(Model): 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(UnencryptedCredentials, self).__init__(**kwargs) self.job_name = None self.job_secrets = None -class UpdateJobDetails(Model): +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["UnencryptedCredentials"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. @@ -2997,29 +3429,35 @@ class UpdateJobDetails(Model): 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, } - def __init__(self, *, contact_details=None, shipping_address=None, **kwargs) -> None: + def __init__( + self, + *, + contact_details: Optional["ContactDetails"] = None, + shipping_address: Optional["ShippingAddress"] = None, + **kwargs + ): super(UpdateJobDetails, self).__init__(**kwargs) self.contact_details = contact_details self.shipping_address = shipping_address class ValidateAddress(ValidationInputRequest): - """The requirements to validate customer address where the device needs to be - shipped. + """The requirements to validate customer address where the device needs to be shipped. All required parameters must be populated in order to send to Azure. - :param validation_type: Required. Constant filled by server. - :type validation_type: str + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability". + :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress - :param device_type: Required. Device type to be used for the job. Possible - values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". :type device_type: str or ~azure.mgmt.databox.models.SkuName - :param transport_preferences: Preferences related to the shipment - logistics of the sku. - :type transport_preferences: - ~azure.mgmt.databox.models.TransportPreferences + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences """ _validation = { @@ -3031,32 +3469,36 @@ class ValidateAddress(ValidationInputRequest): _attribute_map = { 'validation_type': {'key': 'validationType', 'type': 'str'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, - 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, } - def __init__(self, *, shipping_address, device_type, transport_preferences=None, **kwargs) -> None: + def __init__( + self, + *, + shipping_address: "ShippingAddress", + device_type: Union[str, "SkuName"], + transport_preferences: Optional["TransportPreferences"] = None, + **kwargs + ): super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str self.shipping_address = shipping_address self.device_type = device_type self.transport_preferences = transport_preferences - self.validation_type = 'ValidateAddress' -class ValidationResponse(Model): +class ValidationResponse(msrest.serialization.Model): """Response of pre job creation validations. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar status: Overall validation status. Possible values include: - 'AllValidToProceed', 'InputsRevisitRequired', - 'CertainInputValidationsSkipped' + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus - :ivar individual_response_details: List of response details contain - validationType and its response as key and value respectively. - :vartype individual_response_details: - list[~azure.mgmt.databox.models.ValidationInputResponse] + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] """ _validation = { @@ -3065,11 +3507,14 @@ class ValidationResponse(Model): } _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'OverallValidationStatus'}, + 'status': {'key': 'properties.status', 'type': 'str'}, 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ValidationResponse, self).__init__(**kwargs) self.status = None self.individual_response_details = None diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/__init__.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/__init__.py new file mode 100644 index 00000000000..9c8fa7a8253 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._jobs_operations import JobsOperations +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'ServiceOperations', +] diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_jobs_operations.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_jobs_operations.py new file mode 100644 index 00000000000..e984b83e43a --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_jobs_operations.py @@ -0,0 +1,851 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.databox.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def get( + self, + resource_group_name, # type: str + job_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.JobResource" + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """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. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def book_shipment_pick_up( + self, + resource_group_name, # type: str + job_name, # type: str + shipment_pick_up_request, # type: "_models.ShipmentPickUpRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ShipmentPickUpResponse" + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + def cancel( + self, + resource_group_name, # type: str + job_name, # type: str + cancellation_reason, # type: "_models.CancellationReason" + **kwargs # type: Any + ): + # type: (...) -> None + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UnencryptedCredentialsList"] + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_operations.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_operations.py new file mode 100644 index 00000000000..cc8b3483362 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.databox.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationList"] + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_service_operations.py b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_service_operations.py new file mode 100644 index 00000000000..f8cf7bdbaa3 --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/operations/_service_operations.py @@ -0,0 +1,472 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations(object): + """ServiceOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.databox.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_available_skus( + self, + location, # type: str + available_sku_request, # type: "_models.AvailableSkuRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableSkusResult"] + """This method provides the list of available skus for the given subscription and location. + + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_available_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + def list_available_skus_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + available_sku_request, # type: "_models.AvailableSkuRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableSkusResult"] + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + def validate_address( + self, + location, # type: str + validate_address, # type: "_models.ValidateAddress" + **kwargs # type: Any + ): + # type: (...) -> "_models.AddressValidationOutput" + """[DEPRECATED NOTICE: This operation will soon be removed] This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + def validate_inputs_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def validate_inputs( + self, + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def region_configuration( + self, + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/py.typed b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/databox/azext_databox/vendored_sdks/databox/v2019_09_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/databox/setup.py b/src/databox/setup.py index ab049a1dbcf..84deeb4b6e6 100644 --- a/src/databox/setup.py +++ b/src/databox/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.1' +VERSION = '0.1.2' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers