Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
}
},
"responses": {
"200": {
"description": "Successful completion of the asynchronous operation",
"schema": {
"$ref": "#/definitions/SubscriptionCreationResult"
}
},
"202": {
"description": "Accepted. Subscription update is in progress.",
"headers": {
Expand All @@ -68,12 +74,6 @@
"type": "integer"
}
}
},
"200": {
"description": "Successful completion of the asynchronous operation",
"schema": {
"$ref": "#/definitions/SubscriptionCreationResult"
}
}
},
"parameters": [
Expand Down Expand Up @@ -191,10 +191,10 @@
"description": "rbac owner of the subscription",
"$ref": "#/definitions/AdPrincipal"
},
"additionalParameters": {
"additionalParameters": {
"description": "Additional, untyped parameters to support custom subscription creation scenarios.",
"type": "object",
"additionalProperties": {
"additionalProperties": {
"type": "object"
}
}
Expand Down Expand Up @@ -306,7 +306,7 @@
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request. Current version is 2015-06-01"
"description": "Version of the API to be used with the client request. Current version is 2018-11-01-preview"
}
},
"security": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad",
"api-version": "2019-03-01-preview"
},
"responses": {
"200": {
"body": {
"value": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parameters": {
"api-version": "2019-03-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.Subscription/cancel/action",
"display": {
"provider": "Microsoft Subscription",
"resource": "Resources",
"operation": "Cancels the subscription"
}
},
{
"name": "Microsoft.Subscription/rename/action",
"display": {
"provider": "Microsoft Subscription",
"resource": "Resources",
"operation": "Renames the subscription"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad",
"api-version": "2019-03-01-preview",
"body": {
"SubscriptionName": "Test Sub"
}
},
"responses": {
"200": {
"body": {
"value": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
"swagger": "2.0",
"info": {
"version": "2019-03-01-preview",
"title": "SubscriptionClient",
"description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically."
},
"schemes": [
"https"
],
"host": "management.azure.com",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/providers/Microsoft.Subscription/operations": {
"get": {
"description": "Lists all of the available Microsoft.Subscription API operations.",
"operationId": "Operations_List",
"x-ms-examples": {
"getOperations": {
"$ref": "./examples/getOperations.json"
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/OperationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": {
"post": {
"operationId": "Subscriptions_Cancel",
"x-ms-examples": {
"cancelSubscription": {
"$ref": "./examples/cancelSubscription.json"
}
},
"description": "Cancels the subscription",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/CanceledSubscriptionId"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": {
"post": {
"operationId": "Subscriptions_Rename",
"x-ms-examples": {
"renameSubscription": {
"$ref": "./examples/renameSubscription.json"
}
},
"description": "Renames the subscription",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/subscriptionNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/RenamedSubscriptionId"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
},
"CanceledSubscriptionId": {
Comment thread
navysingla marked this conversation as resolved.
"description": "Canceled Subscription Id",
"properties": {
"value": {
"description": "Canceled Subscription Id",
"type": "string",
"readOnly": true
}
}
},
"RenamedSubscriptionId": {
"description": "Renamed Subscription Id",
"properties": {
"value": {
"description": "Renamed Subscription Id",
"type": "string",
"readOnly": true
}
}
},
"SubscriptionName": {
"type": "object",
"description": "New name of the subscription.",
"properties": {
"subscriptionName": {
"type": "string",
"description": "New subscription name"
}
}
},
"OperationListResult": {
"description": "Result of the request to list operations. It contains a list of operations and a URL link to get the next set of results.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
},
"description": "List of operations."
},
"nextLink": {
"type": "string",
"description": "URL to get the next set of operation list results if there are any."
}
}
},
"Operation": {
"description": "REST API operation",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
},
"display": {
"description": "The object that represents the operation.",
"properties": {
"provider": {
"description": "Service provider: Microsoft.Subscription",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: Profile, endpoint, etc.",
"type": "string"
},
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
}
}
}
}
}
},
"parameters": {
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request. Current version is 2019-03-01-preview"
},
"subscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Subscription Id."
},
"subscriptionNameParameter": {
"name": "body",
"x-ms-parameter-location": "method",
"in": "body",
"required": true,
"description": "Subscription Name",
"schema": {
"$ref": "#/definitions/SubscriptionName"
}
}
},
"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"
}
}
}
}
12 changes: 11 additions & 1 deletion specification/subscription/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ These are the global settings for the Subscription API.

``` yaml
openapi-type: arm
tag: package-2018-11-preview
tag: package-2019-03-preview
```
### Tag: package-2019-03-preview

These settings apply only when `--tag=package-2019-03-preview` is specified on the command line.

``` yaml $(tag) == 'package-2019-03-preview'
input-file:
- Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json
- Microsoft.Subscription/stable/2016-06-01/subscriptions.json
title: SubscriptionClient
description: The subscription client
```

### Tag: package-2018-11-preview

Expand Down