UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 9 kB
{"openapi":"3.0.0","info":{"description":"Subscription client provides an interface to create and manage Azure subscriptions programmatically.","title":"SubscriptionClient","version":"2018-11-01-preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"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/2018-11-01-preview/subscriptions.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"subscription-subscriptions","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Subscription/createSubscription":{"post":{"description":"Creates an Azure subscription","operationId":"SubscriptionFactory_CreateSubscription","parameters":[{"description":"The name of the commerce root billing account.","in":"path","name":"billingAccountName","required":true,"schema":{"type":"string"},"examples":{"createSubscription":{"value":"12a6eed9-5d39-4103-a5db-2db1db0a8c67"}}},{"description":"The name of the invoice section.","in":"path","name":"invoiceSectionName","required":true,"schema":{"type":"string"},"examples":{"createSubscription":{"value":"b859d705-1ed7-4769-9d4b-19238e9e8ac2_10_31"}}},{"$ref":"#/components/parameters/apiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreationParameters"}}},"description":"The subscription creation parameters.","required":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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreationResult"},"examples":{"createSubscription":{"$ref":"#/components/examples/createSubscription"}}}}},"202":{"description":"Accepted. Subscription creation is in progress.","headers":{"Location":{"description":"GET this URL to retrieve the status of the asynchronous operation.","schema":{"type":"string"},"example":"/providers/Microsoft.Subscription/subscriptionOperations/aeb76128-ebde-4f5a-a9ed-e7bbf2dbc994?api-version=2018-11-01-preview"},"Retry-After":{"description":"The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.","schema":{"type":"integer"},"example":8}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-ms-long-running-operation":true}},"/providers/Microsoft.Subscription/operations":{"get":{"description":"Lists all of the available Microsoft.Subscription API operations.","operationId":"Operations_List","parameters":[{"$ref":"#/components/parameters/apiVersionParameter"}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationListResult"},"examples":{"getOperations":{"$ref":"#/components/examples/getOperations"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/providers/Microsoft.Subscription/subscriptionOperations/{operationId}":{"get":{"description":"Get the status of the pending Microsoft.Subscription API operations.","operationId":"SubscriptionOperation_Get","parameters":[{"description":"The operation ID, which can be found from the Location field in the generate recommendation response header.","in":"path","name":"operationId","required":true,"schema":{"type":"string"},"examples":{"getPendingSubscriptionOperations":{"value":"e4b8d068-f574-462a-a76f-6fa0afc613c9"}}},{"$ref":"#/components/parameters/apiVersionParameter"}],"responses":{"200":{"description":"Successful completion of the asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreationResult"},"examples":{"getPendingSubscriptionOperations":{"$ref":"#/components/examples/getPendingSubscriptionOperations"}}}}},"202":{"description":"Accepted. Subscription update is in progress.","headers":{"Location":{"description":"The URL where the status of the asynchronous operation can be checked.","schema":{"type":"string"},"example":"/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2018-11-01-preview"},"Retry-After":{"description":"The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.","schema":{"type":"integer"},"example":8}}}}}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"createSubscription":{"value":{"subscriptionLink":"/subscriptions/d0d6ee57-6530-4fca-93a6-b755a070be35"}},"getOperations":{"value":{"value":[{"display":{"operation":"Create an Azure subscription","provider":"Microsoft Subscription","resource":"Resources"},"name":"Microsoft.Subscription/createSubscription/action"}]}},"getPendingSubscriptionOperations":{"value":{"subscriptionLink":"/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633"}}},"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,"schema":{"type":"string"},"examples":{"createSubscription":{"value":"2018-11-01-preview"},"getOperations":{"value":"2018-11-01-preview"},"getPendingSubscriptionOperations":{"value":"2018-11-01-preview"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"AdPrincipal":{"description":"Active Directory Principal for subscription creation delegated permission","properties":{"objectId":{"description":"Object id of the Principal","type":"string"}},"required":["objectId"]},"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":"#/components/schemas/Operation"},"type":"array"}}},"SubscriptionCreationParameters":{"description":"Subscription Creation Parameters required to create a new Azure subscription.","properties":{"additionalParameters":{"additionalProperties":{"type":"object"},"description":"Additional, untyped parameters to support custom subscription creation scenarios.","type":"object"},"billingProfileId":{"description":"The ARM id of the billing profile.","type":"string"},"costCenter":{"description":"optional customer cost center","type":"string"},"displayName":{"description":"The display name of the subscription.","type":"string"},"owner":{"$ref":"#/components/schemas/AdPrincipal"},"skuId":{"description":"The commerce id of the sku.","type":"string"}}},"SubscriptionCreationResult":{"description":"The created subscription object.","properties":{"subscriptionLink":{"description":"The link to the new subscription.","type":"string"}}},"SubscriptionOperation":{"description":"status of the subscription POST operation.","properties":{"id":{"description":"The operation Id.","readOnly":true,"type":"string"},"status":{"description":"Status of the pending subscription","type":"string"},"statusDetail":{"description":"Status Detail of the pending subscription","type":"string"}}},"SubscriptionOperationListResult":{"description":"A list of pending subscription operations.","properties":{"value":{"description":"A list of pending SubscriptionOperations","items":{"$ref":"#/components/schemas/SubscriptionOperation"},"type":"array"}}}}}}