SubscriptionDefinitionsClient
Subscription definitions client provides an interface to create, modify and retrieve azure subscriptions programmatically
COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "management.azure.com",
"info": {
"description": "Subscription definitions client provides an interface to create, modify and retrieve azure subscriptions programmatically.",
"title": "SubscriptionDefinitionsClient",
"version": "2017-11-01-preview",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/subscription/resource-manager/Microsoft.Subscription/preview/2017-11-01-preview/subscriptionDefinitions.json",
"version": "2.0"
}
],
"x-providerName": "azure.com",
"x-serviceName": "subscription-subscriptionDefinitions",
"x-tags": [
"Azure",
"Microsoft"
]
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"azure_auth": {
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2"
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"parameters": {
"apiVersionParameter": {
"description": "Version of the API to be used with the client request. Current version is 2015-06-01",
"in": "query",
"name": "api-version",
"required": true,
"type": "string"
}
},
"paths": {
"/providers/Microsoft.Subscription/operations": {
"get": {
"description": "Lists all of the available Microsoft.Subscription API operations.",
"operationId": "SubscriptionDefinitionsOperationMetadata_list",
"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"
}
}
},
"tags": [
"SubscriptionDefinitions"
],
"x-ms-examples": {
"getSubscriptionDefinitionOperations": {
"parameters": {
"api-version": "2017-11-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"display": {
"operation": "Create a subscription definition",
"provider": "Microsoft Subscription",
"resource": "Resources"
},
"name": "Microsoft.Subscription/subscriptionDefinitions/write"
},
{
"display": {
"operation": "Get a subscription definition",
"provider": "Microsoft Subscription",
"resource": "Resources"
},
"name": "Microsoft.Subscription/subscriptionDefinitions/read"
},
{
"display": {
"operation": "List subscription definitions",
"provider": "Microsoft Subscription",
"resource": "Resources"
},
"name": "Microsoft.Subscription/subscriptionDefinitions/list"
}
]
}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/providers/Microsoft.Subscription/subscriptionDefinitions": {
"get": {
"description": "List an Azure subscription definition by subscriptionId.",
"operationId": "SubscriptionDefinitions_List",
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.",
"schema": {
"$ref": "#/definitions/SubscriptionDefinitionList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"SubscriptionDefinitions"
],
"x-ms-examples": {
"ListSubscriptionDefinition": {
"parameters": {
"api-version": "2017-11-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Subscription/subscriptionDefinitions/MySubscriptionDefinitionName",
"name": "MySubscriptionDefinitionName",
"properties": {
"etag": "somestring",
"offerType": "MS-AZR-0017P",
"subscriptionDisplayName": "My Azure Subscription Name",
"subscriptionId": "0ebc0024-9459-448b-aef4-6617b6f8d217"
},
"type": "Microsoft.Subscription/subscriptionDefinitions"
},
{
"id": "/providers/Microsoft.Subscription/subscriptionDefinitions/My2ndSubscriptionDefinitionName2",
"name": "My2ndSubscriptionDefinitionName2",
"properties": {
"etag": "somestring",
"offerType": "MS-AZR-0017P",
"subscriptionDisplayName": "My 2nd Azure Subscription Name",
"subscriptionId": "ec18a4fb-851a-498e-a380-b42cd1fe6c38"
},
"type": "Microsoft.Subscription/subscriptionDefinitions"
}
]
},
"headers": {}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/providers/Microsoft.Subscription/subscriptionDefinitions/{subscriptionDefinitionName}": {
"get": {
"description": "Get an Azure subscription definition.",
"operationId": "SubscriptionDefinitions_Get",
"parameters": [
{
"description": "The name of the Azure subscription definition.",
"in": "path",
"name": "subscriptionDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.",
"schema": {
"$ref": "#/definitions/SubscriptionDefinition"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"SubscriptionDefinitions"
],
"x-ms-examples": {
"getSubscriptionDefinition": {
"parameters": {
"api-version": "2017-11-01-preview",
"subscriptionDefinitionName": "MySubscriptionDefinitionName"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.SubscriptionDefinition/subscriptionDefinitions/MySubscriptionDefinitionName",
"name": "MySubscriptionDefinitionName",
"properties": {
"etag": "somestring",
"offerType": "MS-AZR-0017P",
"subscriptionDisplayName": "My Azure Subscription Name",
"subscriptionId": "0ebc0024-9459-448b-aef4-6617b6f8d217"
},
"type": "Microsoft.Subscription/subscriptionDefinitions"
},
"headers": {}
}
}
}
}
},
"put": {
"description": "Create an Azure subscription definition.",
"operationId": "SubscriptionDefinitions_Create",
"parameters": [
{
"description": "The name of the Azure subscription definition.",
"in": "path",
"name": "subscriptionDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"description": "The subscription definition creation.",
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SubscriptionDefinition"
}
}
],
"responses": {
"200": {
"description": "Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.",
"schema": {
"$ref": "#/definitions/SubscriptionDefinition"
}
},
"202": {
"description": "Accepted. Subscription creation is in progress.",
"headers": {
"Location": {
"description": "GET this URL to retrieve the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"SubscriptionDefinitions"
],
"x-ms-examples": {
"createSubscriptionDefinition": {
"parameters": {
"api-version": "2017-11-01-preview",
"body": {
"properties": {
"offerType": "MS-AZR-0017P",
"subscriptionDisplayName": "My Azure Subscription Name"
}
},
"subscriptionDefinitionName": "MySubscriptionDefinitionName"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Subscription/subscriptionDefinitions/MySubscriptionDefinitionName",
"name": "MySubscriptionDefinitionName",
"properties": {
"etag": "somestring",
"offerType": "MS-AZR-0017P",
"subscriptionDisplayName": "My Azure Subscription Name",
"subscriptionId": "0ebc0024-9459-448b-aef4-6617b6f8d217"
},
"type": "Microsoft.Subscription/subscriptionDefinitions"
}
},
"202": {
"headers": {
"Location": "/providers/Microsoft.Subscription/subscriptionOperations/aeb76128-ebde-4f5a-a9ed-e7bbf2dbc994?api-version=2017-11-01-preview",
"Retry-After": "60"
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": {
"get": {
"deprecated": false,
"description": "Retrieves the status of the subscription definition PUT operation. The URI of this API is returned in the Location field of the response header.",
"operationId": "SubscriptionDefinitions_GetOperationStatus",
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"description": "The operation ID, which can be found from the Location field in the generate recommendation response header.",
"format": "uuid",
"in": "path",
"name": "operationId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Successful completion of the asynchronous operation",
"schema": {
"$ref": "#/definitions/SubscriptionDefinition"
}
},
"202": {
"description": "Accepted. Subscription update is in progress.",
"headers": {
"Location": {
"description": "The URL where the status of the asynchronous operation can be checked.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "string"
}
}
}
},
"tags": [
"SubscriptionDefinitions"
],
"x-ms-examples": {
"getSubscriptionDefinitionOperation": {
"parameters": {
"api-version": "2017-11-01-preview",
"operationId": "c03acf6e-5295-44c2-92d3-cb1daa4c701c"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Subscription/subscriptionDefinitions/MySubscriptionDefinitionName",
"name": "MySubscriptionDefinitionName",
"properties": {
"etag": "somestring",
"offerType": "MS-AZR-0017P",
"subscriptionDisplayName": "My Azure Subscription Name",
"subscriptionId": "0ebc0024-9459-448b-aef4-6617b6f8d217"
},
"type": "Microsoft.Subscription/subscriptionDefinitions"
}
},
"202": {
"headers": {
"Location": "/providers/Microsoft.Subscription/subscriptionOperations/aeb76128-ebde-4f5a-a9ed-e7bbf2dbc994?api-version=2017-11-01-preview",
"Retry-After": "60"
}
}
}
}
}
}
}
},
"definitions": {
"ErrorResponse": {
"description": "Describes the format of Error response.",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
}
},
"type": "object"
},
"Operation": {
"description": "REST API operation",
"properties": {
"display": {
"description": "The object that represents the operation.",
"properties": {
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
},
"provider": {
"description": "Service provider: Microsoft.Subscription",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: Profile, endpoint, etc.",
"type": "string"
}
}
},
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
}
},
"type": "object"
},
"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": {
"nextLink": {
"description": "URL to get the next set of operation list results if there are any.",
"type": "string"
},
"value": {
"description": "List of operations.",
"items": {
"$ref": "#/definitions/Operation"
},
"type": "array"
}
}
},
"SubscriptionDefinition": {
"description": "The subscription definition used to create the subscription.",
"properties": {
"id": {
"description": "The resource ID.",
"readOnly": true,
"type": "string"
},
"name": {
"description": "The name of the resource.",
"readOnly": true,
"type": "string"
},
"properties": {
"$ref": "#/definitions/SubscriptionDefinitionProperties",
"description": "the subscription definition properties",
"x-ms-client-flatten": true
},
"type": {
"description": "The type of the resource.",
"readOnly": true,
"type": "string"
}
},
"x-ms-azure-resource": true
},
"SubscriptionDefinitionList": {
"description": "Subscription Definition List operation response.",
"properties": {
"nextLink": {
"description": "URL to get the next set of operation list results if there are any.",
"type": "string"
},
"value": {
"description": "An array of subscriptionDefinitions",
"items": {
"$ref": "#/definitions/SubscriptionDefinition"
},
"type": "array"
}
}
},
"SubscriptionDefinitionProperties": {
"description": "The subscription definition properties.",
"properties": {
"etag": {
"description": "The etag the subscription definition.",
"type": "string"
},
"offerType": {
"description": "The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available.",
"type": "string",
"x-ms-mutability": [
"create",
"read"
]
},
"subscriptionDisplayName": {
"description": "The display name of the subscription.",
"type": "string"
},
"subscriptionId": {
"description": "The ID of the subscription.",
"readOnly": true,
"type": "string"
}
}
}
}
}