diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 5bf5d6a7427..7cde02fff1c 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -21,6 +21,12 @@ Release History * [BREAKING] When not specified, the default value for `--start-task-wait-for-success` on `az batch pool create` is now true (was false). * [BREAKING] The default value for Scope on AutoUserSpecification is now always Pool (was Task on Windows nodes, Pool on Linux nodes). This argument is not exposed via the commandline, but can be set in the `--json-file` arguments. +**Compute** + +* vmss create: Add --terminate-notification-time parameters to support terminate scheduled event configurability. +* vmss update: Add --enable-terminate-notification and --terminate-notification-time parameters to support terminate scheduled event configurability. +* Update azure-mgmt-compute version to 7.0.0. + **HDInsight** * `az hdinsight resize`: Make parameter `--workernode-count/-c` required diff --git a/src/azure-cli/azure/cli/command_modules/vm/_params.py b/src/azure-cli/azure/cli/command_modules/vm/_params.py index 8ef306487de..fc78ac35744 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -500,6 +500,13 @@ def load_arguments(self, _): c.argument('protect_from_scale_in', arg_type=protection_policy_type, help="Protect the VM instance from scale-in operations.") c.argument('protect_from_scale_set_actions', arg_type=protection_policy_type, help="Protect the VM instance from scale set actions (including scale-in).") + c.argument('enable_terminate_notification', min_api='2019-03-01', arg_type=get_three_state_flag(), + help='Enable terminate notification') + + for scope in ['vmss create', 'vmss update']: + with self.argument_context(scope) as c: + c.argument('terminate_notification_time', min_api='2019-03-01', + help='Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted') for scope, help_prefix in [('vmss update', 'Update the'), ('vmss wait', 'Wait on the')]: with self.argument_context(scope) as c: diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index 1b8eb52fca9..81432ba4863 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -623,7 +623,8 @@ def build_vmss_resource(cmd, name, naming_prefix, location, tags, overprovision, backend_address_pool_id=None, inbound_nat_pool_id=None, health_probe=None, single_placement_group=None, platform_fault_domain_count=None, custom_data=None, secrets=None, license_type=None, zones=None, priority=None, eviction_policy=None, - application_security_groups=None, ultra_ssd_enabled=None, proximity_placement_group=None): + application_security_groups=None, ultra_ssd_enabled=None, proximity_placement_group=None, + terminate_notification_time=None): # Build IP configuration ip_configuration = { @@ -795,6 +796,15 @@ def build_vmss_resource(cmd, name, naming_prefix, location, tags, overprovision, if proximity_placement_group: vmss_properties['proximityPlacementGroup'] = {'id': proximity_placement_group} + if terminate_notification_time is not None: + scheduled_events_profile = { + 'terminateNotificationProfile': { + 'notBeforeTimeout': terminate_notification_time, + 'enable': 'true' + } + } + vmss_properties['virtualMachineProfile']['scheduledEventsProfile'] = scheduled_events_profile + vmss = { 'type': 'Microsoft.Compute/virtualMachineScaleSets', 'name': name, diff --git a/src/azure-cli/azure/cli/command_modules/vm/_validators.py b/src/azure-cli/azure/cli/command_modules/vm/_validators.py index d1802d8badd..fd2572f0738 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_validators.py @@ -1287,6 +1287,7 @@ def process_vmss_create_namespace(cmd, namespace): _validate_vm_vmss_create_auth(namespace) _validate_vm_vmss_msi(cmd, namespace) _validate_proximity_placement_group(cmd, namespace) + _validate_vmss_terminate_notification(cmd, namespace) if namespace.secrets: _validate_secrets(namespace.secrets, namespace.os_type) @@ -1306,6 +1307,7 @@ def validate_vmss_update_namespace(cmd, namespace): # pylint: disable=unused-ar if namespace.protect_from_scale_in is not None or namespace.protect_from_scale_set_actions is not None: raise CLIError("usage error: protection policies can only be applied to VM instances within a VMSS." " Please use --instance-id to specify a VM instance") + _validate_vmss_update_terminate_notification_related(cmd, namespace) # endregion @@ -1489,3 +1491,24 @@ def process_vm_vmss_stop(cmd, namespace): # pylint: disable=unused-argument else: logger.warning("About to power off the specified VM...\nIt will continue to be billed. " "To deallocate a VM, run: az vm deallocate.") + + +def _validate_vmss_update_terminate_notification_related(cmd, namespace): # pylint: disable=unused-argument + """ + Validate vmss update enable_terminate_notification and terminate_notification_time. + If terminate_notification_time is specified, enable_terminate_notification should not be false + If enable_terminate_notification is true, must specify terminate_notification_time + """ + if namespace.enable_terminate_notification is False and namespace.terminate_notification_time is not None: + raise CLIError("usage error: please enable --enable-terminate-notification") + if namespace.enable_terminate_notification is True and namespace.terminate_notification_time is None: + raise CLIError("usage error: please set --terminate-notification-time") + _validate_vmss_terminate_notification(cmd, namespace) + + +def _validate_vmss_terminate_notification(cmd, namespace): # pylint: disable=unused-argument + """ + Transform minutes to ISO 8601 formmat + """ + if namespace.terminate_notification_time is not None: + namespace.terminate_notification_time = 'PT' + namespace.terminate_notification_time + 'M' diff --git a/src/azure-cli/azure/cli/command_modules/vm/custom.py b/src/azure-cli/azure/cli/command_modules/vm/custom.py index 09c46a19c92..6b38e9f283b 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -1858,7 +1858,7 @@ def create_vmss(cmd, vmss_name, resource_group_name, image, assign_identity=None, identity_scope=None, identity_role='Contributor', identity_role_id=None, zones=None, priority=None, eviction_policy=None, application_security_groups=None, ultra_ssd_enabled=None, ephemeral_os_disk=None, - proximity_placement_group=None, aux_subscriptions=None): + proximity_placement_group=None, aux_subscriptions=None, terminate_notification_time=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string from azure.cli.core.commands.arm import ArmTemplateBuilder @@ -2062,7 +2062,8 @@ def _get_public_ip_address_allocation(value, sku): single_placement_group=single_placement_group, platform_fault_domain_count=platform_fault_domain_count, custom_data=custom_data, secrets=secrets, license_type=license_type, zones=zones, priority=priority, eviction_policy=eviction_policy, application_security_groups=application_security_groups, - ultra_ssd_enabled=ultra_ssd_enabled, proximity_placement_group=proximity_placement_group) + ultra_ssd_enabled=ultra_ssd_enabled, proximity_placement_group=proximity_placement_group, + terminate_notification_time=terminate_notification_time) vmss_resource['dependsOn'] = vmss_dependencies if plan_name: @@ -2289,6 +2290,7 @@ def update_vmss_instances(cmd, resource_group_name, vm_scale_set_name, instance_ def update_vmss(cmd, resource_group_name, name, license_type=None, no_wait=False, instance_id=None, protect_from_scale_in=None, protect_from_scale_set_actions=None, + enable_terminate_notification=None, terminate_notification_time=None, **kwargs): vmss = kwargs['parameters'] client = _compute_client_factory(cmd.cli_ctx) @@ -2316,6 +2318,12 @@ def update_vmss(cmd, resource_group_name, name, license_type=None, no_wait=False if license_type is not None: vmss.virtual_machine_profile.license_type = license_type + if enable_terminate_notification is not None or terminate_notification_time is not None: + TerminateNotificationProfile = cmd.get_models('TerminateNotificationProfile') + vmss.virtual_machine_profile.scheduled_events_profile.terminate_notification_profile =\ + TerminateNotificationProfile(not_before_timeout=terminate_notification_time, + enable=enable_terminate_notification) + return sdk_no_wait(no_wait, client.virtual_machine_scale_sets.create_or_update, resource_group_name, name, **kwargs) diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_terminate_notification.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_terminate_notification.yaml new file mode 100644 index 00000000000..82a651a09d5 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_terminate_notification.yaml @@ -0,0 +1,1528 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001?api-version=2019-05-10 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001","name":"cli_test_vmss_terminate_notification_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2019-09-09T05:25:13Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:25:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-RAW\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:25:19 GMT + etag: + - W/"c3166eef59fc5bc1fcf7ec4817934fa1311cbeab" + expires: + - Mon, 09 Sep 2019 05:30:19 GMT + source-age: + - '229' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding, Accept-Encoding + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 64bd4e27d6890d7a350e595818ac618df9de09d1 + x-frame-options: + - deny + x-geo-block-list: + - '' + x-github-request-id: + - F44E:45BD:175D52:1928EE:5D75E159 + x-served-by: + - cache-sin18025-SIN + x-timer: + - S1568006720.915829,VS0,VE1 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-network/4.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:25:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": + [{"name": "vm1VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vm1Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vm1LBPublicIP", + "location": "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "vm1LB", "location": + "westus", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", + "Microsoft.Network/publicIpAddresses/vm1LBPublicIP"], "properties": {"backendAddressPools": + [{"name": "vm1LBBEPool"}], "inboundNatPools": [{"name": "vm1LBNatPool", "properties": + {"frontendIPConfiguration": {"id": "[concat(resourceId(\''Microsoft.Network/loadBalancers\'', + \''vm1LB\''), \''/frontendIPConfigurations/\'', \''loadBalancerFrontEnd\'')]"}, + "protocol": "tcp", "frontendPortRangeStart": "50000", "frontendPortRangeEnd": + "50119", "backendPort": 22}}], "frontendIPConfigurations": [{"name": "loadBalancerFrontEnd", + "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/publicIPAddresses/vm1LBPublicIP"}}}]}}, + {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "vm1", "location": + "westus", "tags": {}, "apiVersion": "2019-03-01", "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", + "Microsoft.Network/loadBalancers/vm1LB"], "sku": {"name": "Standard_DS1_v2", + "capacity": 2}, "properties": {"overprovision": true, "upgradePolicy": {"mode": + "manual"}, "virtualMachineProfile": {"storageProfile": {"osDisk": {"createOption": + "FromImage", "caching": "ReadWrite", "managedDisk": {"storageAccountType": null}}, + "imageReference": {"publisher": "Canonical", "offer": "UbuntuServer", "sku": + "18.04-LTS", "version": "latest"}}, "osProfile": {"computerNamePrefix": "vm18b5798", + "adminUsername": "fey", "linuxConfiguration": {"disablePasswordAuthentication": + true, "ssh": {"publicKeys": [{"path": "/home/fey/.ssh/authorized_keys", "keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX"}]}}}, + "networkProfile": {"networkInterfaceConfigurations": [{"name": "vm18b5798Nic", + "properties": {"primary": "true", "ipConfigurations": [{"name": "vm18b5798IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool"}]}}]}}]}, + "scheduledEventsProfile": {"terminateNotificationProfile": {"notBeforeTimeout": + "PT5M", "enable": "true"}}}, "singlePlacementGroup": null}}], "outputs": {"VMSS": + {"type": "object", "value": "[reference(resourceId(\''Microsoft.Compute/virtualMachineScaleSets\'', + \''vm1\''),providers(\''Microsoft.Compute\'', \''virtualMachineScaleSets\'').apiVersions[0])]"}}}, + "parameters": {}, "mode": "Incremental"}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4218' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2019-05-10 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/vmss_deploy_jmGctWAmWl9COpXGNGAIbKgnSjhj4yJ8","name":"vmss_deploy_jmGctWAmWl9COpXGNGAIbKgnSjhj4yJ8","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1332271109211616747","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2019-09-09T05:25:25.0840345Z","duration":"PT2.6575021S","correlationId":"d30e0b66-706a-4bdd-8a2d-a01f024826fb","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/publicIPAddresses/vm1LBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1LBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vm1LB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vm1LB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vm1"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/vmss_deploy_jmGctWAmWl9COpXGNGAIbKgnSjhj4yJ8/operationStatuses/08586336001630510984?api-version=2019-05-10 + cache-control: + - no-cache + content-length: + - '2668' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:25:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586336001630510984?api-version=2019-05-10 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:25:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586336001630510984?api-version=2019-05-10 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:26:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586336001630510984?api-version=2019-05-10 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:26:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08586336001630510984?api-version=2019-05-10 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:27:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-resource/3.1.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2019-05-10 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Resources/deployments/vmss_deploy_jmGctWAmWl9COpXGNGAIbKgnSjhj4yJ8","name":"vmss_deploy_jmGctWAmWl9COpXGNGAIbKgnSjhj4yJ8","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1332271109211616747","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2019-09-09T05:27:04.0972388Z","duration":"PT1M41.6707064S","correlationId":"d30e0b66-706a-4bdd-8a2d-a01f024826fb","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/publicIPAddresses/vm1LBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1LBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vm1LB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vm1LB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vm1"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual"},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"vm18b5798","adminUsername":"fey","linuxConfiguration":{"disablePasswordAuthentication":true,"ssh":{"publicKeys":[{"path":"/home/fey/.ssh/authorized_keys","keyData":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX"}]},"provisionVMAgent":true},"secrets":[],"allowExtensionOperations":true,"requireGuestProvisionSignal":true},"storageProfile":{"osDisk":{"createOption":"FromImage","caching":"ReadWrite","managedDisk":{"storageAccountType":"Premium_LRS"}},"imageReference":{"publisher":"Canonical","offer":"UbuntuServer","sku":"18.04-LTS","version":"latest"}},"networkProfile":{"networkInterfaceConfigurations":[{"name":"vm18b5798Nic","properties":{"primary":true,"enableAcceleratedNetworking":false,"dnsSettings":{"dnsServers":[]},"enableIPForwarding":false,"ipConfigurations":[{"name":"vm18b5798IPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"},"privateIPAddressVersion":"IPv4","loadBalancerBackendAddressPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool"}],"loadBalancerInboundNatPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool"}]}}]}}]},"scheduledEventsProfile":{"terminateNotificationProfile":{"notBeforeTimeout":"PT5M","enable":true}}},"provisioningState":"Succeeded","overprovision":true,"doNotRunExtensionsOnOverprovisionedVMs":false,"uniqueId":"82fef48c-2972-4aec-a320-4afcef71c438"}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/publicIPAddresses/vm1LBPublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '5886' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:27:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT5M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3332' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:27:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;196,Microsoft.Compute/GetVMScaleSet30Min;1295 + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westus", "tags": {}, "sku": {"name": "Standard_DS1_v2", + "tier": "Standard", "capacity": 2}, "properties": {"upgradePolicy": {"mode": + "Manual"}, "virtualMachineProfile": {"osProfile": {"computerNamePrefix": "vm18b5798", + "adminUsername": "fey", "linuxConfiguration": {"disablePasswordAuthentication": + true, "ssh": {"publicKeys": [{"path": "/home/fey/.ssh/authorized_keys", "keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX"}]}, + "provisionVMAgent": true}, "secrets": []}, "storageProfile": {"imageReference": + {"publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": + "latest"}, "osDisk": {"caching": "ReadWrite", "createOption": "FromImage", "managedDisk": + {"storageAccountType": "Premium_LRS"}}}, "networkProfile": {"networkInterfaceConfigurations": + [{"name": "vm18b5798Nic", "properties": {"primary": true, "enableAcceleratedNetworking": + false, "dnsSettings": {"dnsServers": []}, "ipConfigurations": [{"name": "vm18b5798IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "privateIPAddressVersion": "IPv4", "loadBalancerBackendAddressPools": [{"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool"}]}}], + "enableIPForwarding": false}}]}, "scheduledEventsProfile": {"terminateNotificationProfile": + {"notBeforeTimeout": "PT8M", "enable": true}}}, "overprovision": true, "doNotRunExtensionsOnOverprovisionedVMs": + false, "singlePlacementGroup": true}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + Content-Length: + - '2376' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --enable-terminate-notification --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT8M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Updating\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/bea41ef3-7f4b-4b6d-9060-e5686d1afdac?api-version=2019-03-01 + cache-control: + - no-cache + content-length: + - '3331' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:27:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateVMScaleSet3Min;58,Microsoft.Compute/CreateVMScaleSet30Min;297,Microsoft.Compute/VmssQueuedVMOperations;4800 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-ms-request-charge: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/bea41ef3-7f4b-4b6d-9060-e5686d1afdac?api-version=2019-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2019-09-09T05:27:32.3154078+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"bea41ef3-7f4b-4b6d-9060-e5686d1afdac\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:27:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29996 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/bea41ef3-7f4b-4b6d-9060-e5686d1afdac?api-version=2019-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2019-09-09T05:27:32.3154078+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"bea41ef3-7f4b-4b6d-9060-e5686d1afdac\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:28:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29995 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/bea41ef3-7f4b-4b6d-9060-e5686d1afdac?api-version=2019-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2019-09-09T05:27:32.3154078+00:00\",\r\n \"endTime\": + \"2019-09-09T05:28:22.1282084+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"bea41ef3-7f4b-4b6d-9060-e5686d1afdac\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:28:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29993 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT8M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3332' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:28:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;194,Microsoft.Compute/GetVMScaleSet30Min;1293 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT8M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3332' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:28:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;193,Microsoft.Compute/GetVMScaleSet30Min;1292 + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westus", "tags": {}, "sku": {"name": "Standard_DS1_v2", + "tier": "Standard", "capacity": 2}, "properties": {"upgradePolicy": {"mode": + "Manual"}, "virtualMachineProfile": {"osProfile": {"computerNamePrefix": "vm18b5798", + "adminUsername": "fey", "linuxConfiguration": {"disablePasswordAuthentication": + true, "ssh": {"publicKeys": [{"path": "/home/fey/.ssh/authorized_keys", "keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX"}]}, + "provisionVMAgent": true}, "secrets": []}, "storageProfile": {"imageReference": + {"publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": + "latest"}, "osDisk": {"caching": "ReadWrite", "createOption": "FromImage", "managedDisk": + {"storageAccountType": "Premium_LRS"}}}, "networkProfile": {"networkInterfaceConfigurations": + [{"name": "vm18b5798Nic", "properties": {"primary": true, "enableAcceleratedNetworking": + false, "dnsSettings": {"dnsServers": []}, "ipConfigurations": [{"name": "vm18b5798IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "privateIPAddressVersion": "IPv4", "loadBalancerBackendAddressPools": [{"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool"}]}}], + "enableIPForwarding": false}}]}, "scheduledEventsProfile": {"terminateNotificationProfile": + {"notBeforeTimeout": "PT9M"}}}, "overprovision": true, "doNotRunExtensionsOnOverprovisionedVMs": + false, "singlePlacementGroup": true}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + Content-Length: + - '2360' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT9M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Updating\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/91709504-98e8-4aa5-b9f2-8678f43a051a?api-version=2019-03-01 + cache-control: + - no-cache + content-length: + - '3331' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:28:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateVMScaleSet3Min;58,Microsoft.Compute/CreateVMScaleSet30Min;296,Microsoft.Compute/VmssQueuedVMOperations;4800 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-ms-request-charge: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/91709504-98e8-4aa5-b9f2-8678f43a051a?api-version=2019-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2019-09-09T05:28:54.9565135+00:00\",\r\n \"endTime\": + \"2019-09-09T05:29:05.3003155+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"91709504-98e8-4aa5-b9f2-8678f43a051a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:29:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29992 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --terminate-notification-time + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT9M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3332' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:29:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;192,Microsoft.Compute/GetVMScaleSet30Min;1291 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {\r\n \"terminateNotificationProfile\": + {\r\n \"notBeforeTimeout\": \"PT9M\",\r\n \"enable\": true\r\n + \ }\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3332' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:29:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;191,Microsoft.Compute/GetVMScaleSet30Min;1290 + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "westus", "tags": {}, "sku": {"name": "Standard_DS1_v2", + "tier": "Standard", "capacity": 2}, "properties": {"upgradePolicy": {"mode": + "Manual"}, "virtualMachineProfile": {"osProfile": {"computerNamePrefix": "vm18b5798", + "adminUsername": "fey", "linuxConfiguration": {"disablePasswordAuthentication": + true, "ssh": {"publicKeys": [{"path": "/home/fey/.ssh/authorized_keys", "keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX"}]}, + "provisionVMAgent": true}, "secrets": []}, "storageProfile": {"imageReference": + {"publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": + "latest"}, "osDisk": {"caching": "ReadWrite", "createOption": "FromImage", "managedDisk": + {"storageAccountType": "Premium_LRS"}}}, "networkProfile": {"networkInterfaceConfigurations": + [{"name": "vm18b5798Nic", "properties": {"primary": true, "enableAcceleratedNetworking": + false, "dnsSettings": {"dnsServers": []}, "ipConfigurations": [{"name": "vm18b5798IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "privateIPAddressVersion": "IPv4", "loadBalancerBackendAddressPools": [{"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool"}]}}], + "enableIPForwarding": false}}]}, "scheduledEventsProfile": {"terminateNotificationProfile": + {"enable": false}}}, "overprovision": true, "doNotRunExtensionsOnOverprovisionedVMs": + false, "singlePlacementGroup": true}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + Content-Length: + - '2349' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --enable-terminate-notification + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {}\r\n },\r\n \"provisioningState\": + \"Updating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/df9e2a11-42d4-4542-81ac-8c8e0ecdbcb7?api-version=2019-03-01 + cache-control: + - no-cache + content-length: + - '3204' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:29:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateVMScaleSet3Min;57,Microsoft.Compute/CreateVMScaleSet30Min;295,Microsoft.Compute/VmssQueuedVMOperations;4800 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-ms-request-charge: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/df9e2a11-42d4-4542-81ac-8c8e0ecdbcb7?api-version=2019-03-01 + response: + body: + string: "{\r\n \"startTime\": \"2019-09-09T05:29:09.8003434+00:00\",\r\n \"endTime\": + \"2019-09-09T05:29:09.9721999+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"df9e2a11-42d4-4542-81ac-8c8e0ecdbcb7\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:29:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14990,Microsoft.Compute/GetOperation30Min;29989 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-terminate-notification + User-Agent: + - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.9 msrest_azure/0.6.1 azure-mgmt-compute/7.0.0 + Azure-SDK-For-Python AZURECLI/2.0.72 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1?api-version=2019-03-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Compute/virtualMachineScaleSets/vm1\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vm18b5798\",\r\n \"adminUsername\": + \"fey\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n + \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyv5CUlZTa9PFgExQFfJKnYZoGp9LW0CUhTpJCa9bMUYGFinZE9MTJXOphuNJdMwP1Kcd608UZgV/CSb+90t+56vC+qRx2L+qIgqiV4M1jKBi9RpHx08FWYhzPykYew2VwOBkoEYIsX8ZdC/gj0OEKlH7L9PTAEhs3qqPdTVzneOtyq92rv02cb6Z3LGWcamaGKAJtAE7a0N9dme6t1GYNE4vOixrraxtJBGEWHlRPCb30etFUCOdK4dmn6RNUFubR0ABJpE5GyHaxyd08Vl0FMKzx3ppyHffGpOpNZn1O769j+N3hk6eyV2J9FfgA3sxQDh73V5gajx0wXEqN4hX\"\r\n + \ }\r\n ]\r\n },\r\n \"provisionVMAgent\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n }\r\n },\r\n + \ \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n + \ \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vm18b5798Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vm18b5798IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/backendAddressPools/vm1LBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_terminate_notification_000001/providers/Microsoft.Network/loadBalancers/vm1LB/inboundNatPools/vm1LBNatPool\"}]}}]}}]},\r\n + \ \"scheduledEventsProfile\": {}\r\n },\r\n \"provisioningState\": + \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"82fef48c-2972-4aec-a320-4afcef71c438\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3205' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 09 Sep 2019 05:29:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;188,Microsoft.Compute/GetVMScaleSet30Min;1287 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py index c40c8c6243c..c8cbc383403 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py @@ -3369,5 +3369,51 @@ def test_dedicated_host_get_instance_view(self, resource_group, resource_group_l # endregion +class VMSSTerminateNotificationScenarioTest(ScenarioTest): + + @ResourceGroupPreparer(name_prefix='cli_test_vmss_terminate_notification_') + def test_vmss_terminate_notification(self, resource_group): + update_enable_key = 'virtualMachineProfile.scheduledEventsProfile.terminateNotificationProfile.enable' + update_not_before_timeout_key = 'virtualMachineProfile.scheduledEventsProfile.terminateNotificationProfile.notBeforeTimeout' + create_enable_key = 'vmss.' + update_enable_key + create_not_before_timeout_key = 'vmss.' + update_not_before_timeout_key + + self.kwargs.update({ + 'vm': 'vm1' + }) + + # Create, enable terminate notification + self.cmd('vmss create -g {rg} -n {vm} --image UbuntuLTS --terminate-notification-time 5', + checks=[ + self.check(create_enable_key, True), + self.check(create_not_before_timeout_key, 'PT5M') + ]) + + # Update, enable terminate notification and set time + self.cmd('vmss update -g {rg} -n {vm} --enable-terminate-notification --terminate-notification-time 8', + checks=[ + self.check(update_enable_key, True), + self.check(update_not_before_timeout_key, 'PT8M') + ]) + + # Update, set time + self.cmd('vmss update -g {rg} -n {vm} --terminate-notification-time 9', + checks=[ + self.check(update_not_before_timeout_key, 'PT9M') + ]) + + # Update, disable terminate notification + self.cmd('vmss update -g {rg} -n {vm} --enable-terminate-notification false', + checks=[ + self.check('virtualMachineProfile.scheduledEventsProfile.terminateNotificationProfile', None) + ]) + + # Parameter validation, the following commands should fail + with self.assertRaises(CLIError): + self.cmd('vmss update -g {rg} -n {vm} --enable-terminate-notification false --terminate-notification-time 5') + with self.assertRaises(CLIError): + self.cmd('vmss update -g {rg} -n {vm} --enable-terminate-notification') + + if __name__ == '__main__': unittest.main() diff --git a/src/azure-cli/requirements.py2.Darwin.txt b/src/azure-cli/requirements.py2.Darwin.txt index aca0a74a37d..ee44d0ad8db 100644 --- a/src/azure-cli/requirements.py2.Darwin.txt +++ b/src/azure-cli/requirements.py2.Darwin.txt @@ -26,7 +26,7 @@ azure-mgmt-billing==0.2.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==6.0.0 +azure-mgmt-compute==7.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc5 diff --git a/src/azure-cli/requirements.py2.Linux.txt b/src/azure-cli/requirements.py2.Linux.txt index aca0a74a37d..ee44d0ad8db 100644 --- a/src/azure-cli/requirements.py2.Linux.txt +++ b/src/azure-cli/requirements.py2.Linux.txt @@ -26,7 +26,7 @@ azure-mgmt-billing==0.2.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==6.0.0 +azure-mgmt-compute==7.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc5 diff --git a/src/azure-cli/requirements.py2.windows.txt b/src/azure-cli/requirements.py2.windows.txt index 787da8ad776..2f8a534446c 100644 --- a/src/azure-cli/requirements.py2.windows.txt +++ b/src/azure-cli/requirements.py2.windows.txt @@ -25,7 +25,7 @@ azure-mgmt-billing==0.2.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==6.0.0 +azure-mgmt-compute==7.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc5 diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index c940a0ca3dd..22f11f7d866 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -26,7 +26,7 @@ azure-mgmt-billing==0.2.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==6.0.0 +azure-mgmt-compute==7.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc5 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index c940a0ca3dd..22f11f7d866 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -26,7 +26,7 @@ azure-mgmt-billing==0.2.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==6.0.0 +azure-mgmt-compute==7.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc5 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index 40445e4a47d..acb13a9ed2f 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -25,7 +25,7 @@ azure-mgmt-billing==0.2.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==6.0.0 +azure-mgmt-compute==7.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc5 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 53146376b61..1e93fa4d5e5 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -74,7 +74,7 @@ 'azure-mgmt-botservice~=0.2.0', 'azure-mgmt-cdn~=3.1', 'azure-mgmt-cognitiveservices~=5.0.0', - 'azure-mgmt-compute~=6.0', + 'azure-mgmt-compute~=7.0', 'azure-mgmt-consumption~=2.0', 'azure-mgmt-containerinstance~=1.4', 'azure-mgmt-containerregistry~=3.0.0rc5',