From 98e6d89c003edd68d282766ca0d2f327bcf21d64 Mon Sep 17 00:00:00 2001 From: Joshua McCarthy Date: Wed, 14 Apr 2021 08:17:29 -0700 Subject: [PATCH] Adding new spot VM fields --- .../examples/GetInstanceMetadata.json | 2 + .../stable/2020-12-01/imds.json | 8 ++++ specification/imds/data-plane/readme.md | 38 ++++++++++++++----- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/examples/GetInstanceMetadata.json b/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/examples/GetInstanceMetadata.json index 1a1c2bb4d7f7..430849198dc3 100644 --- a/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/examples/GetInstanceMetadata.json +++ b/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/examples/GetInstanceMetadata.json @@ -8,6 +8,7 @@ "body": { "compute": { "azEnvironment": "AZUREPUBLICCLOUD", + "evictionPolicy": "deallocate", "isHostCompatibilityLayerVm": "true", "licenseType": "Windows_Server", "location": "westus", @@ -27,6 +28,7 @@ }, "platformFaultDomain": "36", "platformUpdateDomain": "42", + "priority": "Spot", "provider": "Microsoft.Compute", "publicKeys": [ { diff --git a/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json b/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json index a8a39d980a6a..3fd4258f4c16 100644 --- a/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json +++ b/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json @@ -245,6 +245,10 @@ "type": "string", "description": "This is the name of the environment in which the VM is running." }, + "evictionPolicy": { + "type": "string", + "description": "Describes how the VM will be evicted if space needs to be freed up. Only applicable to Spot VMs. For a non-spot VM, this will be an empty string." + }, "isHostCompatibilityLayerVm": { "type": "string", "description": "Identifies if the VM runs on the Host Compatibility Layer." @@ -298,6 +302,10 @@ "type": "string", "description": "This is the update domain in which the VM." }, + "priority": { + "type": "string", + "description": "This is the priority of the VM." + }, "provider": { "type": "string", "description": "This is the provider of the VM." diff --git a/specification/imds/data-plane/readme.md b/specification/imds/data-plane/readme.md index cc339ae43a91..c9d09d69e756 100644 --- a/specification/imds/data-plane/readme.md +++ b/specification/imds/data-plane/readme.md @@ -27,18 +27,9 @@ These are the global settings for the Instance Metadata Service API. ``` yaml openapi-type: data-plane azure-arm: false -tag: package-2020-12 +tag: package-2020-12-01 ``` - -### Tag: package-2020-12 - -These settings apply only when `--tag=package-2020-12` is specified on the command line. - -```yaml $(tag) == 'package-2020-12' -input-file: - - Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json -``` ### Tag: package-2018-10-01 These settings apply only when `--tag=package-2018-10-01` is specified on the command line. @@ -156,6 +147,15 @@ input-file: - Microsoft.InstanceMetadataService/stable/2020-10-01/imds.json ``` +### Tag: package-2020-12-01 + +These settings apply only when `--tag=package-2020-12-01` is specified on the command line. + +```yaml $(tag) == 'package-2020-12-01' +input-file: + - Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json +``` + ## Suppression ``` yaml @@ -373,6 +373,22 @@ directive: - $.definitions.IdentityTokenResponse.properties.object_id - $.definitions.IdentityTokenResponse.properties.msi_res_id - $.definitions.IdentityErrorResponse.properties.error_description + + - suppress: DefinitionsPropertiesNamesCamelCase + reason: The following properties follow the Oath2 spec, which does not use camelCase. + from: Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json + where: + - $.definitions.IdentityTokenResponse.properties.access_token + - $.definitions.IdentityTokenResponse.properties.expires_in + - $.definitions.IdentityTokenResponse.properties.expires_on + - $.definitions.IdentityTokenResponse.properties.ext_expires_in + - $.definitions.IdentityTokenResponse.properties.not_before + - $.definitions.IdentityTokenResponse.properties.resource + - $.definitions.IdentityTokenResponse.properties.token_type + - $.definitions.IdentityTokenResponse.properties.client_id + - $.definitions.IdentityTokenResponse.properties.object_id + - $.definitions.IdentityTokenResponse.properties.msi_res_id + - $.definitions.IdentityErrorResponse.properties.error_description ``` --- @@ -433,6 +449,8 @@ input-file: - $(this-folder)/Microsoft.InstanceMetadataService/stable/2020-07-15/imds.json - $(this-folder)/Microsoft.InstanceMetadataService/stable/2020-09-01/imds.json - $(this-folder)/Microsoft.InstanceMetadataService/stable/2020-10-01/imds.json + - $(this-folder)/Microsoft.InstanceMetadataService/stable/2020-12-01/imds.json + ```