diff --git a/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/diagnostic.json b/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/diagnostic.json new file mode 100644 index 000000000000..8c6ca77f5167 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/diagnostic.json @@ -0,0 +1,255 @@ +{ + "swagger": "2.0", + "info": { + "title": "ComputeDiagnosticResourceProviderClient", + "description": "The Compute Diagnostic Resource Provider Client", + "version": "2025-06-05" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot": { + "get": { + "tags": [ + "placementScores_spot" + ], + "operationId": "SpotPlacementScores_Get", + "description": "Gets Spot Placement Scores metadata.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ComputeDiagnosticBase" + } + }, + "default": { + "description": "Error response describing why the get call failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets the metadata of Spot Placement Scores.": { + "$ref": "./examples/GetSpotPlacementScores.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate": { + "post": { + "tags": [ + "spotPlacementScores" + ], + "operationId": "SpotPlacementScores_Post", + "description": "Generates placement scores for Spot VM skus.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "spotPlacementScoresInput", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SpotPlacementScoresInput" + }, + "description": "SpotPlacementScores object supplied in the body of the Post spot placement scores operation." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/SpotPlacementScoresResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Returns spot VM placement scores for given configurations.": { + "$ref": "./examples/GenerateSpotPlacementScores.json" + } + } + } + } + }, + "definitions": { + "ComputeDiagnosticBase": { + "description": "Contains metadata of a diagnostic type", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/DiagnosticProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "DiagnosticProperties": { + "description": "Contains additional properties of a diagnostic", + "type": "object", + "properties": { + "supportedResourceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Describes what are the supported resource types for a diagnostic." + } + } + }, + "SpotPlacementScoresInput": { + "type": "object", + "properties": { + "desiredLocations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The desired regions" + }, + "desiredSizes": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSize" + }, + "description": "The desired virtual machine SKU sizes." + }, + "desiredCount": { + "type": "integer", + "format": "int32", + "description": "Desired instance count per region/zone based on the scope." + }, + "availabilityZones": { + "type": "boolean", + "description": "Defines if the scope is zonal or regional." + } + }, + "description": "SpotPlacementScores API Input." + }, + "SpotPlacementScoresResponse": { + "type": "object", + "properties": { + "desiredLocations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The desired regions" + }, + "desiredSizes": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSize" + }, + "description": "The desired virtual machine SKU sizes." + }, + "desiredCount": { + "type": "integer", + "format": "int32", + "description": "Desired instance count per region/zone based on the scope." + }, + "availabilityZones": { + "type": "boolean", + "description": "Defines if the scope is zonal or regional." + }, + "placementScores": { + "type": "array", + "items": { + "$ref": "#/definitions/PlacementScore" + }, + "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." + } + }, + "description": "SpotPlacementScores API response." + }, + "ResourceSize": { + "type": "object", + "properties": { + "sku": { + "type": "string", + "description": "The resource's CRP virtual machine SKU size." + } + }, + "description": "SpotPlacementRecommender API response." + }, + "PlacementScore": { + "type": "object", + "properties": { + "sku": { + "type": "string", + "description": "The resource's CRP virtual machine SKU size." + }, + "region": { + "type": "string", + "description": "The region." + }, + "availabilityZone": { + "type": "string", + "description": "The availability zone." + }, + "score": { + "type": "string", + "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." + }, + "isQuotaAvailable": { + "type": "boolean", + "description": "Whether the desired quota is available." + } + }, + "description": "The spot placement score for sku/region/zone combination." + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json new file mode 100644 index 000000000000..e753efac91ab --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus", + "api-version": "2025-06-05", + "spotPlacementScoresInput": { + "desiredLocations": [ + "eastus", + "eastus2" + ], + "desiredSizes": [ + { + "sku": "Standard_D2_v2" + } + ], + "desiredCount": 1, + "availabilityZones": true + } + }, + "responses": { + "200": { + "body": { + "desiredLocations": [ + "eastus", + "eastus2" + ], + "desiredSizes": [ + { + "sku": "Standard_D2_v2" + } + ], + "desiredCount": 1, + "availabilityZones": true, + "placementScores": [ + { + "sku": "Standard_D2_v2", + "region": "eastus", + "availabilityZone": "1", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus", + "availabilityZone": "2", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus", + "availabilityZone": "3", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus2", + "availabilityZone": "1", + "score": "DataNotFoundOrStale", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus2", + "availabilityZone": "2", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus2", + "availabilityZone": "3", + "score": "High", + "isQuotaAvailable": true + } + ] + }, + "headers": { + "x-ms-request-id": "12345678-1234-1234-1234-123456789abc", + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/placementScores/spot/generate?api-version=2025-06-05" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/examples/GetSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/examples/GetSpotPlacementScores.json new file mode 100644 index 000000000000..3786161fed05 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/stable/2025-06-05/examples/GetSpotPlacementScores.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus", + "api-version": "2025-06-05" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "12345678-1234-1234-1234-123456789abc" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/placementScores/spot?api-version=2025-06-05", + "name": "spotPlacementScores", + "type": "Microsoft.Compute/placementScores", + "properties": { + "supportedResourceTypes": [ + "Microsoft.Compute/virtualMachines" + ] + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml index ee80746fcc21..885f07fa735e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml @@ -4,3 +4,6 @@ - tool: TypeSpecRequirement path: DiagnosticRP/preview/2025-02-01-preview/**/*.json reason: CDRP service not yet ready to migrate to typespec +- tool: TypeSpecRequirement + path: DiagnosticRP/stable/2025-06-05/**/*.json + reason: CDRP service not yet ready to migrate to typespec diff --git a/specification/compute/resource-manager/readme.md b/specification/compute/resource-manager/readme.md index 9200e26becf6..7ddbbf4c8bfc 100644 --- a/specification/compute/resource-manager/readme.md +++ b/specification/compute/resource-manager/readme.md @@ -34,7 +34,7 @@ These are the global settings for the Compute API. title: ComputeManagementClient description: Compute Client openapi-type: arm -tag: package-2025-03-01 +tag: package-2025-06-05 directive: - where: @@ -342,6 +342,29 @@ suppressions: reason: VirtualMachineImages_ListWithProperties, which derives from VirtualMachineImages_List operation, returns a fixed list and does not support paging as it is a legacy operation. ``` +### Tag: package-2025-06-05 + +These settings apply only when `--tag=package-2025-06-05` is specified on the command line. + +``` yaml $(tag) == "package-2025-06-05" +input-file: + - Microsoft.Compute/ComputeRP/stable/2024-11-01/ComputeRP.json + - Microsoft.Compute/DiagnosticRP/stable/2025-06-05/diagnostic.json + - Microsoft.Compute/DiskRP/stable/2025-01-02/DiskRP.json + - Microsoft.Compute/Skus/stable/2021-07-01/skus.json + - Microsoft.Compute/GalleryRP/stable/2024-03-03/GalleryRP.json + - Microsoft.Compute/CloudserviceRP/stable/2024-11-04/cloudService.json +``` + +### Tag: package-2025-06-05-only + +These settings apply only when `--tag=package-2025-06-05-only` is specified on the command line. + +``` yaml $(tag) == "package-2025-06-05-only" +input-file: + - Microsoft.Compute/DiagnosticRP/stable/2025-06-05/diagnostic.json +``` + ### Tag: package-2025-03-01 These settings apply only when `--tag=package-2025-03-01` is specified on the command line. @@ -2352,4 +2375,4 @@ Creating this tag to pick proper resources from the hybrid profile. input-file: - Microsoft.Compute/ComputeRP/stable/2020-06-01/compute.json - Microsoft.Compute/DiskRP/stable/2019-07-01/disk.json -``` +``` \ No newline at end of file