From 550362dad269892363f6e9a659d2509209a5787d Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Fri, 27 May 2022 11:10:46 +0800 Subject: [PATCH 1/5] the function is roughly completed, notion: _help.py need to be checked, and style check is not proceeded --- .../azure/cli/command_modules/vm/_help.py | 12 ++++----- .../azure/cli/command_modules/vm/_params.py | 6 +++-- .../cli/command_modules/vm/_validators.py | 27 +++++++++++++++++++ .../azure/cli/command_modules/vm/_vm_utils.py | 25 +++++++++++++---- .../azure/cli/command_modules/vm/commands.py | 5 ++-- .../azure/cli/command_modules/vm/custom.py | 3 ++- 6 files changed, 62 insertions(+), 16 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index e79a85111ab..612142eefb4 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -786,7 +786,7 @@ az sig image-version create --resource-group MyResourceGroup \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --gallery-image-version 1.0.0 \\ - --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM + --virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM - name: Add a new image version from a managed image text: | az sig image-version create --resource-group MyResourceGroup \\ @@ -798,7 +798,7 @@ az sig image-version create --resource-group MyResourceGroup \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --gallery-image-version 1.0.0 \\ - --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/galleries/MyGallery/images/MyImageDefinition/versions/1.0.0 + --image-version /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/galleries/MyGallery/images/MyImageDefinition/versions/1.0.0 - name: Add a new image version from a managed disk text: | az sig image-version create --resource-group MyResourceGroup \\ @@ -866,7 +866,7 @@ az sig image-version create --resource-group MyResourceGroup \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --gallery-image-version 1.0.0 \\ - --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ + --virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ --target-regions westus=2=standard eastus \\ --target-region-encryption WestUSDiskEncryptionSet1,0,WestUSDiskEncryptionSet2 \\ EastUSDiskEncryptionSet1,0,EastUSDiskEncryptionSet2 @@ -875,21 +875,21 @@ az sig image-version create --resource-group MyResourceGroup \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --gallery-image-version 1.0.0 \\ - --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ + --virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ --no-wait - name: Add a new image version but remove it from consideration as latest version in its image definition text: | az sig image-version create --resource-group MyResourceGroup \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --gallery-image-version 1.0.0 \\ - --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ + --virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ --exclude-from-latest true - name: Add a new image version and set its end-of-life date. The image version can still be used to create a virtual machine after its end-of-life date. text: | az sig image-version create --resource-group MyResourceGroup \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --gallery-image-version 1.0.0 \\ - --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ + --virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\ --end-of-life-date 2024-08-02T00:00:00+00:00 """ 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..3892324c0a4 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -21,7 +21,7 @@ from azure.cli.command_modules.vm._validators import ( validate_nsg_name, validate_vm_nics, validate_vm_nic, validate_vmss_disk, validate_asg_names_or_ids, validate_keyvault, _validate_proximity_placement_group, - process_gallery_image_version_namespace, validate_vm_name_for_monitor_metrics) + validate_vm_name_for_monitor_metrics) from azure.cli.command_modules.vm._vm_utils import MSI_LOCAL_ID from azure.cli.command_modules.vm._image_builder import ScriptType @@ -1244,6 +1244,8 @@ def load_arguments(self, _): c.argument('data_vhds_storage_accounts', options_list=['--data-vhds-storage-accounts', '--data-vhds-sa'], nargs='+', help='Names or IDs (space-delimited) of storage accounts of source VHD URIs of data disks') c.argument('replication_mode', min_api='2021-07-01', arg_type=get_enum_type(ReplicationMode), help='Optional parameter which specifies the mode to be used for replication. This property is not updatable.') c.argument('target_region_cvm_encryption', nargs='+', min_api='2021-10-01', help='Space-separated list of customer managed key for Confidential VM encrypting the OS disk in the gallery artifact for each region. Format for each region: `,`. The valid values for os_cvm_encryption_type are EncryptedVMGuestStateOnlyWithPmk, EncryptedWithPmk, EncryptedWithCmk.') + c.argument('virtual_machine', help='Resource id of VM source') + c.argument('image_version', help='Resource id of gallery image version source') with self.argument_context('sig image-version list-shared') as c: c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name') @@ -1273,7 +1275,7 @@ def load_arguments(self, _): for scope in ['sig image-version create', 'sig image-version update']: with self.argument_context(scope) as c: - c.argument('target_regions', nargs='*', validator=process_gallery_image_version_namespace, + c.argument('target_regions', nargs='*', help='Space-separated list of regions and their replica counts. Use `[=][=]` to optionally set the replica count and/or storage account type for each region. ' 'If a replica count is not specified, the default replica count will be used. If a storage account type is not specified, the default storage account type will be used') c.argument('replica_count', help='The default number of replicas to be created per region. To set regional replication counts, use --target-regions', type=int) 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..530c3393205 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -1992,6 +1992,33 @@ def _disk_encryption_set_format(cmd, namespace, name): # endregion +def process_image_version_create_namespace(cmd, namespace): + """ + Validate the resource id from different sources + Only one of these arguments is allowed to provide + Check the format of resource id whether meets requirement + """ + process_gallery_image_version_namespace(cmd, namespace) + + input_num = (1 if namespace.managed_image else 0) + (1 if namespace.virtual_machine else 0) + \ + (1 if namespace.image_version else 0) + if input_num > 1: + raise ArgumentUsageError( + r'usage error: only one of --managed-image\--virtual-machine\--image-version argument is allowed to provide') + + if namespace.managed_image or input_num == 0: + return + + is_vm = True if namespace.virtual_machine else False + resource_id = namespace.virtual_machine if is_vm else namespace.image_version + + from ._vm_utils import is_valid_image_id + if not is_valid_image_id(resource_id, is_vm): + raise ArgumentUsageError('usage error: {} is an invalid {} id' + .format(resource_id, 'VM resource' if is_vm else 'gallery image version')) + namespace.managed_image = resource_id + + def process_vm_vmss_stop(cmd, namespace): # pylint: disable=unused-argument if "vmss" in cmd.name: logger.warning("About to power off the VMSS instances...\nThey will continue to be billed. " diff --git a/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py b/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py index ae83706feb6..d104c406878 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py @@ -19,7 +19,6 @@ logger = get_logger(__name__) - MSI_LOCAL_ID = '[system]' @@ -61,7 +60,7 @@ def _resolve_api_version(cli_ctx, provider_namespace, resource_type, parent_path return npv[0] if npv else rt[0].api_versions[0] raise CLIError( 'API version is required and could not be resolved for resource {}' - .format(resource_type)) + .format(resource_type)) def log_pprint_template(template): @@ -149,7 +148,8 @@ def normalize_disk_info(image_data_disks=None, if attach_data_disks: data_disk_delete_option = validate_delete_options(attach_data_disks, data_disk_delete_option) else: - if isinstance(data_disk_delete_option, list) and len(data_disk_delete_option) == 1 and len(data_disk_delete_option[0].split('=')) == 1: # pylint: disable=line-too-long + if isinstance(data_disk_delete_option, list) and len(data_disk_delete_option) == 1 and len( + data_disk_delete_option[0].split('=')) == 1: # pylint: disable=line-too-long data_disk_delete_option = data_disk_delete_option[0] info['os'] = {} # update os diff disk settings @@ -254,7 +254,6 @@ def normalize_disk_info(image_data_disks=None, def update_disk_caching(model, caching_settings): - def _update(model, lun, value): if isinstance(model, dict): luns = model.keys() if lun is None else [lun] @@ -289,7 +288,6 @@ def _update(model, lun, value): def update_write_accelerator_settings(model, write_accelerator_settings): - def _update(model, lun, value): if isinstance(model, dict): luns = model.keys() if lun is None else [lun] @@ -380,6 +378,23 @@ def is_shared_gallery_image_id(image_reference): return False +_VM_IMAGE_ID_PATTERN = r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.Compute/virtualMachines/.*$' +_IMAGE_VERSION_ID_PATTERN = r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.Compute/galleries/' \ + r'[^/]*/images/[^/]*/versions/.*$' + + +def is_valid_image_id(image_id, is_vm): + if not image_id: + return True + + image_id_pattern = re.compile(_VM_IMAGE_ID_PATTERN if is_vm else _IMAGE_VERSION_ID_PATTERN, re.IGNORECASE) + + if image_id_pattern.match(image_id): + return True + + return False + + def parse_shared_gallery_image_id(image_reference): from azure.cli.core.azclierror import InvalidArgumentValueError diff --git a/src/azure-cli/azure/cli/command_modules/vm/commands.py b/src/azure-cli/azure/cli/command_modules/vm/commands.py index ea4d3ddb133..771d06d95a5 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/commands.py @@ -29,7 +29,8 @@ process_vm_create_namespace, process_vmss_create_namespace, process_image_create_namespace, process_disk_or_snapshot_create_namespace, process_disk_encryption_namespace, process_assign_identity_namespace, process_remove_identity_namespace, process_vm_secret_format, process_vm_vmss_stop, validate_vmss_update_namespace, - process_vm_update_namespace, process_set_applications_namespace, process_vm_disk_attach_namespace) + process_vm_update_namespace, process_set_applications_namespace, process_vm_disk_attach_namespace, + process_image_version_create_namespace) from azure.cli.command_modules.vm._image_builder import ( process_image_template_create_namespace, process_img_tmpl_output_add_namespace, @@ -539,7 +540,7 @@ def load_command_table(self, _): g.command('delete', 'begin_delete') g.show_command('show', 'get', table_transformer='{Name:name, ResourceGroup:resourceGroup, ProvisioningState:provisioningState, TargetRegions: publishingProfile.targetRegions && join(`, `, publishingProfile.targetRegions[*].name), ReplicationState:replicationStatus.aggregatedState}') g.command('list', 'list_by_gallery_image') - g.custom_command('create', 'create_image_version', supports_no_wait=True) + g.custom_command('create', 'create_image_version', supports_no_wait=True, validator=process_image_version_create_namespace) g.generic_update_command('update', getter_name='get_image_version_to_update', setter_arg_name='gallery_image_version', setter_name='update_image_version', setter_type=compute_custom, command_type=compute_custom, supports_no_wait=True) g.wait_command('wait') 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..e6b9f1b5e81 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -4199,7 +4199,8 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n os_snapshot=None, data_snapshots=None, managed_image=None, data_snapshot_luns=None, target_region_encryption=None, os_vhd_uri=None, os_vhd_storage_account=None, data_vhds_uris=None, data_vhds_luns=None, data_vhds_storage_accounts=None, - replication_mode=None, target_region_cvm_encryption=None): + replication_mode=None, target_region_cvm_encryption=None, virtual_machine=None, + image_version=None): from msrestazure.tools import resource_id, is_valid_resource_id from azure.cli.core.commands.client_factory import get_subscription_id From 918bc2a86aeafbf7ea67e3c0de222c595967660d Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Fri, 27 May 2022 22:05:01 +0800 Subject: [PATCH 2/5] modify some details, note: not sure InvalidArgumentValueError error type whether correct --- .../cli/command_modules/vm/_validators.py | 24 ++++++++++++------- .../azure/cli/command_modules/vm/_vm_utils.py | 23 +++++++++++------- 2 files changed, 30 insertions(+), 17 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 530c3393205..3d45f4eeac7 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -16,7 +16,7 @@ from knack.util import CLIError from azure.cli.core.azclierror import (ValidationError, ArgumentUsageError, RequiredArgumentMissingError, - MutuallyExclusiveArgumentError, CLIInternalError) + MutuallyExclusiveArgumentError, CLIInternalError, InvalidArgumentValueError) from azure.cli.core.commands.validators import ( get_default_location_from_resource_group, validate_file_or_dict, validate_parameter_set, validate_tags) from azure.cli.core.util import (hash_string, DISALLOWED_USER_NAMES, get_default_admin_username) @@ -1993,30 +1993,36 @@ def _disk_encryption_set_format(cmd, namespace, name): def process_image_version_create_namespace(cmd, namespace): + process_gallery_image_version_namespace(cmd, namespace) + process_image_resource_id_namespace(cmd, namespace) +# endregion + + +def process_image_resource_id_namespace(cmd, namespace): """ Validate the resource id from different sources Only one of these arguments is allowed to provide Check the format of resource id whether meets requirement """ - process_gallery_image_version_namespace(cmd, namespace) - input_num = (1 if namespace.managed_image else 0) + (1 if namespace.virtual_machine else 0) + \ (1 if namespace.image_version else 0) if input_num > 1: - raise ArgumentUsageError( - r'usage error: only one of --managed-image\--virtual-machine\--image-version argument is allowed to provide') + raise MutuallyExclusiveArgumentError( + r'usage error: please specify only one of the --managed-image\--virtual-machine\--image-version arguments') if namespace.managed_image or input_num == 0: return + from ._vm_utils import is_valid_vm_resource_id, is_valid_image_version_id is_vm = True if namespace.virtual_machine else False + is_valid_function = is_valid_vm_resource_id if is_vm else is_valid_image_version_id resource_id = namespace.virtual_machine if is_vm else namespace.image_version - from ._vm_utils import is_valid_image_id - if not is_valid_image_id(resource_id, is_vm): - raise ArgumentUsageError('usage error: {} is an invalid {} id' - .format(resource_id, 'VM resource' if is_vm else 'gallery image version')) + if not is_valid_function(resource_id): + raise InvalidArgumentValueError('usage error: {} is an invalid {} id' + .format(resource_id, 'VM resource' if is_vm else 'gallery image version')) namespace.managed_image = resource_id +# endregion def process_vm_vmss_stop(cmd, namespace): # pylint: disable=unused-argument diff --git a/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py b/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py index d104c406878..86c57bc57cb 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py @@ -378,18 +378,25 @@ def is_shared_gallery_image_id(image_reference): return False -_VM_IMAGE_ID_PATTERN = r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.Compute/virtualMachines/.*$' -_IMAGE_VERSION_ID_PATTERN = r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.Compute/galleries/' \ - r'[^/]*/images/[^/]*/versions/.*$' - +def is_valid_vm_resource_id(vm_resource_id): + if not vm_resource_id: + return False -def is_valid_image_id(image_id, is_vm): - if not image_id: + vm_id_pattern = re.compile(r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.Compute/' + r'virtualMachines/.*$', re.IGNORECASE) + if vm_id_pattern.match(vm_resource_id): return True - image_id_pattern = re.compile(_VM_IMAGE_ID_PATTERN if is_vm else _IMAGE_VERSION_ID_PATTERN, re.IGNORECASE) + return False + + +def is_valid_image_version_id(image_version_id): + if not image_version_id: + return False - if image_id_pattern.match(image_id): + image_version_id_pattern = re.compile(r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.Compute/' + r'galleries/[^/]*/images/[^/]*/versions/.*$', re.IGNORECASE) + if image_version_id_pattern.match(image_version_id): return True return False From 67ffc8b7df898e468aaad74012047dd7e9aed153 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Tue, 31 May 2022 18:37:52 +0800 Subject: [PATCH 3/5] test image version create for diff source --- ..._image_version_create_for_diff_source.yaml | 3510 +++++++++++++++++ .../vm/tests/latest/test_vm_commands.py | 72 + 2 files changed, 3582 insertions(+) create mode 100644 src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_create_for_diff_source.yaml diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_create_for_diff_source.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_create_for_diff_source.yaml new file mode 100644 index 00000000000..d456e1187ad --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_create_for_diff_source.yaml @@ -0,0 +1,3510 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 09:59: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: '{"location": "westus", "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig create + Connection: + - keep-alive + Content-Length: + - '34' + Content-Type: + - application/json + ParameterSetName: + - -g --gallery-name + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"gallery000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002\",\r\n + \ \"type\": \"Microsoft.Compute/galleries\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"identifier\": {\r\n \"uniqueName\": + \"0b1f6471-1bf0-4dda-aec3-cb9272f09590-GALLERYHDY2GYEWZ\"\r\n },\r\n \"provisioningState\": + \"Creating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8839ec95-7c9c-4114-8681-ae14bbef78ba?api-version=2021-10-01 + cache-control: + - no-cache + content-length: + - '449' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 09:59:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateGallery3Min;49,Microsoft.Compute/CreateUpdateGallery30Min;299 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8839ec95-7c9c-4114-8681-ae14bbef78ba?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T09:59:41.8587364+00:00\",\r\n \"endTime\": + \"2022-05-31T09:59:42.1399741+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"8839ec95-7c9c-4114-8681-ae14bbef78ba\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:12 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/GetOperationStatus3Min;1198,Microsoft.Compute/GetOperationStatus30Min;4166 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"gallery000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002\",\r\n + \ \"type\": \"Microsoft.Compute/galleries\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"identifier\": {\r\n \"uniqueName\": + \"0b1f6471-1bf0-4dda-aec3-cb9272f09590-GALLERYHDY2GYEWZ\"\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '450' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:13 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/GetGallery3Min;344,Microsoft.Compute/GetGallery30Min;2474 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type --os-state -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00: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: '{"location": "westus", "tags": {}, "properties": {"osType": "Linux", "osState": + "Specialized", "hyperVGeneration": "V1", "identifier": {"publisher": "publisher1", + "offer": "offer1", "sku": "sku1"}, "disallowed": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + Content-Length: + - '216' + Content-Type: + - application/json + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type --os-state -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"image1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"architecture\": \"x64\",\r\n \"osType\": \"Linux\",\r\n \"osState\": + \"Specialized\",\r\n \"identifier\": {\r\n \"publisher\": \"publisher1\",\r\n + \ \"offer\": \"offer1\",\r\n \"sku\": \"sku1\"\r\n },\r\n \"provisioningState\": + \"Creating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/e5d798a0-d547-4479-a730-c7c8215c3874?api-version=2021-10-01 + cache-control: + - no-cache + content-length: + - '581' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateGalleryImage3Min;149,Microsoft.Compute/CreateUpdateGalleryImage30Min;749 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type --os-state -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/e5d798a0-d547-4479-a730-c7c8215c3874?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:00:19.2187976+00:00\",\r\n \"endTime\": + \"2022-05-31T10:00:19.3594266+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"e5d798a0-d547-4479-a730-c7c8215c3874\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4164 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type --os-state -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"image1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"architecture\": \"x64\",\r\n \"osType\": \"Linux\",\r\n \"osState\": + \"Specialized\",\r\n \"identifier\": {\r\n \"publisher\": \"publisher1\",\r\n + \ \"offer\": \"offer1\",\r\n \"sku\": \"sku1\"\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '582' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetGalleryImage3Min;593,Microsoft.Compute/GetGalleryImage30Min;2969 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00: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 + Connection: + - keep-alive + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"Debian\": {\n \"publisher\": \"Debian\",\n \"offer\": + \"debian-10\",\n \"sku\": \"10\",\n \"version\": \"latest\"\n + \ },\n \"Flatcar\": {\n \"publisher\": \"kinvolk\",\n + \ \"offer\": \"flatcar-container-linux-free\",\n \"sku\": + \"stable\",\n \"version\": \"latest\"\n },\n \"openSUSE-Leap\": + {\n \"publisher\": \"SUSE\",\n \"offer\": \"opensuse-leap-15-3\",\n + \ \"sku\": \"gen2\",\n \"version\": \"latest\"\n },\n + \ \"RHEL\": {\n \"publisher\": \"RedHat\",\n \"offer\": + \"RHEL\",\n \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n + \ },\n \"SLES\": {\n \"publisher\": \"SUSE\",\n + \ \"offer\": \"sles-15-sp3\",\n \"sku\": \"gen2\",\n + \ \"version\": \"latest\"\n },\n \"UbuntuLTS\": + {\n \"publisher\": \"Canonical\",\n \"offer\": \"UbuntuServer\",\n + \ \"sku\": \"18.04-LTS\",\n \"version\": \"latest\"\n + \ }\n },\n \"Windows\": {\n \"Win2022Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2022-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2022AzureEditionCore\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2022-datacenter-azure-edition-core\",\n \"version\": \"latest\"\n + \ },\n \"Win2019Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2019-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2016Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2012R2Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2012-R2-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2008R2SP1\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n + \ \"version\": \"latest\"\n }\n }\n }\n }\n + \ }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2974' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:52 GMT + etag: + - W/"714b55b3e325c9c936add41807880935e033af5676c36a1ed8ab2e1e476a45f2" + expires: + - Tue, 31 May 2022 10:05:52 GMT + source-age: + - '0' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding,Origin + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 0224a171fdf1866182248d4e4125f3a723b63b08 + x-frame-options: + - deny + x-github-request-id: + - 09CE:72EE:553DC:87903:62957745 + x-served-by: + - cache-qpg1266-QPG + x-timer: + - S1653991252.487997,VS0,VE304 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/UbuntuServer/skus/18.04-LTS/versions?$top=1&$orderby=name%20desc&api-version=2022-03-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"18.04.202205270\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/UbuntuServer/Skus/18.04-LTS/Versions/18.04.202205270\"\r\n + \ }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '286' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43998 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/UbuntuServer/skus/18.04-LTS/versions/18.04.202205270?api-version=2022-03-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"architecture\": + \"x64\",\r\n \"replicaType\": \"Unmanaged\",\r\n \"disallowed\": {\r\n + \ \"vmDiskType\": \"None\"\r\n },\r\n \"automaticOSUpgradeProperties\": + {\r\n \"automaticOSUpgradeSupported\": true\r\n },\r\n \"imageDeprecationStatus\": + {\r\n \"imageState\": \"Active\"\r\n },\r\n \"features\": [\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\": \"Linux\",\r\n \"sizeInGb\": 31,\r\n + \ \"sizeInBytes\": 32213303808\r\n },\r\n \"dataDiskImages\": []\r\n + \ },\r\n \"location\": \"westus\",\r\n \"name\": \"18.04.202205270\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/UbuntuServer/Skus/18.04-LTS/Versions/18.04.202205270\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1043' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:00:55 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/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 10:00: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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": + [{"name": "vm1VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vm1Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": "Microsoft.Network/networkSecurityGroups", + "name": "vm1NSG", "apiVersion": "2015-06-15", "location": "westus", "tags": + {}, "dependsOn": []}, {"apiVersion": "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", + "name": "vm1PublicIP", "location": "westus", "tags": {}, "dependsOn": [], "properties": + {"publicIPAllocationMethod": null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", + "name": "vm1VMNic", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", + "Microsoft.Network/networkSecurityGroups/vm1NSG", "Microsoft.Network/publicIpAddresses/vm1PublicIP"], + "properties": {"ipConfigurations": [{"name": "ipconfigvm1", "properties": {"privateIPAllocationMethod": + "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}}}, + {"apiVersion": "2022-03-01", "type": "Microsoft.Compute/virtualMachines", "name": + "vm1", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1VMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "networkProfile": + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic", + "properties": {"deleteOption": null}}]}, "storageProfile": {"osDisk": {"createOption": + "fromImage", "name": null, "caching": "ReadWrite", "managedDisk": {"storageAccountType": + null}}, "imageReference": {"publisher": "Canonical", "offer": "UbuntuServer", + "sku": "18.04-LTS", "version": "latest"}, "dataDisks": [{"lun": 0, "managedDisk": + {"storageAccountType": null}, "createOption": "empty", "diskSizeGB": 10}]}, + "osProfile": {"computerName": "vm1", "adminUsername": "clitest1", "linuxConfiguration": + {"disablePasswordAuthentication": true, "ssh": {"publicKeys": [{"keyData": "ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDg4qZ5NLtcJdQtFC6W0Q2J64NudXnUpyFOYJjJwU2pQHBoFCGyJ/t87VsXGWa1eAixenDCXhTdjMAQQh+S5STnywT+KfXfTVEp1dpjbPWulANTuSPYtBqQxjcXBPlUNK4VXZR1jPAQtM2+ux6LfGPF8dWXXGf/1rFw2lPT9brNlt2ATSRamKX4MBVeP1oMTa5FB1AQNa4F01JsX88ppRGNc7Bz66yV/YqgjK3gh4pVK7ETu0LXRbEzTJAmH3+TJ26Kld7Pl/fOvbDQESxOzgcbnvgUfIKo3Ye41+bV/Z+bO4YhjVY7WRkHhkYhf/lOOqYSUea4S7WQFjbLY75xbXm64WCNAEQjoKIfppx2xIudgzkwBpqCmyEtR532wTRsczczxyNlk6sn9AKw0zfd6n4W0kh9rvOZbcdaheKcDaw748E3G4NhDVoEoaZKnx/B75QVMAKQDbWzhEtpe8IiZm4RVEPysFrJmaD5KFiSgJT9MW79l7XrDQkbokD5NyxQM5U= + zhuyan@microsoft.com\n", "path": "/home/clitest1/.ssh/authorized_keys"}]}}}}}], + "outputs": {}}, "parameters": {}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + Content-Length: + - '3572' + Content-Type: + - application/json + ParameterSetName: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/vm_deploy_Ww68Q8LGDDOViuB3rwPIc3EnpD5ZghdU","name":"vm_deploy_Ww68Q8LGDDOViuB3rwPIc3EnpD5ZghdU","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6988295017969678368","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2022-05-31T10:01:03.4620974Z","duration":"PT0.0009686S","correlationId":"9f424c2f-5a3e-4e67-9f30-65b214d183e4","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/vm_deploy_Ww68Q8LGDDOViuB3rwPIc3EnpD5ZghdU/operationStatuses/08585476156250487932?api-version=2021-04-01 + cache-control: + - no-cache + content-length: + - '2469' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:01:04 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476156250487932?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 10:01:35 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585476156250487932?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 10:02:05 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Resources/deployments/vm_deploy_Ww68Q8LGDDOViuB3rwPIc3EnpD5ZghdU","name":"vm_deploy_Ww68Q8LGDDOViuB3rwPIc3EnpD5ZghdU","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6988295017969678368","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2022-05-31T10:01:51.3020163Z","duration":"PT47.8408875S","correlationId":"9f424c2f-5a3e-4e67-9f30-65b214d183e4","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '3339' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:02:05 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"29565a60-2bd6-4e60-9d5d-17194074883c\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n + \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": + \"18.04-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": + \"18.04.202205270\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"name\": \"vm1_disk1_233b23cfca744af98291047d36c24c11\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk1_233b23cfca744af98291047d36c24c11\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": + 30\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": + 0,\r\n \"name\": \"vm1_disk2_95be2a9490e440d893b72c02bf9c4173\",\r\n + \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n + \ \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk2_95be2a9490e440d893b72c02bf9c4173\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": + 10,\r\n \"toBeDetached\": false\r\n }\r\n ]\r\n },\r\n + \ \"osProfile\": {\r\n \"computerName\": \"vm1\",\r\n \"adminUsername\": + \"clitest1\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/clitest1/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDg4qZ5NLtcJdQtFC6W0Q2J64NudXnUpyFOYJjJwU2pQHBoFCGyJ/t87VsXGWa1eAixenDCXhTdjMAQQh+S5STnywT+KfXfTVEp1dpjbPWulANTuSPYtBqQxjcXBPlUNK4VXZR1jPAQtM2+ux6LfGPF8dWXXGf/1rFw2lPT9brNlt2ATSRamKX4MBVeP1oMTa5FB1AQNa4F01JsX88ppRGNc7Bz66yV/YqgjK3gh4pVK7ETu0LXRbEzTJAmH3+TJ26Kld7Pl/fOvbDQESxOzgcbnvgUfIKo3Ye41+bV/Z+bO4YhjVY7WRkHhkYhf/lOOqYSUea4S7WQFjbLY75xbXm64WCNAEQjoKIfppx2xIudgzkwBpqCmyEtR532wTRsczczxyNlk6sn9AKw0zfd6n4W0kh9rvOZbcdaheKcDaw748E3G4NhDVoEoaZKnx/B75QVMAKQDbWzhEtpe8IiZm4RVEPysFrJmaD5KFiSgJT9MW79l7XrDQkbokD5NyxQM5U= + zhuyan@microsoft.com\\n\"\r\n }\r\n ]\r\n },\r\n + \ \"provisionVMAgent\": true,\r\n \"patchSettings\": {\r\n \"patchMode\": + \"ImageDefault\",\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 \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"computerName\": + \"vm1\",\r\n \"osName\": \"ubuntu\",\r\n \"osVersion\": \"18.04\",\r\n + \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.7.1.0\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n + \ \"message\": \"Guest Agent is running\",\r\n \"time\": + \"2022-05-31T10:02:01+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": + []\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": \"vm1_disk1_233b23cfca744af98291047d36c24c11\",\r\n + \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-31T10:01:36.3960616+00:00\"\r\n + \ }\r\n ]\r\n },\r\n {\r\n \"name\": + \"vm1_disk2_95be2a9490e440d893b72c02bf9c4173\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-31T10:01:36.3960616+00:00\"\r\n + \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": + \"V1\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2022-05-31T10:01:47.7558845+00:00\"\r\n + \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n + \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2022-05-31T10:01:34.6772434+00:00\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '5018' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:02:06 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;31972 + 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\",\r\n + \ \"etag\": \"W/\\\"667dfcce-04ae-4b9c-b8a1-85561143b029\\\"\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"42a3030c-6841-4d2b-bd42-2c129c96d04f\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\",\r\n + \ \"etag\": \"W/\\\"667dfcce-04ae-4b9c-b8a1-85561143b029\\\"\",\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_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\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\": + \"hnqhmojnirludhwnpk1dbwgv2b.dx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"00-0D-3A-3B-39-41\",\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\r\n + \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2291' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:02:07 GMT + etag: + - W/"667dfcce-04ae-4b9c-b8a1-85561143b029" + 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: + - a7b4d3ef-7144-47d8-8984-a61a2dc842b6 + 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: + - -g -n --image --data-disk-sizes-gb --admin-username --generate-ssh-key --nsg-rule + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\",\r\n + \ \"etag\": \"W/\\\"306f958f-cbf4-4013-82de-7cd57b841364\\\"\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"b6e6e4c7-c972-4ea7-9487-aa80f6c7773b\",\r\n + \ \"ipAddress\": \"20.253.153.183\",\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_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\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: + - '920' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:02:07 GMT + etag: + - W/"306f958f-cbf4-4013-82de-7cd57b841364" + 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: + - 55aea77b-8a1f-4a37-9f1b-b30ec47d9b11 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:03: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: '{"location": "westus", "tags": {}, "properties": {"publishingProfile": + {"targetRegions": [{"name": "westus"}]}, "storageProfile": {"source": {"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + Content-Length: + - '305' + Content-Type: + - application/json + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"1.1.2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": + {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West + US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": + \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n + \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2022-05-31T10:03:22.4712133+00:00\",\r\n + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": + {\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\"\r\n + \ }\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + cache-control: + - no-cache + content-length: + - '986' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:03:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateGalleryImageVersion3Min;374,Microsoft.Compute/CreateUpdateGalleryImageVersion30Min;1198 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:04:23 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/GetOperationStatus3Min;1199,Microsoft.Compute/GetOperationStatus30Min;4163 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:05:25 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/GetOperationStatus3Min;1197,Microsoft.Compute/GetOperationStatus30Min;4169 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:06:25 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4167 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:07:26 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4165 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:08:27 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4163 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:09:28 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4161 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:10:31 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4169 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/050c7ef6-d38b-4290-b3f4-7902ef62cb1a?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:03:22.4556138+00:00\",\r\n \"endTime\": + \"2022-05-31T10:10:53.6492801+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"050c7ef6-d38b-4290-b3f4-7902ef62cb1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:11:31 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4167 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --virtual-machine + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"1.1.2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": + {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West + US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": + \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n + \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2022-05-31T10:03:22.4712133+00:00\",\r\n + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": + {\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\"\r\n + \ },\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 30,\r\n \"hostCaching\": + \"ReadWrite\",\r\n \"source\": {}\r\n },\r\n \"dataDiskImages\": + [\r\n {\r\n \"lun\": 0,\r\n \"sizeInGB\": 10,\r\n + \ \"hostCaching\": \"None\"\r\n }\r\n ]\r\n },\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1245' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:11: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/GetGalleryImageVersion3Min;1997,Microsoft.Compute/GetGalleryImageVersion30Min;9964 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:11:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "tags": {}, "properties": {"osType": "Linux", "osState": + "Generalized", "hyperVGeneration": "V1", "identifier": {"publisher": "publisher2", + "offer": "offer2", "sku": "sku2"}, "disallowed": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + Content-Length: + - '216' + Content-Type: + - application/json + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"image2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"architecture\": \"x64\",\r\n \"osType\": \"Linux\",\r\n \"osState\": + \"Generalized\",\r\n \"identifier\": {\r\n \"publisher\": \"publisher2\",\r\n + \ \"offer\": \"offer2\",\r\n \"sku\": \"sku2\"\r\n },\r\n \"provisioningState\": + \"Creating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/777090f2-857d-4b4a-9fdc-9042203f8d8d?api-version=2021-10-01 + cache-control: + - no-cache + content-length: + - '581' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:11:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateGalleryImage3Min;149,Microsoft.Compute/CreateUpdateGalleryImage30Min;748 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/777090f2-857d-4b4a-9fdc-9042203f8d8d?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:11:39.1803792+00:00\",\r\n \"endTime\": + \"2022-05-31T10:11:39.4460145+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"777090f2-857d-4b4a-9fdc-9042203f8d8d\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:12: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/GetOperationStatus3Min;1193,Microsoft.Compute/GetOperationStatus30Min;4164 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-definition create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --os-type -p -f -s + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"image2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"architecture\": \"x64\",\r\n \"osType\": \"Linux\",\r\n \"osState\": + \"Generalized\",\r\n \"identifier\": {\r\n \"publisher\": \"publisher2\",\r\n + \ \"offer\": \"offer2\",\r\n \"sku\": \"sku2\"\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '582' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:12: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/GetGalleryImage3Min;591,Microsoft.Compute/GetGalleryImage30Min;2964 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:12:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "tags": {}, "properties": {"publishingProfile": + {"targetRegions": [{"name": "westus"}]}, "storageProfile": {"source": {"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + Content-Length: + - '338' + Content-Type: + - application/json + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.1?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"1.1.1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.1\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": + {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West + US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": + \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n + \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2022-05-31T10:12:23.603571+00:00\",\r\n + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": + {\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2\"\r\n + \ }\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + cache-control: + - no-cache + content-length: + - '1018' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:12:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateGalleryImageVersion3Min;374,Microsoft.Compute/CreateUpdateGalleryImageVersion30Min;1198 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:13:25 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/GetOperationStatus3Min;1192,Microsoft.Compute/GetOperationStatus30Min;4162 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:14:26 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/GetOperationStatus3Min;1193,Microsoft.Compute/GetOperationStatus30Min;4161 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:15:26 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4172 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:16:27 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4170 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:17:28 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4168 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:18:29 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4166 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/79518b84-53ff-47f5-89b9-0b55ea6398a6?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:12:23.5879468+00:00\",\r\n \"endTime\": + \"2022-05-31T10:18:33.452068+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"79518b84-53ff-47f5-89b9-0b55ea6398a6\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '183' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:19:29 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4164 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --image-version + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.1?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"1.1.1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.1\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": + {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West + US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": + \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n + \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2022-05-31T10:12:23.603571+00:00\",\r\n + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": + {\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image1/versions/1.1.2\"\r\n + \ },\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 30,\r\n \"hostCaching\": + \"ReadWrite\",\r\n \"source\": {}\r\n },\r\n \"dataDiskImages\": + [\r\n {\r\n \"lun\": 0,\r\n \"sizeInGB\": 10,\r\n + \ \"hostCaching\": \"None\"\r\n }\r\n ]\r\n },\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1277' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:19: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/GetGalleryImageVersion3Min;1996,Microsoft.Compute/GetGalleryImageVersion30Min;9947 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm deallocate + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1/deallocate?api-version=2022-03-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/ce4c6e80-3ad9-479b-8e77-be810d731be4?p=571046f6-b640-41c1-86f7-f9f044b5adf9&api-version=2022-03-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 31 May 2022 10:19:31 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/ce4c6e80-3ad9-479b-8e77-be810d731be4?p=571046f6-b640-41c1-86f7-f9f044b5adf9&monitor=true&api-version=2022-03-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/DeleteVM3Min;239,Microsoft.Compute/DeleteVM30Min;1199 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm deallocate + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/ce4c6e80-3ad9-479b-8e77-be810d731be4?p=571046f6-b640-41c1-86f7-f9f044b5adf9&api-version=2022-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:19:32.3292373+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce4c6e80-3ad9-479b-8e77-be810d731be4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:19: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/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29991 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm deallocate + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/ce4c6e80-3ad9-479b-8e77-be810d731be4?p=571046f6-b640-41c1-86f7-f9f044b5adf9&api-version=2022-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:19:32.3292373+00:00\",\r\n \"endTime\": + \"2022-05-31T10:20:07.7524793+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"ce4c6e80-3ad9-479b-8e77-be810d731be4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:20:18 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;14995,Microsoft.Compute/GetOperation30Min;29987 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm deallocate + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/ce4c6e80-3ad9-479b-8e77-be810d731be4?p=571046f6-b640-41c1-86f7-f9f044b5adf9&monitor=true&api-version=2022-03-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 31 May 2022 10:20:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29986 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm generalize + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1/generalize?api-version=2022-03-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 31 May 2022 10:20:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/UpdateVM3Min;239,Microsoft.Compute/UpdateVM30Min;1199 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - image create + Connection: + - keep-alive + ParameterSetName: + - -g -n --source + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"29565a60-2bd6-4e60-9d5d-17194074883c\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n + \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": + \"18.04-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": + \"18.04.202205270\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"name\": \"vm1_disk1_233b23cfca744af98291047d36c24c11\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk1_233b23cfca744af98291047d36c24c11\"\r\n + \ },\r\n \"deleteOption\": \"Detach\"\r\n },\r\n \"dataDisks\": + [\r\n {\r\n \"lun\": 0,\r\n \"name\": \"vm1_disk2_95be2a9490e440d893b72c02bf9c4173\",\r\n + \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n + \ \"managedDisk\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk2_95be2a9490e440d893b72c02bf9c4173\"\r\n + \ },\r\n \"deleteOption\": \"Detach\",\r\n \"toBeDetached\": + false\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": + \"vm1\",\r\n \"adminUsername\": \"clitest1\",\r\n \"linuxConfiguration\": + {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": + {\r\n \"publicKeys\": [\r\n {\r\n \"path\": + \"/home/clitest1/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDg4qZ5NLtcJdQtFC6W0Q2J64NudXnUpyFOYJjJwU2pQHBoFCGyJ/t87VsXGWa1eAixenDCXhTdjMAQQh+S5STnywT+KfXfTVEp1dpjbPWulANTuSPYtBqQxjcXBPlUNK4VXZR1jPAQtM2+ux6LfGPF8dWXXGf/1rFw2lPT9brNlt2ATSRamKX4MBVeP1oMTa5FB1AQNa4F01JsX88ppRGNc7Bz66yV/YqgjK3gh4pVK7ETu0LXRbEzTJAmH3+TJ26Kld7Pl/fOvbDQESxOzgcbnvgUfIKo3Ye41+bV/Z+bO4YhjVY7WRkHhkYhf/lOOqYSUea4S7WQFjbLY75xbXm64WCNAEQjoKIfppx2xIudgzkwBpqCmyEtR532wTRsczczxyNlk6sn9AKw0zfd6n4W0kh9rvOZbcdaheKcDaw748E3G4NhDVoEoaZKnx/B75QVMAKQDbWzhEtpe8IiZm4RVEPysFrJmaD5KFiSgJT9MW79l7XrDQkbokD5NyxQM5U= + zhuyan@microsoft.com\\n\"\r\n }\r\n ]\r\n },\r\n + \ \"provisionVMAgent\": true,\r\n \"patchSettings\": {\r\n \"patchMode\": + \"ImageDefault\",\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 \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"timeCreated\": \"2022-05-31T10:01:34.6772434+00:00\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3215' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:20:21 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;3998,Microsoft.Compute/LowCostGet30Min;31978 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - image create + Connection: + - keep-alive + ParameterSetName: + - -g -n --source + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:20: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: '{"location": "westus", "tags": {}, "properties": {"sourceVirtualMachine": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "hyperVGeneration": "V1"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - image create + Connection: + - keep-alive + Content-Length: + - '263' + Content-Type: + - application/json + ParameterSetName: + - -g -n --source + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1?api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"managedImage1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1\",\r\n + \ \"type\": \"Microsoft.Compute/images\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"sourceVirtualMachine\": {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\"\r\n + \ },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"osState\": \"Generalized\",\r\n \"managedDisk\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk1_233b23cfca744af98291047d36c24c11\"\r\n + \ },\r\n \"caching\": \"ReadWrite\",\r\n \"storageAccountType\": + \"Premium_LRS\"\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": + 0,\r\n \"managedDisk\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk2_95be2a9490e440d893b72c02bf9c4173\"\r\n + \ },\r\n \"caching\": \"None\",\r\n \"storageAccountType\": + \"Premium_LRS\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": + \"Creating\",\r\n \"hyperVGeneration\": \"V1\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d474c712-fcdd-4018-8f82-7a9353bf8b63?p=571046f6-b640-41c1-86f7-f9f044b5adf9&api-version=2022-03-01 + cache-control: + - no-cache + content-length: + - '1410' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:20:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateImages3Min;39,Microsoft.Compute/CreateImages30Min;199 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - image create + Connection: + - keep-alive + ParameterSetName: + - -g -n --source + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/d474c712-fcdd-4018-8f82-7a9353bf8b63?p=571046f6-b640-41c1-86f7-f9f044b5adf9&api-version=2022-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:20:29.222022+00:00\",\r\n \"endTime\": + \"2022-05-31T10:20:34.3159424+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"d474c712-fcdd-4018-8f82-7a9353bf8b63\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '183' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:21: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/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29985 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - image create + Connection: + - keep-alive + ParameterSetName: + - -g -n --source + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1?api-version=2022-03-01 + response: + body: + string: "{\r\n \"name\": \"managedImage1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1\",\r\n + \ \"type\": \"Microsoft.Compute/images\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"sourceVirtualMachine\": {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/virtualMachines/vm1\"\r\n + \ },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"osState\": \"Generalized\",\r\n \"diskSizeGB\": + 30,\r\n \"managedDisk\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk1_233b23cfca744af98291047d36c24c11\"\r\n + \ },\r\n \"caching\": \"ReadWrite\",\r\n \"storageAccountType\": + \"Premium_LRS\"\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": + 0,\r\n \"diskSizeGB\": 10,\r\n \"managedDisk\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/disks/vm1_disk2_95be2a9490e440d893b72c02bf9c4173\"\r\n + \ },\r\n \"caching\": \"None\",\r\n \"storageAccountType\": + \"Premium_LRS\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": + \"Succeeded\",\r\n \"hyperVGeneration\": \"V1\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1467' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:21: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/GetImages3Min;357,Microsoft.Compute/GetImages30Min;1789 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_image_version_create_000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001","name":"cli_test_image_version_create_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-31T09:59:29Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:21:02 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": "westus", "tags": {}, "properties": {"publishingProfile": + {"targetRegions": [{"name": "westus"}]}, "storageProfile": {"source": {"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + Content-Length: + - '306' + Content-Type: + - application/json + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2/versions/1.1.2?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"1.1.2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2/versions/1.1.2\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": + {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West + US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": + \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n + \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": + {\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1\"\r\n + \ }\r\n },\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + cache-control: + - no-cache + content-length: + - '987' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:21:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateGalleryImageVersion3Min;374,Microsoft.Compute/CreateUpdateGalleryImageVersion30Min;1197 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:22: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/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4162 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:23: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/GetOperationStatus3Min;1197,Microsoft.Compute/GetOperationStatus30Min;4161 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:24: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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4159 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:25:12 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4158 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:26:12 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4156 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:27: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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4154 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ce3d7877-586c-4722-8d6c-bd7cb234da49?api-version=2021-10-01 + response: + body: + string: "{\r\n \"startTime\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n \"endTime\": + \"2022-05-31T10:27:54.5227931+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"ce3d7877-586c-4722-8d6c-bd7cb234da49\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:28:15 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/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4152 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sig image-version create + Connection: + - keep-alive + ParameterSetName: + - -g --gallery-name --gallery-image-definition --gallery-image-version --managed-image + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-compute/27.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2/versions/1.1.2?api-version=2021-10-01 + response: + body: + string: "{\r\n \"name\": \"1.1.2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/galleries/gallery000002/images/image2/versions/1.1.2\",\r\n + \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": + {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West + US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": + \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n + \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2022-05-31T10:21:08.3609621+00:00\",\r\n + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": + {\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_image_version_create_000001/providers/Microsoft.Compute/images/managedImage1\"\r\n + \ },\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 30,\r\n \"hostCaching\": + \"ReadWrite\",\r\n \"source\": {}\r\n },\r\n \"dataDiskImages\": + [\r\n {\r\n \"lun\": 0,\r\n \"sizeInGB\": 10,\r\n + \ \"hostCaching\": \"None\"\r\n }\r\n ]\r\n },\r\n + \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1246' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 31 May 2022 10:28:15 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/GetGalleryImageVersion3Min;1992,Microsoft.Compute/GetGalleryImageVersion30Min;9935 + 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..2a20ed26256 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 @@ -4723,6 +4723,78 @@ def test_shared_gallery(self, resource_group, resource_group_location): self.check('sharingProfile.permissions', 'Private') ]) + @ResourceGroupPreparer(name_prefix='cli_test_image_version_create_', location='westus') + def test_image_version_create_for_diff_source(self, resource_group_location): + self.kwargs.update({ + 'vm': 'vm1', + 'gallery': self.create_random_name('gallery', 16), + 'image1': 'image1', + 'image2': 'image2', + 'version1': '1.1.2', + 'version2': '1.1.1', + 'captured': 'managedImage1', + 'subId': '0b1f6471-1bf0-4dda-aec3-cb9272f09590' + # share the gallery to tester's subscription, so the tester can get shared galleries + }) + + self.cmd('sig create -g {rg} --gallery-name {gallery}') + self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {image1} ' + '--os-type linux --os-state Specialized -p publisher1 -f offer1 -s sku1') + vm_id = self.cmd('vm create -g {rg} -n {vm} --image ubuntults --data-disk-sizes-gb 10 --admin-username clitest1' + ' --generate-ssh-key --nsg-rule NONE').get_output_in_json()['id'] + time.sleep(70) + self.kwargs.update({"vm_id": vm_id}) + + # test the result of creating image version for virtual machine source + image_version_id = self.cmd( + 'sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image1} ' + '--gallery-image-version {version1} --virtual-machine {vm_id}', + checks=[ + self.check('location', resource_group_location), + self.check('name', self.kwargs['version1']), + self.check('provisioningState', 'Succeeded') + ]).get_output_in_json()['id'] + + self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {image2} ' + '--os-type linux -p publisher2 -f offer2 -s sku2') + self.kwargs.update({"image_version_id": image_version_id}) + + # test the format check of virtual machine source and image version source + from azure.cli.core.azclierror import InvalidArgumentValueError + with self.assertRaises(InvalidArgumentValueError): + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image1} ' + '--gallery-image-version {version1} --image-version {vm_id}') + with self.assertRaises(InvalidArgumentValueError): + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image2} ' + '--gallery-image-version {version1} --virtual-machine {image_version_id}') + + # test the result of more than one source are provided + from azure.cli.core.azclierror import MutuallyExclusiveArgumentError + with self.assertRaises(MutuallyExclusiveArgumentError): + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image1} ' + '--gallery-image-version {version1} --virtual-machine {vm_id} --image-version {image_version_id}') + + # test the result of creating image version for gallery image version source + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image1} ' + '--gallery-image-version {version2} --image-version {image_version_id}', + checks=[ + self.check('location', resource_group_location), + self.check('name', self.kwargs['version2']), + self.check('provisioningState', 'Succeeded') + ]) + + # test the result of creating image version for managed image source + 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}') + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition {image2} ' + '--gallery-image-version {version1} --managed-image {captured}', + checks=[ + self.check('location', resource_group_location), + self.check('name', self.kwargs['version1']), + self.check('provisioningState', 'Succeeded') + ]) + @ResourceGroupPreparer(location='eastus2') @KeyVaultPreparer(name_prefix='vault-', name_len=20, key='vault', location='eastus2', additional_params='--enable-purge-protection true --enable-soft-delete true') def test_gallery_e2e(self, resource_group, resource_group_location, key_vault): From 1d75bea5c28c1d2d5528ee3ab0fae3f1d28f9cd7 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Wed, 1 Jun 2022 00:38:26 +0800 Subject: [PATCH 4/5] style check --- .../azure/cli/command_modules/vm/_validators.py | 9 +++++---- src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py | 2 +- 2 files changed, 6 insertions(+), 5 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 3d45f4eeac7..4457fbe6d61 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -16,7 +16,7 @@ from knack.util import CLIError from azure.cli.core.azclierror import (ValidationError, ArgumentUsageError, RequiredArgumentMissingError, - MutuallyExclusiveArgumentError, CLIInternalError, InvalidArgumentValueError) + MutuallyExclusiveArgumentError, CLIInternalError) from azure.cli.core.commands.validators import ( get_default_location_from_resource_group, validate_file_or_dict, validate_parameter_set, validate_tags) from azure.cli.core.util import (hash_string, DISALLOWED_USER_NAMES, get_default_admin_username) @@ -1994,11 +1994,11 @@ def _disk_encryption_set_format(cmd, namespace, name): def process_image_version_create_namespace(cmd, namespace): process_gallery_image_version_namespace(cmd, namespace) - process_image_resource_id_namespace(cmd, namespace) + process_image_resource_id_namespace(namespace) # endregion -def process_image_resource_id_namespace(cmd, namespace): +def process_image_resource_id_namespace(namespace): """ Validate the resource id from different sources Only one of these arguments is allowed to provide @@ -2014,11 +2014,12 @@ def process_image_resource_id_namespace(cmd, namespace): return from ._vm_utils import is_valid_vm_resource_id, is_valid_image_version_id - is_vm = True if namespace.virtual_machine else False + is_vm = namespace.virtual_machine is not None is_valid_function = is_valid_vm_resource_id if is_vm else is_valid_image_version_id resource_id = namespace.virtual_machine if is_vm else namespace.image_version if not is_valid_function(resource_id): + from azure.cli.core.parser import InvalidArgumentValueError raise InvalidArgumentValueError('usage error: {} is an invalid {} id' .format(resource_id, 'VM resource' if is_vm else 'gallery image version')) namespace.managed_image = resource_id diff --git a/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py b/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py index 86c57bc57cb..42f03ba1030 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py @@ -60,7 +60,7 @@ def _resolve_api_version(cli_ctx, provider_namespace, resource_type, parent_path return npv[0] if npv else rt[0].api_versions[0] raise CLIError( 'API version is required and could not be resolved for resource {}' - .format(resource_type)) + .format(resource_type)) def log_pprint_template(template): From 675b355711c63047643e29ad505826474f42373d Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Wed, 1 Jun 2022 15:08:30 +0800 Subject: [PATCH 5/5] test --- src/azure-cli/azure/cli/command_modules/vm/_validators.py | 5 +++++ src/azure-cli/azure/cli/command_modules/vm/commands.py | 4 ++-- 2 files changed, 7 insertions(+), 2 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 4457fbe6d61..ada0738516a 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -1998,6 +1998,11 @@ def process_image_version_create_namespace(cmd, namespace): # endregion +def process_image_version_update_namespace(cmd, namespace): + process_gallery_image_version_namespace(cmd, namespace) +# endregion + + def process_image_resource_id_namespace(namespace): """ Validate the resource id from different sources diff --git a/src/azure-cli/azure/cli/command_modules/vm/commands.py b/src/azure-cli/azure/cli/command_modules/vm/commands.py index 771d06d95a5..8938ccb117e 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/commands.py @@ -30,7 +30,7 @@ process_disk_or_snapshot_create_namespace, process_disk_encryption_namespace, process_assign_identity_namespace, process_remove_identity_namespace, process_vm_secret_format, process_vm_vmss_stop, validate_vmss_update_namespace, process_vm_update_namespace, process_set_applications_namespace, process_vm_disk_attach_namespace, - process_image_version_create_namespace) + process_image_version_create_namespace, process_image_version_update_namespace) from azure.cli.command_modules.vm._image_builder import ( process_image_template_create_namespace, process_img_tmpl_output_add_namespace, @@ -541,7 +541,7 @@ def load_command_table(self, _): g.show_command('show', 'get', table_transformer='{Name:name, ResourceGroup:resourceGroup, ProvisioningState:provisioningState, TargetRegions: publishingProfile.targetRegions && join(`, `, publishingProfile.targetRegions[*].name), ReplicationState:replicationStatus.aggregatedState}') g.command('list', 'list_by_gallery_image') g.custom_command('create', 'create_image_version', supports_no_wait=True, validator=process_image_version_create_namespace) - g.generic_update_command('update', getter_name='get_image_version_to_update', setter_arg_name='gallery_image_version', setter_name='update_image_version', setter_type=compute_custom, command_type=compute_custom, supports_no_wait=True) + g.generic_update_command('update', getter_name='get_image_version_to_update', setter_arg_name='gallery_image_version', setter_name='update_image_version', setter_type=compute_custom, command_type=compute_custom, supports_no_wait=True, validator=process_image_version_update_namespace) g.wait_command('wait') vm_shared_gallery = CliCommandType(