{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Use these REST APIs for performing operations on Subscription entity associated with your Azure API Management deployment. The Subscription entity represents the association between a user and a product in API Management. Products contain one or more APIs, and once a product is published, developers can subscribe to the product and begin to use the product’s APIs.",
    "title": "ApiManagementClient",
    "version": "2016-10-10",
    "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/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2016-10-10/apimsubscriptions.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "apimanagement-apimsubscriptions",
    "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": {
    "SubscriptionEntityIdParameter": {
      "description": "Subscription entity Identifier. The entity represents the association between a user and a product in API Management.",
      "in": "path",
      "maxLength": 256,
      "name": "sid",
      "pattern": "^[^*#&+:<>?]+$",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions": {
      "get": {
        "description": "Lists all subscriptions of the API Management service instance.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/dn776325.aspx"
        },
        "operationId": "Subscriptions_List",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "| Field        | Supported operators    | Supported functions                         |\n|--------------|------------------------|---------------------------------------------|\n| id           | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name         | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| userId       | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| productId    | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state        | eq                     |                                             |",
            "in": "query",
            "name": "$filter",
            "required": false,
            "type": "string"
          },
          {
            "description": "Number of records to return.",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "$top",
            "required": false,
            "type": "integer",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Number of records to skip.",
            "format": "int32",
            "in": "query",
            "minimum": 0,
            "name": "$skip",
            "required": false,
            "type": "integer",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of the Subscription entities for the specified API Management service instance.",
            "schema": {
              "$ref": "#/definitions/SubscriptionCollection"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ],
        "x-ms-odata": "#/definitions/SubscriptionContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}": {
      "delete": {
        "description": "Deletes the specified subscription.",
        "operationId": "Subscriptions_Delete",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/SubscriptionEntityIdParameter"
          },
          {
            "description": "ETag of the Subscription Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "type": "string"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "The subscription details were successfully deleted."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ]
      },
      "get": {
        "description": "Gets the specified Subscription entity.",
        "operationId": "Subscriptions_Get",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/SubscriptionEntityIdParameter"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "The response body contains the specified Subscription entity.",
            "headers": {
              "ETag": {
                "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/SubscriptionContract"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ]
      },
      "patch": {
        "description": "Updates the details of a subscription specified by its identifier.",
        "operationId": "Subscriptions_Update",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/SubscriptionEntityIdParameter"
          },
          {
            "description": "Update parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SubscriptionUpdateParameters"
            }
          },
          {
            "description": "ETag of the Subscription Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "type": "string"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "The subscription details were successfully updated."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ]
      },
      "put": {
        "description": "Creates or updates the subscription of specified user to the specified product.",
        "operationId": "Subscriptions_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/SubscriptionEntityIdParameter"
          },
          {
            "description": "Create parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SubscriptionCreateParameters"
            }
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "201": {
            "description": "The user was successfully subscribed to the product."
          },
          "204": {
            "description": "The user already subscribed to the product."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey": {
      "post": {
        "description": "Regenerates primary key of existing subscription of the API Management service instance.",
        "operationId": "Subscriptions_RegeneratePrimaryKey",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/SubscriptionEntityIdParameter"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "The primary key was successfully regenerated."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey": {
      "post": {
        "description": "Regenerates secondary key of existing subscription of the API Management service instance.",
        "operationId": "Subscriptions_RegenerateSecondaryKey",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/SubscriptionEntityIdParameter"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "The secondary key was successfully regenerated."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Subscriptions"
        ]
      }
    }
  },
  "definitions": {
    "SubscriptionCollection": {
      "description": "Paged Subscriptions list representation.",
      "properties": {
        "count": {
          "description": "Total record count number across all pages.",
          "format": "int64",
          "type": "integer"
        },
        "nextLink": {
          "description": "Next page link if any.",
          "type": "string"
        },
        "value": {
          "description": "Page values.",
          "items": {
            "$ref": "#/definitions/SubscriptionContract"
          },
          "type": "array"
        }
      }
    },
    "SubscriptionContract": {
      "description": "Subscription details.",
      "properties": {
        "createdDate": {
          "description": "Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "endDate": {
          "description": "Date when subscription was cancelled or expired. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
          "format": "date-time",
          "type": "string"
        },
        "expirationDate": {
          "description": "Subscription expiration date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "description": "Uniquely identifies the subscription within the current API Management service instance. The value is a valid relative URL in the format of /subscriptions/{sid} where {sid} is a subscription identifier.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "The name of the subscription, or null if the subscription has no name.",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "notificationDate": {
          "description": "Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
          "format": "date-time",
          "type": "string"
        },
        "primaryKey": {
          "description": "Subscription primary key.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "productId": {
          "description": "The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier.",
          "type": "string"
        },
        "secondaryKey": {
          "description": "Subscription secondary key.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "startDate": {
          "description": "Subscription activation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
          "format": "date-time",
          "type": "string"
        },
        "state": {
          "description": "Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
          "enum": [
            "Suspended",
            "Active",
            "Expired",
            "Submitted",
            "Rejected",
            "Cancelled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "SubscriptionStateContract"
          }
        },
        "stateComment": {
          "description": "Optional subscription comment added by an administrator.",
          "type": "string"
        },
        "userId": {
          "description": "The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier.",
          "type": "string"
        }
      }
    },
    "SubscriptionCreateParameters": {
      "description": "Parameters supplied to the Create subscription operation.",
      "properties": {
        "name": {
          "description": "Subscription name.",
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        "primaryKey": {
          "description": "Primary subscription key. If not specified during request key will be generated automatically.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "productId": {
          "description": "Product (product id path) for which subscription is being created in form /products/{productId}",
          "type": "string"
        },
        "secondaryKey": {
          "description": "Secondary subscription key. If not specified during request key will be generated automatically.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "state": {
          "description": "Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
          "enum": [
            "Suspended",
            "Active",
            "Expired",
            "Submitted",
            "Rejected",
            "Cancelled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "SubscriptionStateContract"
          }
        },
        "userId": {
          "description": "User (user id path) for whom subscription is being created in form /users/{uid}",
          "type": "string"
        }
      },
      "required": [
        "userId",
        "productId",
        "name"
      ]
    },
    "SubscriptionUpdateParameters": {
      "description": "Parameters supplied to the Update subscription operation.",
      "properties": {
        "expirationDate": {
          "description": "New subscription expiration date.",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "Subscription name.",
          "type": "string"
        },
        "primaryKey": {
          "description": "Primary subscription key.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "productId": {
          "description": "Product identifier path: /products/{productId}",
          "type": "string"
        },
        "secondaryKey": {
          "description": "Secondary subscription key.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "state": {
          "description": "Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
          "enum": [
            "Suspended",
            "Active",
            "Expired",
            "Submitted",
            "Rejected",
            "Cancelled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "SubscriptionStateContract"
          }
        },
        "stateComment": {
          "description": "Comments describing subscription state change by the administrator.",
          "type": "string"
        },
        "userId": {
          "description": "User identifier path: /users/{uid}",
          "type": "string"
        }
      }
    }
  }
}