From e368c4da2418758be1b27eb41823a1fe6b8ac95f Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Fri, 27 May 2022 17:41:36 +0800 Subject: [PATCH 01/14] security encryption type --- .../azure/cli/command_modules/vm/_params.py | 3 +- .../command_modules/vm/_template_builder.py | 44 +- .../cli/command_modules/vm/_validators.py | 4 + .../azure/cli/command_modules/vm/custom.py | 11 +- ...test_os_disk_security_encryption_type.yaml | 2424 +++++++++++++++++ .../vm/tests/latest/test_vm_commands.py | 45 + 6 files changed, 2524 insertions(+), 7 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml 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 4a716b8093d..25d9e831559 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -129,7 +129,7 @@ def load_arguments(self, _): enable_vtpm_type = CLIArgumentType(arg_type=get_three_state_flag(), min_api='2020-12-01', help='Enable vTPM.') enable_secure_boot_type = CLIArgumentType(arg_type=get_three_state_flag(), min_api='2020-12-01', help='Enable secure boot.') - security_type = CLIArgumentType(arg_type=get_enum_type(['TrustedLaunch']), min_api='2020-12-01', help='Specify if the VM is Trusted Launch enabled. See https://docs.microsoft.com/azure/virtual-machines/trusted-launch.') + security_type = CLIArgumentType(arg_type=get_enum_type(['TrustedLaunch', 'ConfidentialVM']), min_api='2020-12-01', help='Specify the SecurityType of the virtual machine.') # region MixedScopes for scope in ['vm', 'disk', 'snapshot', 'image', 'sig']: @@ -947,6 +947,7 @@ def load_arguments(self, _): c.argument('edge_zone', edge_zone_type) c.argument('accept_term', action='store_true', help="Accept the license agreement and privacy statement.") c.argument('disable_integrity_monitoring', action='store_true', min_api='2020-12-01', help='Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.') + c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01') with self.argument_context(scope, arg_group='Authentication') as c: c.argument('generate_ssh_keys', action='store_true', help='Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory') diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index b18847cac25..ff7730fb4b7 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -302,7 +302,8 @@ def build_vm_resource( # pylint: disable=too-many-locals, too-many-statements, encryption_at_host=None, dedicated_host_group=None, enable_auto_update=None, patch_mode=None, enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, os_disk_delete_option=None, user_data=None, - capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None): + capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, + os_disk_security_encryption_type=None): os_caching = disk_info['os'].get('caching') @@ -492,6 +493,27 @@ def _build_storage_profile(): storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set, } + if os_disk_security_encryption_type is not None: + storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) + storage_profiles['ManagedCustomImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) + storage_profiles['SharedGalleryImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) + storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) profile = storage_profiles[storage_profile.name] if os_disk_size_gb: @@ -867,7 +889,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, - v_cpus_per_core=None): + v_cpus_per_core=None, os_disk_security_encryption_type=None): # Build IP configuration ip_configuration = {} @@ -944,6 +966,12 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro storage_properties['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set } + if os_disk_security_encryption_type is not None: + storage_properties['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) if disk_info and disk_info['os'].get('diffDiskSettings'): storage_properties['osDisk']['diffDiskSettings'] = disk_info['os']['diffDiskSettings'] @@ -975,6 +1003,12 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro storage_properties['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set } + if os_disk_security_encryption_type is not None: + storage_properties['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) if storage_profile == StorageProfile.CommunityGalleryImage: storage_properties['osDisk'] = { 'caching': os_caching, @@ -989,6 +1023,12 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro storage_properties['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set } + if os_disk_security_encryption_type is not None: + storage_properties['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) if disk_info: data_disks = [v for k, v in disk_info.items() if k != 'os'] diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index b886915651f..aae159ae2db 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -574,6 +574,10 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): "the os type of this image should be {}".format(community_gallery_image_info.os_type)) namespace.os_type = community_gallery_image_info.os_type + if getattr(namespace, 'security_type'): + if namespace.security_type.lower() == 'confidentialvm' and namespace.os_disk_security_encryption_type is None: + raise ArgumentUsageError('usage error: --os-disk-security-encryption-type is required' + ' when os is specified as ConfidentialVM') if not namespace.os_type: namespace.os_type = 'windows' if 'windows' in namespace.os_offer.lower() else 'linux' 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 f1056e65aac..751f9c1e658 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -794,7 +794,8 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, nic_delete_option=None, os_disk_delete_option=None, data_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, - v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False): + v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, + os_disk_security_encryption_type=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -1013,7 +1014,8 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ platform_fault_domain=platform_fault_domain, security_type=security_type, enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, count=count, edge_zone=edge_zone, os_disk_delete_option=os_disk_delete_option, user_data=user_data, capacity_reservation_group=capacity_reservation_group, - enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core) + enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core, + os_disk_security_encryption_type=os_disk_security_encryption_type) vm_resource['dependsOn'] = vm_dependencies @@ -2879,7 +2881,8 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, user_data=None, network_api_version=None, enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, - v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False): + v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, + os_disk_security_encryption_type=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -3155,7 +3158,7 @@ def _get_public_ip_address_allocation(value, sku): patch_mode=patch_mode, enable_agent=enable_agent, security_type=security_type, enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, automatic_repairs_action=automatic_repairs_action, v_cpus_available=v_cpus_available, - v_cpus_per_core=v_cpus_per_core) + v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type) vmss_resource['dependsOn'] = vmss_dependencies diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml new file mode 100644 index 00000000000..9a23e2ca934 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml @@ -0,0 +1,2424 @@ +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: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001","name":"cli_test_os_disk_security_encryption_type000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-27T08:39:34Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:18 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 create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/vault000003'' + under resource group ''cli_test_os_disk_security_encryption_type000001'' was + not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '256' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Jingsong + Zhang (WICRESOFT NORTH AMERICA LTD)","givenName":null,"jobTitle":null,"mail":"v-jingszhang@microsoft.com","mobilePhone":null,"officeLocation":null,"preferredLanguage":null,"surname":null,"userPrincipalName":"v-jingszhang_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","id":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2"}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 27 May 2022 08:40:20 GMT + odata-version: + - '4.0' + request-id: + - d2031bdf-e488-4138-b56b-cf1fadf141bc + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"3","ScaleUnit":"003","RoleInstance":"SE1PEPF00001883"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}], "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "enablePurgeProtection": true, "networkAcls": {"bypass": "AzureServices", + "defaultAction": "Allow"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '526' + Content-Type: + - application/json + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:40:22.446Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1046' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:25 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.5.394.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:40:22.446Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1042' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:55 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.5.394.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000003.vault.azure.net/keys/key000004/create?api-version=7.3 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=180.158.48.76;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000003.vault.azure.net/keys/key000004/create?api-version=7.3 + response: + body: + string: '{"key":{"kid":"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rYavP8fartHk3b7NwXXsIAJUbL10dTX_eM-5bakquT3KQmtzTAJ6JRHo_5lkn5jOLQiBuyvUTHJfsPVOObEFcvA1OhQPrHNpRej_mghvaayV2QvXZYYK9fmpj_MVXeXkkDyxGnYHZiYzd9Eh1KWHt2d-CohVNPj2vq97Z0o4OLRIdAGOtRGlsK9pvQapd4lIbXFIsVytYL7BDg9n3LYx5Q90RxrBxRcd90lIBa261fvetcw0nPUllkjAT7kD-xCAxNctmq80917liSgTgz6jE7maC2lCVIWRN2aymfgeMMuLjTP48M1FguCDQUyenkPWhguYCuUQFZk7Ipeuf1B85Q","e":"AQAB"},"attributes":{"enabled":true,"created":1653640859,"updated":1653640859,"recoveryLevel":"Recoverable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '666' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=180.158.48.76;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001","name":"cli_test_os_disk_security_encryption_type000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-27T08:39:34Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:40:59 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": "centraluseuap", "identity": {"type": "SystemAssigned"}, "properties": + {"encryptionType": "EncryptionAtRestWithPlatformAndCustomerKeys", "activeKey": + {"sourceVault": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003"}, + "keyUrl": "https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '451' + Content-Type: + - application/json + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005?api-version=2020-12-01 + response: + body: + string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": + \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"activeKey\": {\r\n + \ \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithPlatformAndCustomerKeys\",\r\n + \ \"provisioningState\": \"Updating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/83f747f3-8930-46b8-a542-1fba79044e66?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '565' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:06 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/83f747f3-8930-46b8-a542-1fba79044e66?p=157f1a74-df5f-47b0-a815-476d8af3dce4&monitor=true&api-version=2020-12-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/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;299 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/83f747f3-8930-46b8-a542-1fba79044e66?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-27T08:41:07.0544566+00:00\",\r\n \"endTime\": + \"2022-05-27T08:41:07.1325744+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\"name\":\"des1000005\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\",\"type\":\"Microsoft.Compute/diskEncryptionSets\",\"location\":\"centraluseuap\",\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"af7dd047-5779-42a8-b91e-a56c65dc5114\",\"tenantId\":\"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"},\"properties\":{\"activeKey\":{\"sourceVault\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"},\"keyUrl\":\"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"},\"encryptionType\":\"EncryptionAtRestWithPlatformAndCustomerKeys\",\"provisioningState\":\"Succeeded\"}}\r\n + \ },\r\n \"name\": \"83f747f3-8930-46b8-a542-1fba79044e66\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1044' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:37 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;49998,Microsoft.Compute/GetOperation30Min;399998 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"des1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"af7dd047-5779-42a8-b91e-a56c65dc5114\",\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_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithPlatformAndCustomerKeys\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '944' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:37 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;14997,Microsoft.Compute/LowCostGet30Min;119997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"des1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"af7dd047-5779-42a8-b91e-a56c65dc5114\",\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_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithPlatformAndCustomerKeys\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '944' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:39 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;14996,Microsoft.Compute/LowCostGet30Min;119996 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + 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/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv","name":"bez-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"key":"value"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typequcmnevsmoa2l22nw3oenpcgnsqtmurffv/providers/Microsoft.KeyVault/vaults/vault4-h6rfa4jrse6at","name":"vault4-h6rfa4jrse6at","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typequcmnevsmoa2l22nw3oenpcgnsqtmurffv/providers/Microsoft.KeyVault/vaults/vault5br3izuriz","name":"vault5br3izuriz","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typeeefdgeqqkbkeuc7zo4an2mcu7w64qwjiyv/providers/Microsoft.KeyVault/vaults/vault4-g6niep6w25vt5","name":"vault4-g6niep6w25vt5","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typeeefdgeqqkbkeuc7zo4an2mcu7w64qwjiyv/providers/Microsoft.KeyVault/vaults/vaultdwbkccot3s","name":"vaultdwbkccot3s","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zb_test/providers/Microsoft.KeyVault/vaults/zblab7701","name":"zblab7701","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"hidden-DevTestLabs-LabUId":"301109ba-f89e-4ba1-8c0c-be6e91e47840","CreatedBy":"DevTestLabs"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '2995' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:39 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 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:40:22.446Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1042' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:41 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.5.394.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": + "af7dd047-5779-42a8-b91e-a56c65dc5114", "permissions": {"keys": ["wrapKey", + "unwrapKey", "get"]}}], "vaultUri": "https://vault000003.vault.azure.net/", + "enabledForDeployment": false, "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "enablePurgeProtection": true, "provisioningState": "Succeeded", "publicNetworkAccess": + "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '783' + Content-Type: + - application/json + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:41:42.106Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"af7dd047-5779-42a8-b91e-a56c65dc5114","permissions":{"keys":["wrapKey","unwrapKey","get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1197' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:41 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.5.394.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'af7dd047-5779-42a8-b91e-a56c65dc5114') + response: + body: + string: '{"error":{"code":"Authorization_RequestDenied","message":"Insufficient + privileges to complete the operation.","innerError":{"date":"2022-05-27T08:41:58","request-id":"178602da-7af8-497b-83f6-2d2cc1770a07","client-request-id":"178602da-7af8-497b-83f6-2d2cc1770a07"}}}' + headers: + cache-control: + - no-cache + content-length: + - '266' + content-type: + - application/json + date: + - Fri, 27 May 2022 08:41:58 GMT + request-id: + - 178602da-7af8-497b-83f6-2d2cc1770a07 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"3","ScaleUnit":"003","RoleInstance":"SE1PEPF00001FF5"}}' + x-ms-resource-unit: + - '1' + status: + code: 403 + message: Forbidden +- 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003/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":"View + all resources, but does not allow you to make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2021-11-11T20:13:47.8628684Z","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: + - '627' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:41:59 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + 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": "af7dd047-5779-42a8-b91e-a56c65dc5114"}}' + 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"af7dd047-5779-42a8-b91e-a56c65dc5114","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","condition":null,"conditionVersion":null,"createdOn":"2022-05-27T08:41:59.6846109Z","updatedOn":"2022-05-27T08:42:00.2158847Z","createdBy":null,"updatedBy":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003/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: + - '1045' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:42:08 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001","name":"cli_test_os_disk_security_encryption_type000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-27T08:39:34Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:42:09 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: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions?$top=1&$orderby=name%20desc&api-version=2022-03-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"CentralUSEUAP\",\r\n \"name\": \"20348.707.220505\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n + \ }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '335' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08: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/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions/20348.707.220505?api-version=2022-03-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \"architecture\": + \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \"replicaCount\": 10,\r\n + \ \"disallowed\": {\r\n \"vmDiskType\": \"Unmanaged\"\r\n },\r\n + \ \"automaticOSUpgradeProperties\": {\r\n \"automaticOSUpgradeSupported\": + false\r\n },\r\n \"imageDeprecationStatus\": {\r\n \"imageState\": + \"Active\"\r\n },\r\n \"features\": [\r\n {\r\n \"name\": + \"SecurityType\",\r\n \"value\": \"TrustedLaunchAndConfidentialVmSupported\"\r\n + \ },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\",\r\n + \ \"value\": \"True\"\r\n },\r\n {\r\n \"name\": \"DiskControllerTypes\",\r\n + \ \"value\": \"SCSI\"\r\n },\r\n {\r\n \"name\": \"IsHibernateSupported\",\r\n + \ \"value\": \"False\"\r\n }\r\n ],\r\n \"osDiskImage\": + {\r\n \"operatingSystem\": \"Windows\",\r\n \"sizeInGb\": 30\r\n + \ },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"CentralUSEUAP\",\r\n + \ \"name\": \"20348.707.220505\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:42:10 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/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:42:10 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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vm1000006VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "centraluseuap", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vm1000006Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": + "Microsoft.Network/networkSecurityGroups", "name": "vm1000006NSG", "apiVersion": + "2015-06-15", "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": + {"securityRules": [{"name": "rdp", "properties": {"protocol": "Tcp", "sourcePortRange": + "*", "destinationPortRange": "3389", "sourceAddressPrefix": "*", "destinationAddressPrefix": + "*", "access": "Allow", "priority": 1000, "direction": "Inbound"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vm1000006PublicIP", + "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", + "name": "vm1000006VMNic", "location": "centraluseuap", "tags": {}, "dependsOn": + ["Microsoft.Network/virtualNetworks/vm1000006VNET", "Microsoft.Network/networkSecurityGroups/vm1000006NSG", + "Microsoft.Network/publicIpAddresses/vm1000006PublicIP"], "properties": {"ipConfigurations": + [{"name": "ipconfigvm1000006", "properties": {"privateIPAllocationMethod": "Dynamic", + "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET/subnets/vm1000006Subnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG"}}}, + {"apiVersion": "2022-03-01", "type": "Microsoft.Compute/virtualMachines", "name": + "vm1000006", "location": "centraluseuap", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1000006VMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DC2as_v5"}, "networkProfile": + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic", + "properties": {"deleteOption": null}}]}, "storageProfile": {"osDisk": {"createOption": + "fromImage", "name": null, "caching": "ReadWrite", "managedDisk": {"storageAccountType": + null, "diskEncryptionSet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005"}, + "securityProfile": {"securityEncryptionType": "DiskWithVMGuestState"}}}, "imageReference": + {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2022-datacenter-smalldisk-g2", + "version": "latest"}}, "osProfile": {"computerName": "vm1000006", "adminUsername": + "testuser", "adminPassword": "[parameters(''adminPassword'')]"}, "securityProfile": + {"securityType": "ConfidentialVM", "uefiSettings": {"secureBootEnabled": true, + "vTpmEnabled": true}}}}], "outputs": {}}, "parameters": {"adminPassword": {"value": + "testPassword0"}}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + Content-Length: + - '3795' + Content-Type: + - application/json + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","name":"vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","type":"Microsoft.Resources/deployments","properties":{"templateHash":"2624834759687267576","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-27T08:42:18.19405Z","duration":"PT0.0009896S","correlationId":"0c0274e3-3800-4bb1-9427-860b782044a3","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000006VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000006NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000006PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000006"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF/operationStatuses/08585479659499490730?api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '2690' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:42:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:42:50 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:43:20 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:43:50 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:44:20 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:44: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: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:45:21 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:45: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:46:22 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:46:53 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:47:24 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:47:55 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:48:25 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:48:55 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:49:26 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:49:56 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:50:26 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:50:57 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:51:28 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:51:59 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:52:29 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","name":"vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","type":"Microsoft.Resources/deployments","properties":{"templateHash":"2624834759687267576","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2022-05-27T08:52:26.5725248Z","duration":"PT10M8.3794644S","correlationId":"0c0274e3-3800-4bb1-9427-860b782044a3","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000006VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000006NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000006PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000006"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '3649' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:52:29 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: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006?$expand=instanceView&api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d77d2b2e-87b5-446a-9663-ef1b04756847\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DC2as_v5\"\r\n + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": + \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\",\r\n + \ \"exactVersion\": \"20348.707.220505\"\r\n },\r\n \"osDisk\": + {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"diskEncryptionSet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\"\r\n + \ },\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": + \"DiskWithVMGuestState\"\r\n },\r\n \"storageAccountType\": + \"Premium_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/disks/vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": + 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": + {\r\n \"computerName\": \"vm1000006\",\r\n \"adminUsername\": \"testuser\",\r\n + \ \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n + \ \"enableAutomaticUpdates\": true,\r\n \"patchSettings\": {\r\n + \ \"patchMode\": \"AutomaticByOS\",\r\n \"assessmentMode\": + \"ImageDefault\"\r\n },\r\n \"enableVMAgentPlatformUpdates\": + false\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"securityProfile\": + {\r\n \"uefiSettings\": {\r\n \"secureBootEnabled\": true,\r\n + \ \"vTpmEnabled\": true\r\n },\r\n \"securityType\": \"ConfidentialVM\"\r\n + \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"vmAgent\": + {\r\n \"vmAgentVersion\": \"Unknown\",\r\n \"statuses\": [\r\n + \ {\r\n \"code\": \"ProvisioningState/Unavailable\",\r\n + \ \"level\": \"Warning\",\r\n \"displayStatus\": \"Not + Ready\",\r\n \"message\": \"VM status blob is found but not yet + populated.\",\r\n \"time\": \"2022-05-27T08:52:31+00:00\"\r\n }\r\n + \ ]\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": + \"vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-27T08:51:44.0283543+00:00\"\r\n + \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": + \"V2\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-27T08:52:16.3566952+00:00\"\r\n + \ },\r\n {\r\n \"code\": \"PowerState/stopped\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM stopped\"\r\n + \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2022-05-27T08:42:43.2916309+00:00\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3880' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:52:30 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;3997,Microsoft.Compute/LowCostGet30Min;31997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1000006VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic\",\r\n + \ \"etag\": \"W/\\\"55d99d13-e46a-4939-83e3-6bd7afa4dc19\\\"\",\r\n \"location\": + \"centraluseuap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"609a60d0-d225-4733-b5a8-747f1221c704\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1000006\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic/ipConfigurations/ipconfigvm1000006\",\r\n + \ \"etag\": \"W/\\\"55d99d13-e46a-4939-83e3-6bd7afa4dc19\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET/subnets/vm1000006Subnet\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": + [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": + \"4ldeehhdyiduze41esojzj5dna.cdmx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"60-45-BD-76-7A-05\",\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG\"\r\n + \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2426' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:52:32 GMT + etag: + - W/"55d99d13-e46a-4939-83e3-6bd7afa4dc19" + 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-arm-service-request-id: + - a866cc79-5978-4c5e-bcdd-3f0d7f833ba8 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1000006PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP\",\r\n + \ \"etag\": \"W/\\\"cc676cf1-7cae-4eb1-9bea-06539e0cb479\\\"\",\r\n \"location\": + \"centraluseuap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"7530461e-d12b-4df4-a29d-600d26b9f7ff\",\r\n + \ \"ipAddress\": \"20.46.27.15\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n + \ \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic/ipConfigurations/ipconfigvm1000006\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '970' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:52:32 GMT + etag: + - W/"cc676cf1-7cae-4eb1-9bea-06539e0cb479" + 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-arm-service-request-id: + - 23d683a9-c4a9-49cd-82bc-18c2b375c559 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006?api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d77d2b2e-87b5-446a-9663-ef1b04756847\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DC2as_v5\"\r\n + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": + \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\",\r\n + \ \"exactVersion\": \"20348.707.220505\"\r\n },\r\n \"osDisk\": + {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"diskEncryptionSet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\"\r\n + \ },\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": + \"DiskWithVMGuestState\"\r\n },\r\n \"storageAccountType\": + \"Premium_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/disks/vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": + 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": + {\r\n \"computerName\": \"vm1000006\",\r\n \"adminUsername\": \"testuser\",\r\n + \ \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n + \ \"enableAutomaticUpdates\": true,\r\n \"patchSettings\": {\r\n + \ \"patchMode\": \"AutomaticByOS\",\r\n \"assessmentMode\": + \"ImageDefault\"\r\n },\r\n \"enableVMAgentPlatformUpdates\": + false\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"securityProfile\": + {\r\n \"uefiSettings\": {\r\n \"secureBootEnabled\": true,\r\n + \ \"vTpmEnabled\": true\r\n },\r\n \"securityType\": \"ConfidentialVM\"\r\n + \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"timeCreated\": \"2022-05-27T08:42:43.2916309+00:00\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2668' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 May 2022 08:52:34 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;3996,Microsoft.Compute/LowCostGet30Min;31996 + 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 be0f6002cc9..eaa189f3bcc 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 @@ -6222,6 +6222,51 @@ def test_disk_encryption_set_double_encryption(self, resource_group): self.cmd('vmss create -g {rg} -n {vmss1} --image centos --os-disk-encryption-set {des1} --admin-username azureuser --admin-password testPassword0 --authentication-type password') + @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_type', location='CentralUSEUAP') + @KeyVaultPreparer(name_prefix='vault4-', name_len=20, key='vault', location='westcentralus', additional_params='--enable-purge-protection') + def test_os_disk_security_encryption_type(self, resource_group): + self.kwargs.update({ + 'vault': self.create_random_name(prefix='vault', length=15), + 'key': self.create_random_name(prefix='key', length=15), + 'des1': self.create_random_name(prefix='des1', length=15), + 'vm1': self.create_random_name(prefix='vm1', length=15), + 'vmss1': self.create_random_name(prefix='vmss', length=15) + }) + + 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} --encryption-type EncryptionAtRestWithPlatformAndCustomerKeys') + 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}') + + self.cmd('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-encryption-set {des1}') + self.cmd('vm show -n {vm1} -g {rg}', checks=[ + self.check('storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), + self.check('storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des1_id}') + ]) + # self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-encryption-set {des1}') + # self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ + # self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState') + # ]) + + class DiskAccessTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_disk_access_', location='centraluseuap') From c868abac98fe4d860b9b11739611bc0e55cb5e30 Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Mon, 30 May 2022 17:49:12 +0800 Subject: [PATCH 02/14] Update _validators.py --- src/azure-cli/azure/cli/command_modules/vm/_validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index aae159ae2db..bbaf818e1cd 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -574,7 +574,7 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): "the os type of this image should be {}".format(community_gallery_image_info.os_type)) namespace.os_type = community_gallery_image_info.os_type - if getattr(namespace, 'security_type'): + if getattr(namespace, 'security_type', None): if namespace.security_type.lower() == 'confidentialvm' and namespace.os_disk_security_encryption_type is None: raise ArgumentUsageError('usage error: --os-disk-security-encryption-type is required' ' when os is specified as ConfidentialVM') From 699532cf86274a9343d80322e0c2c68a903d520f Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Tue, 31 May 2022 12:53:18 +0800 Subject: [PATCH 03/14] set id --- .../azure/cli/core/profiles/_shared.py | 2 +- .../azure/cli/command_modules/vm/_params.py | 5 +- .../command_modules/vm/_template_builder.py | 40 +- .../azure/cli/command_modules/vm/custom.py | 20 +- .../command_modules/vm/linter_exclusions.yml | 12 + ... => test_os_disk_security_encryption.yaml} | 550 +++---- ...test_os_disk_security_encryption_vmss.yaml | 1309 +++++++++++++++++ .../vm/tests/latest/test_vm_commands.py | 55 +- 8 files changed, 1692 insertions(+), 301 deletions(-) rename src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/{test_os_disk_security_encryption_type.yaml => test_os_disk_security_encryption.yaml} (68%) create mode 100644 src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml diff --git a/src/azure-cli-core/azure/cli/core/profiles/_shared.py b/src/azure-cli-core/azure/cli/core/profiles/_shared.py index b7a2336ecd5..36d3d6444f5 100644 --- a/src/azure-cli-core/azure/cli/core/profiles/_shared.py +++ b/src/azure-cli-core/azure/cli/core/profiles/_shared.py @@ -151,7 +151,7 @@ def default_api_version(self): ResourceType.MGMT_COMPUTE: SDKProfile('2022-03-01', { 'resource_skus': '2019-04-01', 'disks': '2021-12-01', - 'disk_encryption_sets': '2020-12-01', + 'disk_encryption_sets': '2021-04-01', 'disk_accesses': '2020-05-01', 'snapshots': '2021-12-01', 'galleries': '2021-10-01', 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 25d9e831559..abd06e13feb 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -947,7 +947,8 @@ def load_arguments(self, _): c.argument('edge_zone', edge_zone_type) c.argument('accept_term', action='store_true', help="Accept the license agreement and privacy statement.") c.argument('disable_integrity_monitoring', action='store_true', min_api='2020-12-01', help='Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.') - c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01') + c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the EncryptionType of the os managed disk.') + c.argument('os_disk_securevm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.') with self.argument_context(scope, arg_group='Authentication') as c: c.argument('generate_ssh_keys', action='store_true', help='Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory') @@ -1387,7 +1388,7 @@ def load_arguments(self, _): c.argument('disk_encryption_set_name', disk_encryption_set_name) c.argument('key_url', help='URL pointing to a key or secret in KeyVault.') c.argument('source_vault', help='Name or ID of the KeyVault containing the key or secret.') - c.argument('encryption_type', arg_type=get_enum_type(['EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys']), + c.argument('encryption_type', arg_type=get_enum_type(['EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys', 'ConfidentialVmEncryptedWithCustomerKey']), help='The type of key used to encrypt the data of the disk. EncryptionAtRestWithPlatformKey: Disk is encrypted at rest with Platform managed key. It is the default encryption type. EncryptionAtRestWithCustomerKey: Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer. EncryptionAtRestWithPlatformAndCustomerKeys: Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed.') c.argument('location', validator=get_default_location_from_resource_group) c.argument('tags', tags_type) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index ff7730fb4b7..641e4bd6135 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -303,7 +303,7 @@ def build_vm_resource( # pylint: disable=too-many-locals, too-many-statements, enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, os_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, - os_disk_security_encryption_type=None): + os_disk_security_encryption_type=None, os_disk_securevm_disk_encryption_set=None): os_caching = disk_info['os'].get('caching') @@ -496,22 +496,34 @@ def _build_storage_profile(): if os_disk_security_encryption_type is not None: storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_disk_encryption_set + } } }) storage_profiles['ManagedCustomImage']['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_disk_encryption_set + } } }) storage_profiles['SharedGalleryImage']['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_disk_encryption_set + } } }) storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_disk_encryption_set + } } }) @@ -889,7 +901,8 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, - v_cpus_per_core=None, os_disk_security_encryption_type=None): + v_cpus_per_core=None, os_disk_security_encryption_type=None, + os_disk_securevm_disk_encryption_set=None): # Build IP configuration ip_configuration = {} @@ -969,7 +982,10 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro if os_disk_security_encryption_type is not None: storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_disk_encryption_set + } } }) if disk_info and disk_info['os'].get('diffDiskSettings'): @@ -1006,7 +1022,10 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro if os_disk_security_encryption_type is not None: storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_disk_encryption_set + } } }) if storage_profile == StorageProfile.CommunityGalleryImage: @@ -1026,7 +1045,10 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro if os_disk_security_encryption_type is not None: storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type + 'securityEncryptionType': os_disk_security_encryption_type, + 'diskEncryptionSet': { + 'id': os_disk_securevm_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 751f9c1e658..f832d3fe247 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -795,7 +795,7 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ enable_vtpm=None, count=None, edge_zone=None, nic_delete_option=None, os_disk_delete_option=None, data_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, - os_disk_security_encryption_type=None): + os_disk_security_encryption_type=None, os_disk_securevm_disk_encryption_set=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -825,6 +825,11 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ os_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_encryption_set) + if os_disk_securevm_disk_encryption_set is not None and\ + not is_valid_resource_id(os_disk_securevm_disk_encryption_set): + os_disk_securevm_disk_encryption_set = resource_id( + subscription=subscription_id, resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_securevm_disk_encryption_set) if data_disk_encryption_sets is None: data_disk_encryption_sets = [] @@ -1015,7 +1020,8 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ enable_vtpm=enable_vtpm, count=count, edge_zone=edge_zone, os_disk_delete_option=os_disk_delete_option, user_data=user_data, capacity_reservation_group=capacity_reservation_group, enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core, - os_disk_security_encryption_type=os_disk_security_encryption_type) + os_disk_security_encryption_type=os_disk_security_encryption_type, + os_disk_securevm_disk_encryption_set=os_disk_securevm_disk_encryption_set) vm_resource['dependsOn'] = vm_dependencies @@ -2882,7 +2888,7 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, - os_disk_security_encryption_type=None): + os_disk_security_encryption_type=None, os_disk_securevm_disk_encryption_set=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -2920,6 +2926,11 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, os_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_encryption_set) + if os_disk_securevm_disk_encryption_set is not None and\ + not is_valid_resource_id(os_disk_securevm_disk_encryption_set): + os_disk_securevm_disk_encryption_set = resource_id( + subscription=subscription_id, resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_securevm_disk_encryption_set) if data_disk_encryption_sets is None: data_disk_encryption_sets = [] @@ -3158,7 +3169,8 @@ def _get_public_ip_address_allocation(value, sku): patch_mode=patch_mode, enable_agent=enable_agent, security_type=security_type, enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, automatic_repairs_action=automatic_repairs_action, v_cpus_available=v_cpus_available, - v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type) + v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type, + os_disk_securevm_disk_encryption_set=os_disk_securevm_disk_encryption_set) vmss_resource['dependsOn'] = vmss_dependencies diff --git a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml index 446a55feddb..82fff933c9a 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml +++ b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml @@ -30,6 +30,12 @@ vmss create: disable_integrity_monitoring: rule_exclusions: - option_length_too_long + os_disk_security_encryption_type: + rule_exclusions: + - option_length_too_long + os_disk_securevm_disk_encryption_set: + rule_exclusions: + - option_length_too_long vmss update: parameters: enable_cross_zone_upgrade: @@ -63,6 +69,12 @@ vm create: disable_integrity_monitoring: rule_exclusions: - option_length_too_long + os_disk_security_encryption_type: + rule_exclusions: + - option_length_too_long + os_disk_securevm_disk_encryption_set: + rule_exclusions: + - option_length_too_long vm unmanaged-disk attach: parameters: size_gb: diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml similarity index 68% rename from src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml rename to src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml index 9a23e2ca934..b1fa3fd3379 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_type.yaml +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml @@ -15,19 +15,19 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001","name":"cli_test_os_disk_security_encryption_type000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-27T08:39:34Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001","name":"cli_test_os_disk_security_encryption000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T02:49:32Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '379' + - '369' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:18 GMT + - Tue, 31 May 2022 02:49:37 GMT expires: - '-1' pragma: @@ -57,21 +57,21 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview response: body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/vault000003'' - under resource group ''cli_test_os_disk_security_encryption_type000001'' was - not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/vault000002'' + under resource group ''cli_test_os_disk_security_encryption000001'' was not + found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' headers: cache-control: - no-cache content-length: - - '256' + - '251' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:18 GMT + - Tue, 31 May 2022 02:49:38 GMT expires: - '-1' pragma: @@ -114,11 +114,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 27 May 2022 08:40:20 GMT + - Tue, 31 May 2022 02:49:39 GMT odata-version: - '4.0' request-id: - - d2031bdf-e488-4138-b56b-cf1fadf141bc + - e6d4298f-a24a-49f8-9552-362c48211298 strict-transport-security: - max-age=31536000 transfer-encoding: @@ -126,7 +126,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"3","ScaleUnit":"003","RoleInstance":"SE1PEPF00001883"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00002335"}}' x-ms-resource-unit: - '1' status: @@ -158,19 +158,19 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:40:22.446Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:49:44.891Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' headers: cache-control: - no-cache content-length: - - '1046' + - '1041' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:25 GMT + - Tue, 31 May 2022 02:49:47 GMT expires: - '-1' pragma: @@ -188,9 +188,9 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.394.0 + - 1.5.396.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' x-powered-by: - ASP.NET status: @@ -212,19 +212,19 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:40:22.446Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:49:44.891Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' headers: cache-control: - no-cache content-length: - - '1042' + - '1037' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:55 GMT + - Tue, 31 May 2022 02:50:18 GMT expires: - '-1' pragma: @@ -242,7 +242,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.394.0 + - 1.5.396.0 x-powered-by: - ASP.NET status: @@ -264,7 +264,7 @@ interactions: User-Agent: - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: POST - uri: https://vault000003.vault.azure.net/keys/key000004/create?api-version=7.3 + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 response: body: string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing @@ -277,7 +277,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:56 GMT + - Tue, 31 May 2022 02:50:19 GMT expires: - '-1' pragma: @@ -290,7 +290,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-network-info: - - conn_type=Ipv4;addr=180.158.48.76;act_addr_fam=InterNetwork; + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; x-ms-keyvault-region: - centraluseuap x-ms-keyvault-service-version: @@ -316,10 +316,10 @@ interactions: User-Agent: - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: POST - uri: https://vault000003.vault.azure.net/keys/key000004/create?api-version=7.3 + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 response: body: - string: '{"key":{"kid":"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rYavP8fartHk3b7NwXXsIAJUbL10dTX_eM-5bakquT3KQmtzTAJ6JRHo_5lkn5jOLQiBuyvUTHJfsPVOObEFcvA1OhQPrHNpRej_mghvaayV2QvXZYYK9fmpj_MVXeXkkDyxGnYHZiYzd9Eh1KWHt2d-CohVNPj2vq97Z0o4OLRIdAGOtRGlsK9pvQapd4lIbXFIsVytYL7BDg9n3LYx5Q90RxrBxRcd90lIBa261fvetcw0nPUllkjAT7kD-xCAxNctmq80917liSgTgz6jE7maC2lCVIWRN2aymfgeMMuLjTP48M1FguCDQUyenkPWhguYCuUQFZk7Ipeuf1B85Q","e":"AQAB"},"attributes":{"enabled":true,"created":1653640859,"updated":1653640859,"recoveryLevel":"Recoverable","recoverableDays":90}}' + string: '{"key":{"kid":"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5l3kkcECDwTq16qf2IKrBy2mBU4jXysL-eAPaoSJEA3VO68-i5geboi8mDKGnSM5l3NilwBzvnG0A-VRh9iFVSC3LG-kSFxTgFzJ1-3hMwMGdPXefbJDmrwuaDgi-JshsJCwgHh7wlG-WgDZ1F3dEMJeG9X3hR3zLd0bFdDpWKfFYCU8ifR4zW8LUvsCOb1ICr-sXZVr4hP5m6FfiBz_9OpchPdQloWIQdhlr3spF-WyczbSrbmzX3Ms89932DjVwWBKKDav4ly5ThbNUbUl1Igx4y0ESOMHfWwzdr2HmIwxF-w_B2b2AASMROJ_6Fn-JzfanLa7MfPM1E2S_QgCpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1653965420,"updated":1653965420,"recoveryLevel":"Recoverable","recoverableDays":90}}' headers: cache-control: - no-cache @@ -328,7 +328,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:59 GMT + - Tue, 31 May 2022 02:50:20 GMT expires: - '-1' pragma: @@ -338,7 +338,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-network-info: - - conn_type=Ipv4;addr=180.158.48.76;act_addr_fam=InterNetwork; + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; x-ms-keyvault-region: - centraluseuap x-ms-keyvault-service-version: @@ -364,19 +364,19 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001","name":"cli_test_os_disk_security_encryption_type000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-27T08:39:34Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001","name":"cli_test_os_disk_security_encryption000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T02:49:32Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '379' + - '369' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:40:59 GMT + - Tue, 31 May 2022 02:50:21 GMT expires: - '-1' pragma: @@ -392,9 +392,9 @@ interactions: message: OK - request: body: '{"location": "centraluseuap", "identity": {"type": "SystemAssigned"}, "properties": - {"encryptionType": "EncryptionAtRestWithPlatformAndCustomerKeys", "activeKey": - {"sourceVault": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003"}, - "keyUrl": "https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036"}}}' + {"encryptionType": "ConfidentialVmEncryptedWithCustomerKey", "activeKey": {"sourceVault": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002"}, + "keyUrl": "https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb"}}}' headers: Accept: - application/json @@ -405,7 +405,7 @@ interactions: Connection: - keep-alive Content-Length: - - '451' + - '441' Content-Type: - application/json ParameterSetName: @@ -413,30 +413,30 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 response: body: string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"activeKey\": {\r\n - \ \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"\r\n - \ },\r\n \"keyUrl\": \"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"\r\n - \ },\r\n \"encryptionType\": \"EncryptionAtRestWithPlatformAndCustomerKeys\",\r\n + \ \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n \ \"provisioningState\": \"Updating\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/83f747f3-8930-46b8-a542-1fba79044e66?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/44841827-f85f-4c82-b0de-3ddbf721a25b?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 cache-control: - no-cache content-length: - - '565' + - '555' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:06 GMT + - Tue, 31 May 2022 02:50:31 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/83f747f3-8930-46b8-a542-1fba79044e66?p=157f1a74-df5f-47b0-a815-476d8af3dce4&monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/44841827-f85f-4c82-b0de-3ddbf721a25b?p=157f1a74-df5f-47b0-a815-476d8af3dce4&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -447,9 +447,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;299 + - Microsoft.Compute/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;296 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -469,22 +469,22 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/83f747f3-8930-46b8-a542-1fba79044e66?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/44841827-f85f-4c82-b0de-3ddbf721a25b?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2022-05-27T08:41:07.0544566+00:00\",\r\n \"endTime\": - \"2022-05-27T08:41:07.1325744+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"properties\": {\r\n \"output\": {\"name\":\"des1000005\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\",\"type\":\"Microsoft.Compute/diskEncryptionSets\",\"location\":\"centraluseuap\",\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"af7dd047-5779-42a8-b91e-a56c65dc5114\",\"tenantId\":\"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"},\"properties\":{\"activeKey\":{\"sourceVault\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"},\"keyUrl\":\"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"},\"encryptionType\":\"EncryptionAtRestWithPlatformAndCustomerKeys\",\"provisioningState\":\"Succeeded\"}}\r\n - \ },\r\n \"name\": \"83f747f3-8930-46b8-a542-1fba79044e66\"\r\n}" + string: "{\r\n \"startTime\": \"2022-05-31T02:50:31.2973873+00:00\",\r\n \"endTime\": + \"2022-05-31T02:50:31.3754953+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\"name\":\"des1000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\"type\":\"Microsoft.Compute/diskEncryptionSets\",\"location\":\"centraluseuap\",\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"b43b6542-7642-409f-8b2a-27659e9b327e\",\"tenantId\":\"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"},\"properties\":{\"activeKey\":{\"sourceVault\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"},\"keyUrl\":\"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"},\"encryptionType\":\"ConfidentialVmEncryptedWithCustomerKey\",\"provisioningState\":\"Succeeded\"}}\r\n + \ },\r\n \"name\": \"44841827-f85f-4c82-b0de-3ddbf721a25b\"\r\n}" headers: cache-control: - no-cache content-length: - - '1044' + - '1029' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:37 GMT + - Tue, 31 May 2022 02:51:00 GMT expires: - '-1' pragma: @@ -501,7 +501,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49998,Microsoft.Compute/GetOperation30Min;399998 + - Microsoft.Compute/GetOperation3Min;49998,Microsoft.Compute/GetOperation30Min;399995 status: code: 200 message: OK @@ -521,27 +521,27 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 response: body: - string: "{\r\n \"name\": \"des1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\",\r\n + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": - \"af7dd047-5779-42a8-b91e-a56c65dc5114\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \"b43b6542-7642-409f-8b2a-27659e9b327e\",\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_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"\r\n - \ },\r\n \"keyUrl\": \"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"\r\n - \ },\r\n \"encryptionType\": \"EncryptionAtRestWithPlatformAndCustomerKeys\",\r\n + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '944' + - '929' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:37 GMT + - Tue, 31 May 2022 02:51:01 GMT expires: - '-1' pragma: @@ -558,7 +558,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14997,Microsoft.Compute/LowCostGet30Min;119997 + - Microsoft.Compute/LowCostGet3Min;14993,Microsoft.Compute/LowCostGet30Min;119971 status: code: 200 message: OK @@ -578,27 +578,27 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 response: body: - string: "{\r\n \"name\": \"des1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\",\r\n + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": - \"af7dd047-5779-42a8-b91e-a56c65dc5114\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n + \"b43b6542-7642-409f-8b2a-27659e9b327e\",\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_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003\"\r\n - \ },\r\n \"keyUrl\": \"https://vault000003.vault.azure.net/keys/key000004/f14553100a4e4172b3e7f4261e753036\"\r\n - \ },\r\n \"encryptionType\": \"EncryptionAtRestWithPlatformAndCustomerKeys\",\r\n + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '944' + - '929' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:39 GMT + - Tue, 31 May 2022 02:51:02 GMT expires: - '-1' pragma: @@ -615,7 +615,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14996,Microsoft.Compute/LowCostGet30Min;119996 + - Microsoft.Compute/LowCostGet3Min;14992,Microsoft.Compute/LowCostGet30Min;119970 status: code: 200 message: OK @@ -638,16 +638,16 @@ interactions: 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/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv","name":"bez-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"key":"value"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault4-000002","name":"vault4-000002","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typequcmnevsmoa2l22nw3oenpcgnsqtmurffv/providers/Microsoft.KeyVault/vaults/vault4-h6rfa4jrse6at","name":"vault4-h6rfa4jrse6at","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typequcmnevsmoa2l22nw3oenpcgnsqtmurffv/providers/Microsoft.KeyVault/vaults/vault5br3izuriz","name":"vault5br3izuriz","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typeeefdgeqqkbkeuc7zo4an2mcu7w64qwjiyv/providers/Microsoft.KeyVault/vaults/vault4-g6niep6w25vt5","name":"vault4-g6niep6w25vt5","type":"Microsoft.KeyVault/vaults","location":"westcentralus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_typeeefdgeqqkbkeuc7zo4an2mcu7w64qwjiyv/providers/Microsoft.KeyVault/vaults/vaultdwbkccot3s","name":"vaultdwbkccot3s","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zb_test/providers/Microsoft.KeyVault/vaults/zblab7701","name":"zblab7701","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"hidden-DevTestLabs-LabUId":"301109ba-f89e-4ba1-8c0c-be6e91e47840","CreatedBy":"DevTestLabs"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv","name":"bez-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"key":"value"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgekqy3wfedqj4dnzziqlanw3ibaisofsz6xlh5bsdcnxyjexa3urmhyincvvzcb7bu/providers/Microsoft.KeyVault/vaults/sfrp-cli-kv-yfivvc4dy56i","name":"sfrp-cli-kv-yfivvc4dy56i","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgprt2pgwgmw7uu6esq34k76gdppoc2gnajxvzxn5iy4baxvgcm3iwl6dq4usgbnbc2/providers/Microsoft.KeyVault/vaults/clitestrgprt2pgwgmw7u","name":"clitestrgprt2pgwgmw7u","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zb_test/providers/Microsoft.KeyVault/vaults/zblab7701","name":"zblab7701","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"hidden-DevTestLabs-LabUId":"301109ba-f89e-4ba1-8c0c-be6e91e47840","CreatedBy":"DevTestLabs"}}]}' headers: cache-control: - no-cache content-length: - - '2995' + - '2117' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:39 GMT + - Tue, 31 May 2022 02:51:03 GMT expires: - '-1' pragma: @@ -677,19 +677,19 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:40:22.446Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:49:44.891Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' headers: cache-control: - no-cache content-length: - - '1042' + - '1037' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:41 GMT + - Tue, 31 May 2022 02:51:05 GMT expires: - '-1' pragma: @@ -707,7 +707,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.394.0 + - 1.5.396.0 x-powered-by: - ASP.NET status: @@ -719,8 +719,8 @@ interactions: "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], "storage": ["all"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": - "af7dd047-5779-42a8-b91e-a56c65dc5114", "permissions": {"keys": ["wrapKey", - "unwrapKey", "get"]}}], "vaultUri": "https://vault000003.vault.azure.net/", + "b43b6542-7642-409f-8b2a-27659e9b327e", "permissions": {"keys": ["wrapKey", + "get", "unwrapKey"]}}], "vaultUri": "https://vault000002.vault.azure.net/", "enabledForDeployment": false, "enableSoftDelete": true, "softDeleteRetentionInDays": 90, "enablePurgeProtection": true, "provisioningState": "Succeeded", "publicNetworkAccess": "Enabled"}}' @@ -742,19 +742,19 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003?api-version=2021-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","name":"vault000003","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-27T08:40:22.446Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-27T08:41:42.106Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"af7dd047-5779-42a8-b91e-a56c65dc5114","permissions":{"keys":["wrapKey","unwrapKey","get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000003.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:51:05.855Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"b43b6542-7642-409f-8b2a-27659e9b327e","permissions":{"keys":["wrapKey","get","unwrapKey"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' headers: cache-control: - no-cache content-length: - - '1197' + - '1192' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:41 GMT + - Tue, 31 May 2022 02:51:05 GMT expires: - '-1' pragma: @@ -772,7 +772,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.394.0 + - 1.5.396.0 x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: @@ -796,11 +796,11 @@ interactions: User-Agent: - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 method: GET - uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'af7dd047-5779-42a8-b91e-a56c65dc5114') + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'b43b6542-7642-409f-8b2a-27659e9b327e') response: body: string: '{"error":{"code":"Authorization_RequestDenied","message":"Insufficient - privileges to complete the operation.","innerError":{"date":"2022-05-27T08:41:58","request-id":"178602da-7af8-497b-83f6-2d2cc1770a07","client-request-id":"178602da-7af8-497b-83f6-2d2cc1770a07"}}}' + privileges to complete the operation.","innerError":{"date":"2022-05-31T02:51:23","request-id":"b303c891-eb02-4595-87d3-dd45ea4342c5","client-request-id":"b303c891-eb02-4595-87d3-dd45ea4342c5"}}}' headers: cache-control: - no-cache @@ -809,9 +809,9 @@ interactions: content-type: - application/json date: - - Fri, 27 May 2022 08:41:58 GMT + - Tue, 31 May 2022 02:51:22 GMT request-id: - - 178602da-7af8-497b-83f6-2d2cc1770a07 + - b303c891-eb02-4595-87d3-dd45ea4342c5 strict-transport-security: - max-age=31536000 transfer-encoding: @@ -819,7 +819,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"3","ScaleUnit":"003","RoleInstance":"SE1PEPF00001FF5"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00000BCF"}}' x-ms-resource-unit: - '1' status: @@ -844,7 +844,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002/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":"View @@ -857,7 +857,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:41:59 GMT + - Tue, 31 May 2022 02:51:23 GMT expires: - '-1' pragma: @@ -877,7 +877,7 @@ interactions: message: OK - request: body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7", - "principalId": "af7dd047-5779-42a8-b91e-a56c65dc5114"}}' + "principalId": "b43b6542-7642-409f-8b2a-27659e9b327e"}}' headers: Accept: - application/json @@ -901,19 +901,19 @@ interactions: accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview response: body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"af7dd047-5779-42a8-b91e-a56c65dc5114","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003","condition":null,"conditionVersion":null,"createdOn":"2022-05-27T08:41:59.6846109Z","updatedOn":"2022-05-27T08:42:00.2158847Z","createdBy":null,"updatedBy":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.KeyVault/vaults/vault000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"b43b6542-7642-409f-8b2a-27659e9b327e","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","condition":null,"conditionVersion":null,"createdOn":"2022-05-31T02:51:23.9328173Z","updatedOn":"2022-05-31T02:51:24.4171494Z","createdBy":null,"updatedBy":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002/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: - - '1045' + - '1035' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:08 GMT + - Tue, 31 May 2022 02:51:28 GMT expires: - '-1' pragma: @@ -925,7 +925,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -942,23 +942,23 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001","name":"cli_test_os_disk_security_encryption_type000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-27T08:39:34Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001","name":"cli_test_os_disk_security_encryption000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T02:49:32Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '379' + - '369' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:09 GMT + - Tue, 31 May 2022 02:51:29 GMT expires: - '-1' pragma: @@ -985,7 +985,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1003,7 +1003,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:09 GMT + - Tue, 31 May 2022 02:51:32 GMT expires: - '-1' pragma: @@ -1037,7 +1037,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1066,7 +1066,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:10 GMT + - Tue, 31 May 2022 02:51:34 GMT expires: - '-1' pragma: @@ -1083,7 +1083,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73997 + - Microsoft.Compute/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73998 status: code: 200 message: OK @@ -1100,11 +1100,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 response: body: string: '{"value":[]}' @@ -1116,7 +1116,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:10 GMT + - Tue, 31 May 2022 02:51:34 GMT expires: - '-1' pragma: @@ -1134,39 +1134,39 @@ interactions: body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": - [{"name": "vm1000006VNET", "type": "Microsoft.Network/virtualNetworks", "location": + [{"name": "vm1000005VNET", "type": "Microsoft.Network/virtualNetworks", "location": "centraluseuap", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": - "vm1000006Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": - "Microsoft.Network/networkSecurityGroups", "name": "vm1000006NSG", "apiVersion": + "vm1000005Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": + "Microsoft.Network/networkSecurityGroups", "name": "vm1000005NSG", "apiVersion": "2015-06-15", "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": {"securityRules": [{"name": "rdp", "properties": {"protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": "3389", "sourceAddressPrefix": "*", "destinationAddressPrefix": "*", "access": "Allow", "priority": 1000, "direction": "Inbound"}}]}}, {"apiVersion": - "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vm1000006PublicIP", + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vm1000005PublicIP", "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "vm1000006VMNic", "location": "centraluseuap", "tags": {}, "dependsOn": - ["Microsoft.Network/virtualNetworks/vm1000006VNET", "Microsoft.Network/networkSecurityGroups/vm1000006NSG", - "Microsoft.Network/publicIpAddresses/vm1000006PublicIP"], "properties": {"ipConfigurations": - [{"name": "ipconfigvm1000006", "properties": {"privateIPAllocationMethod": "Dynamic", - "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET/subnets/vm1000006Subnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP"}}}], - "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG"}}}, + "name": "vm1000005VMNic", "location": "centraluseuap", "tags": {}, "dependsOn": + ["Microsoft.Network/virtualNetworks/vm1000005VNET", "Microsoft.Network/networkSecurityGroups/vm1000005NSG", + "Microsoft.Network/publicIpAddresses/vm1000005PublicIP"], "properties": {"ipConfigurations": + [{"name": "ipconfigvm1000005", "properties": {"privateIPAllocationMethod": "Dynamic", + "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET/subnets/vm1000005Subnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG"}}}, {"apiVersion": "2022-03-01", "type": "Microsoft.Compute/virtualMachines", "name": - "vm1000006", "location": "centraluseuap", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1000006VMNic"], + "vm1000005", "location": "centraluseuap", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1000005VMNic"], "properties": {"hardwareProfile": {"vmSize": "Standard_DC2as_v5"}, "networkProfile": - {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic", + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic", "properties": {"deleteOption": null}}]}, "storageProfile": {"osDisk": {"createOption": "fromImage", "name": null, "caching": "ReadWrite", "managedDisk": {"storageAccountType": - null, "diskEncryptionSet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005"}, - "securityProfile": {"securityEncryptionType": "DiskWithVMGuestState"}}}, "imageReference": - {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2022-datacenter-smalldisk-g2", - "version": "latest"}}, "osProfile": {"computerName": "vm1000006", "adminUsername": - "testuser", "adminPassword": "[parameters(''adminPassword'')]"}, "securityProfile": - {"securityType": "ConfidentialVM", "uefiSettings": {"secureBootEnabled": true, - "vTpmEnabled": true}}}}], "outputs": {}}, "parameters": {"adminPassword": {"value": - "testPassword0"}}, "mode": "incremental"}}' + null, "securityProfile": {"securityEncryptionType": "DiskWithVMGuestState", + "diskEncryptionSet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004"}}}}, + "imageReference": {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", + "sku": "2022-datacenter-smalldisk-g2", "version": "latest"}}, "osProfile": {"computerName": + "vm1000005", "adminUsername": "testuser", "adminPassword": "[parameters(''adminPassword'')]"}, + "securityProfile": {"securityType": "ConfidentialVM", "uefiSettings": {"secureBootEnabled": + true, "vTpmEnabled": true}}}}], "outputs": {}}, "parameters": {"adminPassword": + {"value": "testPassword0"}}, "mode": "incremental"}}' headers: Accept: - application/json @@ -1177,30 +1177,30 @@ interactions: Connection: - keep-alive Content-Length: - - '3795' + - '3770' Content-Type: - application/json ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","name":"vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","type":"Microsoft.Resources/deployments","properties":{"templateHash":"2624834759687267576","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-27T08:42:18.19405Z","duration":"PT0.0009896S","correlationId":"0c0274e3-3800-4bb1-9427-860b782044a3","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000006VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000006NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000006PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000006"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","name":"vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1228307168060353538","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-31T02:51:42.7602615Z","duration":"PT0.0000887S","correlationId":"1e47d864-c01e-40a8-8490-1dbecf257e5d","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000005NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000005PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000005"}]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF/operationStatuses/08585479659499490730?api-version=2021-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4/operationStatuses/08585476413858650536?api-version=2021-04-01 cache-control: - no-cache content-length: - - '2690' + - '2657' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:18 GMT + - Tue, 31 May 2022 02:51:43 GMT expires: - '-1' pragma: @@ -1227,11 +1227,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1243,7 +1243,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:42:50 GMT + - Tue, 31 May 2022 02:52:14 GMT expires: - '-1' pragma: @@ -1270,11 +1270,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1286,7 +1286,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:43:20 GMT + - Tue, 31 May 2022 02:52:45 GMT expires: - '-1' pragma: @@ -1313,11 +1313,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1329,7 +1329,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:43:50 GMT + - Tue, 31 May 2022 02:53:15 GMT expires: - '-1' pragma: @@ -1356,11 +1356,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1372,7 +1372,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:44:20 GMT + - Tue, 31 May 2022 02:53:46 GMT expires: - '-1' pragma: @@ -1399,11 +1399,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1415,7 +1415,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:44:51 GMT + - Tue, 31 May 2022 02:54:16 GMT expires: - '-1' pragma: @@ -1442,11 +1442,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1458,7 +1458,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:45:21 GMT + - Tue, 31 May 2022 02:54:47 GMT expires: - '-1' pragma: @@ -1485,11 +1485,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1501,7 +1501,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:45:52 GMT + - Tue, 31 May 2022 02:55:17 GMT expires: - '-1' pragma: @@ -1528,11 +1528,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1544,7 +1544,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:46:22 GMT + - Tue, 31 May 2022 02:55:48 GMT expires: - '-1' pragma: @@ -1571,11 +1571,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1587,7 +1587,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:46:53 GMT + - Tue, 31 May 2022 02:56:19 GMT expires: - '-1' pragma: @@ -1614,11 +1614,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1630,7 +1630,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:47:24 GMT + - Tue, 31 May 2022 02:56:49 GMT expires: - '-1' pragma: @@ -1657,11 +1657,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1673,7 +1673,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:47:55 GMT + - Tue, 31 May 2022 02:57:21 GMT expires: - '-1' pragma: @@ -1700,11 +1700,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1716,7 +1716,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:48:25 GMT + - Tue, 31 May 2022 02:57:51 GMT expires: - '-1' pragma: @@ -1743,11 +1743,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1759,7 +1759,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:48:55 GMT + - Tue, 31 May 2022 02:58:22 GMT expires: - '-1' pragma: @@ -1786,11 +1786,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1802,7 +1802,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:49:26 GMT + - Tue, 31 May 2022 02:58:52 GMT expires: - '-1' pragma: @@ -1829,11 +1829,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1845,7 +1845,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:49:56 GMT + - Tue, 31 May 2022 02:59:22 GMT expires: - '-1' pragma: @@ -1872,11 +1872,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1888,7 +1888,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:50:26 GMT + - Tue, 31 May 2022 02:59:53 GMT expires: - '-1' pragma: @@ -1915,11 +1915,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1931,7 +1931,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:50:57 GMT + - Tue, 31 May 2022 03:00:24 GMT expires: - '-1' pragma: @@ -1958,11 +1958,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -1974,7 +1974,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:51:28 GMT + - Tue, 31 May 2022 03:00:54 GMT expires: - '-1' pragma: @@ -2001,11 +2001,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Running"}' @@ -2017,7 +2017,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:51:59 GMT + - Tue, 31 May 2022 03:01:26 GMT expires: - '-1' pragma: @@ -2044,11 +2044,11 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585479659499490730?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 response: body: string: '{"status":"Succeeded"}' @@ -2060,7 +2060,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:52:29 GMT + - Tue, 31 May 2022 03:01:56 GMT expires: - '-1' pragma: @@ -2087,23 +2087,23 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Resources/deployments/vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","name":"vm_deploy_BmNVB5DDQ2QnPMorDHIAxLVXGqa4y9dF","type":"Microsoft.Resources/deployments","properties":{"templateHash":"2624834759687267576","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2022-05-27T08:52:26.5725248Z","duration":"PT10M8.3794644S","correlationId":"0c0274e3-3800-4bb1-9427-860b782044a3","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000006VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000006NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000006PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000006VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000006"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","name":"vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1228307168060353538","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2022-05-31T03:01:39.4691002Z","duration":"PT9M56.7089274S","correlationId":"1e47d864-c01e-40a8-8490-1dbecf257e5d","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000005NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000005PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000005"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET"}]}}' headers: cache-control: - no-cache content-length: - - '3649' + - '3589' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:52:29 GMT + - Tue, 31 May 2022 03:01:56 GMT expires: - '-1' pragma: @@ -2130,31 +2130,31 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006?$expand=instanceView&api-version=2022-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005?$expand=instanceView&api-version=2022-03-01 response: body: - string: "{\r\n \"name\": \"vm1000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006\",\r\n + string: "{\r\n \"name\": \"vm1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"centraluseuap\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d77d2b2e-87b5-446a-9663-ef1b04756847\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"59c2baec-1215-4270-883d-3fc0854105f7\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DC2as_v5\"\r\n \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\",\r\n \ \"exactVersion\": \"20348.707.220505\"\r\n },\r\n \"osDisk\": - {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\",\r\n + {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n - \ \"managedDisk\": {\r\n \"diskEncryptionSet\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\"\r\n - \ },\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": - \"DiskWithVMGuestState\"\r\n },\r\n \"storageAccountType\": - \"Premium_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/disks/vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\"\r\n + \ \"managedDisk\": {\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": + \"DiskWithVMGuestState\",\r\n \"diskEncryptionSet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\"\r\n + \ }\r\n },\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/disks/vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": - {\r\n \"computerName\": \"vm1000006\",\r\n \"adminUsername\": \"testuser\",\r\n + {\r\n \"computerName\": \"vm1000005\",\r\n \"adminUsername\": \"testuser\",\r\n \ \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n \ \"enableAutomaticUpdates\": true,\r\n \"patchSettings\": {\r\n \ \"patchMode\": \"AutomaticByOS\",\r\n \"assessmentMode\": @@ -2163,35 +2163,35 @@ interactions: true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"securityProfile\": {\r\n \"uefiSettings\": {\r\n \"secureBootEnabled\": true,\r\n \ \"vTpmEnabled\": true\r\n },\r\n \"securityType\": \"ConfidentialVM\"\r\n - \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic\"}]},\r\n + \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic\"}]},\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"Unknown\",\r\n \"statuses\": [\r\n \ {\r\n \"code\": \"ProvisioningState/Unavailable\",\r\n \ \"level\": \"Warning\",\r\n \"displayStatus\": \"Not Ready\",\r\n \"message\": \"VM status blob is found but not yet - populated.\",\r\n \"time\": \"2022-05-27T08:52:31+00:00\"\r\n }\r\n + populated.\",\r\n \"time\": \"2022-05-31T03:01:58+00:00\"\r\n }\r\n \ ]\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": - \"vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\",\r\n \"statuses\": + \"vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2022-05-27T08:51:44.0283543+00:00\"\r\n + succeeded\",\r\n \"time\": \"2022-05-31T03:01:10.1918892+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V2\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2022-05-27T08:52:16.3566952+00:00\"\r\n + succeeded\",\r\n \"time\": \"2022-05-31T03:01:29.9419846+00:00\"\r\n \ },\r\n {\r\n \"code\": \"PowerState/stopped\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM stopped\"\r\n - \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2022-05-27T08:42:43.2916309+00:00\"\r\n + \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2022-05-31T02:52:13.7824634+00:00\"\r\n \ }\r\n}" headers: cache-control: - no-cache content-length: - - '3880' + - '3866' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:52:30 GMT + - Tue, 31 May 2022 03:01:57 GMT expires: - '-1' pragma: @@ -2208,7 +2208,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31997 + - Microsoft.Compute/LowCostGet3Min;3996,Microsoft.Compute/LowCostGet30Min;31969 status: code: 200 message: OK @@ -2225,45 +2225,45 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic?api-version=2018-01-01 response: body: - string: "{\r\n \"name\": \"vm1000006VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic\",\r\n - \ \"etag\": \"W/\\\"55d99d13-e46a-4939-83e3-6bd7afa4dc19\\\"\",\r\n \"location\": + string: "{\r\n \"name\": \"vm1000005VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic\",\r\n + \ \"etag\": \"W/\\\"9108ca81-3ea8-4c25-8c31-381f602e4733\\\"\",\r\n \"location\": \"centraluseuap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": - \"Succeeded\",\r\n \"resourceGuid\": \"609a60d0-d225-4733-b5a8-747f1221c704\",\r\n - \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1000006\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic/ipConfigurations/ipconfigvm1000006\",\r\n - \ \"etag\": \"W/\\\"55d99d13-e46a-4939-83e3-6bd7afa4dc19\\\"\",\r\n + \"Succeeded\",\r\n \"resourceGuid\": \"4e6dd1d3-15d9-4dc5-a4c3-3d483f34dc33\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1000005\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic/ipConfigurations/ipconfigvm1000005\",\r\n + \ \"etag\": \"W/\\\"9108ca81-3ea8-4c25-8c31-381f602e4733\\\"\",\r\n \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/virtualNetworks/vm1000006VNET/subnets/vm1000006Subnet\"\r\n + \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET/subnets/vm1000005Subnet\"\r\n \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": - \"4ldeehhdyiduze41esojzj5dna.cdmx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": - \"60-45-BD-76-7A-05\",\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkSecurityGroups/vm1000006NSG\"\r\n + \"uzefxcfo21uu5fyjjbckdsucec.cdmx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"60-45-BD-76-7E-C9\",\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG\"\r\n \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006\"\r\n + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005\"\r\n \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" headers: cache-control: - no-cache content-length: - - '2426' + - '2396' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:52:32 GMT + - Tue, 31 May 2022 03:01:59 GMT etag: - - W/"55d99d13-e46a-4939-83e3-6bd7afa4dc19" + - W/"9108ca81-3ea8-4c25-8c31-381f602e4733" expires: - '-1' pragma: @@ -2280,10 +2280,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a866cc79-5978-4c5e-bcdd-3f0d7f833ba8 + - 5472e652-7d7d-4c65-9ebd-9d036b6f1a44 status: code: 200 - message: '' + message: OK - request: body: null headers: @@ -2297,33 +2297,33 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP?api-version=2018-01-01 response: body: - string: "{\r\n \"name\": \"vm1000006PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/publicIPAddresses/vm1000006PublicIP\",\r\n - \ \"etag\": \"W/\\\"cc676cf1-7cae-4eb1-9bea-06539e0cb479\\\"\",\r\n \"location\": + string: "{\r\n \"name\": \"vm1000005PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP\",\r\n + \ \"etag\": \"W/\\\"d83def5d-a736-465b-826a-719e376f7fe7\\\"\",\r\n \"location\": \"centraluseuap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": - \"Succeeded\",\r\n \"resourceGuid\": \"7530461e-d12b-4df4-a29d-600d26b9f7ff\",\r\n - \ \"ipAddress\": \"20.46.27.15\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n + \"Succeeded\",\r\n \"resourceGuid\": \"80ea5f41-0aea-4444-8552-6d6784c13e0f\",\r\n + \ \"ipAddress\": \"20.45.228.191\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \ \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": - 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic/ipConfigurations/ipconfigvm1000006\"\r\n + 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic/ipConfigurations/ipconfigvm1000005\"\r\n \ }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '970' + - '962' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:52:32 GMT + - Tue, 31 May 2022 03:01:59 GMT etag: - - W/"cc676cf1-7cae-4eb1-9bea-06539e0cb479" + - W/"d83def5d-a736-465b-826a-719e376f7fe7" expires: - '-1' pragma: @@ -2340,10 +2340,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 23d683a9-c4a9-49cd-82bc-18c2b375c559 + - cc566b3b-7f7c-4d42-ab96-a7fcfe5e2789 status: code: 200 - message: '' + message: OK - request: body: null headers: @@ -2360,27 +2360,27 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006?api-version=2022-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005?api-version=2022-03-01 response: body: - string: "{\r\n \"name\": \"vm1000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/virtualMachines/vm1000006\",\r\n + string: "{\r\n \"name\": \"vm1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"centraluseuap\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"d77d2b2e-87b5-446a-9663-ef1b04756847\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"59c2baec-1215-4270-883d-3fc0854105f7\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DC2as_v5\"\r\n \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\",\r\n \ \"exactVersion\": \"20348.707.220505\"\r\n },\r\n \"osDisk\": - {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\",\r\n + {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n - \ \"managedDisk\": {\r\n \"diskEncryptionSet\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/diskEncryptionSets/des1000005\"\r\n - \ },\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": - \"DiskWithVMGuestState\"\r\n },\r\n \"storageAccountType\": - \"Premium_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Compute/disks/vm1000006_OsDisk_1_80f23348d91449659a6f0e48bd956008\"\r\n + \ \"managedDisk\": {\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": + \"DiskWithVMGuestState\",\r\n \"diskEncryptionSet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\"\r\n + \ }\r\n },\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/disks/vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": - {\r\n \"computerName\": \"vm1000006\",\r\n \"adminUsername\": \"testuser\",\r\n + {\r\n \"computerName\": \"vm1000005\",\r\n \"adminUsername\": \"testuser\",\r\n \ \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n \ \"enableAutomaticUpdates\": true,\r\n \"patchSettings\": {\r\n \ \"patchMode\": \"AutomaticByOS\",\r\n \"assessmentMode\": @@ -2389,18 +2389,18 @@ interactions: true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"securityProfile\": {\r\n \"uefiSettings\": {\r\n \"secureBootEnabled\": true,\r\n \ \"vTpmEnabled\": true\r\n },\r\n \"securityType\": \"ConfidentialVM\"\r\n - \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_type000001/providers/Microsoft.Network/networkInterfaces/vm1000006VMNic\"}]},\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"timeCreated\": \"2022-05-27T08:42:43.2916309+00:00\"\r\n + \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"timeCreated\": \"2022-05-31T02:52:13.7824634+00:00\"\r\n \ }\r\n}" headers: cache-control: - no-cache content-length: - - '2668' + - '2654' content-type: - application/json; charset=utf-8 date: - - Fri, 27 May 2022 08:52:34 GMT + - Tue, 31 May 2022 03:01:59 GMT expires: - '-1' pragma: @@ -2417,7 +2417,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3996,Microsoft.Compute/LowCostGet30Min;31996 + - Microsoft.Compute/LowCostGet3Min;3995,Microsoft.Compute/LowCostGet30Min;31968 status: code: 200 message: OK diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml new file mode 100644 index 00000000000..0c6ed963df8 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml @@ -0,0 +1,1309 @@ +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: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001","name":"cli_test_os_disk_security_encryption_vmss000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T03:37:09Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37:12 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 create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/vault000002'' + under resource group ''cli_test_os_disk_security_encryption_vmss000001'' was + not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '256' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Jingsong + Zhang (WICRESOFT NORTH AMERICA LTD)","givenName":null,"jobTitle":null,"mail":"v-jingszhang@microsoft.com","mobilePhone":null,"officeLocation":null,"preferredLanguage":null,"surname":null,"userPrincipalName":"v-jingszhang_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","id":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2"}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Tue, 31 May 2022 03:37:17 GMT + odata-version: + - '4.0' + request-id: + - 7aac055f-3b6a-40ab-908f-699fe50a883d + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF000023FC"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}], "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "enablePurgeProtection": true, "networkAcls": {"bypass": "AzureServices", + "defaultAction": "Allow"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '526' + Content-Type: + - application/json + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:37:25.064Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1046' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37:28 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.5.396.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:37:25.064Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1042' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37: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.5.396.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 + response: + body: + string: '{"key":{"kid":"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"4qmWsb1Lf26VHJBGfOawiuTRFafdTei-ESkbX4XijwTjKnF8iBEc_QXpJkuFXs6-lLQL4tAo8f177Sya8y6JZPpmnO6ubf3LiWqkQLTcPAdMPYJ_87tY7GxFU88IX7H5dyuZgHLZXNbK82BgmQWhBD1Ku2mpQ2ijncil_HbbF95WatZ0xjyZjfSrhrenlxe21kV6hJ7thaNM1YmWCnk0i5kiSo85teD9W6EBGjB4sOXcYuZvEhAJtqx7UFsmpnvuNtjLdgSMv0j94J47h6tKtfAZ755HTuLt81Eqg1HxWBLmQrOqGHW0mYozwBuWasfUl9WUquMAmu_qcjlZlZwhEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1653968282,"updated":1653968282,"recoveryLevel":"Recoverable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '666' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001","name":"cli_test_os_disk_security_encryption_vmss000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T03:37:09Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:03 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": "centraluseuap", "identity": {"type": "SystemAssigned"}, "properties": + {"encryptionType": "ConfidentialVmEncryptedWithCustomerKey", "activeKey": {"sourceVault": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002"}, + "keyUrl": "https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '446' + Content-Type: + - application/json + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + response: + body: + string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": + \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"activeKey\": {\r\n + \ \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Updating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/c3ba53b7-5f92-47b0-9303-2444f2e7b64d?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '560' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:09 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/c3ba53b7-5f92-47b0-9303-2444f2e7b64d?p=157f1a74-df5f-47b0-a815-476d8af3dce4&monitor=true&api-version=2021-04-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/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;297 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/c3ba53b7-5f92-47b0-9303-2444f2e7b64d?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T03:38:09.7295866+00:00\",\r\n \"endTime\": + \"2022-05-31T03:38:09.7920801+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\"name\":\"des1000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\"type\":\"Microsoft.Compute/diskEncryptionSets\",\"location\":\"centraluseuap\",\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"aad0a3b2-6971-4426-a8fb-6752582785da\",\"tenantId\":\"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"},\"properties\":{\"activeKey\":{\"sourceVault\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"},\"keyUrl\":\"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"},\"encryptionType\":\"ConfidentialVmEncryptedWithCustomerKey\",\"provisioningState\":\"Succeeded\"}}\r\n + \ },\r\n \"name\": \"c3ba53b7-5f92-47b0-9303-2444f2e7b64d\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1039' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:41 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;49998,Microsoft.Compute/GetOperation30Min;399995 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + response: + body: + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"aad0a3b2-6971-4426-a8fb-6752582785da\",\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_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '939' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:41 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;14990,Microsoft.Compute/LowCostGet30Min;119928 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + response: + body: + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"aad0a3b2-6971-4426-a8fb-6752582785da\",\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_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '939' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:42 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;14989,Microsoft.Compute/LowCostGet30Min;119927 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + 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/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv","name":"bez-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"key":"value"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgekqy3wfedqj4dnzziqlanw3ibaisofsz6xlh5bsdcnxyjexa3urmhyincvvzcb7bu/providers/Microsoft.KeyVault/vaults/sfrp-cli-kv-yfivvc4dy56i","name":"sfrp-cli-kv-yfivvc4dy56i","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rghbul6h5kf5snf4tyu4ij2d6xiyi6o43qjpe73fna5wzn234gq3l3q5zs52r2borgk/providers/Microsoft.KeyVault/vaults/sfrp-cli-kv-e4zb3mviyonr","name":"sfrp-cli-kv-e4zb3mviyonr","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zb_test/providers/Microsoft.KeyVault/vaults/zblab7701","name":"zblab7701","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"hidden-DevTestLabs-LabUId":"301109ba-f89e-4ba1-8c0c-be6e91e47840","CreatedBy":"DevTestLabs"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '2130' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:43 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 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:37:25.064Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1042' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:44 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.5.396.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": + "aad0a3b2-6971-4426-a8fb-6752582785da", "permissions": {"keys": ["unwrapKey", + "get", "wrapKey"]}}], "vaultUri": "https://vault000002.vault.azure.net/", "enabledForDeployment": + false, "enableSoftDelete": true, "softDeleteRetentionInDays": 90, "enablePurgeProtection": + true, "provisioningState": "Succeeded", "publicNetworkAccess": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '783' + Content-Type: + - application/json + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:38:45.835Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"aad0a3b2-6971-4426-a8fb-6752582785da","permissions":{"keys":["unwrapKey","get","wrapKey"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1197' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38: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.5.396.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'aad0a3b2-6971-4426-a8fb-6752582785da') + response: + body: + string: '{"error":{"code":"Authorization_RequestDenied","message":"Insufficient + privileges to complete the operation.","innerError":{"date":"2022-05-31T03:39:02","request-id":"aa051a92-1768-4cbd-b0a6-5481cfb540b3","client-request-id":"aa051a92-1768-4cbd-b0a6-5481cfb540b3"}}}' + headers: + cache-control: + - no-cache + content-length: + - '266' + content-type: + - application/json + date: + - Tue, 31 May 2022 03:39:02 GMT + request-id: + - aa051a92-1768-4cbd-b0a6-5481cfb540b3 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF000023FC"}}' + x-ms-resource-unit: + - '1' + status: + code: 403 + message: Forbidden +- 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002/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":"View + all resources, but does not allow you to make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2021-11-11T20:13:47.8628684Z","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: + - '627' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:03 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + 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": "aad0a3b2-6971-4426-a8fb-6752582785da"}}' + 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"aad0a3b2-6971-4426-a8fb-6752582785da","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","condition":null,"conditionVersion":null,"createdOn":"2022-05-31T03:39:03.5851900Z","updatedOn":"2022-05-31T03:39:04.0696177Z","createdBy":null,"updatedBy":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002/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: + - '1045' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:09 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001","name":"cli_test_os_disk_security_encryption_vmss000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T03:37:09Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:09 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: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions?$top=1&$orderby=name%20desc&api-version=2022-03-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"CentralUSEUAP\",\r\n \"name\": \"20348.707.220505\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n + \ }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '335' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:11 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/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43996 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions/20348.707.220505?api-version=2022-03-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \"architecture\": + \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \"replicaCount\": 10,\r\n + \ \"disallowed\": {\r\n \"vmDiskType\": \"Unmanaged\"\r\n },\r\n + \ \"automaticOSUpgradeProperties\": {\r\n \"automaticOSUpgradeSupported\": + false\r\n },\r\n \"imageDeprecationStatus\": {\r\n \"imageState\": + \"Active\"\r\n },\r\n \"features\": [\r\n {\r\n \"name\": + \"SecurityType\",\r\n \"value\": \"TrustedLaunchAndConfidentialVmSupported\"\r\n + \ },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\",\r\n + \ \"value\": \"True\"\r\n },\r\n {\r\n \"name\": \"DiskControllerTypes\",\r\n + \ \"value\": \"SCSI\"\r\n },\r\n {\r\n \"name\": \"IsHibernateSupported\",\r\n + \ \"value\": \"False\"\r\n }\r\n ],\r\n \"osDiskImage\": + {\r\n \"operatingSystem\": \"Windows\",\r\n \"sizeInGb\": 30\r\n + \ },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"CentralUSEUAP\",\r\n + \ \"name\": \"20348.707.220505\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:14 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/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73998 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:14 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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vmss000005VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "centraluseuap", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vmss000005Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vmss000005LBPublicIP", + "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "vmss000005LB", + "location": "centraluseuap", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": + ["Microsoft.Network/virtualNetworks/vmss000005VNET", "Microsoft.Network/publicIpAddresses/vmss000005LBPublicIP"], + "properties": {"backendAddressPools": [{"name": "vmss000005LBBEPool"}], "frontendIPConfigurations": + [{"name": "loadBalancerFrontEnd", "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/publicIPAddresses/vmss000005LBPublicIP"}}}], + "inboundNatPools": [{"name": "vmss000005LBNatPool", "properties": {"frontendIPConfiguration": + {"id": "[concat(resourceId(''Microsoft.Network/loadBalancers'', ''vmss000005LB''), + ''/frontendIPConfigurations/'', ''loadBalancerFrontEnd'')]"}, "protocol": "tcp", + "frontendPortRangeStart": "50000", "frontendPortRangeEnd": "50119", "backendPort": + 3389}}]}}, {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "vmss000005", + "location": "centraluseuap", "tags": {}, "apiVersion": "2021-11-01", "dependsOn": + ["Microsoft.Network/virtualNetworks/vmss000005VNET", "Microsoft.Network/loadBalancers/vmss000005LB"], + "properties": {"overprovision": true, "upgradePolicy": {"mode": "manual", "rollingUpgradePolicy": + {}}, "singlePlacementGroup": null, "virtualMachineProfile": {"storageProfile": + {"osDisk": {"createOption": "FromImage", "caching": "ReadWrite", "managedDisk": + {"storageAccountType": null, "securityProfile": {"securityEncryptionType": "DiskWithVMGuestState", + "diskEncryptionSet": {"id": null}}}}, "imageReference": {"publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", "sku": "2022-datacenter-smalldisk-g2", "version": + "latest"}}, "osProfile": {"computerNamePrefix": "vmss21216", "adminUsername": + "testuser", "adminPassword": "[parameters(''adminPassword'')]"}, "securityProfile": + {"securityType": "ConfidentialVM", "uefiSettings": {"secureBootEnabled": true, + "vTpmEnabled": true}}, "networkProfile": {"networkInterfaceConfigurations": + [{"name": "vmss21216Nic", "properties": {"ipConfigurations": [{"name": "vmss21216IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks/vmss000005VNET/subnets/vmss000005Subnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB/backendAddressPools/vmss000005LBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB/inboundNatPools/vmss000005LBNatPool"}]}}], + "primary": "true"}}]}}, "orchestrationMode": "Uniform"}, "sku": {"name": "Standard_DC2as_v5", + "capacity": 2}}], "outputs": {"VMSS": {"type": "object", "value": "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', + ''vmss000005''),providers(''Microsoft.Compute'', ''virtualMachineScaleSets'').apiVersions[0])]"}}}, + "parameters": {"adminPassword": {"value": "testPassword0"}}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4155' + Content-Type: + - application/json + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/vmss_deploy_FE0KNoeeLtgP1l4TH1ugEfojY7uX6bBy","name":"vmss_deploy_FE0KNoeeLtgP1l4TH1ugEfojY7uX6bBy","type":"Microsoft.Resources/deployments","properties":{"templateHash":"10490482595719570506","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-31T03:39:33.5602749Z","duration":"PT0.0001477S","correlationId":"b606c372-ac0b-44cf-bf48-2ac87f201fe4","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"loadBalancers","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks/vmss000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/publicIPAddresses/vmss000005LBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vmss000005LBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vmss000005LB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks/vmss000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vmss000005LB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss000005","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vmss000005"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/vmss_deploy_FE0KNoeeLtgP1l4TH1ugEfojY7uX6bBy/operationStatuses/08585476385151176122?api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '2624' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476385151176122?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:40:07 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476385151176122?api-version=2021-04-01 + response: + body: + string: '{"status":"Failed","error":{"code":"DeploymentFailed","message":"At + least one resource deployment operation failed. Please list deployment operations + for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": + {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Virtual Machines + Scale Sets do not allow setting managedDisk.securityProfile.diskEncryptionSet.\"\r\n }\r\n}"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '458' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:40: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 +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 eaa189f3bcc..c1eaf8e0992 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 @@ -6222,9 +6222,8 @@ def test_disk_encryption_set_double_encryption(self, resource_group): self.cmd('vmss create -g {rg} -n {vmss1} --image centos --os-disk-encryption-set {des1} --admin-username azureuser --admin-password testPassword0 --authentication-type password') - @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_type', location='CentralUSEUAP') - @KeyVaultPreparer(name_prefix='vault4-', name_len=20, key='vault', location='westcentralus', additional_params='--enable-purge-protection') - def test_os_disk_security_encryption_type(self, resource_group): + @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption', location='CentralUSEUAP') + def test_os_disk_security_encryption(self, resource_group): self.kwargs.update({ 'vault': self.create_random_name(prefix='vault', length=15), 'key': self.create_random_name(prefix='key', length=15), @@ -6240,7 +6239,7 @@ def test_os_disk_security_encryption_type(self, resource_group): 'kid': kid }) - self.cmd('disk-encryption-set create -g {rg} -n {des1} --key-url {kid} --source-vault {vault} --encryption-type EncryptionAtRestWithPlatformAndCustomerKeys') + self.cmd('disk-encryption-set create -g {rg} -n {des1} --key-url {kid} --source-vault {vault} --encryption-type ConfidentialVmEncryptedWithCustomerKey') 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'] @@ -6256,15 +6255,51 @@ def test_os_disk_security_encryption_type(self, resource_group): 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('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-encryption-set {des1}') + self.cmd('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-securevm-disk-encryption-set {des1}') self.cmd('vm show -n {vm1} -g {rg}', checks=[ self.check('storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), - self.check('storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des1_id}') + self.check('storageProfile.osDisk.managedDisk.securityProfile.diskEncryptionSet.id', '{des1_id}') ]) - # self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-encryption-set {des1}') - # self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ - # self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState') - # ]) + + # @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_vmss', location='CentralUSEUAP') + # def test_os_disk_security_encryption_vmss(self, resource_group): + # self.kwargs.update({ + # 'vault': self.create_random_name(prefix='vault', length=15), + # 'key': self.create_random_name(prefix='key', length=15), + # 'des1': self.create_random_name(prefix='des1', length=15), + # 'vmss1': self.create_random_name(prefix='vmss', length=15) + # }) + # + # 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') + # 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}') + # + # self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState') + # self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ + # self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), + # # self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des}') + # ]) class DiskAccessTest(ScenarioTest): From b39c375dbc825283fabaea87ac4e553dc106565f Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Thu, 16 Jun 2022 20:53:16 +0800 Subject: [PATCH 04/14] validator --- .../azure/cli/command_modules/vm/_params.py | 6 +- .../command_modules/vm/_template_builder.py | 34 +++++++--- .../cli/command_modules/vm/_validators.py | 20 +++++- .../azure/cli/command_modules/vm/custom.py | 24 +++---- .../command_modules/vm/linter_exclusions.yml | 4 +- .../test_os_disk_security_encryption.yaml | 64 +++++++++---------- .../vm/tests/latest/test_vm_commands.py | 2 +- 7 files changed, 94 insertions(+), 60 deletions(-) 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 2f69dcb60b1..d110fd2f928 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -129,7 +129,7 @@ def load_arguments(self, _): enable_vtpm_type = CLIArgumentType(arg_type=get_three_state_flag(), min_api='2020-12-01', help='Enable vTPM.') enable_secure_boot_type = CLIArgumentType(arg_type=get_three_state_flag(), min_api='2020-12-01', help='Enable secure boot.') - security_type = CLIArgumentType(arg_type=get_enum_type(['TrustedLaunch', 'ConfidentialVM']), min_api='2020-12-01', help='Specify the SecurityType of the virtual machine.') + security_type = CLIArgumentType(arg_type=get_enum_type(self.get_models('SecurityTypes')), min_api='2020-12-01', help='Specify the security type of the virtual machine.') # region MixedScopes for scope in ['vm', 'disk', 'snapshot', 'image', 'sig']: @@ -947,8 +947,8 @@ def load_arguments(self, _): c.argument('edge_zone', edge_zone_type) c.argument('accept_term', action='store_true', help="Accept the license agreement and privacy statement.") c.argument('disable_integrity_monitoring', action='store_true', min_api='2020-12-01', help='Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.') - c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the EncryptionType of the os managed disk.') - c.argument('os_disk_securevm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.') + c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the encryption type of the os managed disk.') + c.argument('os_disk_secure_vm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource Id or name for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.') with self.argument_context(scope, arg_group='Authentication') as c: c.argument('generate_ssh_keys', action='store_true', help='Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory') diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index 641e4bd6135..13d890440a9 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -303,7 +303,7 @@ def build_vm_resource( # pylint: disable=too-many-locals, too-many-statements, enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, os_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, - os_disk_security_encryption_type=None, os_disk_securevm_disk_encryption_set=None): + os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None): os_caching = disk_info['os'].get('caching') @@ -494,11 +494,15 @@ def _build_storage_profile(): 'id': os_disk_encryption_set, } if os_disk_security_encryption_type is not None: + if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + os_disk_secure_vm_disk_encryption_set is not None: + raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) @@ -506,7 +510,7 @@ def _build_storage_profile(): 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) @@ -514,7 +518,7 @@ def _build_storage_profile(): 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) @@ -522,7 +526,7 @@ def _build_storage_profile(): 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) @@ -902,7 +906,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, v_cpus_per_core=None, os_disk_security_encryption_type=None, - os_disk_securevm_disk_encryption_set=None): + os_disk_secure_vm_disk_encryption_set=None): # Build IP configuration ip_configuration = {} @@ -980,11 +984,15 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: + if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + os_disk_secure_vm_disk_encryption_set is not None: + raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) @@ -1020,11 +1028,15 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: + if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + os_disk_secure_vm_disk_encryption_set is not None: + raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) @@ -1043,11 +1055,15 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: + if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + os_disk_secure_vm_disk_encryption_set is not None: + raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, 'diskEncryptionSet': { - 'id': os_disk_securevm_disk_encryption_set + 'id': os_disk_secure_vm_disk_encryption_set } } }) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index acfa29b859a..28cd5dc8a10 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -577,7 +577,25 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): if getattr(namespace, 'security_type', None): if namespace.security_type.lower() == 'confidentialvm' and namespace.os_disk_security_encryption_type is None: raise ArgumentUsageError('usage error: --os-disk-security-encryption-type is required' - ' when os is specified as ConfidentialVM') + ' when --security-type is specified as ConfidentialVM') + confidential_vm_sku = ['standard_dc2as_v5', 'standard_dc4as_v5', 'standard_dc8as_v5', 'standard_dc16as_v5', + 'standard_dc32as_v5', 'standard_dc48as_v5', 'standard_dc64as_v5', 'standard_dc96as_v5', + 'standard_dc2ads_v5', 'standard_dc4ads_v5', 'standard_dc8ads_v5', 'standard_dc16ads_v5', + 'standard_dc32ads_v5', 'standard_dc48ads_v5', 'standard_dc64ads_v5', + 'standard_dc96ads_v5', 'standard_ec2as_v5', 'standard_ec4as_v5', 'standard_ec8as_v5', + 'standard_ec16as_v5', 'standard_ec32as_v5', 'standard_ec48as_v5', 'standard_ec64as_v5', + 'standard_ec96as_v5', 'standard_ec2ads_v5', 'standard_ec4ads_v5', 'standard_ec8ads_v5', + 'standard_ec16ads_v5', 'standard_ec32ads_v5', 'standard_ec48ads_v5', + 'standard_ec64ads_v5', 'standard_ec96ads_v5', + ] + if namespace.security_type.lower() == 'confidentialvm'and getattr(namespace, 'size', None): + if namespace.size.lower() not in confidential_vm_sku: + raise ArgumentUsageError('usage error: when --security-type is set to ConfidentialVM,' + ' the --size should be one of the following: {}'.format(confidential_vm_sku)) + if namespace.security_type.lower() == 'confidentialvm'and getattr(namespace, 'vm_sku', None): + if namespace.vm_sku.lower() not in confidential_vm_sku: + raise ArgumentUsageError('usage error: when --security-type is set to ConfidentialVM,' + ' the --vm-sku should be one of the following: {}'.format(confidential_vm_sku)) if not namespace.os_type: namespace.os_type = 'windows' if 'windows' in namespace.os_offer.lower() else 'linux' 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 374ae47582b..6adebe9ede3 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -797,7 +797,7 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ enable_vtpm=None, count=None, edge_zone=None, nic_delete_option=None, os_disk_delete_option=None, data_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, - os_disk_security_encryption_type=None, os_disk_securevm_disk_encryption_set=None): + os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -827,11 +827,11 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ os_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_encryption_set) - if os_disk_securevm_disk_encryption_set is not None and\ - not is_valid_resource_id(os_disk_securevm_disk_encryption_set): - os_disk_securevm_disk_encryption_set = resource_id( + if os_disk_secure_vm_disk_encryption_set is not None and\ + not is_valid_resource_id(os_disk_secure_vm_disk_encryption_set): + os_disk_secure_vm_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, - namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_securevm_disk_encryption_set) + namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_secure_vm_disk_encryption_set) if data_disk_encryption_sets is None: data_disk_encryption_sets = [] @@ -1023,7 +1023,7 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ user_data=user_data, capacity_reservation_group=capacity_reservation_group, enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type, - os_disk_securevm_disk_encryption_set=os_disk_securevm_disk_encryption_set) + os_disk_secure_vm_disk_encryption_set=os_disk_secure_vm_disk_encryption_set) vm_resource['dependsOn'] = vm_dependencies @@ -2892,7 +2892,7 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, - os_disk_security_encryption_type=None, os_disk_securevm_disk_encryption_set=None): + os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -2930,11 +2930,11 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, os_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_encryption_set) - if os_disk_securevm_disk_encryption_set is not None and\ - not is_valid_resource_id(os_disk_securevm_disk_encryption_set): - os_disk_securevm_disk_encryption_set = resource_id( + if os_disk_secure_vm_disk_encryption_set is not None and\ + not is_valid_resource_id(os_disk_secure_vm_disk_encryption_set): + os_disk_secure_vm_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, - namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_securevm_disk_encryption_set) + namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_secure_vm_disk_encryption_set) if data_disk_encryption_sets is None: data_disk_encryption_sets = [] @@ -3174,7 +3174,7 @@ def _get_public_ip_address_allocation(value, sku): enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, automatic_repairs_action=automatic_repairs_action, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type, - os_disk_securevm_disk_encryption_set=os_disk_securevm_disk_encryption_set) + os_disk_secure_vm_disk_encryption_set=os_disk_secure_vm_disk_encryption_set) vmss_resource['dependsOn'] = vmss_dependencies diff --git a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml index 82fff933c9a..67d2a7cbfa0 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml +++ b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml @@ -33,7 +33,7 @@ vmss create: os_disk_security_encryption_type: rule_exclusions: - option_length_too_long - os_disk_securevm_disk_encryption_set: + os_disk_secure_vm_disk_encryption_set: rule_exclusions: - option_length_too_long vmss update: @@ -72,7 +72,7 @@ vm create: os_disk_security_encryption_type: rule_exclusions: - option_length_too_long - os_disk_securevm_disk_encryption_set: + os_disk_secure_vm_disk_encryption_set: rule_exclusions: - option_length_too_long vm unmanaged-disk attach: diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml index b1fa3fd3379..c81c4f05154 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml @@ -413,7 +413,7 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 response: body: string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": @@ -521,7 +521,7 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 response: body: string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n @@ -578,7 +578,7 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 response: body: string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n @@ -942,7 +942,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -985,7 +985,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1037,7 +1037,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1100,7 +1100,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1182,7 +1182,7 @@ interactions: - application/json ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT @@ -1227,7 +1227,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1270,7 +1270,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1313,7 +1313,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1356,7 +1356,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1399,7 +1399,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1442,7 +1442,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1485,7 +1485,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1528,7 +1528,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1571,7 +1571,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1614,7 +1614,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1657,7 +1657,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1700,7 +1700,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1743,7 +1743,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1786,7 +1786,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1829,7 +1829,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1872,7 +1872,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1915,7 +1915,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -1958,7 +1958,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -2001,7 +2001,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -2044,7 +2044,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -2087,7 +2087,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -2130,7 +2130,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -2225,7 +2225,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET @@ -2297,7 +2297,7 @@ interactions: - keep-alive ParameterSetName: - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm - --enable-secure-boot --os-disk-security-encryption-type --os-disk-securevm-disk-encryption-set + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET 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 6d231c46059..5d4de6d7cab 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 @@ -6338,7 +6338,7 @@ def test_os_disk_security_encryption(self, resource_group): 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('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-securevm-disk-encryption-set {des1}') + self.cmd('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') self.cmd('vm show -n {vm1} -g {rg}', checks=[ self.check('storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), self.check('storageProfile.osDisk.managedDisk.securityProfile.diskEncryptionSet.id', '{des1_id}') From d7c49ea0472b59f36bcacc1879ac7988d7846cdd Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Thu, 16 Jun 2022 21:17:38 +0800 Subject: [PATCH 05/14] style --- .../azure/cli/command_modules/vm/_template_builder.py | 10 +++++----- .../azure/cli/command_modules/vm/_validators.py | 4 ++-- .../test_os_disk_security_encryption_vmss.yaml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index 13d890440a9..fdd6fd0e4ba 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -494,9 +494,9 @@ def _build_storage_profile(): 'id': os_disk_encryption_set, } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ 'securityProfile': { @@ -986,7 +986,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro if os_disk_security_encryption_type is not None: if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { @@ -1030,7 +1030,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro if os_disk_security_encryption_type is not None: if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { @@ -1057,7 +1057,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro if os_disk_security_encryption_type is not None: if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-securevm-disk-encryption-set can only be passed in ' + raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' 'when --os-disk-security-encryption-type is DiskwithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index 28cd5dc8a10..91856e5a6c6 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -588,11 +588,11 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): 'standard_ec16ads_v5', 'standard_ec32ads_v5', 'standard_ec48ads_v5', 'standard_ec64ads_v5', 'standard_ec96ads_v5', ] - if namespace.security_type.lower() == 'confidentialvm'and getattr(namespace, 'size', None): + if namespace.security_type.lower() == 'confidentialvm' and getattr(namespace, 'size', None): if namespace.size.lower() not in confidential_vm_sku: raise ArgumentUsageError('usage error: when --security-type is set to ConfidentialVM,' ' the --size should be one of the following: {}'.format(confidential_vm_sku)) - if namespace.security_type.lower() == 'confidentialvm'and getattr(namespace, 'vm_sku', None): + if namespace.security_type.lower() == 'confidentialvm' and getattr(namespace, 'vm_sku', None): if namespace.vm_sku.lower() not in confidential_vm_sku: raise ArgumentUsageError('usage error: when --security-type is set to ConfidentialVM,' ' the --vm-sku should be one of the following: {}'.format(confidential_vm_sku)) diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml index 0c6ed963df8..e81fbbc2300 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml @@ -413,7 +413,7 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 response: body: string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": @@ -521,7 +521,7 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 response: body: string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n @@ -578,7 +578,7 @@ interactions: User-Agent: - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 response: body: string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n From cd7d1bcfeb5f2450e3f300d1cadebf7b6096ab2f Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Fri, 17 Jun 2022 16:35:05 +0800 Subject: [PATCH 06/14] Update _template_builder.py --- .../cli/command_modules/vm/_template_builder.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index fdd6fd0e4ba..6dff429bb0f 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -497,7 +497,7 @@ def _build_storage_profile(): if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskwithVMGuestState') + 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, @@ -984,10 +984,10 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskwithVMGuestState') + 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, @@ -1028,10 +1028,10 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskwithVMGuestState') + 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, @@ -1055,10 +1055,10 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskwithVMGuestState' and \ + if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ os_disk_secure_vm_disk_encryption_set is not None: raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskwithVMGuestState') + 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, From cdeed4e85ea85ed9b7b5af72338620e70cd22cef Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Fri, 17 Jun 2022 16:37:47 +0800 Subject: [PATCH 07/14] test --- .../vm/tests/latest/test_vm_commands.py | 99 +++++++++++-------- 1 file changed, 60 insertions(+), 39 deletions(-) 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 5d4de6d7cab..546f0ff6e3e 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 @@ -6344,45 +6344,66 @@ def test_os_disk_security_encryption(self, resource_group): self.check('storageProfile.osDisk.managedDisk.securityProfile.diskEncryptionSet.id', '{des1_id}') ]) - # @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_vmss', location='CentralUSEUAP') - # def test_os_disk_security_encryption_vmss(self, resource_group): - # self.kwargs.update({ - # 'vault': self.create_random_name(prefix='vault', length=15), - # 'key': self.create_random_name(prefix='key', length=15), - # 'des1': self.create_random_name(prefix='des1', length=15), - # 'vmss1': self.create_random_name(prefix='vmss', length=15) - # }) - # - # 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') - # 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}') - # - # self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState') - # self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ - # self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), - # # self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des}') - # ]) + @unittest.skip('"Virtual Machines Scale Sets do not allow setting managedDisk.securityProfile.diskEncryptionSet.') + @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_vmss', location='CentralUSEUAP') + def test_os_disk_security_encryption_vmss(self, resource_group): + self.kwargs.update({ + 'vault': self.create_random_name(prefix='vault', length=15), + 'key': self.create_random_name(prefix='key', length=15), + 'des1': self.create_random_name(prefix='des1', length=15), + 'vm': self.create_random_name(prefix='vm', length=15), + 'vmss1': self.create_random_name(prefix='vmss', length=15), + 'gallery': self.create_random_name(prefix='gallery', length=15), + 'image': self.create_random_name(prefix='image', length=15), + 'captured': self.create_random_name(prefix='capture', length=15), + 'version': '1.1.1', + 'subId': '0b1f6471-1bf0-4dda-aec3-cb9272f09590', + 'tenantId': '2f4a9838-26b7-47ee-be60-ccc1fdec5953', + }) + + 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') + 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}') + + self.cmd('sig create -g {rg} --gallery-name {gallery} --permissions groups ') + self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {image} --os-type windows -p publisher1 -f offer1 -s sku1 --hyper-v-generation V2') + self.cmd('vm create -g {rg} -n {vm} --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --data-disk-sizes-gb 10 --admin-username clitest1 --admin-password Password001! --generate-ssh-key --nsg-rule None') + self.cmd('vm deallocate -g {rg} -n {vm}') + self.cmd('vm generalize -g {rg} -n {vm}') + + self.cmd('image create -g {rg} -n {captured} --source {vm} --hyper-v-generation V2') + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image} --gallery-image-version {version} --managed-image {captured} --replica-count 1') + self.kwargs['unique_name'] = self.cmd('sig show --gallery-name {gallery} --resource-group {rg} --select Permissions').get_output_in_json()['identifier']['uniqueName'] + + self.cmd('sig share add --gallery-name {gallery} -g {rg} --subscription-ids {subId} --tenant-ids {tenantId}') + + self.kwargs['shared_gallery_image_version'] = self.cmd('sig image-version show-shared --gallery-image-definition {image} --gallery-unique-name {unique_name} --location CentralUSEUAP --gallery-image-version {version}').get_output_in_json()[ + 'uniqueId'] + + self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image {shared_gallery_image_version} --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') + self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ + self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), + self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des}') + ]) class DiskAccessTest(ScenarioTest): From be4e69bc81bb924b705b27749bb30270ca00ef0f Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Thu, 23 Jun 2022 15:45:39 +0800 Subject: [PATCH 08/14] validators --- .../command_modules/vm/_template_builder.py | 70 ++++++++++--------- .../cli/command_modules/vm/_validators.py | 13 +++- 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index 6dff429bb0f..dd1f600f911 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -494,42 +494,47 @@ def _build_storage_profile(): 'id': os_disk_encryption_set, } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ - os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, - 'diskEncryptionSet': { - 'id': os_disk_secure_vm_disk_encryption_set - } } }) storage_profiles['ManagedCustomImage']['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, - 'diskEncryptionSet': { - 'id': os_disk_secure_vm_disk_encryption_set - } } }) storage_profiles['SharedGalleryImage']['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, - 'diskEncryptionSet': { - 'id': os_disk_secure_vm_disk_encryption_set - } } }) storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_profiles['ManagedPirImage']['osDisk']['managedDisk']['securityProfile'].update({ 'diskEncryptionSet': { 'id': os_disk_secure_vm_disk_encryption_set } - } - }) + }) + storage_profiles['ManagedCustomImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) + storage_profiles['SharedGalleryImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) + storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) profile = storage_profiles[storage_profile.name] if os_disk_size_gb: @@ -984,18 +989,17 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ - os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { - 'securityEncryptionType': os_disk_security_encryption_type, + 'securityEncryptionType': os_disk_security_encryption_type + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_properties['osDisk']['managedDisk']['securityProfile'].update({ 'diskEncryptionSet': { 'id': os_disk_secure_vm_disk_encryption_set } - } - }) + }) if disk_info and disk_info['os'].get('diffDiskSettings'): storage_properties['osDisk']['diffDiskSettings'] = disk_info['os']['diffDiskSettings'] @@ -1028,18 +1032,17 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ - os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_properties['osDisk']['managedDisk']['securityProfile'].update({ 'diskEncryptionSet': { 'id': os_disk_secure_vm_disk_encryption_set } - } - }) + }) if storage_profile == StorageProfile.CommunityGalleryImage: storage_properties['osDisk'] = { 'caching': os_caching, @@ -1055,18 +1058,17 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'id': os_disk_encryption_set } if os_disk_security_encryption_type is not None: - if os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ - os_disk_secure_vm_disk_encryption_set is not None: - raise InvalidArgumentValueError('The --os-disk-secure-vm-disk-encryption-set can only be passed in ' - 'when --os-disk-security-encryption-type is DiskWithVMGuestState') storage_properties['osDisk']['managedDisk'].update({ 'securityProfile': { 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_properties['osDisk']['managedDisk']['securityProfile'].update({ 'diskEncryptionSet': { 'id': os_disk_secure_vm_disk_encryption_set } - } - }) + }) if disk_info: data_disks = [v for k, v in disk_info.items() if k != 'os'] diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index 91856e5a6c6..ad32f97d035 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -575,9 +575,16 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): namespace.os_type = community_gallery_image_info.os_type if getattr(namespace, 'security_type', None): - if namespace.security_type.lower() == 'confidentialvm' and namespace.os_disk_security_encryption_type is None: - raise ArgumentUsageError('usage error: --os-disk-security-encryption-type is required' - ' when --security-type is specified as ConfidentialVM') + if getattr(namespace, 'os_disk_security_encryption_type', None): + if namespace.security_type.lower() == 'confidentialvm' and \ + namespace.os_disk_security_encryption_type is None: + raise ArgumentUsageError('usage error: --os-disk-security-encryption-type is required' + ' when --security-type is specified as ConfidentialVM') + if namespace.os_disk_security_encryption_type != 'DiskWithVMGuestState' and \ + namespace.os_disk_secure_vm_disk_encryption_set is not None: + raise ArgumentUsageError( + 'usage error: The --os-disk-secure-vm-disk-encryption-set can only be passed in ' + 'when --os-disk-security-encryption-type is DiskWithVMGuestState') confidential_vm_sku = ['standard_dc2as_v5', 'standard_dc4as_v5', 'standard_dc8as_v5', 'standard_dc16as_v5', 'standard_dc32as_v5', 'standard_dc48as_v5', 'standard_dc64as_v5', 'standard_dc96as_v5', 'standard_dc2ads_v5', 'standard_dc4ads_v5', 'standard_dc8ads_v5', 'standard_dc16ads_v5', From 87821ad43550af3d756ff75ccbdf8265dcae58e1 Mon Sep 17 00:00:00 2001 From: Xing Zhou Date: Wed, 29 Jun 2022 20:18:53 +0800 Subject: [PATCH 09/14] Update src/azure-cli/azure/cli/command_modules/vm/_params.py --- src/azure-cli/azure/cli/command_modules/vm/_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a14e9c8d93b..6e144b77d7a 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -950,7 +950,7 @@ def load_arguments(self, _): c.argument('edge_zone', edge_zone_type) c.argument('accept_term', action='store_true', help="Accept the license agreement and privacy statement.") c.argument('disable_integrity_monitoring', action='store_true', min_api='2020-12-01', help='Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.') - c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the encryption type of the os managed disk.') + c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the encryption type of the OS managed disk.') c.argument('os_disk_secure_vm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource Id or name for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.') with self.argument_context(scope, arg_group='Authentication') as c: From 13fe18aa364f0e241a7e1f2e7dd47cc6c4a39769 Mon Sep 17 00:00:00 2001 From: Xing Zhou Date: Wed, 29 Jun 2022 20:21:10 +0800 Subject: [PATCH 10/14] Update src/azure-cli/azure/cli/command_modules/vm/_params.py --- src/azure-cli/azure/cli/command_modules/vm/_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6e144b77d7a..4097381e31c 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -951,7 +951,7 @@ def load_arguments(self, _): c.argument('accept_term', action='store_true', help="Accept the license agreement and privacy statement.") c.argument('disable_integrity_monitoring', action='store_true', min_api='2020-12-01', help='Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.') c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the encryption type of the OS managed disk.') - c.argument('os_disk_secure_vm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource Id or name for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.') + c.argument('os_disk_secure_vm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource ID or name for the managed disk that is used for customer managed key encrypted Confidential VM OS disk and VM guest blob.') with self.argument_context(scope, arg_group='Authentication') as c: c.argument('generate_ssh_keys', action='store_true', help='Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory') From b2589c511e237c44359e86cb4e1bf8926e9d1ffc Mon Sep 17 00:00:00 2001 From: zhoxing-ms Date: Wed, 29 Jun 2022 22:45:59 +0800 Subject: [PATCH 11/14] Support encryption type --- .../azure/cli/command_modules/vm/_params.py | 4 +- .../command_modules/vm/_template_builder.py | 84 +- .../cli/command_modules/vm/_validators.py | 10 + .../azure/cli/command_modules/vm/custom.py | 23 +- .../command_modules/vm/linter_exclusions.yml | 12 + .../test_os_disk_security_encryption.yaml | 2424 +++++++++++++++++ ...test_os_disk_security_encryption_vmss.yaml | 1309 +++++++++ .../vm/tests/latest/test_vm_commands.py | 101 + 8 files changed, 3960 insertions(+), 7 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml create mode 100644 src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml 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 6919410806d..9fc6b08d8e6 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -129,7 +129,7 @@ def load_arguments(self, _): enable_vtpm_type = CLIArgumentType(arg_type=get_three_state_flag(), min_api='2020-12-01', help='Enable vTPM.') enable_secure_boot_type = CLIArgumentType(arg_type=get_three_state_flag(), min_api='2020-12-01', help='Enable secure boot.') - security_type = CLIArgumentType(arg_type=get_enum_type(['TrustedLaunch']), min_api='2020-12-01', help='Specify if the VM is Trusted Launch enabled. See https://docs.microsoft.com/azure/virtual-machines/trusted-launch.') + security_type = CLIArgumentType(arg_type=get_enum_type(self.get_models('SecurityTypes')), min_api='2020-12-01', help='Specify the security type of the virtual machine.') gallery_image_name_type = CLIArgumentType(options_list=['--gallery-image-definition', '-i'], help='The name of the community gallery image definition from which the image versions are to be listed.', id_part='child_name_2') gallery_image_name_version_type = CLIArgumentType(options_list=['--gallery-image-version', '-e'], help='The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..', id_part='child_name_3') public_gallery_name_type = CLIArgumentType(help='The public name of community gallery.', id_part='child_name_1') @@ -954,6 +954,8 @@ def load_arguments(self, _): c.argument('edge_zone', edge_zone_type) c.argument('accept_term', action='store_true', help="Accept the license agreement and privacy statement.") c.argument('disable_integrity_monitoring', action='store_true', min_api='2020-12-01', help='Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.') + c.argument('os_disk_security_encryption_type', arg_type=get_enum_type(self.get_models('SecurityEncryptionTypes')), min_api='2021-11-01', help='Specify the encryption type of the OS managed disk.') + c.argument('os_disk_secure_vm_disk_encryption_set', min_api='2021-11-01', help='Specify the customer managed disk encryption set resource ID or name for the managed disk that is used for customer managed key encrypted Confidential VM OS disk and VM guest blob.') with self.argument_context(scope, arg_group='Authentication') as c: c.argument('generate_ssh_keys', action='store_true', help='Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory') diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index b18847cac25..dd1f600f911 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -302,7 +302,8 @@ def build_vm_resource( # pylint: disable=too-many-locals, too-many-statements, encryption_at_host=None, dedicated_host_group=None, enable_auto_update=None, patch_mode=None, enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, os_disk_delete_option=None, user_data=None, - capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None): + capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, + os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None): os_caching = disk_info['os'].get('caching') @@ -492,6 +493,48 @@ def _build_storage_profile(): storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set, } + if os_disk_security_encryption_type is not None: + storage_profiles['ManagedPirImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + storage_profiles['ManagedCustomImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + storage_profiles['SharedGalleryImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_profiles['ManagedPirImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) + storage_profiles['ManagedCustomImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) + storage_profiles['SharedGalleryImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) + storage_profiles['CommunityGalleryImage']['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) profile = storage_profiles[storage_profile.name] if os_disk_size_gb: @@ -867,7 +910,8 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, - v_cpus_per_core=None): + v_cpus_per_core=None, os_disk_security_encryption_type=None, + os_disk_secure_vm_disk_encryption_set=None): # Build IP configuration ip_configuration = {} @@ -944,6 +988,18 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro storage_properties['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set } + if os_disk_security_encryption_type is not None: + storage_properties['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_properties['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) if disk_info and disk_info['os'].get('diffDiskSettings'): storage_properties['osDisk']['diffDiskSettings'] = disk_info['os']['diffDiskSettings'] @@ -975,6 +1031,18 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro storage_properties['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set } + if os_disk_security_encryption_type is not None: + storage_properties['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_properties['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) if storage_profile == StorageProfile.CommunityGalleryImage: storage_properties['osDisk'] = { 'caching': os_caching, @@ -989,6 +1057,18 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro storage_properties['osDisk']['managedDisk']['diskEncryptionSet'] = { 'id': os_disk_encryption_set } + if os_disk_security_encryption_type is not None: + storage_properties['osDisk']['managedDisk'].update({ + 'securityProfile': { + 'securityEncryptionType': os_disk_security_encryption_type, + } + }) + if os_disk_secure_vm_disk_encryption_set is not None: + storage_properties['osDisk']['managedDisk']['securityProfile'].update({ + 'diskEncryptionSet': { + 'id': os_disk_secure_vm_disk_encryption_set + } + }) if disk_info: data_disks = [v for k, v in disk_info.items() if k != 'os'] diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index c3abb9c0ba1..4d1fdff7e2b 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -574,6 +574,16 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): "the os type of this image should be {}".format(community_gallery_image_info.os_type)) namespace.os_type = community_gallery_image_info.os_type + if namespace.security_type == 'ConfidentialVM' and not namespace.os_disk_security_encryption_type: + raise RequiredArgumentMissingError('usage error: "--os-disk-security-encryption-type" is required ' + 'when "--security-type" is specified as "ConfidentialVM"') + + if namespace.os_disk_secure_vm_disk_encryption_set and \ + namespace.os_disk_security_encryption_type != 'DiskWithVMGuestState': + raise ArgumentUsageError( + 'usage error: The "--os-disk-secure-vm-disk-encryption-set" can only be passed in ' + 'when "--os-disk-security-encryption-type" is "DiskWithVMGuestState"') + if not namespace.os_type: namespace.os_type = 'windows' if 'windows' in namespace.os_offer.lower() else 'linux' 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 57a874c7ee3..8911df66948 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -807,7 +807,8 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, nic_delete_option=None, os_disk_delete_option=None, data_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, - v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False): + v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, + os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -837,6 +838,11 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ os_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_encryption_set) + if os_disk_secure_vm_disk_encryption_set is not None and\ + not is_valid_resource_id(os_disk_secure_vm_disk_encryption_set): + os_disk_secure_vm_disk_encryption_set = resource_id( + subscription=subscription_id, resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_secure_vm_disk_encryption_set) if data_disk_encryption_sets is None: data_disk_encryption_sets = [] @@ -1026,7 +1032,9 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_ platform_fault_domain=platform_fault_domain, security_type=security_type, enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, count=count, edge_zone=edge_zone, os_disk_delete_option=os_disk_delete_option, user_data=user_data, capacity_reservation_group=capacity_reservation_group, - enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core) + enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core, + os_disk_security_encryption_type=os_disk_security_encryption_type, + os_disk_secure_vm_disk_encryption_set=os_disk_secure_vm_disk_encryption_set) vm_resource['dependsOn'] = vm_dependencies @@ -2897,7 +2905,8 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, user_data=None, network_api_version=None, enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, - v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False): + v_cpus_available=None, v_cpus_per_core=None, accept_term=None, disable_integrity_monitoring=False, + os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string @@ -2935,6 +2944,11 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, os_disk_encryption_set = resource_id( subscription=subscription_id, resource_group=resource_group_name, namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_encryption_set) + if os_disk_secure_vm_disk_encryption_set is not None and\ + not is_valid_resource_id(os_disk_secure_vm_disk_encryption_set): + os_disk_secure_vm_disk_encryption_set = resource_id( + subscription=subscription_id, resource_group=resource_group_name, + namespace='Microsoft.Compute', type='diskEncryptionSets', name=os_disk_secure_vm_disk_encryption_set) if data_disk_encryption_sets is None: data_disk_encryption_sets = [] @@ -3173,7 +3187,8 @@ def _get_public_ip_address_allocation(value, sku): patch_mode=patch_mode, enable_agent=enable_agent, security_type=security_type, enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, automatic_repairs_action=automatic_repairs_action, v_cpus_available=v_cpus_available, - v_cpus_per_core=v_cpus_per_core) + v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type, + os_disk_secure_vm_disk_encryption_set=os_disk_secure_vm_disk_encryption_set) vmss_resource['dependsOn'] = vmss_dependencies diff --git a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml index 4d273b9f51e..651368d9c40 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml +++ b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml @@ -35,6 +35,12 @@ vmss create: disable_integrity_monitoring: rule_exclusions: - option_length_too_long + os_disk_security_encryption_type: + rule_exclusions: + - option_length_too_long + os_disk_secure_vm_disk_encryption_set: + rule_exclusions: + - option_length_too_long vmss update: parameters: enable_cross_zone_upgrade: @@ -73,6 +79,12 @@ vm create: disable_integrity_monitoring: rule_exclusions: - option_length_too_long + os_disk_security_encryption_type: + rule_exclusions: + - option_length_too_long + os_disk_secure_vm_disk_encryption_set: + rule_exclusions: + - option_length_too_long vm unmanaged-disk attach: parameters: size_gb: diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml new file mode 100644 index 00000000000..c81c4f05154 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml @@ -0,0 +1,2424 @@ +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: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001","name":"cli_test_os_disk_security_encryption000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T02:49:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:49:37 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 create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/vault000002'' + under resource group ''cli_test_os_disk_security_encryption000001'' was not + found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '251' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:49:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Jingsong + Zhang (WICRESOFT NORTH AMERICA LTD)","givenName":null,"jobTitle":null,"mail":"v-jingszhang@microsoft.com","mobilePhone":null,"officeLocation":null,"preferredLanguage":null,"surname":null,"userPrincipalName":"v-jingszhang_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","id":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2"}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Tue, 31 May 2022 02:49:39 GMT + odata-version: + - '4.0' + request-id: + - e6d4298f-a24a-49f8-9552-362c48211298 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00002335"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}], "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "enablePurgeProtection": true, "networkAcls": {"bypass": "AzureServices", + "defaultAction": "Allow"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '526' + Content-Type: + - application/json + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:49:44.891Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1041' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:49: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.5.396.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:49:44.891Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1037' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:50: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.5.396.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:50:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 + response: + body: + string: '{"key":{"kid":"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5l3kkcECDwTq16qf2IKrBy2mBU4jXysL-eAPaoSJEA3VO68-i5geboi8mDKGnSM5l3NilwBzvnG0A-VRh9iFVSC3LG-kSFxTgFzJ1-3hMwMGdPXefbJDmrwuaDgi-JshsJCwgHh7wlG-WgDZ1F3dEMJeG9X3hR3zLd0bFdDpWKfFYCU8ifR4zW8LUvsCOb1ICr-sXZVr4hP5m6FfiBz_9OpchPdQloWIQdhlr3spF-WyczbSrbmzX3Ms89932DjVwWBKKDav4ly5ThbNUbUl1Igx4y0ESOMHfWwzdr2HmIwxF-w_B2b2AASMROJ_6Fn-JzfanLa7MfPM1E2S_QgCpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1653965420,"updated":1653965420,"recoveryLevel":"Recoverable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '666' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:50:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001","name":"cli_test_os_disk_security_encryption000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T02:49:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:50:21 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": "centraluseuap", "identity": {"type": "SystemAssigned"}, "properties": + {"encryptionType": "ConfidentialVmEncryptedWithCustomerKey", "activeKey": {"sourceVault": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002"}, + "keyUrl": "https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '441' + Content-Type: + - application/json + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 + response: + body: + string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": + \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"activeKey\": {\r\n + \ \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Updating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/44841827-f85f-4c82-b0de-3ddbf721a25b?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '555' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:50:31 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/44841827-f85f-4c82-b0de-3ddbf721a25b?p=157f1a74-df5f-47b0-a815-476d8af3dce4&monitor=true&api-version=2021-04-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/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;296 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/44841827-f85f-4c82-b0de-3ddbf721a25b?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T02:50:31.2973873+00:00\",\r\n \"endTime\": + \"2022-05-31T02:50:31.3754953+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\"name\":\"des1000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\"type\":\"Microsoft.Compute/diskEncryptionSets\",\"location\":\"centraluseuap\",\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"b43b6542-7642-409f-8b2a-27659e9b327e\",\"tenantId\":\"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"},\"properties\":{\"activeKey\":{\"sourceVault\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"},\"keyUrl\":\"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"},\"encryptionType\":\"ConfidentialVmEncryptedWithCustomerKey\",\"provisioningState\":\"Succeeded\"}}\r\n + \ },\r\n \"name\": \"44841827-f85f-4c82-b0de-3ddbf721a25b\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1029' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51: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;49998,Microsoft.Compute/GetOperation30Min;399995 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 + response: + body: + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"b43b6542-7642-409f-8b2a-27659e9b327e\",\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_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '929' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:01 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;14993,Microsoft.Compute/LowCostGet30Min;119971 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 + response: + body: + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"b43b6542-7642-409f-8b2a-27659e9b327e\",\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_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/76efa76109434ed4bd02d51c23d7e2fb\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '929' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51: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;14992,Microsoft.Compute/LowCostGet30Min;119970 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + 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/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv","name":"bez-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"key":"value"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgekqy3wfedqj4dnzziqlanw3ibaisofsz6xlh5bsdcnxyjexa3urmhyincvvzcb7bu/providers/Microsoft.KeyVault/vaults/sfrp-cli-kv-yfivvc4dy56i","name":"sfrp-cli-kv-yfivvc4dy56i","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgprt2pgwgmw7uu6esq34k76gdppoc2gnajxvzxn5iy4baxvgcm3iwl6dq4usgbnbc2/providers/Microsoft.KeyVault/vaults/clitestrgprt2pgwgmw7u","name":"clitestrgprt2pgwgmw7u","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zb_test/providers/Microsoft.KeyVault/vaults/zblab7701","name":"zblab7701","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"hidden-DevTestLabs-LabUId":"301109ba-f89e-4ba1-8c0c-be6e91e47840","CreatedBy":"DevTestLabs"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '2117' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:03 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 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:49:44.891Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1037' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:05 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.5.396.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": + "b43b6542-7642-409f-8b2a-27659e9b327e", "permissions": {"keys": ["wrapKey", + "get", "unwrapKey"]}}], "vaultUri": "https://vault000002.vault.azure.net/", + "enabledForDeployment": false, "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "enablePurgeProtection": true, "provisioningState": "Succeeded", "publicNetworkAccess": + "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '783' + Content-Type: + - application/json + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T02:49:44.891Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T02:51:05.855Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"b43b6542-7642-409f-8b2a-27659e9b327e","permissions":{"keys":["wrapKey","get","unwrapKey"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1192' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:05 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.5.396.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'b43b6542-7642-409f-8b2a-27659e9b327e') + response: + body: + string: '{"error":{"code":"Authorization_RequestDenied","message":"Insufficient + privileges to complete the operation.","innerError":{"date":"2022-05-31T02:51:23","request-id":"b303c891-eb02-4595-87d3-dd45ea4342c5","client-request-id":"b303c891-eb02-4595-87d3-dd45ea4342c5"}}}' + headers: + cache-control: + - no-cache + content-length: + - '266' + content-type: + - application/json + date: + - Tue, 31 May 2022 02:51:22 GMT + request-id: + - b303c891-eb02-4595-87d3-dd45ea4342c5 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00000BCF"}}' + x-ms-resource-unit: + - '1' + status: + code: 403 + message: Forbidden +- 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002/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":"View + all resources, but does not allow you to make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2021-11-11T20:13:47.8628684Z","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: + - '627' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:23 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + 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": "b43b6542-7642-409f-8b2a-27659e9b327e"}}' + 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"b43b6542-7642-409f-8b2a-27659e9b327e","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002","condition":null,"conditionVersion":null,"createdOn":"2022-05-31T02:51:23.9328173Z","updatedOn":"2022-05-31T02:51:24.4171494Z","createdBy":null,"updatedBy":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.KeyVault/vaults/vault000002/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: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:28 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001","name":"cli_test_os_disk_security_encryption000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T02:49:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:29 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: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions?$top=1&$orderby=name%20desc&api-version=2022-03-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"CentralUSEUAP\",\r\n \"name\": \"20348.707.220505\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n + \ }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '335' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:32 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/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43997 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions/20348.707.220505?api-version=2022-03-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \"architecture\": + \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \"replicaCount\": 10,\r\n + \ \"disallowed\": {\r\n \"vmDiskType\": \"Unmanaged\"\r\n },\r\n + \ \"automaticOSUpgradeProperties\": {\r\n \"automaticOSUpgradeSupported\": + false\r\n },\r\n \"imageDeprecationStatus\": {\r\n \"imageState\": + \"Active\"\r\n },\r\n \"features\": [\r\n {\r\n \"name\": + \"SecurityType\",\r\n \"value\": \"TrustedLaunchAndConfidentialVmSupported\"\r\n + \ },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\",\r\n + \ \"value\": \"True\"\r\n },\r\n {\r\n \"name\": \"DiskControllerTypes\",\r\n + \ \"value\": \"SCSI\"\r\n },\r\n {\r\n \"name\": \"IsHibernateSupported\",\r\n + \ \"value\": \"False\"\r\n }\r\n ],\r\n \"osDiskImage\": + {\r\n \"operatingSystem\": \"Windows\",\r\n \"sizeInGb\": 30\r\n + \ },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"CentralUSEUAP\",\r\n + \ \"name\": \"20348.707.220505\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:34 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/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73998 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:34 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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vm1000005VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "centraluseuap", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vm1000005Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": + "Microsoft.Network/networkSecurityGroups", "name": "vm1000005NSG", "apiVersion": + "2015-06-15", "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": + {"securityRules": [{"name": "rdp", "properties": {"protocol": "Tcp", "sourcePortRange": + "*", "destinationPortRange": "3389", "sourceAddressPrefix": "*", "destinationAddressPrefix": + "*", "access": "Allow", "priority": 1000, "direction": "Inbound"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vm1000005PublicIP", + "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", + "name": "vm1000005VMNic", "location": "centraluseuap", "tags": {}, "dependsOn": + ["Microsoft.Network/virtualNetworks/vm1000005VNET", "Microsoft.Network/networkSecurityGroups/vm1000005NSG", + "Microsoft.Network/publicIpAddresses/vm1000005PublicIP"], "properties": {"ipConfigurations": + [{"name": "ipconfigvm1000005", "properties": {"privateIPAllocationMethod": "Dynamic", + "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET/subnets/vm1000005Subnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG"}}}, + {"apiVersion": "2022-03-01", "type": "Microsoft.Compute/virtualMachines", "name": + "vm1000005", "location": "centraluseuap", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1000005VMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DC2as_v5"}, "networkProfile": + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic", + "properties": {"deleteOption": null}}]}, "storageProfile": {"osDisk": {"createOption": + "fromImage", "name": null, "caching": "ReadWrite", "managedDisk": {"storageAccountType": + null, "securityProfile": {"securityEncryptionType": "DiskWithVMGuestState", + "diskEncryptionSet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004"}}}}, + "imageReference": {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", + "sku": "2022-datacenter-smalldisk-g2", "version": "latest"}}, "osProfile": {"computerName": + "vm1000005", "adminUsername": "testuser", "adminPassword": "[parameters(''adminPassword'')]"}, + "securityProfile": {"securityType": "ConfidentialVM", "uefiSettings": {"secureBootEnabled": + true, "vTpmEnabled": true}}}}], "outputs": {}}, "parameters": {"adminPassword": + {"value": "testPassword0"}}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + Content-Length: + - '3770' + Content-Type: + - application/json + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","name":"vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1228307168060353538","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-31T02:51:42.7602615Z","duration":"PT0.0000887S","correlationId":"1e47d864-c01e-40a8-8490-1dbecf257e5d","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000005NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000005PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000005"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4/operationStatuses/08585476413858650536?api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '2657' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:51:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:52:14 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:52:45 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:53:15 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:53:46 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:54:16 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:54:47 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:55:17 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:55: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:56:19 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:56:49 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:57:21 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:57: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: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:58:22 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:58: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:59:22 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 02:59:53 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:00:24 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:00: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:26 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476413858650536?api-version=2021-04-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:56 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Resources/deployments/vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","name":"vm_deploy_Uz1T8VFsJx06yrfRFyVi80AK3gbctKP4","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1228307168060353538","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2022-05-31T03:01:39.4691002Z","duration":"PT9M56.7089274S","correlationId":"1e47d864-c01e-40a8-8490-1dbecf257e5d","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"networkSecurityGroups","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"networkInterfaces","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1000005NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1000005PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1000005VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1000005"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '3589' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:56 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: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005?$expand=instanceView&api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"59c2baec-1215-4270-883d-3fc0854105f7\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DC2as_v5\"\r\n + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": + \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\",\r\n + \ \"exactVersion\": \"20348.707.220505\"\r\n },\r\n \"osDisk\": + {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": + \"DiskWithVMGuestState\",\r\n \"diskEncryptionSet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\"\r\n + \ }\r\n },\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/disks/vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": + 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": + {\r\n \"computerName\": \"vm1000005\",\r\n \"adminUsername\": \"testuser\",\r\n + \ \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n + \ \"enableAutomaticUpdates\": true,\r\n \"patchSettings\": {\r\n + \ \"patchMode\": \"AutomaticByOS\",\r\n \"assessmentMode\": + \"ImageDefault\"\r\n },\r\n \"enableVMAgentPlatformUpdates\": + false\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"securityProfile\": + {\r\n \"uefiSettings\": {\r\n \"secureBootEnabled\": true,\r\n + \ \"vTpmEnabled\": true\r\n },\r\n \"securityType\": \"ConfidentialVM\"\r\n + \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"vmAgent\": + {\r\n \"vmAgentVersion\": \"Unknown\",\r\n \"statuses\": [\r\n + \ {\r\n \"code\": \"ProvisioningState/Unavailable\",\r\n + \ \"level\": \"Warning\",\r\n \"displayStatus\": \"Not + Ready\",\r\n \"message\": \"VM status blob is found but not yet + populated.\",\r\n \"time\": \"2022-05-31T03:01:58+00:00\"\r\n }\r\n + \ ]\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": + \"vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-31T03:01:10.1918892+00:00\"\r\n + \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": + \"V2\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-31T03:01:29.9419846+00:00\"\r\n + \ },\r\n {\r\n \"code\": \"PowerState/stopped\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM stopped\"\r\n + \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2022-05-31T02:52:13.7824634+00:00\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3866' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:57 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;3996,Microsoft.Compute/LowCostGet30Min;31969 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1000005VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic\",\r\n + \ \"etag\": \"W/\\\"9108ca81-3ea8-4c25-8c31-381f602e4733\\\"\",\r\n \"location\": + \"centraluseuap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"4e6dd1d3-15d9-4dc5-a4c3-3d483f34dc33\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1000005\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic/ipConfigurations/ipconfigvm1000005\",\r\n + \ \"etag\": \"W/\\\"9108ca81-3ea8-4c25-8c31-381f602e4733\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/virtualNetworks/vm1000005VNET/subnets/vm1000005Subnet\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": + [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": + \"uzefxcfo21uu5fyjjbckdsucec.cdmx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"60-45-BD-76-7E-C9\",\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkSecurityGroups/vm1000005NSG\"\r\n + \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2396' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:59 GMT + etag: + - W/"9108ca81-3ea8-4c25-8c31-381f602e4733" + 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-arm-service-request-id: + - 5472e652-7d7d-4c65-9ebd-9d036b6f1a44 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -n -g --size --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type --os-disk-secure-vm-disk-encryption-set + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1000005PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/publicIPAddresses/vm1000005PublicIP\",\r\n + \ \"etag\": \"W/\\\"d83def5d-a736-465b-826a-719e376f7fe7\\\"\",\r\n \"location\": + \"centraluseuap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"80ea5f41-0aea-4444-8552-6d6784c13e0f\",\r\n + \ \"ipAddress\": \"20.45.228.191\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n + \ \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic/ipConfigurations/ipconfigvm1000005\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '962' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:59 GMT + etag: + - W/"d83def5d-a736-465b-826a-719e376f7fe7" + 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-arm-service-request-id: + - cc566b3b-7f7c-4d42-ab96-a7fcfe5e2789 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005?api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/virtualMachines/vm1000005\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"59c2baec-1215-4270-883d-3fc0854105f7\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DC2as_v5\"\r\n + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": + \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\",\r\n + \ \"exactVersion\": \"20348.707.220505\"\r\n },\r\n \"osDisk\": + {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"securityProfile\": {\r\n \"securityEncryptionType\": + \"DiskWithVMGuestState\",\r\n \"diskEncryptionSet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\"\r\n + \ }\r\n },\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Compute/disks/vm1000005_OsDisk_1_c7d797bc7bfa41979bcbfe11e5506afe\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": + 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": + {\r\n \"computerName\": \"vm1000005\",\r\n \"adminUsername\": \"testuser\",\r\n + \ \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n + \ \"enableAutomaticUpdates\": true,\r\n \"patchSettings\": {\r\n + \ \"patchMode\": \"AutomaticByOS\",\r\n \"assessmentMode\": + \"ImageDefault\"\r\n },\r\n \"enableVMAgentPlatformUpdates\": + false\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"securityProfile\": + {\r\n \"uefiSettings\": {\r\n \"secureBootEnabled\": true,\r\n + \ \"vTpmEnabled\": true\r\n },\r\n \"securityType\": \"ConfidentialVM\"\r\n + \ },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption000001/providers/Microsoft.Network/networkInterfaces/vm1000005VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"timeCreated\": \"2022-05-31T02:52:13.7824634+00:00\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2654' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:01:59 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;3995,Microsoft.Compute/LowCostGet30Min;31968 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml new file mode 100644 index 00000000000..e81fbbc2300 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption_vmss.yaml @@ -0,0 +1,1309 @@ +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: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001","name":"cli_test_os_disk_security_encryption_vmss000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T03:37:09Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37:12 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 create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/vault000002'' + under resource group ''cli_test_os_disk_security_encryption_vmss000001'' was + not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '256' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Jingsong + Zhang (WICRESOFT NORTH AMERICA LTD)","givenName":null,"jobTitle":null,"mail":"v-jingszhang@microsoft.com","mobilePhone":null,"officeLocation":null,"preferredLanguage":null,"surname":null,"userPrincipalName":"v-jingszhang_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","id":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2"}' + headers: + cache-control: + - no-cache + content-length: + - '435' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Tue, 31 May 2022 03:37:17 GMT + odata-version: + - '4.0' + request-id: + - 7aac055f-3b6a-40ab-908f-699fe50a883d + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF000023FC"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}], "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "enablePurgeProtection": true, "networkAcls": {"bypass": "AzureServices", + "defaultAction": "Allow"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '526' + Content-Type: + - application/json + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:37:25.064Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1046' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37:28 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.5.396.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-purge-protection --enable-soft-delete + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:37:25.064Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1042' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:37: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.5.396.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 + User-Agent: + - azsdk-python-keyvault-keys/4.5.1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vault000002.vault.azure.net/keys/key000003/create?api-version=7.3 + response: + body: + string: '{"key":{"kid":"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"4qmWsb1Lf26VHJBGfOawiuTRFafdTei-ESkbX4XijwTjKnF8iBEc_QXpJkuFXs6-lLQL4tAo8f177Sya8y6JZPpmnO6ubf3LiWqkQLTcPAdMPYJ_87tY7GxFU88IX7H5dyuZgHLZXNbK82BgmQWhBD1Ku2mpQ2ijncil_HbbF95WatZ0xjyZjfSrhrenlxe21kV6hJ7thaNM1YmWCnk0i5kiSo85teD9W6EBGjB4sOXcYuZvEhAJtqx7UFsmpnvuNtjLdgSMv0j94J47h6tKtfAZ755HTuLt81Eqg1HxWBLmQrOqGHW0mYozwBuWasfUl9WUquMAmu_qcjlZlZwhEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1653968282,"updated":1653968282,"recoveryLevel":"Recoverable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '666' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.20;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - centraluseuap + x-ms-keyvault-service-version: + - 1.9.422.1 + 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 --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001","name":"cli_test_os_disk_security_encryption_vmss000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T03:37:09Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:03 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": "centraluseuap", "identity": {"type": "SystemAssigned"}, "properties": + {"encryptionType": "ConfidentialVmEncryptedWithCustomerKey", "activeKey": {"sourceVault": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002"}, + "keyUrl": "https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + Content-Length: + - '446' + Content-Type: + - application/json + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 + response: + body: + string: "{\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"type\": + \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"activeKey\": {\r\n + \ \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Updating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/c3ba53b7-5f92-47b0-9303-2444f2e7b64d?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '560' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:09 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/c3ba53b7-5f92-47b0-9303-2444f2e7b64d?p=157f1a74-df5f-47b0-a815-476d8af3dce4&monitor=true&api-version=2021-04-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/HighCostDiskEncryptionSet3Min;99,Microsoft.Compute/HighCostDiskEncryptionSet30Min;297 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/c3ba53b7-5f92-47b0-9303-2444f2e7b64d?p=157f1a74-df5f-47b0-a815-476d8af3dce4&api-version=2021-04-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T03:38:09.7295866+00:00\",\r\n \"endTime\": + \"2022-05-31T03:38:09.7920801+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\"name\":\"des1000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\"type\":\"Microsoft.Compute/diskEncryptionSets\",\"location\":\"centraluseuap\",\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"aad0a3b2-6971-4426-a8fb-6752582785da\",\"tenantId\":\"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"},\"properties\":{\"activeKey\":{\"sourceVault\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"},\"keyUrl\":\"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"},\"encryptionType\":\"ConfidentialVmEncryptedWithCustomerKey\",\"provisioningState\":\"Succeeded\"}}\r\n + \ },\r\n \"name\": \"c3ba53b7-5f92-47b0-9303-2444f2e7b64d\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1039' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:41 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;49998,Microsoft.Compute/GetOperation30Min;399995 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set create + Connection: + - keep-alive + ParameterSetName: + - -g -n --key-url --source-vault --encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 + response: + body: + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"aad0a3b2-6971-4426-a8fb-6752582785da\",\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_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '939' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:41 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;14990,Microsoft.Compute/LowCostGet30Min;119928 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-encryption-set show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004?api-version=2022-03-02 + response: + body: + string: "{\r\n \"name\": \"des1000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/diskEncryptionSets/des1000004\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"aad0a3b2-6971-4426-a8fb-6752582785da\",\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_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002\"\r\n + \ },\r\n \"keyUrl\": \"https://vault000002.vault.azure.net/keys/key000003/b2e54a8863cc41d7b00c9a23bcc3b71a\"\r\n + \ },\r\n \"encryptionType\": \"ConfidentialVmEncryptedWithCustomerKey\",\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '939' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:42 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;14989,Microsoft.Compute/LowCostGet30Min;119927 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + 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/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv","name":"bez-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"key":"value"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgekqy3wfedqj4dnzziqlanw3ibaisofsz6xlh5bsdcnxyjexa3urmhyincvvzcb7bu/providers/Microsoft.KeyVault/vaults/sfrp-cli-kv-yfivvc4dy56i","name":"sfrp-cli-kv-yfivvc4dy56i","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rghbul6h5kf5snf4tyu4ij2d6xiyi6o43qjpe73fna5wzn234gq3l3q5zs52r2borgk/providers/Microsoft.KeyVault/vaults/sfrp-cli-kv-e4zb3mviyonr","name":"sfrp-cli-kv-e4zb3mviyonr","type":"Microsoft.KeyVault/vaults","location":"eastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zb_test/providers/Microsoft.KeyVault/vaults/zblab7701","name":"zblab7701","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"hidden-DevTestLabs-LabUId":"301109ba-f89e-4ba1-8c0c-be6e91e47840","CreatedBy":"DevTestLabs"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '2130' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:43 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 + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:37:25.064Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1042' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38:44 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.5.396.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "centraluseuap", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d44a2991-98c6-47c3-b59b-2b30d72cfcc2", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": + "aad0a3b2-6971-4426-a8fb-6752582785da", "permissions": {"keys": ["unwrapKey", + "get", "wrapKey"]}}], "vaultUri": "https://vault000002.vault.azure.net/", "enabledForDeployment": + false, "enableSoftDelete": true, "softDeleteRetentionInDays": 90, "enablePurgeProtection": + true, "provisioningState": "Succeeded", "publicNetworkAccess": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '783' + Content-Type: + - application/json + ParameterSetName: + - -n --object-id --key-permissions + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-keyvault/9.3.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002?api-version=2021-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","name":"vault000002","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-05-31T03:37:25.064Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-05-31T03:38:45.835Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"aad0a3b2-6971-4426-a8fb-6752582785da","permissions":{"keys":["unwrapKey","get","wrapKey"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enablePurgeProtection":true,"vaultUri":"https://vault000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1197' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:38: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.5.396.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.8.10 (Windows-10-10.0.22000-SP0) AZURECLI/2.37.0 + method: GET + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'aad0a3b2-6971-4426-a8fb-6752582785da') + response: + body: + string: '{"error":{"code":"Authorization_RequestDenied","message":"Insufficient + privileges to complete the operation.","innerError":{"date":"2022-05-31T03:39:02","request-id":"aa051a92-1768-4cbd-b0a6-5481cfb540b3","client-request-id":"aa051a92-1768-4cbd-b0a6-5481cfb540b3"}}}' + headers: + cache-control: + - no-cache + content-length: + - '266' + content-type: + - application/json + date: + - Tue, 31 May 2022 03:39:02 GMT + request-id: + - aa051a92-1768-4cbd-b0a6-5481cfb540b3 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF000023FC"}}' + x-ms-resource-unit: + - '1' + status: + code: 403 + message: Forbidden +- 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002/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":"View + all resources, but does not allow you to make any changes.","assignableScopes":["/"],"permissions":[{"actions":["*/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2021-11-11T20:13:47.8628684Z","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: + - '627' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:03 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + 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": "aad0a3b2-6971-4426-a8fb-6752582785da"}}' + 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.8.10 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.37.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"aad0a3b2-6971-4426-a8fb-6752582785da","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002","condition":null,"conditionVersion":null,"createdOn":"2022-05-31T03:39:03.5851900Z","updatedOn":"2022-05-31T03:39:04.0696177Z","createdBy":null,"updatedBy":"d44a2991-98c6-47c3-b59b-2b30d72cfcc2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.KeyVault/vaults/vault000002/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: + - '1045' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:09 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001","name":"cli_test_os_disk_security_encryption_vmss000001","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T03:37:09Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:09 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: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions?$top=1&$orderby=name%20desc&api-version=2022-03-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"CentralUSEUAP\",\r\n \"name\": \"20348.707.220505\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n + \ }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '335' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:11 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/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43996 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2022-datacenter-smalldisk-g2/versions/20348.707.220505?api-version=2022-03-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \"architecture\": + \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \"replicaCount\": 10,\r\n + \ \"disallowed\": {\r\n \"vmDiskType\": \"Unmanaged\"\r\n },\r\n + \ \"automaticOSUpgradeProperties\": {\r\n \"automaticOSUpgradeSupported\": + false\r\n },\r\n \"imageDeprecationStatus\": {\r\n \"imageState\": + \"Active\"\r\n },\r\n \"features\": [\r\n {\r\n \"name\": + \"SecurityType\",\r\n \"value\": \"TrustedLaunchAndConfidentialVmSupported\"\r\n + \ },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\",\r\n + \ \"value\": \"True\"\r\n },\r\n {\r\n \"name\": \"DiskControllerTypes\",\r\n + \ \"value\": \"SCSI\"\r\n },\r\n {\r\n \"name\": \"IsHibernateSupported\",\r\n + \ \"value\": \"False\"\r\n }\r\n ],\r\n \"osDiskImage\": + {\r\n \"operatingSystem\": \"Windows\",\r\n \"sizeInGb\": 30\r\n + \ },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"CentralUSEUAP\",\r\n + \ \"name\": \"20348.707.220505\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/CentralUSEUAP/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-smalldisk-g2/Versions/20348.707.220505\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:14 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/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73998 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:14 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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vmss000005VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "centraluseuap", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vmss000005Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vmss000005LBPublicIP", + "location": "centraluseuap", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "vmss000005LB", + "location": "centraluseuap", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": + ["Microsoft.Network/virtualNetworks/vmss000005VNET", "Microsoft.Network/publicIpAddresses/vmss000005LBPublicIP"], + "properties": {"backendAddressPools": [{"name": "vmss000005LBBEPool"}], "frontendIPConfigurations": + [{"name": "loadBalancerFrontEnd", "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/publicIPAddresses/vmss000005LBPublicIP"}}}], + "inboundNatPools": [{"name": "vmss000005LBNatPool", "properties": {"frontendIPConfiguration": + {"id": "[concat(resourceId(''Microsoft.Network/loadBalancers'', ''vmss000005LB''), + ''/frontendIPConfigurations/'', ''loadBalancerFrontEnd'')]"}, "protocol": "tcp", + "frontendPortRangeStart": "50000", "frontendPortRangeEnd": "50119", "backendPort": + 3389}}]}}, {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "vmss000005", + "location": "centraluseuap", "tags": {}, "apiVersion": "2021-11-01", "dependsOn": + ["Microsoft.Network/virtualNetworks/vmss000005VNET", "Microsoft.Network/loadBalancers/vmss000005LB"], + "properties": {"overprovision": true, "upgradePolicy": {"mode": "manual", "rollingUpgradePolicy": + {}}, "singlePlacementGroup": null, "virtualMachineProfile": {"storageProfile": + {"osDisk": {"createOption": "FromImage", "caching": "ReadWrite", "managedDisk": + {"storageAccountType": null, "securityProfile": {"securityEncryptionType": "DiskWithVMGuestState", + "diskEncryptionSet": {"id": null}}}}, "imageReference": {"publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", "sku": "2022-datacenter-smalldisk-g2", "version": + "latest"}}, "osProfile": {"computerNamePrefix": "vmss21216", "adminUsername": + "testuser", "adminPassword": "[parameters(''adminPassword'')]"}, "securityProfile": + {"securityType": "ConfidentialVM", "uefiSettings": {"secureBootEnabled": true, + "vTpmEnabled": true}}, "networkProfile": {"networkInterfaceConfigurations": + [{"name": "vmss21216Nic", "properties": {"ipConfigurations": [{"name": "vmss21216IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks/vmss000005VNET/subnets/vmss000005Subnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB/backendAddressPools/vmss000005LBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB/inboundNatPools/vmss000005LBNatPool"}]}}], + "primary": "true"}}]}}, "orchestrationMode": "Uniform"}, "sku": {"name": "Standard_DC2as_v5", + "capacity": 2}}], "outputs": {"VMSS": {"type": "object", "value": "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', + ''vmss000005''),providers(''Microsoft.Compute'', ''virtualMachineScaleSets'').apiVersions[0])]"}}}, + "parameters": {"adminPassword": {"value": "testPassword0"}}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4155' + Content-Type: + - application/json + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/vmss_deploy_FE0KNoeeLtgP1l4TH1ugEfojY7uX6bBy","name":"vmss_deploy_FE0KNoeeLtgP1l4TH1ugEfojY7uX6bBy","type":"Microsoft.Resources/deployments","properties":{"templateHash":"10490482595719570506","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-31T03:39:33.5602749Z","duration":"PT0.0001477S","correlationId":"b606c372-ac0b-44cf-bf48-2ac87f201fe4","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["centraluseuap"]},{"resourceType":"publicIPAddresses","locations":["centraluseuap"]},{"resourceType":"loadBalancers","locations":["centraluseuap"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["centraluseuap"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks/vmss000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/publicIPAddresses/vmss000005LBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vmss000005LBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vmss000005LB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/virtualNetworks/vmss000005VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss000005VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Network/loadBalancers/vmss000005LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vmss000005LB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss000005","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vmss000005"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/vmss_deploy_FE0KNoeeLtgP1l4TH1ugEfojY7uX6bBy/operationStatuses/08585476385151176122?api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '2624' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:39:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476385151176122?api-version=2021-04-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:40:07 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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -n -g --vm-sku --security-type --image --admin-username --admin-password --enable-vtpm + --enable-secure-boot --os-disk-security-encryption-type + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_os_disk_security_encryption_vmss000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476385151176122?api-version=2021-04-01 + response: + body: + string: '{"status":"Failed","error":{"code":"DeploymentFailed","message":"At + least one resource deployment operation failed. Please list deployment operations + for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": + {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Virtual Machines + Scale Sets do not allow setting managedDisk.securityProfile.diskEncryptionSet.\"\r\n }\r\n}"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '458' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 03:40: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 +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 4c5c5e527c8..5536f68c6f1 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 @@ -6993,6 +6993,107 @@ def test_confidential_disk_encryption_set(self, resource_group): ]) + @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption', location='CentralUSEUAP') + def test_os_disk_security_encryption(self, resource_group): + self.kwargs.update({ + 'vault': self.create_random_name(prefix='vault', length=15), + 'key': self.create_random_name(prefix='key', length=15), + 'des1': self.create_random_name(prefix='des1', length=15), + 'vm1': self.create_random_name(prefix='vm1', length=15), + 'vmss1': self.create_random_name(prefix='vmss', length=15) + }) + + 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') + 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}') + + self.cmd('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') + self.cmd('vm show -n {vm1} -g {rg}', checks=[ + self.check('storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), + self.check('storageProfile.osDisk.managedDisk.securityProfile.diskEncryptionSet.id', '{des1_id}') + ]) + + @unittest.skip('"Virtual Machines Scale Sets do not allow setting managedDisk.securityProfile.diskEncryptionSet.') + @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_vmss', location='CentralUSEUAP') + def test_os_disk_security_encryption_vmss(self, resource_group): + self.kwargs.update({ + 'vault': self.create_random_name(prefix='vault', length=15), + 'key': self.create_random_name(prefix='key', length=15), + 'des1': self.create_random_name(prefix='des1', length=15), + 'vm': self.create_random_name(prefix='vm', length=15), + 'vmss1': self.create_random_name(prefix='vmss', length=15), + 'gallery': self.create_random_name(prefix='gallery', length=15), + 'image': self.create_random_name(prefix='image', length=15), + 'captured': self.create_random_name(prefix='capture', length=15), + 'version': '1.1.1', + 'subId': '0b1f6471-1bf0-4dda-aec3-cb9272f09590', + 'tenantId': '2f4a9838-26b7-47ee-be60-ccc1fdec5953', + }) + + 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') + 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}') + + self.cmd('sig create -g {rg} --gallery-name {gallery} --permissions groups ') + self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {image} --os-type windows -p publisher1 -f offer1 -s sku1 --hyper-v-generation V2') + self.cmd('vm create -g {rg} -n {vm} --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --data-disk-sizes-gb 10 --admin-username clitest1 --admin-password Password001! --generate-ssh-key --nsg-rule None') + self.cmd('vm deallocate -g {rg} -n {vm}') + self.cmd('vm generalize -g {rg} -n {vm}') + + self.cmd('image create -g {rg} -n {captured} --source {vm} --hyper-v-generation V2') + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image} --gallery-image-version {version} --managed-image {captured} --replica-count 1') + self.kwargs['unique_name'] = self.cmd('sig show --gallery-name {gallery} --resource-group {rg} --select Permissions').get_output_in_json()['identifier']['uniqueName'] + + self.cmd('sig share add --gallery-name {gallery} -g {rg} --subscription-ids {subId} --tenant-ids {tenantId}') + + self.kwargs['shared_gallery_image_version'] = self.cmd('sig image-version show-shared --gallery-image-definition {image} --gallery-unique-name {unique_name} --location CentralUSEUAP --gallery-image-version {version}').get_output_in_json()[ + 'uniqueId'] + + self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image {shared_gallery_image_version} --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') + self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ + self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), + self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des}') + ]) + + class DiskAccessTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_disk_access_', location='centraluseuap') From 8fb9cef0fcbde441138837db4615a4c46b318c94 Mon Sep 17 00:00:00 2001 From: zhoxing-ms Date: Wed, 29 Jun 2022 23:06:51 +0800 Subject: [PATCH 12/14] Fix CI issues --- src/azure-cli/azure/cli/command_modules/vm/_validators.py | 7 ++++--- .../command_modules/vm/tests/latest/test_vm_commands.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index 4d1fdff7e2b..7c4621ca5f9 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -574,12 +574,13 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False): "the os type of this image should be {}".format(community_gallery_image_info.os_type)) namespace.os_type = community_gallery_image_info.os_type - if namespace.security_type == 'ConfidentialVM' and not namespace.os_disk_security_encryption_type: + if getattr(namespace, 'security_type', None) == 'ConfidentialVM' and \ + not getattr(namespace, 'os_disk_security_encryption_type', None): raise RequiredArgumentMissingError('usage error: "--os-disk-security-encryption-type" is required ' 'when "--security-type" is specified as "ConfidentialVM"') - if namespace.os_disk_secure_vm_disk_encryption_set and \ - namespace.os_disk_security_encryption_type != 'DiskWithVMGuestState': + if getattr(namespace, 'os_disk_secure_vm_disk_encryption_set', None) and \ + getattr(namespace, 'os_disk_security_encryption_type', None) != 'DiskWithVMGuestState': raise ArgumentUsageError( 'usage error: The "--os-disk-secure-vm-disk-encryption-set" can only be passed in ' 'when "--os-disk-security-encryption-type" is "DiskWithVMGuestState"') 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 5536f68c6f1..d32e317f229 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 @@ -7065,7 +7065,7 @@ def test_os_disk_security_encryption_vmss(self, resource_group): 'des1_id': des1_id }) - self.cmd('keyvault set-policy -n {vault} --object-id {des1_sp_id} --key-permissions wrapKey unwrapKey get') + self.cmd('keyvault set-policy -g {rg} -n {vault} --object-id {des1_sp_id} --key-permissions wrapKey unwrapKey get') time.sleep(15) From 071d2f7f299474a7edb19cf7675524fcc4f5d9c8 Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Thu, 30 Jun 2022 14:56:08 +0800 Subject: [PATCH 13/14] Update test_vm_commands.py --- .../vm/tests/latest/test_vm_commands.py | 101 ------------------ 1 file changed, 101 deletions(-) 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 526a0fbd900..d32e317f229 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 @@ -7094,107 +7094,6 @@ def test_os_disk_security_encryption_vmss(self, resource_group): ]) - @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption', location='CentralUSEUAP') - def test_os_disk_security_encryption(self, resource_group): - self.kwargs.update({ - 'vault': self.create_random_name(prefix='vault', length=15), - 'key': self.create_random_name(prefix='key', length=15), - 'des1': self.create_random_name(prefix='des1', length=15), - 'vm1': self.create_random_name(prefix='vm1', length=15), - 'vmss1': self.create_random_name(prefix='vmss', length=15) - }) - - 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') - 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}') - - self.cmd('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') - self.cmd('vm show -n {vm1} -g {rg}', checks=[ - self.check('storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), - self.check('storageProfile.osDisk.managedDisk.securityProfile.diskEncryptionSet.id', '{des1_id}') - ]) - - @unittest.skip('"Virtual Machines Scale Sets do not allow setting managedDisk.securityProfile.diskEncryptionSet.') - @ResourceGroupPreparer(name_prefix='cli_test_os_disk_security_encryption_vmss', location='CentralUSEUAP') - def test_os_disk_security_encryption_vmss(self, resource_group): - self.kwargs.update({ - 'vault': self.create_random_name(prefix='vault', length=15), - 'key': self.create_random_name(prefix='key', length=15), - 'des1': self.create_random_name(prefix='des1', length=15), - 'vm': self.create_random_name(prefix='vm', length=15), - 'vmss1': self.create_random_name(prefix='vmss', length=15), - 'gallery': self.create_random_name(prefix='gallery', length=15), - 'image': self.create_random_name(prefix='image', length=15), - 'captured': self.create_random_name(prefix='capture', length=15), - 'version': '1.1.1', - 'subId': '0b1f6471-1bf0-4dda-aec3-cb9272f09590', - 'tenantId': '2f4a9838-26b7-47ee-be60-ccc1fdec5953', - }) - - 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} --encryption-type ConfidentialVmEncryptedWithCustomerKey') - 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}') - - self.cmd('sig create -g {rg} --gallery-name {gallery} --permissions groups ') - self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {image} --os-type windows -p publisher1 -f offer1 -s sku1 --hyper-v-generation V2') - self.cmd('vm create -g {rg} -n {vm} --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --data-disk-sizes-gb 10 --admin-username clitest1 --admin-password Password001! --generate-ssh-key --nsg-rule None') - self.cmd('vm deallocate -g {rg} -n {vm}') - self.cmd('vm generalize -g {rg} -n {vm}') - - self.cmd('image create -g {rg} -n {captured} --source {vm} --hyper-v-generation V2') - self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image} --gallery-image-version {version} --managed-image {captured} --replica-count 1') - self.kwargs['unique_name'] = self.cmd('sig show --gallery-name {gallery} --resource-group {rg} --select Permissions').get_output_in_json()['identifier']['uniqueName'] - - self.cmd('sig share add --gallery-name {gallery} -g {rg} --subscription-ids {subId} --tenant-ids {tenantId}') - - self.kwargs['shared_gallery_image_version'] = self.cmd('sig image-version show-shared --gallery-image-definition {image} --gallery-unique-name {unique_name} --location CentralUSEUAP --gallery-image-version {version}').get_output_in_json()[ - 'uniqueId'] - - self.cmd('vmss create -n {vmss1} -g {rg} --vm-sku Standard_DC2as_v5 --security-type Confidentialvm --image {shared_gallery_image_version} --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') - self.cmd('vmss show -n {vmss1} -g {rg}', checks=[ - self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), - self.check('virtualMachineProfile.storageProfile.osDisk.managedDisk.diskEncryptionSet.id', '{des}') - ]) - - class DiskAccessTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_disk_access_', location='centraluseuap') From afd92c27600bd3ab98e1a8a226dbb3adbc839d0a Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Thu, 30 Jun 2022 16:58:22 +0800 Subject: [PATCH 14/14] lower case --- .../cli/command_modules/vm/tests/latest/test_vm_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d32e317f229..f8bd97788cf 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 @@ -7010,7 +7010,7 @@ def test_os_disk_security_encryption(self, resource_group): 'kid': kid }) - self.cmd('disk-encryption-set create -g {rg} -n {des1} --key-url {kid} --source-vault {vault} --encryption-type ConfidentialVmEncryptedWithCustomerKey') + self.cmd('disk-encryption-set create -g {rg} -n {des1} --key-url {kid} --source-vault {vault} --encryption-type confidentialvmencryptedwithcustomerkey') 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'] @@ -7026,7 +7026,7 @@ def test_os_disk_security_encryption(self, resource_group): 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('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type Confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type DiskwithVMGuestState --os-disk-secure-vm-disk-encryption-set {des1}') + self.cmd('vm create -n {vm1} -g {rg} --size Standard_DC2as_v5 --security-type confidentialvm --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest --admin-username testuser --admin-password testPassword0 --enable-vtpm true --enable-secure-boot true --os-disk-security-encryption-type diskwithvmgueststate --os-disk-secure-vm-disk-encryption-set {des1}') self.cmd('vm show -n {vm1} -g {rg}', checks=[ self.check('storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType', 'DiskWithVMGuestState'), self.check('storageProfile.osDisk.managedDisk.securityProfile.diskEncryptionSet.id', '{des1_id}')