diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/getSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/getSubscription.json deleted file mode 100644 index bbc99e2a75fd..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/getSubscription.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "api-version": "2016-06-01" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "authorizationSource": "Legacy", - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "displayName": "Subscription2", - "state": "Enabled", - "subscriptionPolicies": { - "locationPlacementId": "Internal_2014-09-01", - "quotaId": "Internal_2014-09-01", - "spendingLimit": "Off" - } - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listLocations.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listLocations.json deleted file mode 100644 index 7c44bf0f50b9..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listLocations.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parameters": { - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "api-version": "2016-06-01" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/83aa47df-e3e9-49ff-877b-94304bf3d3ad/locations/eastasia", - "name": "eastasia", - "displayName": "East Asia", - "longitude": "114.188", - "latitude": "22.267" - }, - { - "id": "/subscriptions/83aa47df-e3e9-49ff-877b-94304bf3d3ad/locations/southeastasia", - "name": "southeastasia", - "displayName": "Southeast Asia", - "longitude": "103.833", - "latitude": "1.283" - } - ] - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listSubscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listSubscriptions.json deleted file mode 100644 index 5a6caa076237..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listSubscriptions.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "api-version": "2016-06-01" - }, - "responses": { - "200": { - "body": { - "nextLink": "string", - "value": [ - { - "id": "/subscriptions/83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "authorizationSource": "Legacy", - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "displayName": "SubscriptionName", - "state": "Enabled", - "subscriptionPolicies": { - "locationPlacementId": "Internal_2014-09-01", - "quotaId": "Internal_2014-09-01", - "spendingLimit": "Off" - } - } - ] - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listTenants.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listTenants.json deleted file mode 100644 index 0b5ecbff5055..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/examples/listTenants.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "api-version": "2016-06-01" - }, - "responses": { - "200": { - "body": { - "nextLink": "string", - "value": [ - { - "id": "/tenants/72f988bf-86f1-41af-91ab-2d7cd011db47", - "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" - }, - { - "id": "/tenants/33e01921-4d64-4f8c-a055-5bdaffd5e33d", - "tenantId": "33e01921-4d64-4f8c-a055-5bdaffd5e33d" - } - ] - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/subscriptions.json deleted file mode 100644 index b268882804ac..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2016-06-01/subscriptions.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "SubscriptionClient", - "version": "2016-06-01", - "description": "All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization." - }, - "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}/locations": { - "get": { - "tags": [ - "Subscriptions" - ], - "operationId": "Subscriptions_ListLocations", - "summary": "Gets all available geo-locations.", - "description": "This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.", - "x-ms-examples": { - "listLocations": { - "$ref": "./examples/listLocations.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of locations.", - "schema": { - "$ref": "#/definitions/LocationListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "tags": [ - "Subscriptions" - ], - "operationId": "Subscriptions_Get", - "description": "Gets details about a specified subscription.", - "x-ms-examples": { - "getSubscription": { - "$ref": "./examples/getSubscription.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns information about the subscription.", - "schema": { - "$ref": "#/definitions/Subscription" - } - } - } - } - }, - "/subscriptions": { - "get": { - "tags": [ - "Subscriptions" - ], - "operationId": "Subscriptions_List", - "description": "Gets all subscriptions for a tenant.", - "x-ms-examples": { - "listSubscriptions": { - "$ref": "./examples/listSubscriptions.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of subscriptions.", - "schema": { - "$ref": "#/definitions/SubscriptionListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/tenants": { - "get": { - "tags": [ - "Tenants" - ], - "operationId": "Tenants_List", - "description": "Gets the tenants for your account.", - "x-ms-examples": { - "listTenants": { - "$ref": "./examples/listTenants.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of tenants.", - "schema": { - "$ref": "#/definitions/TenantListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "Location": { - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus." - }, - "subscriptionId": { - "readOnly": true, - "type": "string", - "description": "The subscription ID." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The location name." - }, - "displayName": { - "readOnly": true, - "type": "string", - "description": "The display name of the location." - }, - "latitude": { - "readOnly": true, - "type": "string", - "description": "The latitude of the location." - }, - "longitude": { - "readOnly": true, - "type": "string", - "description": "The longitude of the location." - } - }, - "description": "Location information." - }, - "LocationListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Location" - }, - "description": "An array of locations." - } - }, - "description": "Location list operation response." - }, - "Subscription": { - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000." - }, - "subscriptionId": { - "readOnly": true, - "type": "string", - "description": "The subscription ID." - }, - "displayName": { - "readOnly": true, - "type": "string", - "description": "The subscription display name." - }, - "state": { - "readOnly": true, - "type": "string", - "description": "The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.", - "enum": [ - "Enabled", - "Warned", - "PastDue", - "Disabled", - "Deleted" - ], - "x-ms-enum": { - "name": "SubscriptionState", - "modelAsString": false - } - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID. For example, 00000000-0000-0000-0000-000000000000." - }, - "tags": { - "description": "Tags for the subscription", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "subscriptionPolicies": { - "$ref": "#/definitions/SubscriptionPolicies", - "description": "The subscription policies." - }, - "authorizationSource": { - "type": "string", - "description": "The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'." - } - }, - "description": "Subscription information." - }, - "SubscriptionPolicies": { - "properties": { - "locationPlacementId": { - "readOnly": true, - "type": "string", - "description": "The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions." - }, - "quotaId": { - "readOnly": true, - "type": "string", - "description": "The subscription quota ID." - }, - "spendingLimit": { - "readOnly": true, - "type": "string", - "description": "The subscription spending limit.", - "enum": [ - "On", - "Off", - "CurrentPeriodOff" - ], - "x-ms-enum": { - "name": "spendingLimit", - "modelAsString": false - } - } - }, - "description": "Subscription policies." - }, - "SubscriptionListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Subscription" - }, - "description": "An array of subscriptions." - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of results." - } - }, - "description": "Subscription list operation response." - }, - "TenantIdDescription": { - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID. For example, 00000000-0000-0000-0000-000000000000." - }, - "tenantCategory": { - "readOnly": true, - "type": "string", - "description": "The category of the tenant. Possible values are TenantCategoryHome,TenantCategoryProjectedBy,TenantCategoryManagedBy" - }, - "country": { - "readOnly": true, - "type": "string", - "description": "The country/region name of the address for the tenant." - }, - "countryCode": { - "readOnly": true, - "type": "string", - "description": "The Country/region abbreviation for the tenant." - }, - "displayName": { - "readOnly": true, - "type": "string", - "description": "The display name of the tenant." - }, - "domains": { - "readOnly": true, - "type": "string", - "description": "The list of domains for the tenant." - }, - "defaultDomain": { - "readOnly": true, - "type": "string", - "description": "The default domain for the tenant." - }, - "tenantType": { - "readOnly": true, - "type": "string", - "description": "The tenant type. Only available for Home tenant category." - } - }, - "description": "Tenant Id information." - }, - "TenantListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/TenantIdDescription" - }, - "description": "An array of tenants." - }, - "nextLink": { - "type": "string", - "description": "The URL to use for getting the next set of results." - } - }, - "required": [ - "nextLink" - ], - "description": "Tenant Ids information." - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for the operation.", - "x-ms-parameter-location": "client" - } - } -} diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 81c1cd0ddfd9..10bb48eb1f73 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -4,10 +4,10 @@ This is the AutoRest configuration file for Subscription. - - --- + ## Getting Started + To build the SDK for Subscription, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest` @@ -15,12 +15,14 @@ To build the SDK for Subscription, simply [Install AutoRest](https://aka.ms/auto To see additional help and options, run: > `autorest --help` + --- ## Configuration ### Suppression -``` yaml + +```yaml directive: - suppress: R2059 - suppress: PutResponseCodes @@ -46,22 +48,22 @@ directive: reason: The delete operation response for subscription changed directory expected to return 200 on every user's request, once it's deleted it will return 404, since it's a change on the existing api with new version, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29188912", to refactor the call on delete request and will return 204 as no content in such cases to take this item in future ref. ``` - ### Basic Information + These are the global settings for the Subscription API. -``` yaml +```yaml openapi-type: arm -tag: package-2021-10 +tag: package-2024-08-preview ``` ### Tag: package-2024-08-preview These settings apply only when `--tag=package-2024-08-preview` is specified on the command line. -``` yaml $(tag) == 'package-2024-08-preview' +```yaml $(tag) == 'package-2024-08-preview' input-file: -- Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json + - Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json title: Initiate, Get and Accept Subscription Changed Directory description: Initiate, Get and Accept Subscription Changed Directory ``` @@ -70,10 +72,9 @@ description: Initiate, Get and Accept Subscription Changed Directory These settings apply only when `--tag=package-2021-10` is specified on the command line. -``` yaml $(tag) == 'package-2021-10' +```yaml $(tag) == 'package-2021-10' input-file: -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json -- Microsoft.Subscription/stable/2021-10-01/subscriptions.json + - Microsoft.Subscription/stable/2021-10-01/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -82,10 +83,9 @@ description: The subscription client These settings apply only when `--tag=package-2020-09` is specified on the command line. -``` yaml $(tag) == 'package-2020-09' +```yaml $(tag) == 'package-2020-09' input-file: -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json -- Microsoft.Subscription/stable/2020-09-01/subscriptions.json + - Microsoft.Subscription/stable/2020-09-01/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -94,9 +94,9 @@ description: The subscription client These settings apply only when `--tag=package-2020-01` is specified on the command line. -``` yaml $(tag) == 'package-2020-01' +```yaml $(tag) == 'package-2020-01' input-file: -- Microsoft.Subscription/stable/2020-01-01/subscriptions.json + - Microsoft.Subscription/stable/2020-01-01/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -105,10 +105,9 @@ description: The subscription client These settings apply only when `--tag=package-2019-10-preview` is specified on the command line. -``` yaml $(tag) == 'package-2019-10-preview' +```yaml $(tag) == 'package-2019-10-preview' input-file: -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json -- Microsoft.Subscription/preview/2019-10-01-preview/subscriptions.json + - Microsoft.Subscription/preview/2019-10-01-preview/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -117,12 +116,9 @@ description: The subscription client These settings apply only when `--tag=package-2019-03-preview` is specified on the command line. -``` yaml $(tag) == 'package-2019-03-preview' +```yaml $(tag) == 'package-2019-03-preview' input-file: -- Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json -- Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json -- Microsoft.Subscription/preview/2018-03-01-preview/operations.json -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json + - Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -131,10 +127,9 @@ description: The subscription client These settings apply only when `--tag=package-2018-03-preview` is specified on the command line. -``` yaml $(tag) == 'package-2018-11-preview' +```yaml $(tag) == 'package-2018-11-preview' input-file: -- Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json + - Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -143,10 +138,9 @@ description: The subscription client These settings apply only when `--tag=package-2018-03-preview` is specified on the command line. -``` yaml $(tag) == 'package-2018-03-preview' +```yaml $(tag) == 'package-2018-03-preview' input-file: -- Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json + - Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json title: SubscriptionClient description: The subscription client ``` @@ -155,21 +149,21 @@ description: The subscription client These settings apply only when `--tag=package-2017-11-preview` is specified on the command line. -``` yaml $(tag) == 'package-2017-11-preview' +```yaml $(tag) == 'package-2017-11-preview' input-file: -- Microsoft.Subscription/preview/2017-11-01-preview/subscriptionDefinitions.json + - Microsoft.Subscription/preview/2017-11-01-preview/subscriptionDefinitions.json ``` --- -# Code Generation +# Code Generation ## Swagger to SDK This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. -``` yaml $(swagger-to-sdk) +```yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-net - repo: azure-sdk-for-go @@ -194,7 +188,7 @@ See configuration in [readme.go.md](./readme.go.md) These settings apply only when `--java` is specified on the command line. Please also specify `--azure-libraries-for-java-folder=`. -``` yaml $(java) +```yaml $(java) azure-arm: true fluent: true namespace: com.microsoft.azure.management.subscription @@ -205,7 +199,7 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-subscription ### Java multi-api -``` yaml $(java) && $(multiapi) +```yaml $(java) && $(multiapi) batch: - tag: package-2019-10-preview - tag: package-2017-11-preview @@ -216,7 +210,7 @@ batch: These settings apply only when `--tag=package-2019-10-preview --java` is specified on the command line. Please also specify `--azure-libraries-for-java=`. -``` yaml $(tag) == 'package-2019-10-preview' && $(java) && $(multiapi) +```yaml $(tag) == 'package-2019-10-preview' && $(java) && $(multiapi) java: namespace: com.microsoft.azure.management.subscription.v2019_10_01_preview output-folder: $(azure-libraries-for-java-folder)/sdk/subscription/mgmt-v2019_10_01_preview @@ -229,25 +223,10 @@ generate-interface: true These settings apply only when `--tag=package-2017-11-preview --java` is specified on the command line. Please also specify `--azure-libraries-for-java=`. -``` yaml $(tag) == 'package-2017-11-preview' && $(java) && $(multiapi) +```yaml $(tag) == 'package-2017-11-preview' && $(java) && $(multiapi) java: namespace: com.microsoft.azure.management.subscription.v2017_11_01_preview output-folder: $(azure-libraries-for-java-folder)/sdk/subscription/mgmt-v2017_11_01_preview regenerate-manager: true generate-interface: true ``` - -### Tag: package-2016-06-01 - -These settings apply only when `--tag=package-2016-06-01` is specified on the command line. - -``` yaml $(tag) == 'package-2016-06-01' -input-file: -- Microsoft.Subscription/stable/2016-06-01/subscriptions.json -title: SubscriptionClient -description: The subscription client -``` - - - -