From a45370e5f8a53ce438e3519be0692f85000ae9df Mon Sep 17 00:00:00 2001 From: Ke Yu Date: Fri, 3 Nov 2023 15:27:35 +0800 Subject: [PATCH] New version 2020-03-01 --- .../preview/2020-03-01/addons-swagger.json | 464 ++++++++++++++++++ .../CanonicalListSupportPlanInfo_Post.json | 28 ++ .../2020-03-01/examples/Operations_List.json | 58 +++ .../SupportPlanTypes_CreateOrUpdate.json | 31 ++ .../examples/SupportPlanTypes_Delete.json | 24 + .../examples/SupportPlanTypes_Get.json | 21 + .../addons/resource-manager/readme.go.md | 10 + .../addons/resource-manager/readme.md | 25 +- 8 files changed, 660 insertions(+), 1 deletion(-) create mode 100644 specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/addons-swagger.json create mode 100644 specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/CanonicalListSupportPlanInfo_Post.json create mode 100644 specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/Operations_List.json create mode 100644 specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_CreateOrUpdate.json create mode 100644 specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Delete.json create mode 100644 specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Get.json diff --git a/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/addons-swagger.json b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/addons-swagger.json new file mode 100644 index 000000000000..f6bea4cff9b5 --- /dev/null +++ b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/addons-swagger.json @@ -0,0 +1,464 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Addons Resource Provider", + "description": "The service for managing third party addons.", + "version": "2020-03-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "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": { + "/providers/Microsoft.Addons/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available Addons RP operations.", + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List all the operations.", + "schema": { + "$ref": "#/definitions/OperationListValue" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorDefinition" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Addons/supportProviders/{providerName}/supportPlanTypes/{planTypeName}": { + "get": { + "tags": [ + "AddonDetails" + ], + "operationId": "SupportPlanTypes_Get", + "description": "Returns whether or not the canonical support plan of type {type} is enabled for the subscription.", + "x-ms-examples": { + "SupportPlanTypes_Get": { + "$ref": "./examples/SupportPlanTypes_Get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/SupportProviderName" + }, + { + "$ref": "#/parameters/CanonicalSupportPlanType" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CanonicalSupportPlanResponseEnvelope" + } + }, + "404": { + "description": "Not Found" + }, + "default": { + "description": "'404' - 'Not Found'.\n'400' - 'Bad Request'", + "schema": { + "$ref": "#/definitions/ErrorDefinition" + } + } + } + }, + "put": { + "tags": [ + "AddonDetails" + ], + "operationId": "SupportPlanTypes_CreateOrUpdate", + "description": "Creates or updates the Canonical support plan of type {type} for the subscription.", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "SupportPlanTypes_CreateOrUpdate": { + "$ref": "./examples/SupportPlanTypes_CreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/SupportProviderName" + }, + { + "$ref": "#/parameters/CanonicalSupportPlanType" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CanonicalSupportPlanResponseEnvelope" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/CanonicalSupportPlanResponseEnvelope" + } + }, + "404": { + "description": "Not Found" + }, + "default": { + "description": "'404' - 'Not Found'.\n'400' - 'Bad Request'", + "schema": { + "$ref": "#/definitions/ErrorDefinition" + } + } + } + }, + "delete": { + "operationId": "SupportPlanTypes_Delete", + "description": "Cancels the Canonical support plan of type {type} for the subscription.", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "SupportPlanTypes_Delete": { + "$ref": "./examples/SupportPlanTypes_Delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/SupportProviderName" + }, + { + "$ref": "#/parameters/CanonicalSupportPlanType" + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": {}, + "schema": { + "$ref": "#/definitions/CanonicalSupportPlanResponseEnvelope" + } + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "BadRequest", + "schema": { + "$ref": "#/definitions/ErrorDefinition" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Addons/supportProviders/canonical/listSupportPlanInfo": { + "post": { + "tags": [ + "AddonStatus" + ], + "operationId": "SupportPlanTypes_ListInfo", + "description": "Returns the canonical support plan information for all types for the subscription.", + "x-ms-examples": { + "CanonicalListSupportPlanInfo_Post": { + "$ref": "./examples/CanonicalListSupportPlanInfo_Post.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CanonicalSupportPlanInfo" + } + }, + "404": { + "description": "Not Found" + }, + "default": { + "description": "BadRequest", + "schema": { + "$ref": "#/definitions/ErrorDefinition" + } + } + } + } + } + }, + "definitions": { + "CanonicalSupportPlanProperties": { + "type": "object", + "description": "The properties of the Canonical support plan.", + "properties": { + "provisioningState": { + "type": "string", + "description": "The provisioning state of the resource.", + "enum": [ + "Succeeded", + "Failed", + "Cancelled", + "Purchasing", + "Downgrading", + "Cancelling", + "Upgrading" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + } + } + }, + "CanonicalSupportPlanResponseEnvelope": { + "type": "object", + "description": "The status of the Canonical support plan.", + "required": [ + "properties" + ], + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The id of the ARM resource, e.g. \"/subscriptions/{id}/providers/Microsoft.Addons/supportProvider/{supportProviderName}/supportPlanTypes/{planTypeName}\"." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the Canonical support plan, i.e. \"essential\", \"standard\" or \"advanced\"." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Microsoft.Addons/supportProvider" + }, + "properties": { + "type": "object", + "$ref": "#/definitions/CanonicalSupportPlanProperties", + "description": "Describes Canonical support plan type and status.", + "x-ms-client-flatten": true + } + }, + "x-ms-azure-resource": true + }, + "CanonicalSupportPlanInfo": { + "type": "array", + "title": "Canonical Support Plan Info", + "description": "The status of all Canonical support plans for a subscription.", + "items": { + "$ref": "#/definitions/CanonicalSupportPlanInfoDefinition" + }, + "x-ms-identifiers": [] + }, + "CanonicalSupportPlanInfoDefinition": { + "type": "object", + "description": "Definition object with the properties of a canonical plan", + "properties": { + "supportPlanType": { + "type": "string", + "description": "Support plan type.", + "enum": [ + "essential", + "standard", + "advanced" + ], + "x-ms-enum": { + "name": "SupportPlanType", + "modelAsString": true + } + }, + "enabled": { + "type": "boolean", + "description": "Flag to indicate if this support plan type is currently enabled for the subscription." + }, + "oneTimeCharge": { + "type": "string", + "description": "The one time charge status for the subscription.", + "enum": [ + "no", + "onEnabled", + "onReenabled" + ], + "x-ms-enum": { + "name": "OneTimeCharge", + "modelAsString": true + } + } + } + }, + "OperationListValue": { + "type": "object", + "description": "List of supported operations.", + "properties": { + "value": { + "$ref": "#/definitions/OperationList" + } + } + }, + "OperationList": { + "type": "array", + "description": "List of supported operations.", + "items": { + "$ref": "#/definitions/OperationsDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "OperationsDefinition": { + "type": "object", + "description": "Definition object with the name and properties of an operation.", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation." + }, + "display": { + "$ref": "#/definitions/OperationsDisplayDefinition", + "description": "Display object with properties of the operation." + } + } + }, + "OperationsDisplayDefinition": { + "type": "object", + "description": "Display object with properties of the operation.", + "properties": { + "provider": { + "type": "string", + "description": "Resource provider of the operation." + }, + "resource": { + "type": "string", + "description": "Resource for the operation." + }, + "operation": { + "type": "string", + "description": "Short description of the operation." + }, + "description": { + "type": "string", + "description": "Description of the operation." + } + } + }, + "ErrorDefinition": { + "type": "object", + "title": "Error", + "description": "Error description and code explaining why an operation failed.", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Description of the error." + }, + "code": { + "type": "string", + "description": "Service specific error code which serves as the substatus for the HTTP error code." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials that uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client API version." + }, + "SupportProviderName": { + "name": "providerName", + "in": "path", + "required": true, + "type": "string", + "description": "The support plan type. For now the only valid type is \"canonical\".", + "x-ms-parameter-location": "method" + }, + "CanonicalSupportPlanType": { + "name": "planTypeName", + "in": "path", + "required": true, + "type": "string", + "description": "The Canonical support plan type.", + "enum": [ + "Essential", + "Standard", + "Advanced" + ], + "x-ms-enum": { + "name": "PlanTypeName", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + }, + "OperationResultsIdParameter": { + "name": "operationResultsId", + "in": "path", + "required": true, + "type": "string", + "description": "The id representing an async operation.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/CanonicalListSupportPlanInfo_Post.json b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/CanonicalListSupportPlanInfo_Post.json new file mode 100644 index 000000000000..9549f7a9cda3 --- /dev/null +++ b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/CanonicalListSupportPlanInfo_Post.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2020-03-01", + "subscriptionId": "d18d258f-bdba-4de1-8b51-e79d6c181d5e" + }, + "responses": { + "200": { + "body": [ + { + "oneTimeCharge": "onReenabled", + "supportPlanType": "standard", + "enabled": false + }, + { + "oneTimeCharge": "onReenabled", + "supportPlanType": "advanced", + "enabled": false + }, + { + "oneTimeCharge": "no", + "supportPlanType": "essential", + "enabled": true + } + ] + }, + "404": {} + } +} diff --git a/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/Operations_List.json b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/Operations_List.json new file mode 100644 index 000000000000..82d58c2110bc --- /dev/null +++ b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/Operations_List.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2020-03-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Addons/supportProviders/supportPlanTypes/read", + "display": { + "provider": "Microsoft Addons", + "resource": "supportPlanTypes", + "operation": "Get Canonical support plan state", + "description": "Get the specified Canonical support plan state." + } + }, + { + "name": "Microsoft.Addons/supportProviders/supportPlanTypes/write", + "display": { + "provider": "Microsoft Addons", + "resource": "supportPlanTypes", + "operation": "Adds a Canonical support plan.", + "description": "Adds the Canonical support plan type specified." + } + }, + { + "name": "Microsoft.Addons/supportProviders/supportPlanTypes/delete", + "display": { + "provider": "Microsoft Addons", + "resource": "supportPlanTypes", + "operation": "Removes the Canonical support plan", + "description": "Removes the specified Canonical support plan" + } + }, + { + "name": "Microsoft.Addons/supportProviders/canonical/supportPlanTypes/get", + "display": { + "provider": "Microsoft Addons", + "resource": "supportProviders", + "operation": "Gets available Canonical support plan types.", + "description": "Gets the available Canonical support plan types as well as some extra metadata on their enabled status." + } + }, + { + "name": "Microsoft.Addons/register/action", + "display": { + "provider": "Microsoft Addons", + "resource": "register", + "operation": "Register for Microsoft.Addons", + "description": "Register the specified subscription with Microsoft.Addons" + } + } + ] + } + } + } +} diff --git a/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_CreateOrUpdate.json b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_CreateOrUpdate.json new file mode 100644 index 000000000000..47482dcf5d22 --- /dev/null +++ b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_CreateOrUpdate.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2020-03-01", + "subscriptionId": "d18d258f-bdba-4de1-8b51-e79d6c181d5e", + "providerName": "Canonical", + "planTypeName": "Standard" + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded" + }, + "id": "subscriptions/d18d258f-bdba-4de1-8b51-e79d6c181d5e/providers/Microsoft.Addons/supportProviders/canonical/supportPlanTypes/Standard", + "name": "Standard", + "type": "Microsoft.Addons/supportProvider" + } + }, + "201": { + "body": { + "properties": { + "provisioningState": "Purchasing" + }, + "id": "subscriptions/d18d258f-bdba-4de1-8b51-e79d6c181d5e/providers/Microsoft.Addons/supportProviders/canonical/supportPlanTypes/Standard", + "name": "Standard", + "type": "Microsoft.Addons/supportProvider" + } + }, + "404": {} + } +} diff --git a/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Delete.json b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Delete.json new file mode 100644 index 000000000000..e8e624b740f8 --- /dev/null +++ b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Delete.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2020-03-01", + "subscriptionId": "d18d258f-bdba-4de1-8b51-e79d6c181d5e", + "providerName": "Canonical", + "planTypeName": "Standard" + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Addons/supportProviders/{providerName}/supportPlanTypes/{planTypeName}?api-version=2020-03-01" + }, + "body": { + "properties": { + "provisioningState": "Cancelling" + }, + "id": "subscriptions/d18d258f-bdba-4de1-8b51-e79d6c181d5e/providers/Microsoft.Addons/supportProviders/canonical/supportPlanTypes/Standard", + "name": "Standard", + "type": "Microsoft.Addons/supportProvider" + } + }, + "204": {} + } +} diff --git a/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Get.json b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Get.json new file mode 100644 index 000000000000..0b56a2d730bc --- /dev/null +++ b/specification/addons/resource-manager/Microsoft.Addons/preview/2020-03-01/examples/SupportPlanTypes_Get.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2020-03-01", + "subscriptionId": "d18d258f-bdba-4de1-8b51-e79d6c181d5e", + "providerName": "Canonical", + "planTypeName": "Standard" + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded" + }, + "id": "subscriptions/d18d258f-bdba-4de1-8b51-e79d6c181d5e/providers/Microsoft.Addons/supportProviders/canonical/supportPlanTypes/Standard", + "name": "Standard", + "type": "Microsoft.Addons/supportProvider" + } + }, + "404": {} + } +} diff --git a/specification/addons/resource-manager/readme.go.md b/specification/addons/resource-manager/readme.go.md index f760e06355e6..d7948ec2571e 100644 --- a/specification/addons/resource-manager/readme.go.md +++ b/specification/addons/resource-manager/readme.go.md @@ -22,10 +22,20 @@ azure-arm: true ``` yaml $(go) && $(multiapi) batch: + - tag: package-2020-03 - tag: package-2018-03 - tag: package-2017-05 ``` +### Tag: package-2020-03 and go + +These settings apply only when `--tag=package-2020-03 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2020-03' && $(go) +output-folder: $(go-sdk-folder)/services/preview/addons/mgmt/2020-03-01/addons +``` + ### Tag: package-2018-03 and go These settings apply only when `--tag=package-2018-03 --go` is specified on the command line. diff --git a/specification/addons/resource-manager/readme.md b/specification/addons/resource-manager/readme.md index 7e7d712a0adb..2d62b633d7f5 100644 --- a/specification/addons/resource-manager/readme.md +++ b/specification/addons/resource-manager/readme.md @@ -26,7 +26,16 @@ These are the global settings for the Addons API. ``` yaml openapi-type: arm -tag: package-2018-03 +tag: package-2020-03 +``` + +### Tag: package-2020-03 + +These settings apply only when `--tag=package-2020-03` is specified on the command line. + +``` yaml $(tag) == 'package-2020-03' +input-file: +- Microsoft.Addons/preview/2020-03-01/addons-swagger.json ``` ### Tag: package-2018-03 @@ -127,10 +136,24 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-addons ``` yaml $(java) && $(multiapi) batch: + - tag: package-2020-03 - tag: package-2018-03 - tag: package-2017-05 ``` +### Tag: package-2020-03 and java + +These settings apply only when `--tag=package-2020-03 --java` is specified on the command line. +Please also specify `--azure-libraries-for-java=`. + +``` yaml $(tag) == 'package-2020-03' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.addons.v2020_03_01 + output-folder: $(azure-libraries-for-java-folder)/sdk/addons/mgmt-v2020_03_01 +regenerate-manager: true +generate-interface: true +``` + ### Tag: package-2018-03 and java These settings apply only when `--tag=package-2018-03 --java` is specified on the command line.