From cc9b9feba7b75327f3a8955cc8e1544c189d71ad Mon Sep 17 00:00:00 2001 From: Dania Etienne Date: Tue, 9 Feb 2021 12:52:51 -0500 Subject: [PATCH 1/7] improved error handling, fixed bug in ts show --- .vscode/launch.json | 6 +- .../cli/command_modules/resource/custom.py | 9 +- .../test_create_template_specs.yaml | 38 +-- .../recordings/test_show_template_spec.yaml | 251 ++++++++++++++---- .../resource/tests/latest/test_resource.py | 37 ++- 5 files changed, 254 insertions(+), 87 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 1187e215bf1..c2a47d74891 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Azure CLI Debug (Integrated Console)", "type": "python", "request": "launch", - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -24,7 +24,7 @@ "type": "python", "request": "launch", "stopOnEntry": true, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -40,7 +40,7 @@ "name": "Azdev Scripts", "type": "python", "request": "launch", - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/tools/automation/__main__.py", "cwd": "${workspaceRoot}", "args": [ diff --git a/src/azure-cli/azure/cli/command_modules/resource/custom.py b/src/azure-cli/azure/cli/command_modules/resource/custom.py index f66bce02c21..1313b6cd299 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/custom.py +++ b/src/azure-cli/azure/cli/command_modules/resource/custom.py @@ -1816,7 +1816,10 @@ def get_template_spec(cmd, resource_group_name=None, name=None, version=None, te rcf = _resource_templatespecs_client_factory(cmd.cli_ctx) if version: return rcf.template_spec_versions.get(resource_group_name, name, version) - return rcf.template_specs.get(resource_group_name, name) + retrieved_template = rcf.template_specs.get(resource_group_name, name, expand="versions") + version_names = list(retrieved_template.versions.keys()) + retrieved_template.versions = version_names + return retrieved_template def create_template_spec(cmd, resource_group_name, name, template_file=None, location=None, display_name=None, @@ -1935,7 +1938,9 @@ def export_template_spec(cmd, output_folder, resource_group_name=None, name=None version = id_parts.get('resource_name') if version == name: version = None - exported_template = rcf.template_spec_versions.get(resource_group_name, name, version) if version else rcf.template_specs.get(resource_group_name, name) + if not version: + raise IncorrectUsageError('a template spec version must be specified for export') + exported_template = rcf.template_spec_versions.get(resource_group_name, name, version) from azure.cli.command_modules.resource._packing_engine import (unpack) return unpack(cmd, exported_template, output_folder, (str(name) + '.JSON')) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs.yaml index a287fe09f54..a9020caab38 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs.yaml +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs.yaml @@ -13,8 +13,8 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 17:53:56 GMT + - Tue, 09 Feb 2021 17:41:10 GMT expires: - '-1' pragma: @@ -60,8 +60,8 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -79,7 +79,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 17:53:57 GMT + - Tue, 09 Feb 2021 17:41:10 GMT expires: - '-1' pragma: @@ -112,8 +112,8 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -122,9 +122,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T17:53:59.5486662Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:41:13.1182977Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T17:53:59.5486662Z\"\r\n },\r\n \"properties\": {\r\n \"description\": + \"2021-02-09T17:41:13.1182977Z\"\r\n },\r\n \"properties\": {\r\n \"description\": \"AzCLI test root template spec\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-create-template-spec000002\"\r\n}" headers: @@ -135,7 +135,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 17:53:59 GMT + - Tue, 09 Feb 2021 17:41:12 GMT expires: - '-1' pragma: @@ -244,8 +244,8 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -254,9 +254,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T17:54:00.8486769Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:41:14.4233826Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T17:54:00.8486769Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-09T17:41:14.4233826Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"description\": \"AzCLI test version of root template spec\",\r\n \ \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"customer\": @@ -385,7 +385,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 17:54:00 GMT + - Tue, 09 Feb 2021 17:41:14 GMT expires: - '-1' pragma: @@ -417,8 +417,8 @@ interactions: ParameterSetName: - --template-spec --yes User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: DELETE @@ -432,7 +432,7 @@ interactions: content-length: - '0' date: - - Thu, 07 Jan 2021 17:54:03 GMT + - Tue, 09 Feb 2021 17:41:17 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_show_template_spec.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_show_template_spec.yaml index 1eb2b734bd7..a26fba9221d 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_show_template_spec.yaml +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_show_template_spec.yaml @@ -13,8 +13,8 @@ interactions: ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 12 Oct 2020 03:43:36 GMT + - Tue, 09 Feb 2021 17:42:09 GMT expires: - '-1' pragma: @@ -60,8 +60,8 @@ interactions: ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -79,7 +79,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 12 Oct 2020 03:43:36 GMT + - Tue, 09 Feb 2021 17:42:09 GMT expires: - '-1' pragma: @@ -94,7 +94,7 @@ interactions: code: 404 message: Not Found - request: - body: '{"location": "westus"}' + body: '{"location": "westus", "tags": {}}' headers: Accept: - application/json @@ -105,35 +105,36 @@ interactions: Connection: - keep-alive Content-Length: - - '22' + - '34' Content-Type: - application/json; charset=utf-8 ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002?api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-10-12T03:43:39.0172583Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-10-12T03:43:39.0172583Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:42:12.1320715Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-09T17:42:12.1320715Z\"\r\n },\r\n \"properties\": {},\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-get-template-spec000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '719' + - '734' content-type: - application/json; charset=utf-8 date: - - Mon, 12 Oct 2020 03:43:38 GMT + - Tue, 09 Feb 2021 17:42:11 GMT expires: - '-1' pragma: @@ -159,7 +160,7 @@ interactions: "Microsoft.Network/networkSecurityGroups", "name": "[parameters(''name'')]", "apiVersion": "2015-06-15", "location": "[parameters(''location'')]", "properties": {"securityRules": []}, "dependsOn": []}], "outputs": {"NewNSG": {"type": "object", - "value": "[reference(parameters(''name''))]"}}}}}' + "value": "[reference(parameters(''name''))]"}}}}, "tags": {}}' headers: Accept: - application/json @@ -170,26 +171,26 @@ interactions: Connection: - keep-alive Content-Length: - - '781' + - '793' Content-Type: - application/json; charset=utf-8 ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002/versions/1.0?api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-10-12T03:43:40.2322611Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-10-12T03:43:40.2322611Z\"\r\n - \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": - {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:42:13.3571881Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-09T17:42:13.3571881Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n \ \"metadata\": {\r\n \"description\": \"Location for the @@ -210,11 +211,11 @@ interactions: cache-control: - no-cache content-length: - - '1817' + - '1832' content-type: - application/json; charset=utf-8 date: - - Mon, 12 Oct 2020 03:43:39 GMT + - Tue, 09 Feb 2021 17:42:13 GMT expires: - '-1' pragma: @@ -244,29 +245,32 @@ interactions: ParameterSetName: - -g --name User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002?$expand=versions&api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-10-12T03:43:39.0172583Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-10-12T03:43:40.2322611Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:42:12.1320715Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-09T17:42:13.3571881Z\"\r\n },\r\n \"properties\": {\r\n \"versions\": + {\r\n \"1.0\": {\r\n \"timeCreated\": \"2021-02-09T17:42:13.3571881+00:00\",\r\n + \ \"timeModified\": \"2021-02-09T17:42:13.3571881+00:00\"\r\n }\r\n + \ }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-get-template-spec000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '719' + - '911' content-type: - application/json; charset=utf-8 date: - - Mon, 12 Oct 2020 03:43:40 GMT + - Tue, 09 Feb 2021 17:42:14 GMT expires: - '-1' pragma: @@ -298,29 +302,172 @@ interactions: ParameterSetName: - --template-spec User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002?$expand=versions&api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-10-12T03:43:39.0172583Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-10-12T03:43:40.2322611Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:42:12.1320715Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-09T17:42:13.3571881Z\"\r\n },\r\n \"properties\": {\r\n \"versions\": + {\r\n \"1.0\": {\r\n \"timeCreated\": \"2021-02-09T17:42:13.3571881+00:00\",\r\n + \ \"timeModified\": \"2021-02-09T17:42:13.3571881+00:00\"\r\n }\r\n + \ }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-get-template-spec000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '719' + - '911' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 09 Feb 2021 17:42:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts show + Connection: + - keep-alive + ParameterSetName: + - -g --name --version + User-Agent: + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002/versions/1.0?api-version=2019-06-01-preview + response: + body: + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:42:13.3571881Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-09T17:42:13.3571881Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n + \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": + {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n + \ \"metadata\": {\r\n \"description\": \"Location for the + network security group.\"\r\n }\r\n },\r\n \"name\": + {\r\n \"type\": \"string\",\r\n \"metadata\": {\r\n \"description\": + \"Name of the network security group.\"\r\n }\r\n }\r\n },\r\n + \ \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": + \"Microsoft.Network/networkSecurityGroups\",\r\n \"name\": \"[parameters('name')]\",\r\n + \ \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[parameters('location')]\",\r\n + \ \"properties\": {\r\n \"securityRules\": []\r\n },\r\n + \ \"dependsOn\": []\r\n }\r\n ],\r\n \"outputs\": + {\r\n \"NewNSG\": {\r\n \"type\": \"object\",\r\n \"value\": + \"[reference(parameters('name'))]\"\r\n }\r\n }\r\n }\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002/versions/1.0\",\r\n + \ \"type\": \"Microsoft.Resources/templateSpecs/versions\",\r\n \"name\": + \"1.0\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1832' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 09 Feb 2021 17:42:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts show + Connection: + - keep-alive + ParameterSetName: + - --template-spec + User-Agent: + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002/versions/1.0?api-version=2019-06-01-preview + response: + body: + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-09T17:42:13.3571881Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-09T17:42:13.3571881Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n + \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": + {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n + \ \"metadata\": {\r\n \"description\": \"Location for the + network security group.\"\r\n }\r\n },\r\n \"name\": + {\r\n \"type\": \"string\",\r\n \"metadata\": {\r\n \"description\": + \"Name of the network security group.\"\r\n }\r\n }\r\n },\r\n + \ \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": + \"Microsoft.Network/networkSecurityGroups\",\r\n \"name\": \"[parameters('name')]\",\r\n + \ \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[parameters('location')]\",\r\n + \ \"properties\": {\r\n \"securityRules\": []\r\n },\r\n + \ \"dependsOn\": []\r\n }\r\n ],\r\n \"outputs\": + {\r\n \"NewNSG\": {\r\n \"type\": \"object\",\r\n \"value\": + \"[reference(parameters('name'))]\"\r\n }\r\n }\r\n }\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-get-template-spec000002/versions/1.0\",\r\n + \ \"type\": \"Microsoft.Resources/templateSpecs/versions\",\r\n \"name\": + \"1.0\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1832' content-type: - application/json; charset=utf-8 date: - - Mon, 12 Oct 2020 03:43:41 GMT + - Tue, 09 Feb 2021 17:42:15 GMT expires: - '-1' pragma: @@ -354,8 +501,8 @@ interactions: ParameterSetName: - --template-spec --yes User-Agent: - - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.13.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: DELETE @@ -369,7 +516,7 @@ interactions: content-length: - '0' date: - - Mon, 12 Oct 2020 03:43:44 GMT + - Tue, 09 Feb 2021 17:42:18 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index 0ac8419e84f..5d8719e1c45 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -760,8 +760,9 @@ def test_create_template_specs(self, resource_group, resource_group_location): self.check('template.variables.name', "[if(parameters('useHyphen'), variables('hyphenedNameAfterInstanceCount'), replace(variables('hyphenedNameAfterInstanceCount'), '-', ''))]") ]).get_output_in_json() - with self.assertRaises(IncorrectUsageError): + with self.assertRaises(IncorrectUsageError) as err: self.cmd('ts create --name {template_spec_name} -g {rg} -l {resource_group_location} --template-file "{tf}"') + self.assertTrue("please provide --template-uri if --query-string is specified" in str(err.exception)) # clean up self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') @@ -870,11 +871,18 @@ def test_show_template_spec(self, resource_group, resource_group_location): self.kwargs['template_spec_version_id'] = result['id'] self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') - ts_cnt = self.cmd('ts show -g {rg} --name {template_spec_name}').get_output_in_json() - assert len(ts_cnt) > 0 - ts_cnt_by_id = self.cmd('ts show --template-spec {template_spec_id}').get_output_in_json() - assert len(ts_cnt_by_id) > 0 - assert len(ts_cnt) == len(ts_cnt_by_id) + ts_parent = self.cmd('ts show -g {rg} --name {template_spec_name}').get_output_in_json() + assert len(ts_parent) > 0 + self.assertTrue(ts_parent['versions'] is not None) + ts_parent_by_id = self.cmd('ts show --template-spec {template_spec_id}').get_output_in_json() + assert len(ts_parent_by_id) > 0 + assert len(ts_parent) == len(ts_parent_by_id) + + ts_version = self.cmd('ts show -g {rg} --name {template_spec_name} --version 1.0').get_output_in_json() + assert len(ts_version) > 0 + ts_version_by_id = self.cmd('ts show --template-spec {template_spec_version_id}').get_output_in_json() + assert len(ts_version_by_id) > 0 + assert len(ts_version_by_id) == len(ts_version_by_id) # clean up self.cmd('ts delete --template-spec {template_spec_id} --yes') @@ -965,11 +973,19 @@ def test_template_spec_create_and_update_with_tags(self, resource_group, resourc # clean up self.cmd('ts delete --template-spec {template_spec_id} --yes') + @ResourceGroupPreparer(name_prefix='cli_test_export_template_spec', location="westus") + def test_template_spec_export_error_handling(self, resource_group, resource_group_location): + self.kwargs.update({ + 'template_spec_name': 'CLITestTemplateSpecExport', + 'output_folder': os.path.dirname(os.path.realpath(__file__)).replace('\\', '\\\\') + }) + with self.assertRaises(IncorrectUsageError) as err: + self.cmd('ts export -g {rg} --name {template_spec_name} --output-folder {output_folder}') + self.assertTrue('A template spec version must be specified for export.' in str(err.exception)) class TemplateSpecsExportTest(LiveScenarioTest): - - @ResourceGroupPreparer(name_prefix='cli_test_template_specs', location='westus') - def test_export_template_spec(self, resource_group, resource_group_location): + @ResourceGroupPreparer(name_prefix='cli_test_export_template_spec', location='westus') + def test_template_spec_export_version(self, resource_group, resource_group_location): curr_dir = os.path.dirname(os.path.realpath(__file__)) dir_name = self.create_random_name('TemplateSpecExport', 30) dir_name2 = self.create_random_name('TemplateSpecExport', 30) @@ -1017,8 +1033,7 @@ def test_export_template_spec(self, resource_group, resource_group_location): self.assertTrue(os.path.isfile(_template_file)) self.assertTrue(os.path.isfile(_artifactFile)) self.assertTrue(os.path.isfile(_artifactFile1)) - self.assertTrue(os.path.isfile(_artifactFile2))\ - + self.assertTrue(os.path.isfile(_artifactFile2)) class DeploymentTestsWithQueryString(LiveScenarioTest): From 2c9e6819738059b1567c11b15ba5d6ea082d6637 Mon Sep 17 00:00:00 2001 From: Dania Etienne Date: Tue, 9 Feb 2021 12:54:27 -0500 Subject: [PATCH 2/7] restored launch.json --- .vscode/launch.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c2a47d74891..1187e215bf1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Azure CLI Debug (Integrated Console)", "type": "python", "request": "launch", - "python": "${command:python.interpreterPath}", + "pythonPath": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -24,7 +24,7 @@ "type": "python", "request": "launch", "stopOnEntry": true, - "python": "${command:python.interpreterPath}", + "pythonPath": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -40,7 +40,7 @@ "name": "Azdev Scripts", "type": "python", "request": "launch", - "python": "${command:python.interpreterPath}", + "pythonPath": "${command:python.interpreterPath}", "program": "${workspaceRoot}/tools/automation/__main__.py", "cwd": "${workspaceRoot}", "args": [ From b1d5fd55d4de19c6c178d133edc4b0a516f9ff53 Mon Sep 17 00:00:00 2001 From: Dania Etienne Date: Tue, 9 Feb 2021 13:01:47 -0500 Subject: [PATCH 3/7] styling fixed --- .../cli/command_modules/resource/tests/latest/test_resource.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index 5d8719e1c45..e6bce8a6961 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -983,6 +983,7 @@ def test_template_spec_export_error_handling(self, resource_group, resource_grou self.cmd('ts export -g {rg} --name {template_spec_name} --output-folder {output_folder}') self.assertTrue('A template spec version must be specified for export.' in str(err.exception)) + class TemplateSpecsExportTest(LiveScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_export_template_spec', location='westus') def test_template_spec_export_version(self, resource_group, resource_group_location): From fa6f83b94294325aa8a40eaed0e058bb06d31ef1 Mon Sep 17 00:00:00 2001 From: Dania Etienne Date: Tue, 9 Feb 2021 19:33:16 -0500 Subject: [PATCH 4/7] Exporting template spec is not supported --- src/azure-cli/azure/cli/command_modules/resource/_help.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/_help.py b/src/azure-cli/azure/cli/command_modules/resource/_help.py index 62e43e1b6db..0e37f6c4b62 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/_help.py +++ b/src/azure-cli/azure/cli/command_modules/resource/_help.py @@ -2262,11 +2262,9 @@ helps['ts export'] = """ type: command -short-summary: Export the specified template spec and artifacts (if any) to the specified output folder. +short-summary: Export the specified template spec version and artifacts (if any) to the specified output folder. examples: - - name: Export the specified template spec with all versions. - text: az ts export -g testrg --name TemplateSpecName --output-folder C:/path/ - - name: Export the specified template spec. + - name: Export the specified template spec version based on resource ID. text: az ts export -s resourceID --output-folder C:/path/ - name: Export the specified template spec version. text: az ts export -g testrg --name TemplateSpecName --version VersionName --output-folder C:/path/ From 6c9671fc9ba1ad5a2cd21a1dba4b02550eae77c2 Mon Sep 17 00:00:00 2001 From: Dania Etienne Date: Sun, 14 Feb 2021 18:36:59 -0500 Subject: [PATCH 5/7] Re-recorded test cases --- .../recordings/test_delete_template_spec.yaml | 134 ++++---- ...late_spec_create_and_update_with_tags.yaml | 291 ++++++++++-------- .../resource/tests/latest/test_resource.py | 20 +- 3 files changed, 236 insertions(+), 209 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_delete_template_spec.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_delete_template_spec.yaml index f7395ebf3ba..da6fc5949b7 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_delete_template_spec.yaml +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_delete_template_spec.yaml @@ -13,8 +13,8 @@ interactions: ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:27 GMT + - Sun, 14 Feb 2021 22:17:03 GMT expires: - '-1' pragma: @@ -60,8 +60,8 @@ interactions: ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -79,7 +79,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:27 GMT + - Sun, 14 Feb 2021 22:17:03 GMT expires: - '-1' pragma: @@ -94,7 +94,7 @@ interactions: code: 404 message: Not Found - request: - body: '{"location": "westus"}' + body: '{"location": "westus", "tags": {}}' headers: Accept: - application/json @@ -105,35 +105,36 @@ interactions: Connection: - keep-alive Content-Length: - - '22' + - '34' Content-Type: - application/json; charset=utf-8 ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002?api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-12-16T20:47:29.0571593Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-12-16T20:47:29.0571593Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:17:05.623697Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-14T22:17:05.623697Z\"\r\n },\r\n \"properties\": {},\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-list-template-spec000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '719' + - '732' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:29 GMT + - Sun, 14 Feb 2021 22:17:05 GMT expires: - '-1' pragma: @@ -159,7 +160,7 @@ interactions: "Microsoft.Network/networkSecurityGroups", "name": "[parameters(''name'')]", "apiVersion": "2015-06-15", "location": "[parameters(''location'')]", "properties": {"securityRules": []}, "dependsOn": []}], "outputs": {"NewNSG": {"type": "object", - "value": "[reference(parameters(''name''))]"}}}}}' + "value": "[reference(parameters(''name''))]"}}}}, "tags": {}}' headers: Accept: - application/json @@ -170,26 +171,26 @@ interactions: Connection: - keep-alive Content-Length: - - '781' + - '793' Content-Type: - application/json; charset=utf-8 ParameterSetName: - -g -n -v -l -f User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002/versions/1.0?api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-12-16T20:47:30.3528797Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-12-16T20:47:30.3528797Z\"\r\n - \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": - {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:17:06.7337712Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-14T22:17:06.7337712Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n \ \"metadata\": {\r\n \"description\": \"Location for the @@ -210,11 +211,11 @@ interactions: cache-control: - no-cache content-length: - - '1817' + - '1832' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:30 GMT + - Sun, 14 Feb 2021 22:17:06 GMT expires: - '-1' pragma: @@ -244,20 +245,20 @@ interactions: ParameterSetName: - --template-spec User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002/versions/1.0?api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-12-16T20:47:30.3528797Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-12-16T20:47:30.3528797Z\"\r\n - \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": - {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:17:06.7337712Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-14T22:17:06.7337712Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n \ \"metadata\": {\r\n \"description\": \"Location for the @@ -278,11 +279,11 @@ interactions: cache-control: - no-cache content-length: - - '1817' + - '1832' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:30 GMT + - Sun, 14 Feb 2021 22:17:07 GMT expires: - '-1' pragma: @@ -314,29 +315,32 @@ interactions: ParameterSetName: - --template-spec User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002?$expand=versions&api-version=2019-06-01-preview response: body: - string: "{\r\n \"location\": \"westus\",\r\n \"systemData\": {\r\n \"createdBy\": - \"daetienn@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": - \"2020-12-16T20:47:29.0571593Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n - \ \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-12-16T20:47:30.3528797Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002\",\r\n + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": + {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:17:05.623697Z\",\r\n \"lastModifiedBy\": + \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": + \"2021-02-14T22:17:06.7337712Z\"\r\n },\r\n \"properties\": {\r\n \"versions\": + {\r\n \"1.0\": {\r\n \"timeCreated\": \"2021-02-14T22:17:06.7337712+00:00\",\r\n + \ \"timeModified\": \"2021-02-14T22:17:06.7337712+00:00\"\r\n }\r\n + \ }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-list-template-spec000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '719' + - '910' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:31 GMT + - Sun, 14 Feb 2021 22:17:07 GMT expires: - '-1' pragma: @@ -370,8 +374,8 @@ interactions: ParameterSetName: - --template-spec --yes User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: DELETE @@ -385,7 +389,7 @@ interactions: content-length: - '0' date: - - Wed, 16 Dec 2020 20:47:39 GMT + - Sun, 14 Feb 2021 22:17:09 GMT expires: - '-1' pragma: @@ -415,8 +419,8 @@ interactions: ParameterSetName: - -g User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -424,10 +428,10 @@ interactions: response: body: string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"westus\",\r\n - \ \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-12-16T20:47:29.0571593Z\",\r\n + \ \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:17:05.623697Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2020-12-16T20:47:30.3528797Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:17:06.7337712Z\"\r\n \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-list-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-list-template-spec000002\"\r\n }\r\n ]\r\n}" @@ -435,11 +439,11 @@ interactions: cache-control: - no-cache content-length: - - '804' + - '822' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:40 GMT + - Sun, 14 Feb 2021 22:17:10 GMT expires: - '-1' pragma: @@ -473,8 +477,8 @@ interactions: ParameterSetName: - --template-spec --yes User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: DELETE @@ -488,7 +492,7 @@ interactions: content-length: - '0' date: - - Wed, 16 Dec 2020 20:47:42 GMT + - Sun, 14 Feb 2021 22:17:12 GMT expires: - '-1' pragma: @@ -518,8 +522,8 @@ interactions: ParameterSetName: - -g User-Agent: - - python/3.8.6 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.3.0 Azure-SDK-For-Python AZURECLI/2.16.0 + - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -535,7 +539,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 16 Dec 2020 20:47:43 GMT + - Sun, 14 Feb 2021 22:17:12 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_template_spec_create_and_update_with_tags.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_template_spec_create_and_update_with_tags.yaml index 476df1cee2a..1e97351de84 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_template_spec_create_and_update_with_tags.yaml +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_template_spec_create_and_update_with_tags.yaml @@ -14,7 +14,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:16 GMT + - Sun, 14 Feb 2021 22:18:29 GMT expires: - '-1' pragma: @@ -61,7 +61,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -79,7 +79,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:16 GMT + - Sun, 14 Feb 2021 22:18:29 GMT expires: - '-1' pragma: @@ -112,7 +112,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -121,9 +121,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:18.4932071Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:31.9853059Z\"\r\n \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: @@ -134,7 +134,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:18 GMT + - Sun, 14 Feb 2021 22:18:32 GMT expires: - '-1' pragma: @@ -178,7 +178,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -187,9 +187,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:19.8282865Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:33.3353042Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -216,7 +216,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:19 GMT + - Sun, 14 Feb 2021 22:18:33 GMT expires: - '-1' pragma: @@ -247,7 +247,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -256,9 +256,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:19.8282865Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:33.3353042Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -285,7 +285,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:20 GMT + - Sun, 14 Feb 2021 22:18:33 GMT expires: - '-1' pragma: @@ -318,29 +318,32 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?$expand=versions&api-version=2019-06-01-preview response: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:19.8282865Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:33.3353042Z\"\r\n + \ },\r\n \"properties\": {\r\n \"versions\": {\r\n \"1.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:33.3353042+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:33.3353042+00:00\"\r\n }\r\n }\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '762' + - '939' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:21 GMT + - Sun, 14 Feb 2021 22:18:34 GMT expires: - '-1' pragma: @@ -373,7 +376,7 @@ interactions: - -g -n -v -l -f User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -391,7 +394,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:21 GMT + - Sun, 14 Feb 2021 22:18:34 GMT expires: - '-1' pragma: @@ -420,7 +423,7 @@ interactions: - -g -n -v -l -f User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -429,9 +432,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:19.8282865Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:33.3353042Z\"\r\n \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: @@ -442,7 +445,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:21 GMT + - Sun, 14 Feb 2021 22:18:34 GMT expires: - '-1' pragma: @@ -488,7 +491,7 @@ interactions: - -g -n -v -l -f User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -497,9 +500,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:23.6928125Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:37.4624124Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:23.6928125Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:37.4624124Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -526,7 +529,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:23 GMT + - Sun, 14 Feb 2021 22:18:37 GMT expires: - '-1' pragma: @@ -557,7 +560,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -566,9 +569,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:23.6928125Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:37.4624124Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:23.6928125Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:37.4624124Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -595,7 +598,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:24 GMT + - Sun, 14 Feb 2021 22:18:38 GMT expires: - '-1' pragma: @@ -628,7 +631,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -646,7 +649,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:25 GMT + - Sun, 14 Feb 2021 22:18:38 GMT expires: - '-1' pragma: @@ -675,7 +678,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -684,9 +687,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:23.6928125Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:37.4624124Z\"\r\n \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: @@ -697,7 +700,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:25 GMT + - Sun, 14 Feb 2021 22:18:39 GMT expires: - '-1' pragma: @@ -744,7 +747,7 @@ interactions: - -g -n -v -l -f --tags User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -754,9 +757,9 @@ interactions: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cliName1\": \"cliValue1\",\r\n \"cliName4\": \"cliValue4\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:27.2696242Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:41.6486812Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:27.2696242Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:41.6486812Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -782,7 +785,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:27 GMT + - Sun, 14 Feb 2021 22:18:41 GMT expires: - '-1' pragma: @@ -813,7 +816,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -823,9 +826,9 @@ interactions: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cliName1\": \"cliValue1\",\r\n \"cliName4\": \"cliValue4\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:27.2696242Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:41.6486812Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:27.2696242Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:41.6486812Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -851,7 +854,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:28 GMT + - Sun, 14 Feb 2021 22:18:42 GMT expires: - '-1' pragma: @@ -884,29 +887,36 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?$expand=versions&api-version=2019-06-01-preview response: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:27.2696242Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:41.6486812Z\"\r\n + \ },\r\n \"properties\": {\r\n \"versions\": {\r\n \"1.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:33.3353042+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:33.3353042+00:00\"\r\n },\r\n \"2.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:37.4624124+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:37.4624124+00:00\"\r\n },\r\n \"3.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:41.6486812+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:41.6486812+00:00\"\r\n }\r\n }\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '762' + - '1235' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:28 GMT + - Sun, 14 Feb 2021 22:18:43 GMT expires: - '-1' pragma: @@ -939,7 +949,7 @@ interactions: - -g -n -v -f --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -948,9 +958,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:19.8282865Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:33.3353042Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -977,7 +987,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:28 GMT + - Sun, 14 Feb 2021 22:18:44 GMT expires: - '-1' pragma: @@ -1023,7 +1033,7 @@ interactions: - -g -n -v -f --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -1032,9 +1042,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:29.4606185Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:44.5179649Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -1061,7 +1071,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:28 GMT + - Sun, 14 Feb 2021 22:18:44 GMT expires: - '-1' pragma: @@ -1092,7 +1102,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1101,9 +1111,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:29.4606185Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:44.5179649Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -1130,7 +1140,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:29 GMT + - Sun, 14 Feb 2021 22:18:44 GMT expires: - '-1' pragma: @@ -1163,7 +1173,7 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1172,9 +1182,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:29.4606185Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:44.5179649Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -1201,7 +1211,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:29 GMT + - Sun, 14 Feb 2021 22:18:45 GMT expires: - '-1' pragma: @@ -1247,7 +1257,7 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -1256,9 +1266,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:30.9783726Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:46.6221214Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -1284,7 +1294,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:31 GMT + - Sun, 14 Feb 2021 22:18:46 GMT expires: - '-1' pragma: @@ -1315,7 +1325,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1324,9 +1334,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:19.8282865Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:33.3353042Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:30.9783726Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:46.6221214Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -1352,7 +1362,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:32 GMT + - Sun, 14 Feb 2021 22:18:47 GMT expires: - '-1' pragma: @@ -1385,7 +1395,7 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1394,9 +1404,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:23.6928125Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:37.4624124Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:23.6928125Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:37.4624124Z\"\r\n \ },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": @@ -1423,7 +1433,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:32 GMT + - Sun, 14 Feb 2021 22:18:48 GMT expires: - '-1' pragma: @@ -1469,7 +1479,7 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -1478,9 +1488,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:23.6928125Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:37.4624124Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:33.3897715Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:49.5518907Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -1506,7 +1516,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:34 GMT + - Sun, 14 Feb 2021 22:18:49 GMT expires: - '-1' pragma: @@ -1537,7 +1547,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1546,9 +1556,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:23.6928125Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:37.4624124Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:33.3897715Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:49.5518907Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -1574,7 +1584,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:34 GMT + - Sun, 14 Feb 2021 22:18:50 GMT expires: - '-1' pragma: @@ -1607,23 +1617,23 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_template_specs000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001","name":"cli_test_template_specs000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-01-07T19:19:15Z","StorageType":"testStrogae"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001","name":"cli_test_template_specs000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-02-14T22:18:27Z","ic3":"ic3","NameTag":"ValueTag","StorageType":"Standard_LRS"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '456' + - '490' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:34 GMT + - Sun, 14 Feb 2021 22:18:50 GMT expires: - '-1' pragma: @@ -1652,7 +1662,7 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1661,9 +1671,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:33.3897715Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:49.5518907Z\"\r\n \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: @@ -1674,7 +1684,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:35 GMT + - Sun, 14 Feb 2021 22:18:52 GMT expires: - '-1' pragma: @@ -1720,7 +1730,7 @@ interactions: - -g -n -v -f --tags --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -1729,9 +1739,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:27.2696242Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:41.6486812Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:36.1380633Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:52.6592995Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -1757,7 +1767,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:36 GMT + - Sun, 14 Feb 2021 22:18:53 GMT expires: - '-1' pragma: @@ -1788,7 +1798,7 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET @@ -1797,9 +1807,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:27.2696242Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:41.6486812Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:36.1380633Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": + \"2021-02-14T22:18:52.6592995Z\"\r\n },\r\n \"properties\": {\r\n \"artifacts\": [],\r\n \"template\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \ \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"[resourceGroup().location]\",\r\n @@ -1825,7 +1835,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:36 GMT + - Sun, 14 Feb 2021 22:18:54 GMT expires: - '-1' pragma: @@ -1858,29 +1868,36 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?$expand=versions&api-version=2019-06-01-preview response: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"cli-test\": \"test\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \ \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-01-07T19:19:36.1380633Z\"\r\n - \ },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-02-14T22:18:52.6592995Z\"\r\n + \ },\r\n \"properties\": {\r\n \"versions\": {\r\n \"1.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:33.3353042+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:46.6221214+00:00\"\r\n },\r\n \"2.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:37.4624124+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:49.5518907+00:00\"\r\n },\r\n \"3.0\": {\r\n + \ \"timeCreated\": \"2021-02-14T22:18:41.6486812+00:00\",\r\n \"timeModified\": + \"2021-02-14T22:18:52.6592995+00:00\"\r\n }\r\n }\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '762' + - '1235' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:37 GMT + - Sun, 14 Feb 2021 22:18:54 GMT expires: - '-1' pragma: @@ -1913,23 +1930,23 @@ interactions: - -g -n --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_template_specs000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001","name":"cli_test_template_specs000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-01-07T19:19:15Z","StorageType":"testStrogae"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001","name":"cli_test_template_specs000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-02-14T22:18:27Z","ic3":"ic3","NameTag":"ValueTag","StorageType":"Standard_LRS"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '456' + - '490' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:37 GMT + - Sun, 14 Feb 2021 22:18:54 GMT expires: - '-1' pragma: @@ -1962,7 +1979,7 @@ interactions: - -g -n --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: PUT @@ -1971,9 +1988,9 @@ interactions: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:38.9815574Z\"\r\n },\r\n \"properties\": {},\r\n \"id\": + \"2021-02-14T22:18:56.4279068Z\"\r\n },\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: @@ -1984,7 +2001,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:39 GMT + - Sun, 14 Feb 2021 22:18:56 GMT expires: - '-1' pragma: @@ -2015,29 +2032,35 @@ interactions: - --template-spec User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002?$expand=versions&api-version=2019-06-01-preview response: body: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"daetienn@microsoft.com\",\r\n \"createdByType\": - \"User\",\r\n \"createdAt\": \"2021-01-07T19:19:18.4932071Z\",\r\n \"lastModifiedBy\": + \"User\",\r\n \"createdAt\": \"2021-02-14T22:18:31.9853059Z\",\r\n \"lastModifiedBy\": \"daetienn@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": - \"2021-01-07T19:19:38.9815574Z\"\r\n },\r\n \"properties\": {},\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n + \"2021-02-14T22:18:56.4279068Z\"\r\n },\r\n \"properties\": {\r\n \"versions\": + {\r\n \"1.0\": {\r\n \"timeCreated\": \"2021-02-14T22:18:33.3353042+00:00\",\r\n + \ \"timeModified\": \"2021-02-14T22:18:46.6221214+00:00\"\r\n },\r\n + \ \"2.0\": {\r\n \"timeCreated\": \"2021-02-14T22:18:37.4624124+00:00\",\r\n + \ \"timeModified\": \"2021-02-14T22:18:49.5518907+00:00\"\r\n },\r\n + \ \"3.0\": {\r\n \"timeCreated\": \"2021-02-14T22:18:41.6486812+00:00\",\r\n + \ \"timeModified\": \"2021-02-14T22:18:52.6592995+00:00\"\r\n }\r\n + \ }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-template-spec-tags000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-template-spec-tags000002\"\r\n}" headers: cache-control: - no-cache content-length: - - '734' + - '1207' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jan 2021 19:19:39 GMT + - Sun, 14 Feb 2021 22:18:57 GMT expires: - '-1' pragma: @@ -2072,7 +2095,7 @@ interactions: - --template-spec --yes User-Agent: - python/3.8.7 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.17.1 (MSI) + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.19.0 accept-language: - en-US method: DELETE @@ -2086,7 +2109,7 @@ interactions: content-length: - '0' date: - - Thu, 07 Jan 2021 19:19:43 GMT + - Sun, 14 Feb 2021 22:19:00 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index e6bce8a6961..826456d5b3d 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -973,16 +973,6 @@ def test_template_spec_create_and_update_with_tags(self, resource_group, resourc # clean up self.cmd('ts delete --template-spec {template_spec_id} --yes') - @ResourceGroupPreparer(name_prefix='cli_test_export_template_spec', location="westus") - def test_template_spec_export_error_handling(self, resource_group, resource_group_location): - self.kwargs.update({ - 'template_spec_name': 'CLITestTemplateSpecExport', - 'output_folder': os.path.dirname(os.path.realpath(__file__)).replace('\\', '\\\\') - }) - with self.assertRaises(IncorrectUsageError) as err: - self.cmd('ts export -g {rg} --name {template_spec_name} --output-folder {output_folder}') - self.assertTrue('A template spec version must be specified for export.' in str(err.exception)) - class TemplateSpecsExportTest(LiveScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_export_template_spec', location='westus') @@ -1036,6 +1026,16 @@ def test_template_spec_export_version(self, resource_group, resource_group_locat self.assertTrue(os.path.isfile(_artifactFile1)) self.assertTrue(os.path.isfile(_artifactFile2)) + @ResourceGroupPreparer(name_prefix='cli_test_export_template_spec', location="westus") + def test_template_spec_export_error_handling(self, resource_group, resource_group_location): + self.kwargs.update({ + 'template_spec_name': 'CLITestTemplateSpecExport', + 'output_folder': os.path.dirname(os.path.realpath(__file__)).replace('\\', '\\\\') + }) + with self.assertRaises(IncorrectUsageError) as err: + self.cmd('ts export -g {rg} --name {template_spec_name} --output-folder {output_folder}') + self.assertTrue('A template spec version must be specified for export.' in str(err.exception)) + class DeploymentTestsWithQueryString(LiveScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_query_str_rg', location='eastus') From cd215f6e1fd7e3e00fac19833846ab9b684d8eee Mon Sep 17 00:00:00 2001 From: Dania Etienne Date: Wed, 17 Feb 2021 21:40:33 -0500 Subject: [PATCH 6/7] Update src/azure-cli/azure/cli/command_modules/resource/custom.py Co-authored-by: Xing Zhou --- src/azure-cli/azure/cli/command_modules/resource/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/custom.py b/src/azure-cli/azure/cli/command_modules/resource/custom.py index 1313b6cd299..07d673ad5ab 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/custom.py +++ b/src/azure-cli/azure/cli/command_modules/resource/custom.py @@ -1939,7 +1939,7 @@ def export_template_spec(cmd, output_folder, resource_group_name=None, name=None if version == name: version = None if not version: - raise IncorrectUsageError('a template spec version must be specified for export') + raise IncorrectUsageError('Please specify the template spec version for export') exported_template = rcf.template_spec_versions.get(resource_group_name, name, version) from azure.cli.command_modules.resource._packing_engine import (unpack) return unpack(cmd, exported_template, output_folder, (str(name) + '.JSON')) From fc21268c52161a7e7f610495da00876d353d9ad7 Mon Sep 17 00:00:00 2001 From: Xing Zhou Date: Thu, 18 Feb 2021 10:44:47 +0800 Subject: [PATCH 7/7] Update src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py --- .../cli/command_modules/resource/tests/latest/test_resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index 826456d5b3d..696132141dc 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -1034,7 +1034,7 @@ def test_template_spec_export_error_handling(self, resource_group, resource_grou }) with self.assertRaises(IncorrectUsageError) as err: self.cmd('ts export -g {rg} --name {template_spec_name} --output-folder {output_folder}') - self.assertTrue('A template spec version must be specified for export.' in str(err.exception)) + self.assertTrue('Please specify the template spec version for export' in str(err.exception)) class DeploymentTestsWithQueryString(LiveScenarioTest):