SubscriptionClient icon

SubscriptionClient

The User Subscription Management Client

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "The User Subscription Management Client.",
    "title": "SubscriptionClient",
    "version": "2015-11-01",
    "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/azsadmin/resource-manager/user-subscriptions/Microsoft.Subscriptions/preview/2015-11-01/Subscriptions.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "azsadmin-Subscriptions",
    "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": {
      "default": "2015-11-01",
      "description": "Client Api Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "NewSubscriptionParameter": {
      "description": "Subscription parameter.",
      "in": "body",
      "name": "newSubscription",
      "required": true,
      "schema": {
        "$ref": "#/definitions/Subscription"
      },
      "x-ms-parameter-location": "method"
    },
    "SubscriptionIdParameter": {
      "description": "Id of the subscription.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions": {
      "get": {
        "description": "Get the list of subscriptions.",
        "operationId": "Subscriptions_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SubscriptionList"
            }
          }
        },
        "tags": [
          "Subscriptions"
        ],
        "x-ms-examples": {
          "Get the list of subscriptions.": {
            "parameters": {
              "api-version": "2015-11-01"
            },
            "responses": {
              "200": {
                "body": [
                  {
                    "displayName": "Test User-user1@contoso.com",
                    "id": "/subscriptions/17c22a2f-9a79-4f90-a34c-aa8d9b942071",
                    "offerId": "/delegatedProviders/default/offers/TestOffer-def2432b-81ef-4480-9211-c18e808c3d1b",
                    "state": "Enabled",
                    "subscriptionId": "17c22a2f-9a79-4f90-a34c-aa8d9b942071",
                    "tenantId": "1e64bce5-9f3b-4add-8be8-e550e05014d0"
                  },
                  {
                    "displayName": "Test User-user1@contoso.com",
                    "id": "/subscriptions/7d3c5374-0180-4743-b468-d87bec909693",
                    "offerId": "/delegatedProviders/default/offers/TestOffer-c2e9d93a-d8a2-4ec9-970e-3dcd8c47c525",
                    "state": "Disabled",
                    "subscriptionId": "7d3c5374-0180-4743-b468-d87bec909693",
                    "tenantId": "1e64bce5-9f3b-4add-8be8-e550e05014d0"
                  }
                ]
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}": {
      "delete": {
        "description": "Delete the specified subscription.",
        "operationId": "Subscriptions_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "No Content"
          }
        },
        "tags": [
          "Subscriptions"
        ],
        "x-ms-examples": {
          "Delete the specified subscription": {
            "parameters": {
              "api-version": "2015-11-01",
              "location": "local",
              "subscription": "test",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets details about particular subscription.",
        "operationId": "Subscriptions_Get",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/Subscription"
            }
          }
        },
        "tags": [
          "Subscriptions"
        ],
        "x-ms-examples": {
          "Get the specified subscription.": {
            "parameters": {
              "api-version": "2015-11-01",
              "subscriptionId": "7d3c5374-0180-4743-b468-d87bec909693"
            },
            "responses": {
              "200": {
                "body": {
                  "displayName": "Test User-user1@msazurestack.onmicrosoft.com",
                  "id": "/subscriptions/7d3c5374-0180-4743-b468-d87bec909693",
                  "offerId": "/delegatedProviders/default/offers/TestOffer-c2e9d93a-d8a2-4ec9-970e-3dcd8c47c525",
                  "state": "Disabled",
                  "subscriptionId": "7d3c5374-0180-4743-b468-d87bec909693",
                  "tenantId": "1e64bce5-9f3b-4add-8be8-e550e05014d0"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Create or updates a subscription.",
        "operationId": "Subscriptions_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/NewSubscriptionParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Subscription"
            }
          },
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/Subscription"
            }
          }
        },
        "tags": [
          "Subscriptions"
        ],
        "x-ms-examples": {
          "Create or updates a subscription": {
            "parameters": {
              "api-version": "2015-11-01",
              "location": "local",
              "newSubscription": {
                "properties": {
                  "displayName": "Test User-user1@contoso.com",
                  "id": "",
                  "offerId": "/delegatedProviders/default/offers/TestOffer-0892f99c-8d1c-48d1-a2b3-128a931afc09",
                  "state": "Enabled",
                  "subscriptionId": "a7aeb2dd-1b1d-458c-a3dc-09070c2ece5e",
                  "tenantId": ""
                }
              },
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {
                "body": {
                  "displayName": "Test User-user1@contoso.com",
                  "id": "/subscriptions/a7aeb2dd-1b1d-458c-a3dc-09070c2ece5e",
                  "offerId": "/delegatedProviders/default/offers/TestOffer-0892f99c-8d1c-48d1-a2b3-128a931afc09",
                  "state": "Enabled",
                  "subscriptionId": "a7aeb2dd-1b1d-458c-a3dc-09070c2ece5e",
                  "tenantId": "1e64bce5-9f3b-4add-8be8-e550e05014d0"
                }
              },
              "201": {
                "body": {
                  "displayName": "Test User-user1@contoso.com",
                  "id": "/subscriptions/a7aeb2dd-1b1d-458c-a3dc-09070c2ece5e",
                  "offerId": "/delegatedProviders/default/offers/TestOffer-0892f99c-8d1c-48d1-a2b3-128a931afc09",
                  "state": "Enabled",
                  "subscriptionId": "a7aeb2dd-1b1d-458c-a3dc-09070c2ece5e",
                  "tenantId": "1e64bce5-9f3b-4add-8be8-e550e05014d0"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Resource": {
      "description": "Base Resource Object",
      "properties": {
        "id": {
          "description": "URI of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "Location of the resource",
          "type": "string"
        },
        "name": {
          "description": "Name of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "List of key-value pairs.",
          "readOnly": true,
          "type": "object"
        },
        "type": {
          "description": "Type of resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    },
    "Subscription": {
      "description": "List of supported operations.",
      "properties": {
        "displayName": {
          "description": "Subscription name.",
          "type": "string"
        },
        "id": {
          "description": "Fully qualified identifier.",
          "type": "string"
        },
        "offerId": {
          "description": "Identifier of the offer under the scope of a delegated provider.",
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/SubscriptionState",
          "description": "Subscription state."
        },
        "subscriptionId": {
          "description": "Subscription identifier.",
          "type": "string"
        },
        "tenantId": {
          "description": "Directory tenant identifier.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SubscriptionList": {
      "description": "List of subscriptions.",
      "properties": {
        "nextLink": {
          "description": "URI to the next page.",
          "type": "string"
        },
        "value": {
          "description": "Subscription definition.",
          "items": {
            "$ref": "#/definitions/Subscription"
          },
          "type": "array"
        }
      }
    },
    "SubscriptionState": {
      "description": "Subscription notification state.",
      "enum": [
        "NotDefined",
        "Enabled",
        "Warned",
        "PastDue",
        "Disabled",
        "Deleted"
      ],
      "type": "string",
      "x-ms-enum": {
        "modelAsString": true,
        "name": "SubscriptionState"
      }
    }
  }
}