From 66bf9e811d63a1f967473e9bb3a83b607c917148 Mon Sep 17 00:00:00 2001 From: Cameron Taggart Date: Mon, 9 Nov 2020 20:09:37 -0600 Subject: [PATCH] fix correctness errors for AVS 2019-08-09-preview API (#11545) * backport Operations_List to AVS 2019-08-09 API * add deprecated clusterID * "format": "int32" --- .../examples/Operations_List.json | 525 ++++++++++++++---- .../preview/2019-08-09-preview/vmware.json | 158 +++++- 2 files changed, 566 insertions(+), 117 deletions(-) diff --git a/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/examples/Operations_List.json b/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/examples/Operations_List.json index 6f4f28c7ce33..e4b1f95b3031 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/examples/Operations_List.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/examples/Operations_List.json @@ -4,36 +4,366 @@ }, "responses": { "200": { + "headers": {}, "body": { "value": [ { "display": { - "description": "Creates a private cloud", - "operation": "Create Private Cloud", - "provider": "Azure VMware Solution", - "resource": "Private Cloud" + "description": "Lists operations available on Microsoft.AVS resource provider.", + "operation": "List available Microsoft.AVS operations", + "provider": "Microsoft.AVS", + "resource": "operations" }, - "name": "Microsoft.AVS/privateClouds/create", - "origin": "user,system" + "isDataAction": false, + "name": "Microsoft.AVS/operations/read", + "origin": "user,system", + "properties": {} }, { - "origin": "system", - "name": "Microsoft.AVS/privateClouds/providers/Microsoft.Insights/metricDefinitions/read", "display": { - "provider": "Microsoft Azure Dedicated", - "resource": "Private Cloud", + "description": "Register Subscription for Microsoft.AVS resource provider.", + "operation": "Register Subscription for Microsoft.AVS", + "provider": "Microsoft.AVS", + "resource": "" + }, + "isDataAction": false, + "name": "Microsoft.AVS/register/action", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Unregister Subscription for Microsoft.AVS resource provider.", + "operation": "Unregister Subscription for Microsoft.AVS", + "provider": "Microsoft.AVS", + "resource": "" + }, + "isDataAction": false, + "name": "Microsoft.AVS/unregister/action", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Checks if the privateCloud Name is available", + "operation": "Check Name Availability", + "provider": "Microsoft.AVS", + "resource": "checkNameAvailability" + }, + "isDataAction": false, + "name": "Microsoft.AVS/checkNameAvailability/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Checks if the privateCloud Name is available", + "operation": "Check Name Availability", + "provider": "Microsoft.AVS", + "resource": "locations/checkNameAvailability" + }, + "isDataAction": false, + "name": "Microsoft.AVS/locations/checkNameAvailability/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Checks if quota is available for the subscription", + "operation": "Check Quota Availability", + "provider": "Microsoft.AVS", + "resource": "locations/checkQuotaAvailability" + }, + "isDataAction": false, + "name": "Microsoft.AVS/locations/checkQuotaAvailability/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Checks if trial is available for the subscription", + "operation": "Check Trial Availability", + "provider": "Microsoft.AVS", + "resource": "locations/checkTrialAvailability" + }, + "isDataAction": false, + "name": "Microsoft.AVS/locations/checkTrialAvailability/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Registers the Microsoft Microsoft.AVS resource provider and enables creation of Private Clouds.", + "operation": "Register Microsoft.AVS resource provider.", + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/register/action", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Creates or updates a PrivateCloud resource.", + "operation": "Create or update a PrivateCloud.", + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/write", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Gets the settings for the specified PrivateCloud.", + "operation": "Read PrivateCloud settings", + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Delete a specific PrivateCloud.", + "operation": "Delete a PrivateCloud.", + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/delete", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Reads privateClouds operationstatuses.", + "operation": "Read privateClouds operationstatuses", + "provider": "Microsoft.AVS", + "resource": "privateClouds/operationstatuses" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/operationstatuses/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Gets the cluster settings for a PrivateCloud cluster.", + "operation": "Read Cluster settings.", + "provider": "Microsoft.AVS", + "resource": "privateClouds/clusters" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/clusters/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Create or update a PrivateCloud cluster resource.", + "operation": "Create or update a PrivateCloud cluster.", + "provider": "Microsoft.AVS", + "resource": "privateClouds/clusters" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/clusters/write", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Delete a specific PrivateCloud cluster.", + "operation": "Delete a PriveCloud cluster.", + "provider": "Microsoft.AVS", + "resource": "privateClouds/clusters" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/clusters/delete", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Reads privateClouds/clusters operationstatuses.", + "operation": "Read privateClouds/clusters operationstatuses", + "provider": "Microsoft.AVS", + "resource": "privateClouds/clusters/operationstatuses" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/clusters/operationstatuses/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Reads privateClouds/clusters operationresults.", + "operation": "Read privateClouds/clusters operationresults", + "provider": "Microsoft.AVS", + "resource": "privateclouds/clusters/operationresults" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateclouds/clusters/operationresults/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Reads privateClouds operationresults.", + "operation": "Read privateClouds operationresults", + "provider": "Microsoft.AVS", + "resource": "privateClouds/operationresults" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/operationresults/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Gets the authorization settings for a PrivateCloud cluster.", + "operation": "Read Authorization settings.", + "provider": "Microsoft.AVS", + "resource": "privateClouds/authorizations" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/authorizations/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Create or update a PrivateCloud authorization resource.", + "operation": "Create or update a PrivateCloud authorization.", + "provider": "Microsoft.AVS", + "resource": "privateClouds/authorizations" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/authorizations/write", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Delete a specific PrivateCloud authorization.", + "operation": "Delete a PriveCloud authorization.", + "provider": "Microsoft.AVS", + "resource": "privateClouds/authorizations" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/authorizations/delete", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Lists the AdminCredentials for privateClouds.", + "operation": "List privateClouds AdminCredentials", + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": true, + "name": "Microsoft.AVS/privateClouds/listAdminCredentials/action", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Gets the hcxEnterpriseSites for a PrivateCloud.", + "operation": "Read hcxEnterpriseSites", + "provider": "Microsoft.AVS", + "resource": "privateClouds/hcxEnterpriseSites" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/hcxEnterpriseSites/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Create or update a hcxEnterpriseSites.", + "operation": "Create or update a hcxEnterpriseSites", + "provider": "Microsoft.AVS", + "resource": "privateClouds/hcxEnterpriseSites" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/hcxEnterpriseSites/write", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Delete a specific hcxEnterpriseSites.", + "operation": "Delete a hcxEnterpriseSites", + "provider": "Microsoft.AVS", + "resource": "privateClouds/hcxEnterpriseSites" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/hcxEnterpriseSites/delete", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Gets the hostInstances for a PrivateCloud.", + "operation": "Read hostInstances", + "provider": "Microsoft.AVS", + "resource": "privateClouds/hostInstances" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/hostInstances/read", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Create or update a hostInstances.", + "operation": "Create or update a hostInstances", + "provider": "Microsoft.AVS", + "resource": "privateClouds/hostInstances" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/hostInstances/write", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Delete a specific hostInstances.", + "operation": "Delete a hostInstances", + "provider": "Microsoft.AVS", + "resource": "privateClouds/hostInstances" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/hostInstances/delete", + "origin": "user,system", + "properties": {} + }, + { + "display": { + "description": "Gets the available metrics for Private Cloud", "operation": "Read Private Cloud metric definitions", - "description": "Gets the available metrics for Private Cloud" + "provider": "Microsoft Azure Dedicated", + "resource": "privateClouds" }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/providers/Microsoft.Insights/metricDefinitions/read", + "origin": "system", "properties": { "serviceSpecification": { "metricSpecifications": [ { - "name": "UsedLatest", - "displayName": "Datastore disk used", + "aggregationType": "Average", "displayDescription": "The total amount of disk used in SDDC", - "unit": "Average", - "aggregationType": "Total", + "displayName": "Datastore disk used", + "enableRegionalMdmAccount": "true", + "name": "UsedLatest", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Datastore.Disk", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -43,16 +373,16 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Datastore.Disk" + "unit": "Bytes" }, { - "name": "CapacityLatest", - "displayName": "Datastore disk total capacity", + "aggregationType": "Average", "displayDescription": "The total capacity of disk in SDDC", - "unit": "Average", - "aggregationType": "Total", + "displayName": "Datastore disk total capacity", + "enableRegionalMdmAccount": "true", + "name": "CapacityLatest", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Datastore.Disk", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -62,54 +392,16 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Datastore.Disk" + "unit": "Bytes" }, { - "name": "EffectiveMemAverage", - "displayName": "Average Effective Memory", + "aggregationType": "Average", "displayDescription": "Total amount of machine memory in cluster that is available", - "unit": "Average", - "aggregationType": "Total", - "supportedTimeGrainTypes": [ - "PT5M", - "PT15M", - "PT30M", - "PT1H", - "PT6H", - "PT12H", - "P1D" - ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.ClusterServices" - }, - { - "name": "EffectiveCpuAverage", - "displayName": "Average Effective CPU", - "displayDescription": "Total available CPU resources in cluster", - "unit": "Average", - "aggregationType": "Total", - "supportedTimeGrainTypes": [ - "PT5M", - "PT15M", - "PT30M", - "PT1H", - "PT6H", - "PT12H", - "P1D" - ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.ClusterServices" - }, - { - "name": "FailoverLatest", - "displayName": "Failover", - "displayDescription": "vSphere HA number of failures that can be tolerated", - "unit": "Average", - "aggregationType": "Total", + "displayName": "Average Effective Memory", + "enableRegionalMdmAccount": "true", + "name": "EffectiveMemAverage", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Cluster.ClusterServices", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -119,16 +411,16 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.ClusterServices" + "unit": "Bytes" }, { - "name": "TotalMhzAverage", - "displayName": "Average Total CPU", - "displayDescription": "Total CPU resources in cluster", - "unit": "Average", - "aggregationType": "Total", + "aggregationType": "Average", + "displayDescription": "Total memory in cluster", + "displayName": "Average Total Memory", + "enableRegionalMdmAccount": "true", + "name": "TotalMbAverage", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Cluster.Mem", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -138,16 +430,16 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.Cpu" + "unit": "Bytes" }, { - "name": "TotalMbAverage", - "displayName": "Average Total Memory", - "displayDescription": "Total memory in cluster", - "unit": "Average", - "aggregationType": "Total", + "aggregationType": "Average", + "displayDescription": "Host physical memory consumed by the virtualization infrastructure", + "displayName": "Average Memory Overhead", + "enableRegionalMdmAccount": "true", + "name": "OverheadAverage", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Cluster.Mem", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -157,16 +449,16 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.Mem" + "unit": "Bytes" }, { - "name": "OverheadAverage", - "displayName": "Average Memory Overhead", - "displayDescription": "Host physical memory consumed by the virtualization infrastructure", - "unit": "Average", - "aggregationType": "Total", + "aggregationType": "Average", + "displayDescription": "Memory usage as percentage of total configured or available memory", + "displayName": "Average Memory Usage", + "enableRegionalMdmAccount": "true", + "name": "UsageAverage", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Cluster.Mem", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -176,16 +468,16 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.Mem" + "unit": "Percent" }, { - "name": "UsageAverage", - "displayName": "Average Memory Usage", - "displayDescription": "Memory usage as percentage of total configured or available memory", - "unit": "Average", - "aggregationType": "Total", + "aggregationType": "Average", + "displayDescription": "Total available CPU resources in cluster", + "displayName": "Effective CPU available", + "enableRegionalMdmAccount": "true", + "name": "EffectiveCpuAverage", + "sourceMdmAccount": "AVSShoebox2", + "sourceMdmNamespace": "Vsphere.Cluster.ClusterServices", "supportedTimeGrainTypes": [ "PT5M", "PT15M", @@ -195,37 +487,38 @@ "PT12H", "P1D" ], - "enableRegionalMdmAccount": "false", - "sourceMdmAccount": "AVSShoebox2WestEurope", - "sourceMdmNamespace": "Vsphere.Cluster.Mem" + "unit": "Percent" } ] } } }, { - "origin": "system", - "name": "Microsoft.AVS/privateClouds/providers/Microsoft.Insights/diagnosticSettings/read", "display": { - "provider": "Microsoft.AVS", - "resource": "Private Cloud", + "description": "Gets the diagnostic setting for the resource", "operation": "Read diagnostic setting", - "description": "Gets the diagnostic setting for the resource" - } + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/providers/Microsoft.Insights/diagnosticSettings/read", + "origin": "system", + "properties": {} }, { - "origin": "system", - "name": "Microsoft.AVS/privateClouds/providers/Microsoft.Insights/diagnosticSettings/write", "display": { - "provider": "Microsoft.AVS", - "resource": "Private Cloud", + "description": "Creates or updates the diagnostic setting for the resource", "operation": "Write diagnostic setting", - "description": "Creates or updates the diagnostic setting for the resource" - } + "provider": "Microsoft.AVS", + "resource": "privateClouds" + }, + "isDataAction": false, + "name": "Microsoft.AVS/privateClouds/providers/Microsoft.Insights/diagnosticSettings/write", + "origin": "system", + "properties": {} } ] - }, - "nextLink": "string" + } } } } diff --git a/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/vmware.json index 8c6fb346d26d..d789d36a0152 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/preview/2019-08-09-preview/vmware.json @@ -812,6 +812,7 @@ "availableHosts": { "description": "Number of trial hosts available", "type": "integer", + "format": "int32", "readOnly": true } } @@ -825,6 +826,7 @@ "readOnly": true, "additionalProperties": { "type": "integer", + "format": "int32", "readOnly": true } }, @@ -963,6 +965,152 @@ "readOnly": true } } + }, + "isDataAction": { + "description": "Gets or sets a value indicating whether the operation is a data action or not", + "type": "boolean" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" + } + } + }, + "OperationProperties": { + "description": "Extra Operation properties", + "type": "object", + "properties": { + "serviceSpecification": { + "$ref": "#/definitions/ServiceSpecification", + "description": "Service specifications of the operation" + } + } + }, + "ServiceSpecification": { + "description": "Service specification payload", + "type": "object", + "properties": { + "logSpecifications": { + "description": "Specifications of the Log for Azure Monitoring", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/LogSpecification" + } + }, + "metricSpecifications": { + "description": "Specifications of the Metrics for Azure Monitoring", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/MetricSpecification" + } + } + } + }, + "LogSpecification": { + "description": "Specifications of the Log for Azure Monitoring", + "type": "object", + "properties": { + "name": { + "description": "Name of the log", + "type": "string" + }, + "displayName": { + "description": "Localized friendly display name of the log", + "type": "string" + }, + "blobDuration": { + "description": "Blob duration of the log", + "type": "string" + } + } + }, + "MetricSpecification": { + "description": "Specifications of the Metrics for Azure Monitoring", + "type": "object", + "properties": { + "name": { + "description": "Name of the metric", + "type": "string" + }, + "displayName": { + "description": "Localized friendly display name of the metric", + "type": "string" + }, + "displayDescription": { + "description": "Localized friendly description of the metric", + "type": "string" + }, + "unit": { + "description": "Unit that makes sense for the metric", + "type": "string" + }, + "category": { + "description": "Name of the metric category that the metric belongs to. A metric can only belong to a single category.", + "type": "string" + }, + "aggregationType": { + "description": "Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.", + "type": "string" + }, + "supportedAggregationTypes": { + "description": "Supported aggregation types", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "supportedTimeGrainTypes": { + "description": "Supported time grain types", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "fillGapWithZero": { + "description": "Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published.", + "type": "boolean" + }, + "dimensions": { + "description": "Dimensions of the metric", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/MetricDimension" + } + }, + "enableRegionalMdmAccount": { + "description": "Whether or not the service is using regional MDM accounts.", + "type": "string" + }, + "sourceMdmAccount": { + "description": "The name of the MDM account.", + "type": "string" + }, + "sourceMdmNamespace": { + "description": "The name of the MDM namespace.", + "type": "string" + } + } + }, + "MetricDimension": { + "description": "Specifications of the Dimension of metrics", + "type": "object", + "properties": { + "name": { + "description": "Name of the dimension", + "type": "string" + }, + "displayName": { + "description": "Localized friendly display name of the dimension", + "type": "string" } } }, @@ -1219,14 +1367,22 @@ "DefaultClusterProperties": { "description": "The properties of a default cluster", "properties": { + "clusterID": { + "description": "The deprecated identity", + "type": "integer", + "format": "int32", + "readOnly": true + }, "clusterId": { "description": "The identity", "type": "integer", + "format": "int32", "readOnly": true }, "clusterSize": { "description": "The cluster size", - "type": "integer" + "type": "integer", + "format": "int32" }, "hosts": { "description": "The hosts",