diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 1b688a4b66c..a7c830f09df 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +**Compute** + +* disk update: Add --disk-encryption-set and --encryption-type +* snapshot create/update: Add --disk-encryption-set and --encryption-type + **Stoarge** * Upgrade azure-mgmt-storage version to 7.1.0 diff --git a/src/azure-cli/azure/cli/command_modules/vm/_params.py b/src/azure-cli/azure/cli/command_modules/vm/_params.py index 3bbb09a844b..38bb6bf96cc 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -114,8 +114,9 @@ def load_arguments(self, _): c.argument('hyper_v_generation', arg_type=hyper_v_gen_sku, help='The hypervisor generation of the Virtual Machine. Applicable to OS disks only.') else: c.ignore('access_level', 'for_upload', 'hyper_v_generation') - c.argument('encryption_type', arg_type=get_enum_type(self.get_models('EncryptionType')), help='Encryption type.') - c.argument('disk_encryption_set', help='Name or ID of disk encryption set that is used to encrypt the disk.') + c.argument('encryption_type', min_api='2019-07-01', arg_type=get_enum_type(self.get_models('EncryptionType')), + help='Encryption type. EncryptionAtRestWithPlatformKey: Disk is encrypted with XStore managed key at rest. It is the default encryption type. EncryptionAtRestWithCustomerKey: Disk is encrypted with Customer managed key at rest.') + c.argument('disk_encryption_set', min_api='2019-07-01', help='Name or ID of disk encryption set that is used to encrypt the disk.') for scope in ['disk create', 'snapshot create']: with self.argument_context(scope) as c: diff --git a/src/azure-cli/azure/cli/command_modules/vm/commands.py b/src/azure-cli/azure/cli/command_modules/vm/commands.py index 00f8e696d5b..0aa4f63f1ce 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/commands.py @@ -202,7 +202,7 @@ def load_command_table(self, _): g.generic_update_command('update', custom_func_name='update_managed_disk', setter_arg_name='disk', supports_no_wait=True) g.wait_command('wait') - with self.command_group('disk-encryption-set', compute_disk_encryption_set_sdk, client_factory=cf_disk_encryption_set, min_api='2019-07-01', is_preview=True) as g: + with self.command_group('disk-encryption-set', compute_disk_encryption_set_sdk, client_factory=cf_disk_encryption_set, min_api='2019-07-01') as g: g.custom_command('create', 'create_disk_encryption_set', supports_no_wait=True) g.command('delete', 'delete') g.generic_update_command('update', custom_func_name='update_disk_encryption_set', setter_arg_name='disk_encryption_set') diff --git a/src/azure-cli/azure/cli/command_modules/vm/custom.py b/src/azure-cli/azure/cli/command_modules/vm/custom.py index ed03dae1352..eb6742d331e 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -327,7 +327,11 @@ def list_managed_disks(cmd, resource_group_name=None): return client.disks.list() -def update_managed_disk(cmd, instance, size_gb=None, sku=None, disk_iops_read_write=None, disk_mbps_read_write=None): +def update_managed_disk(cmd, resource_group_name, instance, size_gb=None, sku=None, disk_iops_read_write=None, + disk_mbps_read_write=None, encryption_type=None, disk_encryption_set=None): + from msrestazure.tools import resource_id, is_valid_resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + if size_gb is not None: instance.disk_size_gb = size_gb if sku is not None: @@ -336,6 +340,17 @@ def update_managed_disk(cmd, instance, size_gb=None, sku=None, disk_iops_read_wr instance.disk_iops_read_write = disk_iops_read_write if disk_mbps_read_write is not None: instance.disk_mbps_read_write = disk_mbps_read_write + if disk_encryption_set is not None: + if instance.encryption.type != 'EncryptionAtRestWithCustomerKey' and \ + encryption_type != 'EncryptionAtRestWithCustomerKey': + raise CLIError('usage error: Please set --encryption-type to EncryptionAtRestWithCustomerKey') + if not is_valid_resource_id(disk_encryption_set): + disk_encryption_set = resource_id( + subscription=get_subscription_id(cmd.cli_ctx), resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=disk_encryption_set) + instance.encryption.disk_encryption_set_id = disk_encryption_set + if encryption_type is not None: + instance.encryption.type = encryption_type return instance # endregion @@ -408,12 +423,18 @@ def list_images(cmd, resource_group_name=None): # region Snapshots +# pylint: disable=unused-argument,too-many-locals def create_snapshot(cmd, resource_group_name, snapshot_name, location=None, size_gb=None, sku='Standard_LRS', - source=None, for_upload=None, incremental=None, # pylint: disable=unused-argument + source=None, for_upload=None, incremental=None, # below are generated internally from 'source' source_blob_uri=None, source_disk=None, source_snapshot=None, source_storage_account_id=None, - hyper_v_generation=None, tags=None, no_wait=False): - Snapshot, CreationData, DiskCreateOption = cmd.get_models('Snapshot', 'CreationData', 'DiskCreateOption') + hyper_v_generation=None, tags=None, no_wait=False, disk_encryption_set=None, + encryption_type=None): + from msrestazure.tools import resource_id, is_valid_resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + + Snapshot, CreationData, DiskCreateOption, Encryption = cmd.get_models( + 'Snapshot', 'CreationData', 'DiskCreateOption', 'Encryption') location = location or _get_resource_group_location(cmd.cli_ctx, resource_group_name) if source_blob_uri: @@ -432,8 +453,22 @@ def create_snapshot(cmd, resource_group_name, snapshot_name, location=None, size if size_gb is None and option == DiskCreateOption.empty: raise CLIError('Please supply size for the snapshots') + + if disk_encryption_set is not None and not is_valid_resource_id(disk_encryption_set): + disk_encryption_set = resource_id( + subscription=get_subscription_id(cmd.cli_ctx), resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=disk_encryption_set) + + if disk_encryption_set is not None and encryption_type is None: + raise CLIError('usage error: Please specify --encryption-type.') + if encryption_type is not None: + encryption = Encryption(type=encryption_type, disk_encryption_set_id=disk_encryption_set) + else: + encryption = None + snapshot = Snapshot(location=location, creation_data=creation_data, tags=(tags or {}), - sku=_get_sku_object(cmd, sku), disk_size_gb=size_gb, incremental=incremental) + sku=_get_sku_object(cmd, sku), disk_size_gb=size_gb, incremental=incremental, + encryption=encryption) if hyper_v_generation: snapshot.hyper_vgeneration = hyper_v_generation @@ -453,9 +488,23 @@ def list_snapshots(cmd, resource_group_name=None): return client.snapshots.list() -def update_snapshot(cmd, instance, sku=None): +def update_snapshot(cmd, resource_group_name, instance, sku=None, disk_encryption_set=None, encryption_type=None): + from msrestazure.tools import resource_id, is_valid_resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + if sku is not None: _set_sku(cmd, instance, sku) + if disk_encryption_set is not None: + if instance.encryption.type != 'EncryptionAtRestWithCustomerKey' and \ + encryption_type != 'EncryptionAtRestWithCustomerKey': + raise CLIError('usage error: Please set --encryption-type to EncryptionAtRestWithCustomerKey') + if not is_valid_resource_id(disk_encryption_set): + disk_encryption_set = resource_id( + subscription=get_subscription_id(cmd.cli_ctx), resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=disk_encryption_set) + instance.encryption.disk_encryption_set_id = disk_encryption_set + if encryption_type is not None: + instance.encryption.type = encryption_type return instance # endregion diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_encryption_set_disk_update.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_encryption_set_disk_update.yaml new file mode 100644 index 00000000000..ee27bec0f3a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_encryption_set_disk_update.yaml @@ -0,0 +1,1404 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_disk_update_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001","name":"cli_test_disk_encryption_set_disk_update_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:35:45Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:35:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/me?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element","odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","deletionTimestamp":null,"accountEnabled":true,"ageGroup":null,"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"consentProvidedForMinor":null,"country":null,"createdDateTime":"2019-08-07T22:18:30Z","creationType":"Invitation","department":null,"dirSyncEnabled":null,"displayName":"Feiyue + Yu","employeeId":null,"facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"legalAgeGroupClassification":null,"mail":"fey@microsoft.com","mailNickname":"fey_microsoft.com#EXT#","mobile":null,"onPremisesDistinguishedName":null,"onPremisesSecurityIdentifier":null,"otherMails":["fey@microsoft.com"],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":["SMTP:fey@microsoft.com"],"refreshTokensValidFromDateTime":"2019-08-07T22:18:30Z","showInAddressList":false,"signInNames":[],"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"thumbnailPhoto@odata.mediaEditLink":"directoryObjects/0a592c45-613e-4f1b-9023-7c4414fd53bf/Microsoft.DirectoryServices.User/thumbnailPhoto","usageLocation":null,"userIdentities":[],"userPrincipalName":"fey_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","userState":"Accepted","userStateChangedOn":"2019-08-08T01:44:26Z","userType":"Guest"}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1671' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:35:54 GMT + duration: + - '2846035' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - oUZPSuQNGNzArM2e1hDtSjXxq+ySFKzIto9RsQmrMb8= + ocp-aad-session-key: + - us04W3FSFAoAFTCKnaUE1Z9TBTt-kmHAZR3x6aEg97wwBw6p65IF1A8NSjDnEfXyb1dGSIfQtddJDI3oqM02mkid9kQ4-usDov2oRyQLswCfoECiiRM59FCGyPLiZ1y7.w9h3QIOFVwAsKdKsXgXlo7BM6HA7J4t-A35WxO7jMUQ + pragma: + - no-cache + request-id: + - a6d55330-f17d-42b7-9095-c54418c441f3 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "0a592c45-613e-4f1b-9023-7c4414fd53bf", + "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", + "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", + "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", + "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", + "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", + "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}], + "enableSoftDelete": true, "enablePurgeProtection": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '810' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002","name":"vault3-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault3-000002.vault.azure.net","provisioningState":"RegisteringDns"}}' + headers: + cache-control: + - no-cache + content-length: + - '1154' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002","name":"vault3-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault3-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1150' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - 0 + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://vault3-000002.vault.azure.net/keys/key-000003/create?api-version=7.0 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=167.220.255.108;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westcentralus + x-ms-keyvault-service-version: + - 1.1.0.891 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"kty": "RSA", "attributes": {"enabled": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '47' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://vault3-000002.vault.azure.net/keys/key-000003/create?api-version=7.0 + response: + body: + string: '{"key":{"kid":"https://vault3-000002.vault.azure.net/keys/key-000003/9a781f9ffcfc4389809adf4d6d510fe1","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tba1tSRvLV_yJKQI6W5ADfXHIBskpgSD5BuGMTL042njBMXRdDOzCj7hF9FGYBrNcJN6sDWYWteWxbAB8-bPCqr6TRCz91vPJcCPOCDp4rRifkyIsjfUWurvKgDk2JFpedns-0XbkCfl1j4qbJ-IRyoaW_FYeK36LKdiMKjW6ZBV6bVmihbpruPJ8wP4ciwtPxEP7d76dY2KkZllbOv8TzYdFp561kUYtunWLVYutBD53mMRC0QJQpyD9FxH7Yid29Mm4jdp_d_PUH_SsfTQo0-luGDrmjR1btbrxDWhsGsAGAxtk7TsnpIbsHhAACx_7EHQuMjL_BHW4zeyCatkqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1578631000,"updated":1578631000,"recoveryLevel":"Recoverable"}}' + headers: + cache-control: + - no-cache + content-length: + - '665' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=167.220.255.108;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westcentralus + x-ms-keyvault-service-version: + - 1.1.0.891 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_disk_update_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001","name":"cli_test_disk_encryption_set_disk_update_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:35:45Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westcentralus", "identity": {"type": "SystemAssigned"}, + "properties": {"activeKey": {"sourceVault": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002"}, + "keyUrl": "https://vault3-000002.vault.azure.net/keys/key-000003/9a781f9ffcfc4389809adf4d6d510fe1"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '443' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --key-url --source-vault + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"des1-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westcentralus\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"91c52f48-ee32-4b41-b7aa-734155c651e0\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault3-000002.vault.azure.net/keys/key-000003/9a781f9ffcfc4389809adf4d6d510fe1\"\r\n + \ },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '979' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;299 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"des1-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westcentralus\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"91c52f48-ee32-4b41-b7aa-734155c651e0\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault3-000002.vault.azure.net/keys/key-000003/9a781f9ffcfc4389809adf4d6d510fe1\"\r\n + \ },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '979' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4999,Microsoft.Compute/LowCostGet30Min;39999 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.KeyVault%2Fvaults%27&api-version=2015-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-test-rg/providers/Microsoft.KeyVault/vaults/azureclitest-vault","name":"azureclitest-vault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002","name":"vault3-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault4848","name":"vault4848","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yeming/providers/Microsoft.KeyVault/vaults/yeming","name":"yeming","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '993' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002","name":"vault3-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault3-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1150' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "0a592c45-613e-4f1b-9023-7c4414fd53bf", + "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", + "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", + "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", + "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", + "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", + "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}, + {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "91c52f48-ee32-4b41-b7aa-734155c651e0", + "permissions": {"keys": ["wrapKey", "unwrapKey", "get"]}}], "vaultUri": "https://vault3-000002.vault.azure.net/", + "enabledForDeployment": false, "enableSoftDelete": true, "enablePurgeProtection": + true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '1078' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002","name":"vault3-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"91c52f48-ee32-4b41-b7aa-734155c651e0","permissions":{"keys":["wrapKey","unwrapKey","get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault3-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1305' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:36:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Reader","type":"BuiltInRole","description":"Lets + you view everything, but not make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2019-02-05T21:24:35.7424745Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","type":"Microsoft.Authorization/roleDefinitions","name":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '615' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:14 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-request-charge: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%2791c52f48-ee32-4b41-b7aa-734155c651e0%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:37:15 GMT + duration: + - '2329491' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - C8TrCVVTAkLP6c6HL4PGoY9R0WooVdfsYI7c9Lj6EBs= + ocp-aad-session-key: + - 8ekUGhNibaa70a3b8MY8tDIgRBli1nrj9aDAAOSsJGGjf_vsrh9i1i1y-3Cn6p1TCjL87NL2CPEF1fro_79mSEv-H63deI-3bjsuxRHvkLHWbLGaZEuYl3cAs4lGRAT5.HYhFgK-FpXhozHXneNjxhEtHTZoFY8-Sw6V28A6pOLQ + pragma: + - no-cache + request-id: + - c479224a-4baa-46cf-bf01-988410ae3698 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["91c52f48-ee32-4b41-b7aa-734155c651e0"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"91c52f48-ee32-4b41-b7aa-734155c651e0","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":["isExplicit=False","/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004"],"appDisplayName":null,"appId":"f55ca32a-268a-41d2-9c2e-ddf62bdecdf0","applicationTemplateId":null,"appOwnerTenantId":null,"appRoleAssignmentRequired":false,"appRoles":[],"displayName":"des1-000004","errorUrl":null,"homepage":null,"informationalUrls":null,"keyCredentials":[{"customKeyIdentifier":"0D1AB5CCC4D5F70A6C052F24DE7E92D1C3E681FF","endDate":"2020-04-09T04:31:00Z","keyId":"69ca52d7-2711-4be9-b802-862d80816ded","startDate":"2020-01-10T04:31:00Z","type":"AsymmetricX509Cert","usage":"Verify","value":null}],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":null,"replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["f55ca32a-268a-41d2-9c2e-ddf62bdecdf0","https://identity.azure.net/EWMvhYbgiOZjn8Dx2wYpYUfMxKGmT7WcpstHhvkYeC0="],"servicePrincipalType":"ManagedIdentity","signInAudience":null,"tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1645' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:37:15 GMT + duration: + - '4526173' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - jAY6tweZL71h4Zs/fSXIbbKUblkE4vI7Xhf6+Ag18Ok= + ocp-aad-session-key: + - L5Svsz6rdJ5ptmPsbK7RdcNwfbfxMrgGcNotSboZHfju29FfV8Y4u5XhAsmbmmaLt5o-RPjsCLfRbxGUBXQFxOZ7Jh4FUZexlo5PGtgtu6G37WmvpUoJr0kdGLvi3kSF.SA6pYT4-cCZtoBDAFH0tCqa1v7Z0K6E7oubGfKHqcys + pragma: + - no-cache + request-id: + - 47a7cbdc-e7f8-4094-a193-be0c916d103e + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7", + "principalId": "91c52f48-ee32-4b41-b7aa-734155c651e0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"91c52f48-ee32-4b41-b7aa-734155c651e0","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002","createdOn":"2020-01-10T04:37:16.7890517Z","updatedOn":"2020-01-10T04:37:16.7890517Z","createdBy":null,"updatedBy":"0a592c45-613e-4f1b-9023-7c4414fd53bf"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.KeyVault/vaults/vault3-000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' + headers: + cache-control: + - no-cache + content-length: + - '1017' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:21 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-ms-request-charge: + - '3' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_disk_update_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001","name":"cli_test_disk_encryption_set_disk_update_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:35:45Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "sku": {"name": "Premium_LRS"}, + "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": "Empty"}, + "diskSizeGB": 10}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + Content-Length: + - '176' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"disk-000005\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\"\r\n },\r\n + \ \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": + {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 10,\r\n + \ \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true\r\n + \ }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/1db8a1e6-a908-4714-80c8-4c4210075c53?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '336' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:42 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/1db8a1e6-a908-4714-80c8-4c4210075c53?monitor=true&api-version=2019-07-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateDisks3Min;999,Microsoft.Compute/CreateUpdateDisks30Min;7999 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/1db8a1e6-a908-4714-80c8-4c4210075c53?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-01-10T04:37:42.2243277+00:00\",\r\n \"endTime\": + \"2020-01-10T04:37:42.3649094+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disk-000005\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"timeCreated\": \"2020-01-10T04:37:42.2243277+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"0c3a14b2-e4d5-4bce-968e-f609719060b0\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"1db8a1e6-a908-4714-80c8-4c4210075c53\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1126' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49999,Microsoft.Compute/GetOperation30Min;399999 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"disk-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"timeCreated\": \"2020-01-10T04:37:42.2243277+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"0c3a14b2-e4d5-4bce-968e-f609719060b0\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '901' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4997,Microsoft.Compute/LowCostGet30Min;39997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk update + Connection: + - keep-alive + ParameterSetName: + - -g -n --disk-encryption-set --encryption-type + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"disk-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"timeCreated\": \"2020-01-10T04:37:42.2243277+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"0c3a14b2-e4d5-4bce-968e-f609719060b0\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '901' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4996,Microsoft.Compute/LowCostGet30Min;39996 + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westcentralus", "tags": {}, "sku": {"name": "Premium_LRS"}, + "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": "Empty"}, + "diskSizeGB": 10, "diskIOPSReadWrite": 120, "diskMBpsReadWrite": 25, "encryption": + {"diskEncryptionSetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004", + "type": "EncryptionAtRestWithCustomerKey"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk update + Connection: + - keep-alive + Content-Length: + - '523' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --disk-encryption-set --encryption-type + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"disk-000005\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\"\r\n },\r\n + \ \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": + {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 10,\r\n + \ \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\"\r\n + \ },\r\n \"provisioningState\": \"Updating\",\r\n \"isArmResource\": + true\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/90e4cd2f-61c8-4506-ac61-73571a11c907?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '658' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:50 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/90e4cd2f-61c8-4506-ac61-73571a11c907?monitor=true&api-version=2019-07-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateDisks3Min;998,Microsoft.Compute/CreateUpdateDisks30Min;7998 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk update + Connection: + - keep-alive + ParameterSetName: + - -g -n --disk-encryption-set --encryption-type + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/90e4cd2f-61c8-4506-ac61-73571a11c907?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-01-10T04:37:49.3492443+00:00\",\r\n \"endTime\": + \"2020-01-10T04:37:50.6773526+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disk-000005\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\"\r\n + \ },\r\n \"timeCreated\": \"2020-01-10T04:37:42.2243277+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"0c3a14b2-e4d5-4bce-968e-f609719060b0\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"90e4cd2f-61c8-4506-ac61-73571a11c907\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1370' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49997,Microsoft.Compute/GetOperation30Min;399997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk update + Connection: + - keep-alive + ParameterSetName: + - -g -n --disk-encryption-set --encryption-type + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"disk-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/disks/disk-000005\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\"\r\n + \ },\r\n \"timeCreated\": \"2020-01-10T04:37:42.2243277+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"0c3a14b2-e4d5-4bce-968e-f609719060b0\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1145' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:37:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4994,Microsoft.Compute/LowCostGet30Min;39994 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_encryption_set_snapshot.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_encryption_set_snapshot.yaml new file mode 100644 index 00000000000..b747be38532 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_encryption_set_snapshot.yaml @@ -0,0 +1,2209 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001","name":"cli_test_disk_encryption_set_snapshot_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:39:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:39:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/me?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element","odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","deletionTimestamp":null,"accountEnabled":true,"ageGroup":null,"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"consentProvidedForMinor":null,"country":null,"createdDateTime":"2019-08-07T22:18:30Z","creationType":"Invitation","department":null,"dirSyncEnabled":null,"displayName":"Feiyue + Yu","employeeId":null,"facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"legalAgeGroupClassification":null,"mail":"fey@microsoft.com","mailNickname":"fey_microsoft.com#EXT#","mobile":null,"onPremisesDistinguishedName":null,"onPremisesSecurityIdentifier":null,"otherMails":["fey@microsoft.com"],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":["SMTP:fey@microsoft.com"],"refreshTokensValidFromDateTime":"2019-08-07T22:18:30Z","showInAddressList":false,"signInNames":[],"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"thumbnailPhoto@odata.mediaEditLink":"directoryObjects/0a592c45-613e-4f1b-9023-7c4414fd53bf/Microsoft.DirectoryServices.User/thumbnailPhoto","usageLocation":null,"userIdentities":[],"userPrincipalName":"fey_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","userState":"Accepted","userStateChangedOn":"2019-08-08T01:44:26Z","userType":"Guest"}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1671' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:39:39 GMT + duration: + - '2421243' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 0ckRfx0wKNAF3tQRGM778rnRPbGUYODeCcCKEzizf3Y= + ocp-aad-session-key: + - hl5DYKIhyLfrVFovLhriB7BVC263gLajptmRinJGPef4s4b8lWAiO9_NHwNhGVWTZgaUJGhs1R1pWzHMdy_dnJCCgfu85FYe3JSE1JRcdBdfbqDIvgmr25ybymJ5oknA.PN7qXfycPy3O3_ijj5NGr3boU4IEXFOdmTZuEb0qy6o + pragma: + - no-cache + request-id: + - 0e3f1848-6227-4d6d-8802-7bce8f4891de + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "0a592c45-613e-4f1b-9023-7c4414fd53bf", + "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", + "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", + "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", + "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", + "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", + "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}], + "enableSoftDelete": true, "enablePurgeProtection": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '810' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault4-000002.vault.azure.net","provisioningState":"RegisteringDns"}}' + headers: + cache-control: + - no-cache + content-length: + - '1154' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:39:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault4-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1150' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - 0 + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://vault4-000002.vault.azure.net/keys/key-000003/create?api-version=7.0 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=167.220.255.108;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westcentralus + x-ms-keyvault-service-version: + - 1.1.0.891 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"kty": "RSA", "attributes": {"enabled": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '47' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-keyvault/7.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://vault4-000002.vault.azure.net/keys/key-000003/create?api-version=7.0 + response: + body: + string: '{"key":{"kid":"https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xT8cXXRpANPskv6YcvKi2n1HgAmDSDS2TlgqLYv1azLg8KOdSc7jXjmu8myyGbVgn7k9C4Fj6oTQqxDW6Ii4T3h63bc2Nk6X9DRL3Tyl8RYD5IzzS5cP-RAX1n2V1ab4RQHEWw7BeZL9hpRnL48ggVdime3b7t18Ml4VUEBFBAqqeMbWgVRGrcIf3sL2_1eghp_BUMQaM8KbujrAA8Ooc8XlTY17LIDW0745kLhsIRISrsq2R9TwUJWKyGxKYj-9tnARZ-7ozhU3ImYuGaImIRydqAvN9YnR0YpVX-66W0cvZxl3M_fUHNwiKkMqTnE076-pmB9uZlLNAnAiGWPeyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1578631222,"updated":1578631222,"recoveryLevel":"Recoverable"}}' + headers: + cache-control: + - no-cache + content-length: + - '665' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=167.220.255.108;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westcentralus + x-ms-keyvault-service-version: + - 1.1.0.891 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001","name":"cli_test_disk_encryption_set_snapshot_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:39:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westcentralus", "identity": {"type": "SystemAssigned"}, + "properties": {"activeKey": {"sourceVault": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002"}, + "keyUrl": "https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '443' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --key-url --source-vault + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"des1-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westcentralus\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"6e8b8efb-311a-42c9-ab58-932dac53f0b8\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c\"\r\n + \ },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '979' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/HighCostDiskEncryptionSet3Min;98,Microsoft.Compute/HighCostDiskEncryptionSet30Min;297 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"des1-000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westcentralus\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"6e8b8efb-311a-42c9-ab58-932dac53f0b8\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c\"\r\n + \ },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '979' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4996,Microsoft.Compute/LowCostGet30Min;39988 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001","name":"cli_test_disk_encryption_set_snapshot_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:39:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westcentralus", "identity": {"type": "SystemAssigned"}, + "properties": {"activeKey": {"sourceVault": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002"}, + "keyUrl": "https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '443' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --key-url --source-vault + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"des2-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westcentralus\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"08e9a7a3-9698-4d84-8012-b7c57033f80a\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c\"\r\n + \ },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '979' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/HighCostDiskEncryptionSet3Min;97,Microsoft.Compute/HighCostDiskEncryptionSet30Min;296 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"des2-000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westcentralus\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"08e9a7a3-9698-4d84-8012-b7c57033f80a\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault4-000002.vault.azure.net/keys/key-000003/0639d17c095d429d9a357c26b4791f0c\"\r\n + \ },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '979' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4994,Microsoft.Compute/LowCostGet30Min;39986 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.KeyVault%2Fvaults%27&api-version=2015-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-test-rg/providers/Microsoft.KeyVault/vaults/azureclitest-vault","name":"azureclitest-vault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault4848","name":"vault4848","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yeming/providers/Microsoft.KeyVault/vaults/yeming","name":"yeming","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '993' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault4-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1150' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "0a592c45-613e-4f1b-9023-7c4414fd53bf", + "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", + "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", + "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", + "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", + "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", + "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}, + {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "6e8b8efb-311a-42c9-ab58-932dac53f0b8", + "permissions": {"keys": ["wrapKey", "unwrapKey", "get"]}}], "vaultUri": "https://vault4-000002.vault.azure.net/", + "enabledForDeployment": false, "enableSoftDelete": true, "enablePurgeProtection": + true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '1078' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"6e8b8efb-311a-42c9-ab58-932dac53f0b8","permissions":{"keys":["wrapKey","unwrapKey","get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault4-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1305' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.KeyVault%2Fvaults%27&api-version=2015-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-test-rg/providers/Microsoft.KeyVault/vaults/azureclitest-vault","name":"azureclitest-vault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault4848","name":"vault4848","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yeming/providers/Microsoft.KeyVault/vaults/yeming","name":"yeming","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '993' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"6e8b8efb-311a-42c9-ab58-932dac53f0b8","permissions":{"keys":["wrapKey","unwrapKey","get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault4-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1305' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "0a592c45-613e-4f1b-9023-7c4414fd53bf", + "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", + "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", + "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", + "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", + "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", + "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}, + {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "6e8b8efb-311a-42c9-ab58-932dac53f0b8", + "permissions": {"keys": ["wrapKey", "unwrapKey", "get"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "objectId": "08e9a7a3-9698-4d84-8012-b7c57033f80a", "permissions": {"keys": + ["wrapKey", "unwrapKey", "get"]}}], "vaultUri": "https://vault4-000002.vault.azure.net/", + "enabledForDeployment": false, "enableSoftDelete": true, "enablePurgeProtection": + true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '1242' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002?api-version=2018-02-14 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["get","create","delete","list","update","import","backup","restore","recover"],"secrets":["get","list","set","delete","backup","restore","recover"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"6e8b8efb-311a-42c9-ab58-932dac53f0b8","permissions":{"keys":["wrapKey","unwrapKey","get"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"08e9a7a3-9698-4d84-8012-b7c57033f80a","permissions":{"keys":["wrapKey","unwrapKey","get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"enablePurgeProtection":true,"vaultUri":"https://vault4-000002.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1460' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:40:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.1.0.269 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Reader","type":"BuiltInRole","description":"Lets + you view everything, but not make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2019-02-05T21:24:35.7424745Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","type":"Microsoft.Authorization/roleDefinitions","name":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '615' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:05 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-request-charge: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%276e8b8efb-311a-42c9-ab58-932dac53f0b8%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:41:06 GMT + duration: + - '2501441' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - Md6E3vPOqFLz1QkERrZZo6BWrUx/Iddg8pmWAKTOGQg= + ocp-aad-session-key: + - UIOUs1A6o-uApKgfhhIsP8HBuY6C34H_47NZ0iilIA0sePO1q8Obw9NPCb8nNzyiyopWbzVIE-0DmZ8SnlmATTRvF0UZAjdFFq2VKM-c9DSHIw-dFZZvLjqxBKsVcsUK.-UGpyeXjYWVRrwt8hNUpwyrCAicw2QD_irbMmiEJJ3U + pragma: + - no-cache + request-id: + - 323ec88c-2aeb-4a77-b70d-f742483d5280 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["6e8b8efb-311a-42c9-ab58-932dac53f0b8"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"6e8b8efb-311a-42c9-ab58-932dac53f0b8","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":["isExplicit=False","/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004"],"appDisplayName":null,"appId":"29d158d7-b828-4d58-b295-6ab92029b3fc","applicationTemplateId":null,"appOwnerTenantId":null,"appRoleAssignmentRequired":false,"appRoles":[],"displayName":"des1-000004","errorUrl":null,"homepage":null,"informationalUrls":null,"keyCredentials":[{"customKeyIdentifier":"C490F99A0D18A672D63F19030628EC1984AFFEBF","endDate":"2020-04-09T04:35:00Z","keyId":"b96e6292-fded-4df0-af0d-ac46d5817a84","startDate":"2020-01-10T04:35:00Z","type":"AsymmetricX509Cert","usage":"Verify","value":null}],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":null,"replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["29d158d7-b828-4d58-b295-6ab92029b3fc","https://identity.azure.net/XRcSmex0kMusZUoBLlXhUpNzT9CREViIct1kJF4IyRw="],"servicePrincipalType":"ManagedIdentity","signInAudience":null,"tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1645' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:41:08 GMT + duration: + - '4538859' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - BI70eeqtQXrdS4Ok9RnJ88M0ewwv+DbnOCOkOB0pCIo= + ocp-aad-session-key: + - sVShf2farWgjxYAmHKfpaolVYwe9tUa9Lg6TSetNEw83IiK4R0sVBiDe4WFNRgxuRThi7IKpdcQ5rkcfGkWhtfzx6e208CgjjYvKekBb98e6EupobqVO5FB3y5rDLtjQ.DAqvZJL3q5IMsYjUTjRV95sdN2nuy6vJiZRTs7TQTy4 + pragma: + - no-cache + request-id: + - 5e64d309-c27c-45b6-af5b-3c9bcfe73036 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7", + "principalId": "6e8b8efb-311a-42c9-ab58-932dac53f0b8"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"6e8b8efb-311a-42c9-ab58-932dac53f0b8","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","createdOn":"2020-01-10T04:41:08.6294881Z","updatedOn":"2020-01-10T04:41:08.6294881Z","createdBy":null,"updatedBy":"0a592c45-613e-4f1b-9023-7c4414fd53bf"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' + headers: + cache-control: + - no-cache + content-length: + - '1017' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:17 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-ms-request-charge: + - '8' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Reader","type":"BuiltInRole","description":"Lets + you view everything, but not make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2019-02-05T21:24:35.7424745Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","type":"Microsoft.Authorization/roleDefinitions","name":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '615' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:19 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-request-charge: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%2708e9a7a3-9698-4d84-8012-b7c57033f80a%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:41:19 GMT + duration: + - '2487566' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - WZ1tie5kwd2P/fNOMow1DDXctXC5/a/bbla5vKZtclY= + ocp-aad-session-key: + - kAYTmUpB-oweI7ydF3X6CGgBEWVZv5_K26PKIcRR78T36vttx3HeKB2wEKnOPd6DCtrF7Ky3uqK8iHCpaDHtPebPQ02TpXq9mn07MXCd5207m8E2RJ7zo2wJXHbenfHf.0w9ckZCVHbeY_pKdeDvh0ZKZ6eBMDXtFalvlfmodZUA + pragma: + - no-cache + request-id: + - cba7421b-d16f-4e89-bda1-6aa794de5968 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["08e9a7a3-9698-4d84-8012-b7c57033f80a"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"08e9a7a3-9698-4d84-8012-b7c57033f80a","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":["isExplicit=False","/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005"],"appDisplayName":null,"appId":"cd8f40d1-f062-4c52-840a-a611753df92c","applicationTemplateId":null,"appOwnerTenantId":null,"appRoleAssignmentRequired":false,"appRoles":[],"displayName":"des2-000005","errorUrl":null,"homepage":null,"informationalUrls":null,"keyCredentials":[{"customKeyIdentifier":"FD22E26513E1C5F49975104FE405A306730D94B5","endDate":"2020-04-09T04:35:00Z","keyId":"5cda8f45-f5cc-4934-8c29-e82d75f7bfb2","startDate":"2020-01-10T04:35:00Z","type":"AsymmetricX509Cert","usage":"Verify","value":null}],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":null,"replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["cd8f40d1-f062-4c52-840a-a611753df92c","https://identity.azure.net/25vUGgreZOOVyYw0hNnTDTGsbRzrklixwwU7/X4/3iQ="],"servicePrincipalType":"ManagedIdentity","signInAudience":null,"tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1645' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 10 Jan 2020 04:41:19 GMT + duration: + - '4381280' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - m44jz5vCS9u4O5sSSVss6CKrthWLHfOPU5++FHDbfV8= + ocp-aad-session-key: + - 6PU0cygTRuPXW3pBUxxB7feJxJtXGg3Kl_dZ1ZHdncCc4gsPKd5XRjcSBoQexnpQa3nDNBu_LN_QZq1g7GbW_6sAZYwSGZXin2RuoNwzsQTYHdEHGOVBudOSiBA8GZfn.Zn-d7Ej9hThqv7aWl02DgXBPaS7bOvD2llfMjM2ONCY + pragma: + - no-cache + request-id: + - 66bc2864-a558-430a-9a45-cd1343faa88f + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7", + "principalId": "08e9a7a3-9698-4d84-8012-b7c57033f80a"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000002?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"08e9a7a3-9698-4d84-8012-b7c57033f80a","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002","createdOn":"2020-01-10T04:41:21.4386870Z","updatedOn":"2020-01-10T04:41:21.4386870Z","createdBy":null,"updatedBy":"0a592c45-613e-4f1b-9023-7c4414fd53bf"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.KeyVault/vaults/vault4-000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000002","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000002"}' + headers: + cache-control: + - no-cache + content-length: + - '1017' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:25 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-ms-request-charge: + - '2' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001","name":"cli_test_disk_encryption_set_snapshot_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:39:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westcentralus", "tags": {}, "sku": {"name": "Standard_LRS"}, + "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": "Empty"}, + "diskSizeGB": 10, "encryption": {"diskEncryptionSetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004", + "type": "EncryptionAtRestWithCustomerKey"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + Content-Length: + - '473' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot1-000006?api-version=2019-07-01 + response: + body: + string: "{\r\n \"location\": \"westcentralus\",\r\n \"tags\": {},\r\n \"sku\": + {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": + \"V1\",\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n + \ },\r\n \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": + \"EncryptionAtRestWithCustomerKey\",\r\n \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\"\r\n + \ },\r\n \"provisioningState\": \"Updating\",\r\n \"isArmResource\": + true\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/5e9f89e2-be1f-4f51-8215-5c64d9c3d849?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '624' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:46 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/5e9f89e2-be1f-4f51-8215-5c64d9c3d849?monitor=true&api-version=2019-07-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/HighCostSnapshotCreateHydrate3Min;239,Microsoft.Compute/HighCostSnapshotCreateHydrate30Min;1919 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/5e9f89e2-be1f-4f51-8215-5c64d9c3d849?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-01-10T04:41:46.0974313+00:00\",\r\n \"endTime\": + \"2020-01-10T04:41:49.2692628+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"snapshot1-000006\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot1-000006\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:47.3005333+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"b7627003-fafa-4c25-94cc-6e079273aa8b\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"5e9f89e2-be1f-4f51-8215-5c64d9c3d849\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1346' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49997,Microsoft.Compute/GetOperation30Min;399991 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot1-000006?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"snapshot1-000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot1-000006\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des1-000004\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:47.3005333+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"b7627003-fafa-4c25-94cc-6e079273aa8b\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1121' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4992,Microsoft.Compute/LowCostGet30Min;39982 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_disk_encryption_set_snapshot_000001?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001","name":"cli_test_disk_encryption_set_snapshot_000001","type":"Microsoft.Resources/resourceGroups","location":"westcentralus","tags":{"product":"azurecli","cause":"automation","date":"2020-01-10T04:39:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "sku": {"name": "Standard_LRS"}, + "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": "Empty"}, + "diskSizeGB": 10}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + Content-Length: + - '177' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007?api-version=2019-07-01 + response: + body: + string: "{\r\n \"location\": \"westcentralus\",\r\n \"tags\": {},\r\n \"sku\": + {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": + \"V1\",\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n + \ },\r\n \"diskSizeGB\": 10,\r\n \"provisioningState\": \"Updating\",\r\n + \ \"isArmResource\": true\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/838d5945-e8e5-4f1a-95de-90e8d8a3011f?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:41:57 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/838d5945-e8e5-4f1a-95de-90e8d8a3011f?monitor=true&api-version=2019-07-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/HighCostSnapshotCreateHydrate3Min;238,Microsoft.Compute/HighCostSnapshotCreateHydrate30Min;1918 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/838d5945-e8e5-4f1a-95de-90e8d8a3011f?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-01-10T04:41:57.6754482+00:00\",\r\n \"endTime\": + \"2020-01-10T04:41:58.5348493+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"snapshot2-000007\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:57.6910976+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"f42bf943-1283-4c6a-9a0e-a5e7b9d5687d\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"838d5945-e8e5-4f1a-95de-90e8d8a3011f\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1102' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:42:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49995,Microsoft.Compute/GetOperation30Min;399989 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"snapshot2-000007\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:57.6910976+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"f42bf943-1283-4c6a-9a0e-a5e7b9d5687d\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '877' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:42:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4990,Microsoft.Compute/LowCostGet30Min;39980 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot update + Connection: + - keep-alive + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"snapshot2-000007\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:57.6910976+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"f42bf943-1283-4c6a-9a0e-a5e7b9d5687d\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '877' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:42:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4989,Microsoft.Compute/LowCostGet30Min;39979 + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westcentralus", "tags": {}, "sku": {"name": "Standard_LRS"}, + "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": "Empty"}, + "diskSizeGB": 10, "incremental": false, "encryption": {"diskEncryptionSetId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005", + "type": "EncryptionAtRestWithCustomerKey"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot update + Connection: + - keep-alive + Content-Length: + - '495' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007?api-version=2019-07-01 + response: + body: + string: "{\r\n \"location\": \"westcentralus\",\r\n \"tags\": {},\r\n \"sku\": + {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": + \"V1\",\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n + \ },\r\n \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": + \"EncryptionAtRestWithCustomerKey\",\r\n \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005\"\r\n + \ },\r\n \"incremental\": false,\r\n \"provisioningState\": \"Updating\",\r\n + \ \"isArmResource\": true,\r\n \"faultDomain\": 0\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/22f21178-d735-4397-a75e-124126a4449a?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '674' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:42:05 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/22f21178-d735-4397-a75e-124126a4449a?monitor=true&api-version=2019-07-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/HighCostSnapshotCreateHydrate3Min;237,Microsoft.Compute/HighCostSnapshotCreateHydrate30Min;1917 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot update + Connection: + - keep-alive + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westcentralus/DiskOperations/22f21178-d735-4397-a75e-124126a4449a?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-01-10T04:42:05.362905+00:00\",\r\n \"endTime\": + \"2020-01-10T04:42:09.2066193+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"snapshot2-000007\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:57.6910976+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"f42bf943-1283-4c6a-9a0e-a5e7b9d5687d\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"22f21178-d735-4397-a75e-124126a4449a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1345' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:42:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49993,Microsoft.Compute/GetOperation30Min;399987 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - snapshot update + Connection: + - keep-alive + ParameterSetName: + - -g -n --encryption-type --disk-encryption-set + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-compute/10.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"snapshot2-000007\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/snapshots/snapshot2-000007\",\r\n + \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"westcentralus\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 10,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithCustomerKey\",\r\n + \ \"diskEncryptionSetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_000001/providers/Microsoft.Compute/diskEncryptionSets/des2-000005\"\r\n + \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2020-01-10T04:41:57.6910976+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 10737418240,\r\n \"uniqueId\": \"f42bf943-1283-4c6a-9a0e-a5e7b9d5687d\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1121' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 10 Jan 2020 04:42:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;4986,Microsoft.Compute/LowCostGet30Min;39976 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py index bf74f7886b0..cf6d47e1a67 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py @@ -3889,6 +3889,106 @@ def test_disk_encryption_set_update(self, resource_group): self.check('vault', '{vault2}'), ]) + @ResourceGroupPreparer(name_prefix='cli_test_disk_encryption_set_disk_update_', location='westcentralus') + @AllowLargeResponse(size_kb=99999) + def test_disk_encryption_set_disk_update(self, resource_group): + self.kwargs.update({ + 'vault': self.create_random_name(prefix='vault3-', length=20), + 'key': self.create_random_name(prefix='key-', length=20), + 'des1': self.create_random_name(prefix='des1-', length=20), + 'disk': self.create_random_name(prefix='disk-', length=20), + }) + + vault_id = self.cmd('keyvault create -g {rg} -n {vault} --enable-purge-protection true --enable-soft-delete true').get_output_in_json()['id'] + kid = self.cmd('keyvault key create -n {key} --vault {vault} --protection software').get_output_in_json()['key']['kid'] + self.kwargs.update({ + 'vault_id': vault_id, + 'kid': kid + }) + + self.cmd('disk-encryption-set create -g {rg} -n {des1} --key-url {kid} --source-vault {vault}') + des1_show_output = self.cmd('disk-encryption-set show -g {rg} -n {des1}').get_output_in_json() + des1_sp_id = des1_show_output['identity']['principalId'] + des1_id = des1_show_output['id'] + self.kwargs.update({ + 'des1_sp_id': des1_sp_id, + 'des1_id': des1_id + }) + + self.cmd('keyvault set-policy -n {vault} --object-id {des1_sp_id} --key-permissions wrapKey unwrapKey get') + + time.sleep(15) + + with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid): + self.cmd('role assignment create --assignee {des1_sp_id} --role Reader --scope {vault_id}') + + time.sleep(15) + + self.cmd('disk create -g {rg} -n {disk} --size-gb 10') + self.cmd('disk update -g {rg} -n {disk} --disk-encryption-set {des1} --encryption-type EncryptionAtRestWithCustomerKey', checks=[ + self.check('encryption.diskEncryptionSetId', '{des1_id}', False), + self.check('encryption.type', 'EncryptionAtRestWithCustomerKey') + ]) + + @ResourceGroupPreparer(name_prefix='cli_test_disk_encryption_set_snapshot_', location='westcentralus') + @AllowLargeResponse(size_kb=99999) + def test_disk_encryption_set_snapshot(self, resource_group): + self.kwargs.update({ + 'vault': self.create_random_name(prefix='vault4-', length=20), + 'key': self.create_random_name(prefix='key-', length=20), + 'des1': self.create_random_name(prefix='des1-', length=20), + 'des2': self.create_random_name(prefix='des2-', length=20), + 'snapshot1': self.create_random_name(prefix='snapshot1-', length=20), + 'snapshot2': self.create_random_name(prefix='snapshot2-', length=20), + }) + + vault_id = self.cmd('keyvault create -g {rg} -n {vault} --enable-purge-protection true --enable-soft-delete true').get_output_in_json()['id'] + kid = self.cmd('keyvault key create -n {key} --vault {vault} --protection software').get_output_in_json()['key']['kid'] + self.kwargs.update({ + 'vault_id': vault_id, + 'kid': kid + }) + + self.cmd('disk-encryption-set create -g {rg} -n {des1} --key-url {kid} --source-vault {vault}') + des1_show_output = self.cmd('disk-encryption-set show -g {rg} -n {des1}').get_output_in_json() + des1_sp_id = des1_show_output['identity']['principalId'] + des1_id = des1_show_output['id'] + self.kwargs.update({ + 'des1_sp_id': des1_sp_id, + 'des1_id': des1_id + }) + + self.cmd('disk-encryption-set create -g {rg} -n {des2} --key-url {kid} --source-vault {vault}') + des2_show_output = self.cmd('disk-encryption-set show -g {rg} -n {des2}').get_output_in_json() + des2_sp_id = des2_show_output['identity']['principalId'] + des2_id = des2_show_output['id'] + self.kwargs.update({ + 'des2_sp_id': des2_sp_id, + 'des2_id': des2_id + }) + + self.cmd('keyvault set-policy -n {vault} --object-id {des1_sp_id} --key-permissions wrapKey unwrapKey get') + self.cmd('keyvault set-policy -n {vault} --object-id {des2_sp_id} --key-permissions wrapKey unwrapKey get') + + time.sleep(15) + + with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid): + self.cmd('role assignment create --assignee {des1_sp_id} --role Reader --scope {vault_id}') + self.cmd('role assignment create --assignee {des2_sp_id} --role Reader --scope {vault_id}') + + time.sleep(15) + + self.cmd('snapshot create -g {rg} -n {snapshot1} --encryption-type EncryptionAtRestWithCustomerKey --disk-encryption-set {des1} --size-gb 10', checks=[ + self.check('encryption.diskEncryptionSetId', '{des1_id}', False), + self.check('encryption.type', 'EncryptionAtRestWithCustomerKey') + ]) + + self.cmd('snapshot create -g {rg} -n {snapshot2} --size-gb 10') + + self.cmd('snapshot update -g {rg} -n {snapshot2} --encryption-type EncryptionAtRestWithCustomerKey --disk-encryption-set {des2}', checks=[ + self.check('encryption.diskEncryptionSetId', '{des2_id}', False) + ]) + if __name__ == '__main__': unittest.main()