swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for performing operations on Product entity associated with your Azure API Management deployment. The Product entity represents a product in API Management. Products include one or more APIs and their associated terms of use. Once a product is published, developers can subscribe to the product and begin to use the product’s APIs.
  title: ApiManagementClient
  version: 2019-12-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/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimproducts.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: apimanagement-apimproducts
  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: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products":
    get:
      description: Lists a collection of products in the specified service instance.
      operationId: Product_ListByService
      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     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| state | filter | eq |     | </br>| groups | expand |     |     | </br>"
          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: When set to true, the response contains an array of groups that have visibility to the product. The default is false.
          in: query
          name: expandGroups
          required: false
          type: boolean
        - description: Products which are part of a specific tag.
          in: query
          name: tags
          required: false
          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:
        "200":
          description: A Collection of the Product entities for the specified API Management service instance.
          schema:
            description: Paged Products list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Product details.
                  properties:
                    properties:
                      allOf:
                        - description: Product Entity Base Parameters
                          properties:
                            approvalRequired:
                              description: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.
                              type: boolean
                            description:
                              description: Product description. May include HTML formatting tags.
                              maxLength: 1000
                              minLength: 1
                              type: string
                            state:
                              description: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
                              enum:
                                - notPublished
                                - published
                              type: string
                              x-ms-enum:
                                modelAsString: false
                                name: ProductState
                            subscriptionRequired:
                              description: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
                              type: boolean
                            subscriptionsLimit:
                              description: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.
                              format: int32
                              type: integer
                            terms:
                              description: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
                              type: string
                      description: Product profile.
                      properties:
                        displayName:
                          description: Product name.
                          maxLength: 300
                          minLength: 1
                          type: string
                      required:
                        - displayName
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - Product
      x-ms-examples:
        ApiManagementListProducts:
          parameters:
            api-version: 2019-12-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmtemplateCert1
                    name: kjoshiarmtemplateCert1
                    properties:
                      description: Development Product
                      displayName: Dev
                      state: published
                      subscriptionRequired: false
                    type: Microsoft.ApiManagement/service/products
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter
                    name: starter
                    properties:
                      approvalRequired: false
                      description: Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.
                      displayName: Starter
                      state: published
                      subscriptionRequired: true
                      subscriptionsLimit: 1
                      terms: ""
                    type: Microsoft.ApiManagement/service/products
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited
                    name: unlimited
                    properties:
                      approvalRequired: true
                      description: Subscribers have completely unlimited access to the API. Administrator approval is required.
                      displayName: Unlimited
                      state: published
                      subscriptionRequired: true
                      subscriptionsLimit: 1
                    type: Microsoft.ApiManagement/service/products
      x-ms-odata: ./definitions.json#/definitions/ProductContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}":
    delete:
      description: Delete product.
      operationId: Product_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: ETag of the 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
          x-ms-parameter-location: method
        - description: Delete existing subscriptions associated with the product or not.
          in: query
          name: deleteSubscriptions
          required: false
          type: boolean
        - 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: Product was successfully removed.
        "204":
          description: Product was successfully removed by previous request or does not exist.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - Product
      x-ms-examples:
        ApiManagementDeleteProduct:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            deleteSubscriptions: true
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets the details of the product specified by its identifier.
      operationId: Product_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          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: The response body contains the specified Product entity.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Product details.
            properties:
              properties:
                allOf:
                  - description: Product Entity Base Parameters
                    properties:
                      approvalRequired:
                        description: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.
                        type: boolean
                      description:
                        description: Product description. May include HTML formatting tags.
                        maxLength: 1000
                        minLength: 1
                        type: string
                      state:
                        description: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
                        enum:
                          - notPublished
                          - published
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: ProductState
                      subscriptionRequired:
                        description: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
                        type: boolean
                      subscriptionsLimit:
                        description: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.
                        format: int32
                        type: integer
                      terms:
                        description: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
                        type: string
                description: Product profile.
                properties:
                  displayName:
                    description: Product name.
                    maxLength: 300
                    minLength: 1
                    type: string
                required:
                  - displayName
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - Product
      x-ms-examples:
        ApiManagementGetProduct:
          parameters:
            api-version: 2019-12-01-preview
            productId: unlimited
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited
                name: unlimited
                properties:
                  approvalRequired: true
                  description: Subscribers have completely unlimited access to the API. Administrator approval is required.
                  displayName: Unlimited
                  state: published
                  subscriptionRequired: true
                  subscriptionsLimit: 1
                type: Microsoft.ApiManagement/service/products
    head:
      description: Gets the entity state (Etag) version of the product specified by its identifier.
      operationId: Product_GetEntityTag
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          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: Specified Product entity exists and current entity state version is present in the ETag header.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - Product
      x-ms-examples:
        ApiManagementHeadProduct:
          parameters:
            api-version: 2019-12-01-preview
            productId: unlimited
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              headers:
                etag: AAAAAAAAAAa=
    patch:
      description: Update existing product details.
      operationId: Product_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Update parameters.
          in: body
          name: parameters
          required: true
          schema:
            description: Product Update parameters.
            properties:
              properties:
                allOf:
                  - description: Product Entity Base Parameters
                    properties:
                      approvalRequired:
                        description: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.
                        type: boolean
                      description:
                        description: Product description. May include HTML formatting tags.
                        maxLength: 1000
                        minLength: 1
                        type: string
                      state:
                        description: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
                        enum:
                          - notPublished
                          - published
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: ProductState
                      subscriptionRequired:
                        description: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
                        type: boolean
                      subscriptionsLimit:
                        description: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.
                        format: int32
                        type: integer
                      terms:
                        description: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
                        type: string
                description: Parameters supplied to the Update Product operation.
                properties:
                  displayName:
                    description: Product name.
                    maxLength: 300
                    minLength: 1
                    type: string
        - description: ETag of the 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
          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:
        "204":
          description: Product details was successfully updated.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - Product
      x-ms-examples:
        ApiManagementUpdateProduct:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            parameters:
              properties:
                displayName: Test Template ProductName 4
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "204": {}
    put:
      description: Creates or Updates a product.
      operationId: Product_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Create or update parameters.
          in: body
          name: parameters
          required: true
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Product details.
            properties:
              properties:
                allOf:
                  - description: Product Entity Base Parameters
                    properties:
                      approvalRequired:
                        description: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.
                        type: boolean
                      description:
                        description: Product description. May include HTML formatting tags.
                        maxLength: 1000
                        minLength: 1
                        type: string
                      state:
                        description: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
                        enum:
                          - notPublished
                          - published
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: ProductState
                      subscriptionRequired:
                        description: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
                        type: boolean
                      subscriptionsLimit:
                        description: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.
                        format: int32
                        type: integer
                      terms:
                        description: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
                        type: string
                description: Product profile.
                properties:
                  displayName:
                    description: Product name.
                    maxLength: 300
                    minLength: 1
                    type: string
                required:
                  - displayName
        - description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
          in: header
          name: If-Match
          required: false
          type: string
          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: Product was successfully updated.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Product details.
            properties:
              properties:
                allOf:
                  - description: Product Entity Base Parameters
                    properties:
                      approvalRequired:
                        description: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.
                        type: boolean
                      description:
                        description: Product description. May include HTML formatting tags.
                        maxLength: 1000
                        minLength: 1
                        type: string
                      state:
                        description: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
                        enum:
                          - notPublished
                          - published
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: ProductState
                      subscriptionRequired:
                        description: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
                        type: boolean
                      subscriptionsLimit:
                        description: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.
                        format: int32
                        type: integer
                      terms:
                        description: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
                        type: string
                description: Product profile.
                properties:
                  displayName:
                    description: Product name.
                    maxLength: 300
                    minLength: 1
                    type: string
                required:
                  - displayName
        "201":
          description: Product was successfully created.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Product details.
            properties:
              properties:
                allOf:
                  - description: Product Entity Base Parameters
                    properties:
                      approvalRequired:
                        description: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.
                        type: boolean
                      description:
                        description: Product description. May include HTML formatting tags.
                        maxLength: 1000
                        minLength: 1
                        type: string
                      state:
                        description: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
                        enum:
                          - notPublished
                          - published
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: ProductState
                      subscriptionRequired:
                        description: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
                        type: boolean
                      subscriptionsLimit:
                        description: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.
                        format: int32
                        type: integer
                      terms:
                        description: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
                        type: string
                description: Product profile.
                properties:
                  displayName:
                    description: Product name.
                    maxLength: 300
                    minLength: 1
                    type: string
                required:
                  - displayName
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - Product
      x-ms-examples:
        ApiManagementCreateProduct:
          parameters:
            api-version: 2019-12-01-preview
            parameters:
              properties:
                displayName: Test Template ProductName 4
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct
                name: testproduct
                properties:
                  approvalRequired: false
                  displayName: Test Template ProductName 4
                  state: notPublished
                  subscriptionRequired: true
                type: Microsoft.ApiManagement/service/products
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct
                name: testproduct
                properties:
                  approvalRequired: false
                  displayName: Test Template ProductName 4
                  state: notPublished
                  subscriptionRequired: true
                type: Microsoft.ApiManagement/service/products
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis":
    get:
      description: Lists a collection of the APIs associated with a product.
      operationId: ProductApi_ListByProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "|   Field     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>"
          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: The response body contains a collection of Api entities in the product.
          schema:
            description: Paged Api list representation.
            properties:
              nextLink:
                description: Next page link if any.
                readOnly: true
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Api details.
                  properties:
                    properties:
                      allOf:
                        - description: API base contract details.
                          properties:
                            apiRevision:
                              description: Describes the Revision of the Api. If no value is provided, default revision 1 is created
                              maxLength: 100
                              minLength: 1
                              type: string
                            apiRevisionDescription:
                              description: Description of the Api Revision.
                              maxLength: 256
                              type: string
                            apiVersion:
                              description: Indicates the Version identifier of the API if the API is versioned
                              maxLength: 100
                              type: string
                            apiVersionDescription:
                              description: Description of the Api Version.
                              maxLength: 256
                              type: string
                            apiVersionSetId:
                              description: A resource identifier for the related ApiVersionSet.
                              type: string
                            authenticationSettings:
                              description: API Authentication Settings.
                              properties:
                                oAuth2:
                                  description: API OAuth2 Authentication settings details.
                                  properties:
                                    authorizationServerId:
                                      description: OAuth authorization server identifier.
                                      type: string
                                    scope:
                                      description: operations scope.
                                      type: string
                                openid:
                                  description: API OAuth2 Authentication settings details.
                                  properties:
                                    bearerTokenSendingMethods:
                                      description: How to send token to the server.
                                      items:
                                        description: Form of an authorization grant, which the client uses to request the access token.
                                        enum:
                                          - authorizationHeader
                                          - query
                                        type: string
                                        x-ms-enum:
                                          modelAsString: true
                                          name: bearerTokenSendingMethods
                                          values:
                                            - description: Access token will be transmitted in the Authorization header using Bearer schema
                                              value: authorizationHeader
                                            - description: Access token will be transmitted as query parameters.
                                              value: query
                                      type: array
                                    openidProviderId:
                                      description: OAuth authorization server identifier.
                                      type: string
                            description:
                              description: Description of the API. May include HTML formatting tags.
                              type: string
                            isCurrent:
                              description: Indicates if API revision is current api revision.
                              type: boolean
                            isOnline:
                              description: Indicates if API revision is accessible via the gateway.
                              readOnly: true
                              type: boolean
                            subscriptionKeyParameterNames:
                              description: Subscription key parameter names details.
                              example:
                                subscriptionKeyParameterNames:
                                  header: customHeaderParameterName
                                  query: customQueryParameterName
                              properties:
                                header:
                                  description: Subscription key header name.
                                  type: string
                                query:
                                  description: Subscription key query string parameter name.
                                  type: string
                            subscriptionRequired:
                              description: Specifies whether an API or Product subscription is required for accessing the API.
                              type: boolean
                            type:
                              description: Type of API.
                              enum:
                                - http
                                - soap
                              type: string
                              x-ms-client-name: ApiType
                              x-ms-enum:
                                modelAsString: true
                                name: ApiType
                      description: Api Entity Properties
                      properties:
                        apiVersionSet:
                          description: "An API Version Set contains the common configuration for a set of API Versions relating "
                          properties:
                            description:
                              description: Description of API Version Set.
                              type: string
                            id:
                              description: Identifier for existing API Version Set. Omit this value to create a new Version Set.
                              type: string
                            name:
                              description: The display Name of the API Version Set.
                              type: string
                            versionHeaderName:
                              description: Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
                              type: string
                            versionQueryName:
                              description: Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
                              type: string
                            versioningScheme:
                              description: An value that determines where the API Version identifer will be located in a HTTP request.
                              enum:
                                - Segment
                                - Query
                                - Header
                              type: string
                        displayName:
                          description: API name. Must be 1 to 300 characters long.
                          maxLength: 300
                          minLength: 1
                          type: string
                        path:
                          description: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
                          maxLength: 400
                          minLength: 0
                          type: string
                        protocols:
                          description: Describes on which protocols the operations in this API can be invoked.
                          items:
                            enum:
                              - http
                              - https
                            type: string
                            x-ms-enum:
                              modelAsString: false
                              name: Protocol
                          type: array
                        serviceUrl:
                          description: Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
                          maxLength: 2000
                          minLength: 0
                          type: string
                        sourceApiId:
                          description: API identifier of the source API.
                          type: string
                      required:
                        - path
                readOnly: true
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductApi
      x-ms-examples:
        ApiManagementListProductApis:
          parameters:
            api-version: 2019-12-01-preview
            productId: 5768181ea40f7eb6c49f6ac7
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7/apis/57681820a40f7eb6c49f6aca
                    name: 57681820a40f7eb6c49f6aca
                    properties:
                      apiRevision: "1"
                      description: description_57681820a40f7eb6c49f6acc
                      displayName: api_57681820a40f7eb6c49f6acb
                      isCurrent: true
                      path: suffix_57681820a40f7eb6c49f6ace
                      protocols:
                        - https
                      serviceUrl: http://contoso/57681820a40f7eb6c49f6acd
                    type: Microsoft.ApiManagement/service/products/apis
      x-ms-odata: ./definitions.json#/definitions/ApiContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}":
    delete:
      description: Deletes the specified API from the specified product.
      operationId: ProductApi_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
          in: path
          maxLength: 256
          minLength: 1
          name: apiId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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: API was successfully removed from product
        "204":
          description: API successfully removed by previous request or does not exist in product
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductApi
      x-ms-examples:
        ApiManagementDeleteProductApi:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            apiId: echo-api
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    head:
      description: Checks that API entity specified by identifier is associated with the Product entity.
      operationId: ProductApi_CheckEntityExists
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
          in: path
          maxLength: 256
          minLength: 1
          name: apiId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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:
        "204":
          description: Entity exists
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductApi
      x-ms-examples:
        ApiManagementHeadProductApi:
          parameters:
            api-version: 2019-12-01-preview
            apiId: 59306a29e4bbd510dc24e5f9
            productId: 5931a75ae4bbd512a88c680b
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "204": {}
    put:
      description: Adds an API to the specified product.
      operationId: ProductApi_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
          in: path
          maxLength: 256
          minLength: 1
          name: apiId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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: The specified API is already added to the product.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Api details.
            properties:
              properties:
                allOf:
                  - description: API base contract details.
                    properties:
                      apiRevision:
                        description: Describes the Revision of the Api. If no value is provided, default revision 1 is created
                        maxLength: 100
                        minLength: 1
                        type: string
                      apiRevisionDescription:
                        description: Description of the Api Revision.
                        maxLength: 256
                        type: string
                      apiVersion:
                        description: Indicates the Version identifier of the API if the API is versioned
                        maxLength: 100
                        type: string
                      apiVersionDescription:
                        description: Description of the Api Version.
                        maxLength: 256
                        type: string
                      apiVersionSetId:
                        description: A resource identifier for the related ApiVersionSet.
                        type: string
                      authenticationSettings:
                        description: API Authentication Settings.
                        properties:
                          oAuth2:
                            description: API OAuth2 Authentication settings details.
                            properties:
                              authorizationServerId:
                                description: OAuth authorization server identifier.
                                type: string
                              scope:
                                description: operations scope.
                                type: string
                          openid:
                            description: API OAuth2 Authentication settings details.
                            properties:
                              bearerTokenSendingMethods:
                                description: How to send token to the server.
                                items:
                                  description: Form of an authorization grant, which the client uses to request the access token.
                                  enum:
                                    - authorizationHeader
                                    - query
                                  type: string
                                  x-ms-enum:
                                    modelAsString: true
                                    name: bearerTokenSendingMethods
                                    values:
                                      - description: Access token will be transmitted in the Authorization header using Bearer schema
                                        value: authorizationHeader
                                      - description: Access token will be transmitted as query parameters.
                                        value: query
                                type: array
                              openidProviderId:
                                description: OAuth authorization server identifier.
                                type: string
                      description:
                        description: Description of the API. May include HTML formatting tags.
                        type: string
                      isCurrent:
                        description: Indicates if API revision is current api revision.
                        type: boolean
                      isOnline:
                        description: Indicates if API revision is accessible via the gateway.
                        readOnly: true
                        type: boolean
                      subscriptionKeyParameterNames:
                        description: Subscription key parameter names details.
                        example:
                          subscriptionKeyParameterNames:
                            header: customHeaderParameterName
                            query: customQueryParameterName
                        properties:
                          header:
                            description: Subscription key header name.
                            type: string
                          query:
                            description: Subscription key query string parameter name.
                            type: string
                      subscriptionRequired:
                        description: Specifies whether an API or Product subscription is required for accessing the API.
                        type: boolean
                      type:
                        description: Type of API.
                        enum:
                          - http
                          - soap
                        type: string
                        x-ms-client-name: ApiType
                        x-ms-enum:
                          modelAsString: true
                          name: ApiType
                description: Api Entity Properties
                properties:
                  apiVersionSet:
                    description: "An API Version Set contains the common configuration for a set of API Versions relating "
                    properties:
                      description:
                        description: Description of API Version Set.
                        type: string
                      id:
                        description: Identifier for existing API Version Set. Omit this value to create a new Version Set.
                        type: string
                      name:
                        description: The display Name of the API Version Set.
                        type: string
                      versionHeaderName:
                        description: Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
                        type: string
                      versionQueryName:
                        description: Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
                        type: string
                      versioningScheme:
                        description: An value that determines where the API Version identifer will be located in a HTTP request.
                        enum:
                          - Segment
                          - Query
                          - Header
                        type: string
                  displayName:
                    description: API name. Must be 1 to 300 characters long.
                    maxLength: 300
                    minLength: 1
                    type: string
                  path:
                    description: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
                    maxLength: 400
                    minLength: 0
                    type: string
                  protocols:
                    description: Describes on which protocols the operations in this API can be invoked.
                    items:
                      enum:
                        - http
                        - https
                      type: string
                      x-ms-enum:
                        modelAsString: false
                        name: Protocol
                    type: array
                  serviceUrl:
                    description: Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
                    maxLength: 2000
                    minLength: 0
                    type: string
                  sourceApiId:
                    description: API identifier of the source API.
                    type: string
                required:
                  - path
        "201":
          description: The API was successfully added to the product.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Api details.
            properties:
              properties:
                allOf:
                  - description: API base contract details.
                    properties:
                      apiRevision:
                        description: Describes the Revision of the Api. If no value is provided, default revision 1 is created
                        maxLength: 100
                        minLength: 1
                        type: string
                      apiRevisionDescription:
                        description: Description of the Api Revision.
                        maxLength: 256
                        type: string
                      apiVersion:
                        description: Indicates the Version identifier of the API if the API is versioned
                        maxLength: 100
                        type: string
                      apiVersionDescription:
                        description: Description of the Api Version.
                        maxLength: 256
                        type: string
                      apiVersionSetId:
                        description: A resource identifier for the related ApiVersionSet.
                        type: string
                      authenticationSettings:
                        description: API Authentication Settings.
                        properties:
                          oAuth2:
                            description: API OAuth2 Authentication settings details.
                            properties:
                              authorizationServerId:
                                description: OAuth authorization server identifier.
                                type: string
                              scope:
                                description: operations scope.
                                type: string
                          openid:
                            description: API OAuth2 Authentication settings details.
                            properties:
                              bearerTokenSendingMethods:
                                description: How to send token to the server.
                                items:
                                  description: Form of an authorization grant, which the client uses to request the access token.
                                  enum:
                                    - authorizationHeader
                                    - query
                                  type: string
                                  x-ms-enum:
                                    modelAsString: true
                                    name: bearerTokenSendingMethods
                                    values:
                                      - description: Access token will be transmitted in the Authorization header using Bearer schema
                                        value: authorizationHeader
                                      - description: Access token will be transmitted as query parameters.
                                        value: query
                                type: array
                              openidProviderId:
                                description: OAuth authorization server identifier.
                                type: string
                      description:
                        description: Description of the API. May include HTML formatting tags.
                        type: string
                      isCurrent:
                        description: Indicates if API revision is current api revision.
                        type: boolean
                      isOnline:
                        description: Indicates if API revision is accessible via the gateway.
                        readOnly: true
                        type: boolean
                      subscriptionKeyParameterNames:
                        description: Subscription key parameter names details.
                        example:
                          subscriptionKeyParameterNames:
                            header: customHeaderParameterName
                            query: customQueryParameterName
                        properties:
                          header:
                            description: Subscription key header name.
                            type: string
                          query:
                            description: Subscription key query string parameter name.
                            type: string
                      subscriptionRequired:
                        description: Specifies whether an API or Product subscription is required for accessing the API.
                        type: boolean
                      type:
                        description: Type of API.
                        enum:
                          - http
                          - soap
                        type: string
                        x-ms-client-name: ApiType
                        x-ms-enum:
                          modelAsString: true
                          name: ApiType
                description: Api Entity Properties
                properties:
                  apiVersionSet:
                    description: "An API Version Set contains the common configuration for a set of API Versions relating "
                    properties:
                      description:
                        description: Description of API Version Set.
                        type: string
                      id:
                        description: Identifier for existing API Version Set. Omit this value to create a new Version Set.
                        type: string
                      name:
                        description: The display Name of the API Version Set.
                        type: string
                      versionHeaderName:
                        description: Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
                        type: string
                      versionQueryName:
                        description: Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
                        type: string
                      versioningScheme:
                        description: An value that determines where the API Version identifer will be located in a HTTP request.
                        enum:
                          - Segment
                          - Query
                          - Header
                        type: string
                  displayName:
                    description: API name. Must be 1 to 300 characters long.
                    maxLength: 300
                    minLength: 1
                    type: string
                  path:
                    description: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
                    maxLength: 400
                    minLength: 0
                    type: string
                  protocols:
                    description: Describes on which protocols the operations in this API can be invoked.
                    items:
                      enum:
                        - http
                        - https
                      type: string
                      x-ms-enum:
                        modelAsString: false
                        name: Protocol
                    type: array
                  serviceUrl:
                    description: Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
                    maxLength: 2000
                    minLength: 0
                    type: string
                  sourceApiId:
                    description: API identifier of the source API.
                    type: string
                required:
                  - path
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductApi
      x-ms-examples:
        ApiManagementCreateProductApi:
          parameters:
            api-version: 2019-12-01-preview
            apiId: echo-api
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b
                name: 5931a75ae4bbd512a88c680b
                properties:
                  apiRevision: "1"
                  displayName: EchoApi
                  isCurrent: true
                  path: ""
                  protocols:
                    - http
                    - https
                  serviceUrl: https://contoso.com/apis/echo
                  subscriptionKeyParameterNames:
                    header: Ocp-Apim-Subscription-Key
                    query: subscription-key
                type: Microsoft.ApiManagement/service/apis
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b
                name: 5931a75ae4bbd512a88c680b
                properties:
                  apiRevision: "1"
                  displayName: EchoApi
                  isCurrent: true
                  path: ""
                  protocols:
                    - http
                    - https
                  serviceUrl: https://contoso.com/apis/echo
                  subscriptionKeyParameterNames:
                    header: Ocp-Apim-Subscription-Key
                    query: subscription-key
                type: Microsoft.ApiManagement/service/apis
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups":
    get:
      description: Lists the collection of developer groups associated with the specified product.
      operationId: ProductGroup_ListByProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "|   Field     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt |     | </br>| displayName | filter | eq, ne |     | </br>| description | filter | eq, ne |     | </br>"
          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: Lists a collection of Group entities.
          schema:
            description: Paged Group list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Contract details.
                  properties:
                    properties:
                      description: Group contract Properties.
                      properties:
                        builtIn:
                          description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                          readOnly: true
                          type: boolean
                        description:
                          description: Group description. Can contain HTML formatting tags.
                          maxLength: 1000
                          type: string
                        displayName:
                          description: Group name.
                          maxLength: 300
                          minLength: 1
                          type: string
                        externalId:
                          description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                          type: string
                        type:
                          description: Group type.
                          enum:
                            - custom
                            - system
                            - external
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: GroupType
                      required:
                        - displayName
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductGroup
      x-ms-examples:
        ApiManagementListProductGroups:
          parameters:
            api-version: 2019-12-01-preview
            productId: 5600b57e7e8880006a060002
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020001
                    name: 5600b57e7e8880006a020001
                    properties:
                      builtIn: true
                      description: Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.
                      displayName: Administrators
                      type: system
                    type: Microsoft.ApiManagement/service/products/groups
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020002
                    name: 5600b57e7e8880006a020002
                    properties:
                      builtIn: true
                      description: Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.
                      displayName: Developers
                      type: system
                    type: Microsoft.ApiManagement/service/products/groups
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020003
                    name: 5600b57e7e8880006a020003
                    properties:
                      builtIn: true
                      description: Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.
                      displayName: Guests
                      type: system
                    type: Microsoft.ApiManagement/service/products/groups
      x-ms-odata: ./definitions.json#/definitions/GroupContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}":
    delete:
      description: Deletes the association between the specified group and product.
      operationId: ProductGroup_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          required: true
          type: string
          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: The group was successfully disassociated with the product.
        "204":
          description: The group was successfully disassociated with the product.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductGroup
      x-ms-examples:
        ApiManagementDeleteProductGroup:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            groupId: templateGroup
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    head:
      description: Checks that Group entity specified by identifier is associated with the Product entity.
      operationId: ProductGroup_CheckEntityExists
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          required: true
          type: string
          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:
        "204":
          description: The Group is associated with the Product.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductGroup
      x-ms-examples:
        ApiManagementHeadProductGroup:
          parameters:
            api-version: 2019-12-01-preview
            groupId: 59306a29e4bbd510dc24e5f9
            productId: 5931a75ae4bbd512a88c680b
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "204": {}
    put:
      description: Adds the association between the specified developer group with the specified product.
      operationId: ProductGroup_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          required: true
          type: string
          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: The specified group is already associated with the product.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Contract details.
            properties:
              properties:
                description: Group contract Properties.
                properties:
                  builtIn:
                    description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                    readOnly: true
                    type: boolean
                  description:
                    description: Group description. Can contain HTML formatting tags.
                    maxLength: 1000
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
                required:
                  - displayName
        "201":
          description: The group was successfully associated with the product.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Contract details.
            properties:
              properties:
                description: Group contract Properties.
                properties:
                  builtIn:
                    description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                    readOnly: true
                    type: boolean
                  description:
                    description: Group description. Can contain HTML formatting tags.
                    maxLength: 1000
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
                required:
                  - displayName
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductGroup
      x-ms-examples:
        ApiManagementCreateProductGroup:
          parameters:
            api-version: 2019-12-01-preview
            groupId: templateGroup
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/templateGroup
                name: templateGroup
                properties:
                  builtIn: false
                  description: group created via Template
                  displayName: Template Group
                  type: custom
                type: Microsoft.ApiManagement/service/products/groups
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/templateGroup
                name: templateGroup
                properties:
                  builtIn: false
                  description: group created via Template
                  displayName: Template Group
                  type: custom
                type: Microsoft.ApiManagement/service/products/groups
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies":
    get:
      description: Get the policy configuration at the Product level.
      operationId: ProductPolicy_ListByProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          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: Product Policy information.
          schema:
            description: The response of the list policy operation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Policy Contract value.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Policy Contract details.
                  properties:
                    properties:
                      description: Policy contract Properties.
                      properties:
                        format:
                          default: xml
                          description: Format of the policyContent.
                          enum:
                            - xml
                            - xml-link
                            - rawxml
                            - rawxml-link
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: PolicyContentFormat
                            values:
                              - description: The contents are inline and Content type is an XML document.
                                value: xml
                              - description: The policy XML document is hosted on a http endpoint accessible from the API Management service.
                                value: xml-link
                              - description: The contents are inline and Content type is a non XML encoded policy document.
                                value: rawxml
                              - description: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.
                                value: rawxml-link
                        value:
                          description: Contents of the Policy as defined by the format.
                          type: string
                      required:
                        - value
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductPolicy
      x-ms-examples:
        ApiManagementListProductPolicies:
          parameters:
            api-version: 2019-12-01-preview
            productId: armTemplateProduct4
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/armTemplateProduct4/policies/policy
                    name: policy
                    properties:
                      value: "<policies>\r

                        \  <inbound>\r

                        \    <base />\r

                        \  </inbound>\r

                        \  <backend>\r

                        \    <base />\r

                        \  </backend>\r

                        \  <outbound>\r

                        \    <base />\r

                        \  </outbound>\r

                        \  <on-error>\r

                        \    <base />\r

                        \  </on-error>\r

                        </policies>"
                    type: Microsoft.ApiManagement/service/products/policies
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}":
    delete:
      description: Deletes the policy configuration at the Product.
      operationId: ProductPolicy_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The identifier of the Policy.
          enum:
            - policy
          in: path
          name: policyId
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: PolicyIdName
          x-ms-parameter-location: method
        - description: ETag of the 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
          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: Successfully deleted the policy configuration at the Product level.
        "204":
          description: Successfully deleted the policy configuration at the Product level.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductPolicy
      x-ms-examples:
        ApiManagementDeleteProductPolicy:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            policyId: policy
            productId: testproduct
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    get:
      description: Get the policy configuration at the Product level.
      operationId: ProductPolicy_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The identifier of the Policy.
          enum:
            - policy
          in: path
          name: policyId
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: PolicyIdName
          x-ms-parameter-location: method
        - default: xml
          description: Policy Export Format.
          enum:
            - xml
            - rawxml
          in: query
          name: format
          required: false
          type: string
          x-ms-enum:
            modelAsString: true
            name: PolicyExportFormat
            values:
              - description: The contents are inline and Content type is an XML document.
                value: xml
              - description: The contents are inline and Content type is a non XML encoded policy document.
                value: rawxml
          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: Product Policy information.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Policy Contract details.
            properties:
              properties:
                description: Policy contract Properties.
                properties:
                  format:
                    default: xml
                    description: Format of the policyContent.
                    enum:
                      - xml
                      - xml-link
                      - rawxml
                      - rawxml-link
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: PolicyContentFormat
                      values:
                        - description: The contents are inline and Content type is an XML document.
                          value: xml
                        - description: The policy XML document is hosted on a http endpoint accessible from the API Management service.
                          value: xml-link
                        - description: The contents are inline and Content type is a non XML encoded policy document.
                          value: rawxml
                        - description: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.
                          value: rawxml-link
                  value:
                    description: Contents of the Policy as defined by the format.
                    type: string
                required:
                  - value
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductPolicy
      x-ms-examples:
        ApiManagementGetProductPolicy:
          parameters:
            api-version: 2019-12-01-preview
            policyId: policy
            productId: kjoshiarmTemplateProduct4
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmTemplateProduct4/policies/policy
                name: policy
                properties:
                  value: "<policies>\r

                    \  <inbound>\r

                    \    <base />\r

                    \  </inbound>\r

                    \  <backend>\r

                    \    <base />\r

                    \  </backend>\r

                    \  <outbound>\r

                    \    <base />\r

                    \  </outbound>\r

                    \  <on-error>\r

                    \    <base />\r

                    \  </on-error>\r

                    </policies>"
                type: Microsoft.ApiManagement/service/products/policies
    head:
      description: Get the ETag of the policy configuration at the Product level.
      operationId: ProductPolicy_GetEntityTag
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The identifier of the Policy.
          enum:
            - policy
          in: path
          name: policyId
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: PolicyIdName
          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: Product Policy Etag information.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductPolicy
      x-ms-examples:
        ApiManagementHeadProductPolicy:
          parameters:
            api-version: 2019-12-01-preview
            policyId: policy
            productId: unlimited
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              headers:
                etag: AAAAAAAAAAa=
    put:
      description: Creates or updates policy configuration for the Product.
      operationId: ProductPolicy_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
        - description: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The identifier of the Policy.
          enum:
            - policy
          in: path
          name: policyId
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: PolicyIdName
          x-ms-parameter-location: method
        - description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
          in: header
          name: If-Match
          required: false
          type: string
          x-ms-parameter-location: method
        - description: The policy contents to apply.
          in: body
          name: parameters
          required: true
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Policy Contract details.
            properties:
              properties:
                description: Policy contract Properties.
                properties:
                  format:
                    default: xml
                    description: Format of the policyContent.
                    enum:
                      - xml
                      - xml-link
                      - rawxml
                      - rawxml-link
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: PolicyContentFormat
                      values:
                        - description: The contents are inline and Content type is an XML document.
                          value: xml
                        - description: The policy XML document is hosted on a http endpoint accessible from the API Management service.
                          value: xml-link
                        - description: The contents are inline and Content type is a non XML encoded policy document.
                          value: rawxml
                        - description: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.
                          value: rawxml-link
                  value:
                    description: Contents of the Policy as defined by the format.
                    type: string
                required:
                  - value
        - 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: Product policy configuration of the tenant was successfully updated.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Policy Contract details.
            properties:
              properties:
                description: Policy contract Properties.
                properties:
                  format:
                    default: xml
                    description: Format of the policyContent.
                    enum:
                      - xml
                      - xml-link
                      - rawxml
                      - rawxml-link
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: PolicyContentFormat
                      values:
                        - description: The contents are inline and Content type is an XML document.
                          value: xml
                        - description: The policy XML document is hosted on a http endpoint accessible from the API Management service.
                          value: xml-link
                        - description: The contents are inline and Content type is a non XML encoded policy document.
                          value: rawxml
                        - description: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.
                          value: rawxml-link
                  value:
                    description: Contents of the Policy as defined by the format.
                    type: string
                required:
                  - value
        "201":
          description: Product policy configuration was successfully created.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Policy Contract details.
            properties:
              properties:
                description: Policy contract Properties.
                properties:
                  format:
                    default: xml
                    description: Format of the policyContent.
                    enum:
                      - xml
                      - xml-link
                      - rawxml
                      - rawxml-link
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: PolicyContentFormat
                      values:
                        - description: The contents are inline and Content type is an XML document.
                          value: xml
                        - description: The policy XML document is hosted on a http endpoint accessible from the API Management service.
                          value: xml-link
                        - description: The contents are inline and Content type is a non XML encoded policy document.
                          value: rawxml
                        - description: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.
                          value: rawxml-link
                  value:
                    description: Contents of the Policy as defined by the format.
                    type: string
                required:
                  - value
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductPolicy
      x-ms-examples:
        ApiManagementCreateProductPolicy:
          parameters:
            api-version: 2019-12-01-preview
            parameters:
              properties:
                format: xml
                value: "<policies>\r

                  \  <inbound>\r

                  \    <rate-limit calls=\"{{call-count}}\" renewal-period=\"15\"></rate-limit>\r

                  \    <log-to-eventhub logger-id=\"16\">\r

                  \                      @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r

                  \                  </log-to-eventhub>\r

                  \    <quota-by-key calls=\"40\" counter-key=\"cc\" renewal-period=\"3600\" increment-count=\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\" />\r

                  \    <base />\r

                  \  </inbound>\r

                  \  <backend>\r

                  \    <base />\r

                  \  </backend>\r

                  \  <outbound>\r

                  \    <base />\r

                  \  </outbound>\r

                  </policies>"
            policyId: policy
            productId: 5702e97e5157a50f48dce801
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5702e97e5157a50f48dce801/policies/policy
                name: policy
                properties:
                  value: "<policies>\r

                    \  <inbound>\r

                    \    <rate-limit calls=\"{{58c884fed8d14f127cec38f0}}\" renewal-period=\"15\" version=\"2\"></rate-limit>\r

                    \    <log-to-eventhub logger-id=\"16\">\r

                    \                      @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r

                    \                  </log-to-eventhub>\r

                    \    <quota-by-key calls=\"40\" counter-key=\"cc\" renewal-period=\"3600\" increment-count=\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\" />\r

                    \    <base />\r

                    \  </inbound>\r

                    \  <backend>\r

                    \    <base />\r

                    \  </backend>\r

                    \  <outbound>\r

                    \    <base />\r

                    \  </outbound>\r

                    </policies>"
                type: Microsoft.ApiManagement/service/products/policies
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5702e97e5157a50f48dce801/policies/policy
                name: policy
                properties:
                  value: "<policies>\r

                    \  <inbound>\r

                    \    <rate-limit calls=\"{{58c884fed8d14f127cec38f0}}\" renewal-period=\"15\" version=\"2\"></rate-limit>\r

                    \    <log-to-eventhub logger-id=\"16\">\r

                    \                      @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r

                    \                  </log-to-eventhub>\r

                    \    <quota-by-key calls=\"40\" counter-key=\"cc\" renewal-period=\"3600\" increment-count=\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\" />\r

                    \    <base />\r

                    \  </inbound>\r

                    \  <backend>\r

                    \    <base />\r

                    \  </backend>\r

                    \  <outbound>\r

                    \    <base />\r

                    \  </outbound>\r

                    </policies>"
                type: Microsoft.ApiManagement/service/products/policies
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions":
    get:
      description: Lists the collection of subscriptions to the specified product.
      operationId: ProductSubscriptions_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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "|   Field     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| state | filter | eq |     | </br>| user | expand |     |     | </br>"
          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: Lists a collection of subscription entities.
          schema:
            description: Paged Subscriptions list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Subscription details.
                  properties:
                    properties:
                      description: Subscription details.
                      properties:
                        allowTracing:
                          description: Determines whether tracing is enabled
                          type: boolean
                          x-apim-code-nillable: true
                        createdDate:
                          description: |
                            Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                          format: date-time
                          readOnly: true
                          type: string
                        displayName:
                          description: The name of the subscription, or null if the subscription has no name.
                          maxLength: 100
                          minLength: 0
                          type: string
                        endDate:
                          description: |
                            Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                          format: date-time
                          type: string
                        expirationDate:
                          description: |
                            Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                          format: date-time
                          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.
                          format: date-time
                          type: string
                        ownerId:
                          description: The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.
                          type: string
                        primaryKey:
                          description: Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
                          maxLength: 256
                          minLength: 1
                          type: string
                          x-ms-secret: true
                        scope:
                          description: Scope like /products/{productId} or /apis or /apis/{apiId}.
                          type: string
                        secondaryKey:
                          description: Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
                          maxLength: 256
                          minLength: 1
                          type: string
                          x-ms-secret: true
                        startDate:
                          description: |
                            Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                          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: SubscriptionState
                        stateComment:
                          description: Optional subscription comment added by an administrator.
                          type: string
                      required:
                        - scope
                        - state
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductSubscription
      x-ms-examples:
        ApiManagementListProductSubscriptions:
          parameters:
            api-version: 2019-12-01-preview
            productId: 5600b57e7e8880006a060002
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/subscriptions/5600b57e7e8880006a070002
                    name: 5600b57e7e8880006a070002
                    properties:
                      createdDate: 2015-09-22T01:57:18.723Z
                      ownerId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1
                      scope: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002
                      state: active
                    type: Microsoft.ApiManagement/service/products/subscriptions
      x-ms-odata: ./definitions.json#/definitions/SubscriptionContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags":
    get:
      description: Lists all Tags associated with the Product.
      operationId: Tag_ListByProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "|   Field     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>"
          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: The operation returns a collection of tags associated with the Product entity.
          schema:
            description: Paged Tag list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Tag Contract details.
                  properties:
                    properties:
                      description: Tag contract Properties.
                      properties:
                        displayName:
                          description: Tag name.
                          maxLength: 160
                          minLength: 1
                          type: string
                      required:
                        - displayName
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductTag
      x-ms-examples:
        ApiManagementListProductTags:
          parameters:
            api-version: 2019-12-01-preview
            productId: 57d2ef278aa04f0888cba3f1
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002
                    name: 5600b539c53f5b0062060002
                    properties:
                      displayName: tag1
                    type: Microsoft.ApiManagement/service/tags
      x-ms-odata: ./definitions.json#/definitions/TagContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}":
    delete:
      description: Detach the tag from the Product.
      operationId: Tag_DetachFromProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Tag identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: tagId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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: Successfully detached the tag from the Product.
        "204":
          description: Successfully detached the tag from the Product.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductTag
      x-ms-examples:
        ApiManagementDeleteProductTag:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            productId: 59d5b28d1f7fab116c282650
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            tagId: 59d5b28e1f7fab116402044e
          responses:
            "200": {}
            "204": {}
    get:
      description: Get tag associated with the Product.
      operationId: Tag_GetByProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Tag identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: tagId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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: Gets the details of the tag specified by its identifier.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Tag Contract details.
            properties:
              properties:
                description: Tag contract Properties.
                properties:
                  displayName:
                    description: Tag name.
                    maxLength: 160
                    minLength: 1
                    type: string
                required:
                  - displayName
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductTag
      x-ms-examples:
        ApiManagementGetProductTag:
          parameters:
            api-version: 2019-12-01-preview
            productId: 59d6bb8f1f7fab13dc67ec9b
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            tagId: 59306a29e4bbd510dc24e5f9
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9
                name: 59306a29e4bbd510dc24e5f9
                properties:
                  displayName: tag1
                type: Microsoft.ApiManagement/service/tags
    head:
      description: Gets the entity state version of the tag specified by its identifier.
      operationId: Tag_GetEntityStateByProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Tag identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: tagId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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: Empty response body, ETag header entity state version.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductTag
      x-ms-examples:
        ApiManagementHeadProductTag:
          parameters:
            api-version: 2019-12-01-preview
            productId: 59306a29e4bbd510dc24e5f8
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            tagId: 59306a29e4bbd510dc24e5f9
          responses:
            "200":
              headers:
                Etag: AAAAAAAACCI=
    put:
      description: Assign tag to the Product.
      operationId: Tag_AssignToProduct
      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: Product identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: productId
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Tag identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: tagId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          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: Tag is already assigned to the Product.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Tag Contract details.
            properties:
              properties:
                description: Tag contract Properties.
                properties:
                  displayName:
                    description: Tag name.
                    maxLength: 160
                    minLength: 1
                    type: string
                required:
                  - displayName
        "201":
          description: Tag was assigned to the Product.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Tag Contract details.
            properties:
              properties:
                description: Tag contract Properties.
                properties:
                  displayName:
                    description: Tag name.
                    maxLength: 160
                    minLength: 1
                    type: string
                required:
                  - displayName
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                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:
        - ProductTag
      x-ms-examples:
        ApiManagementCreateProductTag:
          parameters:
            api-version: 2019-12-01-preview
            productId: 5931a75ae4bbd512a88c680b
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            tagId: tagId1
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1
                name: tagId1
                properties:
                  displayName: tag1
                type: Microsoft.ApiManagement/service/tags
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1
                name: tagId1
                properties:
                  displayName: tag1
                type: Microsoft.ApiManagement/service/tags
definitions: {}
