Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3919ecd
Initial version of Subscription Creation API Swagger
amagams Feb 23, 2018
19a919b
Making Offer Type as enum
amagams Feb 23, 2018
d799d74
Removing the API to monitor an operation since the client automatical…
amagams Feb 23, 2018
5d44b15
Rename folder to match with the swagger version
amagams Feb 23, 2018
931a5a3
Improving the descriptions of models
amagams Feb 28, 2018
a4c75bf
Editing readme.md file
amagams Feb 28, 2018
ae55fa6
Correcting the createSubscription.json example file
amagams Feb 28, 2018
7feabda
variable name fix in example json
amagams Feb 28, 2018
f64198c
correcting the Tenant id
amagams Feb 28, 2018
85443e0
Correcting the exmaple file name in Swagger
amagams Feb 28, 2018
cef2be0
Rename BillingAccount->EnrollmentAccount
amagams Mar 9, 2018
882c078
renaming Billing to Enrollment
amagams Mar 9, 2018
2a4555b
fix createSubscription.json example file
amagams Mar 9, 2018
549bb10
Adding the tag package-all-subscription
amagams Mar 12, 2018
d3a8186
Merging subscriptions.json swagger from Microsoft.Resources in Micros…
amagams Mar 16, 2018
95fc8cf
Renaming subscription.json to subscriptions.json to be consistent wit…
amagams Mar 19, 2018
782fa82
file rename in readme.md
amagams Mar 19, 2018
bc4c145
Rename the client from SubscriptionManagementClient to SubscriptionCl…
amagams Mar 19, 2018
8c9aef6
making object id a string instead of guid, and removing tenant id
amagams Mar 20, 2018
5d31f58
Updating examples
amagams Mar 20, 2018
05e0359
removed extra property from required in model
amagams Mar 20, 2018
9a5ddb0
Getting the new stable subscriptions.json
amagams Mar 20, 2018
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
@@ -0,0 +1,32 @@
{
"parameters": {
"enrollmentAccountName": "73f8ab6e-cfa0-42be-b886-be6e77c2980c",
"api-version": "2018-03-01-preview",
"body": {
"offerType": "MS-AZR-0017P",
"displayName": "Test Ea Azure Sub",
"owners": [
{
"objectId": "973034ff-acb7-409c-b731-e789672c7b31"
},
{
"objectId": "67439a9e-8519-4016-a630-f5f805eba567"
}
]
}
},
"responses": {
"202": {
"headers": {
"Location":
"/providers/Microsoft.Subscription/subscriptionOperations/aeb76128-ebde-4f5a-a9ed-e7bbf2dbc994?api-version=2018-03-01-preview",
"Retry-After": "60"
}
},
"200": {
"body": {
"subscriptionLink": "/subscriptions/c03acf6e-5295-44c2-92d3-cb1daa4c701c"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2018-03-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.Subscription/createOperation/action",
"display": {
"provider": "Microsoft Subscription",
"resource": "Resources",
"operation": "Create a subscription",
"description": "Create an Azure subscription."
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"api-version": "2018-03-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Subscription/subscriptionOperations/c03acf6e-5295-44c2-92d3-cb1daa4c701c",
"status": "Pending",
"statusDetail": "Subscription Creation in Progress"
},
{
"id": "/providers/Microsoft.Subscription/subscriptionOperations/d46dcd37-f8b3-43a4-aed6-41de9131412d",
"status": "Pending",
"statusDetail": "Subscription Creation in Progress"
},
{
"id": "/providers/Microsoft.Subscription/subscriptionOperations/54e3cde0-2420-451c-969d-f538d5349834",
"status": "Completed",
"statusDetail": "Subscription Created Successfully"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
{
"swagger": "2.0",
"info": {
"version": "2018-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"
}
}
}
}
},
"/providers/Microsoft.Subscription/subscriptionOperations": {
"get": {
"description": "Lists all of the available pending Microsoft.Subscription API operations.",
"operationId": "SubscriptionOperations_List",
"x-ms-examples": {
"getPendingSubscriptionOperations": {
"$ref": "./examples/getSubscriptionOperations.json"
}
},
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/SubscriptionOperationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
}
]
}
},
"/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountName}/providers/Microsoft.Subscription/createSubscription": {
"post": {
"description": "Creates an Azure subscription",
"operationId": "SubscriptionFactory_CreateSubscriptionInEnrollmentAccount",
"x-ms-examples": {
"createSubscription": {
"$ref": "./examples/createSubscription.json"
}
},
"x-ms-long-running-operation": true,
"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/SubscriptionCreationResult"
}
},
"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"
}
}
},
"parameters": [
{
"name": "enrollmentAccountName",
"in": "path",
"description": "The name of the enrollment account to which the subscription will be billed.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"name": "body",
"in": "body",
"description": "The subscription creation parameters.",
"required": true,
"schema": {
"$ref": "#/definitions/SubscriptionCreationParameters"
}
}
]
}
}
},
"definitions": {
"SubscriptionCreationResult": {
"description": "The created subscription object.",
"properties": {
"subscriptionLink": {
"description": "The link to the new subscription.",
"type": "string"
}
}
},
"SubscriptionCreationParameters": {
"description": "Subscription Creation Parameters required to create a new Azure subscription.",
"properties": {
"displayName": {
"description": "The display name of the subscription.",
"type": "string"
},
"owners": {
"type": "array",
"items": {
"$ref": "#/definitions/AdPrincipal"
},
"description": "The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group."
},
"offerType": {
"description": "The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available. Only valid when creating a subscription in a enrollment account scope.",
"type": "string",
"x-ms-enum": {
"name": "offerType",
"modelAsString": true
},
"enum": [
"MS-AZR-0017P",
"MS-AZR-0148P"
]
}
}
},
"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"
}
}
},
"AdPrincipal": {
"description": "Active Directory Principal for subscription creation delegated permission",
"properties": {
"objectId": {
"description": "Object id of the Principal",
"type": "string"
}
},
"required": [
"objectId"
]
},
"SubscriptionOperationListResult": {
"description": "A list of pending subscription operations.",
"properties": {
"value": {
"description": "A list of pending SubscriptionOperations",
"type": "array",
"items": {
"$ref": "#/definitions/SubscriptionOperation"
}
}
}
},
"SubscriptionOperation": {
"description": "status of the subscription POST operation.",
"properties": {
"id": {
"type": "string",
"description": "The operation Id.",
"readOnly": true
},
"status": {
"description": "Status of the pending subscription",
"type": "string"
},
"statusDetail": {
"description": "Status Detail of the pending subscription",
"type": "string"
}
}
},
"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 2015-06-01"
}
},
"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"
}
}
}
}
Loading