swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: Quota admin operation endpoints and objects.
  title: NetworkAdminManagementClient
  version: 2015-06-15
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/azsadmin/resource-manager/network/Microsoft.Network.Admin/preview/2015-06-15/Quotas.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: azsadmin-Quotas
  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:
  QuotaParameter:
    description: New network quota to create.
    in: body
    name: Quota
    required: true
    schema:
      $ref: "#/definitions/Quota"
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/providers/Microsoft.Network.Admin/locations/{location}/quotas":
    get:
      description: List all quotas.
      operationId: Quotas_List
      parameters:
        - 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
        - description: Location of the resource.
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2015-06-15
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
        - description: OData filter parameter.
          in: query
          name: $filter
          type: string
          x-ms-parameter-location: method
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/QuotaList"
        "404":
          description: Not Found
      tags:
        - Quotas
      x-ms-examples:
        List all quotas:
          parameters:
            api-version: 2015-06-15
            location: local
            subscriptionId: fc8456aa-4843-4079-a152-f3497c63aa73
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/fc8456aa-4843-4079-a152-f3497c63aa73/providers/Microsoft.Network.Admin/locations/local/quotas/Default Quota
                    location: local
                    name: Default Quota
                    properties:
                      maxLoadBalancersPerSubscription: 50
                      maxNicsPerSubscription: 100
                      maxPublicIpsPerSubscription: 50
                      maxSecurityGroupsPerSubscription: 50
                      maxVirtualNetworkGatewayConnectionsPerSubscription: 2
                      maxVirtualNetworkGatewaysPerSubscription: 1
                      maxVnetsPerSubscription: 50
                      migrationPhase: None
                      provisioningState: Succeeded
                    type: Microsoft.Network.Admin/quotas
            "404": {}
      x-ms-odata: "#/definitions/Quota"
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.Network.Admin/locations/{location}/quotas/{resourceName}":
    delete:
      description: Delete a quota by name.
      operationId: Quotas_Delete
      parameters:
        - 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
        - description: Location of the resource.
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the resource.
          in: path
          name: resourceName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2015-06-15
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
        "202":
          description: Accepted
        "204":
          description: No Content
      tags:
        - Network
      x-ms-examples:
        Delete a quota by name.:
          parameters:
            api-version: 2015-06-15
            location: local
            resourceName: TestQuotaForUpdate
            subscriptionId: fc8456aa-4843-4079-a152-f3497c63aa73
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Get a quota by name.
      operationId: Quotas_Get
      parameters:
        - 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
        - description: Location of the resource.
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the resource.
          in: path
          name: resourceName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2015-06-15
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Quota"
        "404":
          description: Not Found
      tags:
        - Quotas
      x-ms-examples:
        Get a quota by name:
          parameters:
            api-version: 2015-06-15
            location: local
            resourceName: Default Quota
            subscriptionId: fc8456aa-4843-4079-a152-f3497c63aa73
          responses:
            "200":
              body:
                id: /subscriptions/fc8456aa-4843-4079-a152-f3497c63aa73/providers/Microsoft.Network.Admin/locations/local/quotas/Default Quota
                location: local
                name: Default Quota
                properties:
                  maxLoadBalancersPerSubscription: 50
                  maxNicsPerSubscription: 100
                  maxPublicIpsPerSubscription: 50
                  maxSecurityGroupsPerSubscription: 50
                  maxVirtualNetworkGatewayConnectionsPerSubscription: 2
                  maxVirtualNetworkGatewaysPerSubscription: 1
                  maxVnetsPerSubscription: 50
                  migrationPhase: None
                  provisioningState: Succeeded
                type: Microsoft.Network.Admin/quotas
            "404": {}
    put:
      description: Create or update a quota.
      operationId: Quotas_CreateOrUpdate
      parameters:
        - 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
        - description: Location of the resource.
          in: path
          name: location
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Name of the resource.
          in: path
          name: resourceName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2015-06-15
          description: Client API Version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/QuotaParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Quota"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/Quota"
      tags:
        - Network
      x-ms-examples:
        Create or update a new quota:
          parameters:
            Quota: test
            api-version: 2015-06-15
            location: local
            resourceName: TestQuotaForUpdate
            subscriptionId: fc8456aa-4843-4079-a152-f3497c63aa73
          responses:
            "200":
              body:
                id: /subscriptions/2a6b336c-6c7f-4a19-bab9-b51119d8fec8/providers/Microsoft.Network.Admin/locations/local/quotas/TestQuotaForUpdate
                name: TestQuotaForUpdate
                properties:
                  maxLoadBalancersPerSubscription: 0
                  maxNicsPerSubscription: 8
                  maxPublicIpsPerSubscription: 32
                  maxSecurityGroupsPerSubscription: 0
                  maxVirtualNetworkGatewayConnectionsPerSubscription: 0
                  maxVirtualNetworkGatewaysPerSubscription: 0
                  maxVnetsPerSubscription: 0
                  migrationPhase: None
                  provisioningState: Updating
                type: Microsoft.Network.Admin/quotas
            "201":
              body:
                id: /subscriptions/fc8456aa-4843-4079-a152-f3497c63aa73/providers/Microsoft.Network.Admin/locations/local/quotas/TestQuotaForRemoval
                name: TestQuotaForRemoval
                properties:
                  maxLoadBalancersPerSubscription: 32
                  maxNicsPerSubscription: 4
                  maxPublicIpsPerSubscription: 32
                  maxSecurityGroupsPerSubscription: 2
                  maxVirtualNetworkGatewayConnectionsPerSubscription: 32
                  maxVirtualNetworkGatewaysPerSubscription: 32
                  maxVnetsPerSubscription: 32
                  migrationPhase: None
                  provisioningState: Succeeded
                type: Microsoft.Network.Admin/quotas
definitions:
  MigrationPhase:
    description: State of migration such as None, Prepare, Commit, and Abort.
    enum:
      - None
      - Prepare
      - Commit
      - Abort
    type: string
    x-ms-enum:
      modelAsString: true
      name: MigrationPhaseType
  Quota:
    allOf:
      - description: Base Resource Object
        properties:
          id:
            description: URI of the resource.
            readOnly: true
            type: string
          location:
            description: Region location of resource.
            readOnly: true
            type: string
          name:
            description: Name of the resource.
            readOnly: true
            type: string
          tags:
            additionalProperties:
              type: string
            description: List of key value pairs.
            type: object
          type:
            description: Type of resource.
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: Network quota resource.
    properties:
      properties:
        $ref: "#/definitions/QuotaProperties"
        description: Network quota properties.
        x-ms-client-flatten: true
  QuotaList:
    description: A pageable list of network quotas.
    properties:
      nextLink:
        description: The URI to the next page.
        type: string
      value:
        description: List of quotas on this page.
        items:
          $ref: "#/definitions/Quota"
        type: array
    type: object
  QuotaProperties:
    allOf:
      - description: Objects which have a provisioning state.
        properties:
          provisioningState:
            description: The provisioning state.
            readOnly: true
            type: string
        type: object
    description: Properties of a quota.
    properties:
      maxLoadBalancersPerSubscription:
        description: Maximum number of load balancers a tenant subscription can provision.
        format: int64
        type: integer
      maxNicsPerSubscription:
        description: Maximum number of NICs a tenant subscription can provision.
        format: int64
        type: integer
      maxPublicIpsPerSubscription:
        description: Maximum number of public IP addresses a tenant subscription can provision.
        format: int64
        type: integer
      maxSecurityGroupsPerSubscription:
        description: Maximum number of security groups a tenant subscription can provision.
        format: int64
        type: integer
      maxVirtualNetworkGatewayConnectionsPerSubscription:
        description: Maximum number of virtual network gateway Connections a tenant subscription can provision.
        format: int64
        type: integer
      maxVirtualNetworkGatewaysPerSubscription:
        description: Maximum number of virtual network gateways a tenant subscription can provision.
        format: int64
        type: integer
      maxVnetsPerSubscription:
        description: Maximum number of virtual networks a tenant subscription can provision.
        format: int64
        type: integer
      migrationPhase:
        $ref: "#/definitions/MigrationPhase"
        description: State of migration such as None, Prepare, Commit, and Abort.
        readOnly: true
