swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.
  title: NetworkManagementClient
  version: 2018-07-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/network/resource-manager/Microsoft.Network/stable/2018-07-01/publicIpPrefix.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: network-publicIpPrefix
  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
paths:
  "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes":
    get:
      description: Gets all the public IP prefixes in a subscription.
      operationId: PublicIPPrefixes_ListAll
      parameters:
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - description: The subscription credentials which uniquely identify the 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: Request successful. The operation returns a list of PublicIPPrefix resources.
          schema:
            $ref: "#/definitions/PublicIPPrefixListResult"
      tags:
        - PublicIPPrefixes
      x-ms-examples:
        List all public IP prefixes:
          parameters:
            api-version: 2018-07-01
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - etag: W/"00000000-0000-0000-0000-00000000"
                    id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                    location: westus
                    name: test-ipprefix
                    properties:
                      ipPrefix: 41.85.154.247/30
                      ipTags: []
                      prefixLength: 30
                      provisioningState: Succeeded
                      publicIPAddressVersion: IPv4
                      publicIPAddresses:
                        - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1
                      resourceGuid: 00000000-0000-0000-0000-00000000
                    sku:
                      name: Standard
                    type: Microsoft.Network/publicIPPrefixes
                  - etag: W/"00000000-0000-0000-0000-00000000"
                    id: /subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPPrefixes/ipprefix01
                    location: westus
                    name: ipprefix01
                    properties:
                      ipPrefix: 40.85.154.247/30
                      ipTags: []
                      prefixLength: 30
                      provisioningState: Succeeded
                      publicIPAddressVersion: IPv4
                      resourceGuid: 00000000-0000-0000-0000-00000000
                    sku:
                      name: Standard
                    type: Microsoft.Network/publicIPPrefixes
                  - etag: W/"00000000-0000-0000-0000-00000000"
                    id: /subscriptions/subid/resourceGroups/rg3/providers/Microsoft.Network/publicIPPrefixes/pfx
                    location: westus
                    name: pfx
                    properties:
                      ipPrefix: 25.101.84.16/30
                      ipTags: []
                      loadBalancerFrontendIpConfiguration:
                        id: /subscriptions/subid/resourceGroups/rg3/providers/Microsoft.Network/loadBalancers/lb-pfx/frontendIPConfigurations/ipconfig1
                      prefixLength: 30
                      provisioningState: Succeeded
                      publicIPAddressVersion: IPv4
                      resourceGuid: 00000000-0000-0000-0000-00000000
                    sku:
                      name: Standard
                    type: Microsoft.Network/publicIPPrefixes
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes":
    get:
      description: Gets all public IP prefixes in a resource group.
      operationId: PublicIPPrefixes_List
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - description: The subscription credentials which uniquely identify the 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: Request successful. The operation returns a list of PublicIPPrefix resources.
          schema:
            $ref: "#/definitions/PublicIPPrefixListResult"
      tags:
        - PublicIPPrefixes
      x-ms-examples:
        List resource group public IP prefixes:
          parameters:
            api-version: 2018-07-01
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                value:
                  - etag: W/"00000000-0000-0000-0000-00000000"
                    id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                    location: westus
                    name: test-ipprefix
                    properties:
                      ipPrefix: 40.85.154.2/30
                      ipTags:
                        - ipTagType: FirstPartyUsage
                          tag: SQL
                      prefixLength: 30
                      provisioningState: Succeeded
                      publicIPAddressVersion: IPv4
                      resourceGuid: 00000000-0000-0000-0000-00000000
                    sku:
                      name: Standard
                    type: Microsoft.Network/publicIPPrefixes
                  - etag: W/"00000000-0000-0000-0000-00000000"
                    id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/ipprefix03
                    location: westus
                    name: ipprefix03
                    properties:
                      ipPrefix: 40.85.153.2/31
                      ipTags: []
                      prefixLength: 31
                      provisioningState: Succeeded
                      publicIPAddressVersion: IPv4
                      resourceGuid: 00000000-0000-0000-0000-00000000
                    sku:
                      name: Standard
                    type: Microsoft.Network/publicIPPrefixes
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}":
    delete:
      description: Deletes the specified public IP prefix.
      operationId: PublicIPPrefixes_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the PublicIpPrefix.
          in: path
          name: publicIpPrefixName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - description: The subscription credentials which uniquely identify the 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: Delete successful.
        "202":
          description: Accepted and the operation will complete asynchronously.
        "204":
          description: Request successful. Resource does not exist.
      tags:
        - PublicIPPrefixes
      x-ms-examples:
        Delete public IP prefix:
          parameters:
            api-version: 2018-07-01
            publicIpPrefixName: test-ipprefix
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets the specified public IP prefix in a specified resource group.
      operationId: PublicIPPrefixes_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the Public IP Prefix.
          in: path
          name: publicIpPrefixName
          required: true
          type: string
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - description: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: Expands referenced resources.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: Request successful. The operation returns the resulting PublicIPPrefix resource.
          schema:
            $ref: "#/definitions/PublicIPPrefix"
      tags:
        - PublicIPPrefixes
      x-ms-examples:
        Get public IP prefix:
          parameters:
            api-version: 2018-07-01
            publicIpPrefixName: test-ipprefix
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: W/"00000000-0000-0000-0000-00000000"
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                location: westus
                name: test-ipprefix
                properties:
                  ipPrefix: 192.168.254.2/30
                  ipTags: []
                  prefixLength: 30
                  provisioningState: Succeeded
                  publicIPAddressVersion: IPv4
                  publicIPAddresses:
                    - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1
                  resourceGuid: 00000000-0000-0000-0000-00000000
                sku:
                  name: Standard
                type: Microsoft.Network/publicIPPrefixes
    patch:
      description: Updates public IP prefix tags.
      operationId: PublicIPPrefixes_UpdateTags
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the public IP prefix.
          in: path
          name: publicIpPrefixName
          required: true
          type: string
        - description: Parameters supplied to update public IP prefix tags.
          in: body
          name: parameters
          required: true
          schema:
            description: Tags object for patch operations.
            properties:
              tags:
                additionalProperties:
                  type: string
                description: Resource tags.
                type: object
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - description: The subscription credentials which uniquely identify the 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: Update successful. The operation returns the resulting PublicIPPrefix resource.
          schema:
            $ref: "#/definitions/PublicIPPrefix"
      tags:
        - PublicIPPrefixes
      x-ms-examples:
        Update public IP prefix tags:
          parameters:
            api-version: 2018-07-01
            parameters:
              tags:
                tag1: value1
                tag2: value2
            publicIpPrefixName: test-ipprefix
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: W/"00000000-0000-0000-0000-00000000"
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                location: westus
                name: test-ipprefix
                properties:
                  ipPrefix: 40.85.154.247/30
                  ipTags: []
                  prefixLength: 30
                  provisioningState: Succeeded
                  publicIPAddressVersion: IPv4
                  resourceGuid: 00000000-0000-0000-0000-00000000
                sku:
                  name: Standard
                tags:
                  tag1: value1
                  tag2: value2
                type: Microsoft.Network/publicIPPrefixes
      x-ms-long-running-operation: true
    put:
      description: Creates or updates a static or dynamic public IP prefix.
      operationId: PublicIPPrefixes_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the public IP prefix.
          in: path
          name: publicIpPrefixName
          required: true
          type: string
        - description: Parameters supplied to the create or update public IP prefix operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/PublicIPPrefix"
        - description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - description: The subscription credentials which uniquely identify the 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: Update successful. The operation returns the resulting PublicIPPrefix resource.
          schema:
            $ref: "#/definitions/PublicIPPrefix"
        "201":
          description: Create successful. The operation returns the resulting PublicIPPrefix resource.
          schema:
            $ref: "#/definitions/PublicIPPrefix"
      tags:
        - PublicIPPrefixes
      x-ms-examples:
        Create public IP prefix allocation method:
          parameters:
            api-version: 2018-07-01
            parameters:
              location: westus
              properties:
                prefixLength: 30
                publicIPAddressVersion: IPv4
              sku:
                name: Standard
            publicIpPrefixName: test-ipprefix
            resourceGroupName: rg1
            subscriptionId: subid
            zones:
              - "1"
          responses:
            "200":
              body:
                etag: W/"00000000-0000-0000-0000-00000000"
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                location: westus
                name: test-ipprefix
                properties:
                  ipPrefix: 192.168.254.2/30
                  ipTags: []
                  prefixLength: 30
                  provisioningState: Succeeded
                  publicIPAddressVersion: IPv4
                  resourceGuid: 00000000-0000-0000-0000-00000000
                sku:
                  name: Standard
                type: Microsoft.Network/publicIPPrefixes
                zones:
                  - "1"
            "201":
              body:
                etag: W/"00000000-0000-0000-0000-00000000"
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ipprefix
                location: westus
                name: test-ipprefix
                properties:
                  ipPrefix: 192.168.254.2/30
                  ipTags: []
                  prefixLength: 30
                  provisioningState: Succeeded
                  publicIPAddressVersion: IPv4
                  resourceGuid: 00000000-0000-0000-0000-00000000
                sku:
                  name: Standard
                type: Microsoft.Network/publicIPPrefixes
                zones:
                  - "1"
        Create public IP prefix defaults:
          parameters:
            api-version: 2018-07-01
            parameters:
              location: westus
              properties:
                prefixLength: 30
              sku:
                name: Standard
            publicIpPrefixName: test-ipprefix
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                etag: W/"00000000-0000-0000-0000-00000000"
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                location: westus
                name: test-ipprefix
                properties:
                  ipPrefix: 192.168.254.2/30
                  ipTags: []
                  prefixLength: 30
                  provisioningState: Succeeded
                  publicIPAddressVersion: IPv4
                  resourceGuid: 00000000-0000-0000-0000-00000000
                sku:
                  name: Standard
                type: Microsoft.Network/publicIPPrefixes
            "201":
              body:
                etag: W/"00000000-0000-0000-0000-00000000"
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/test-ipprefix
                location: westus
                name: test-ipprefix
                properties:
                  ipPrefix: 192.168.254.2/30
                  ipTags: []
                  prefixLength: 30
                  provisioningState: Succeeded
                  publicIPAddressVersion: IPv4
                  resourceGuid: 00000000-0000-0000-0000-00000000
                sku:
                  name: Standard
                type: Microsoft.Network/publicIPPrefixes
      x-ms-long-running-operation: true
definitions:
  IpTag:
    description: Contains the IpTag associated with the object
    properties:
      ipTagType:
        description: "Gets or sets the ipTag type: Example FirstPartyUsage."
        type: string
      tag:
        description: Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
        type: string
  PublicIPPrefix:
    allOf:
      - description: Common resource representation.
        properties:
          id:
            description: Resource ID.
            type: string
          location:
            description: Resource location.
            type: string
          name:
            description: Resource name.
            readOnly: true
            type: string
          tags:
            additionalProperties:
              type: string
            description: Resource tags.
            type: object
          type:
            description: Resource type.
            readOnly: true
            type: string
        x-ms-azure-resource: true
    description: Public IP prefix resource.
    properties:
      etag:
        description: A unique read-only string that changes whenever the resource is updated.
        type: string
      properties:
        $ref: "#/definitions/PublicIPPrefixPropertiesFormat"
        description: Public IP prefix properties.
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/PublicIPPrefixSku"
        description: The public IP prefix SKU.
      zones:
        description: A list of availability zones denoting the IP allocated for the resource needs to come from.
        items:
          type: string
        type: array
  PublicIPPrefixListResult:
    description: Response for ListPublicIpPrefixes API service call.
    properties:
      nextLink:
        description: The URL to get the next set of results.
        type: string
      value:
        description: A list of public IP prefixes that exists in a resource group.
        items:
          $ref: "#/definitions/PublicIPPrefix"
        type: array
  PublicIPPrefixPropertiesFormat:
    description: Public IP prefix properties.
    properties:
      ipPrefix:
        description: The allocated Prefix
        type: string
      ipTags:
        description: The list of tags associated with the public IP prefix.
        items:
          $ref: "#/definitions/IpTag"
        type: array
      loadBalancerFrontendIpConfiguration:
        description: Reference to another subresource.
        properties:
          id:
            description: Resource ID.
            type: string
        x-ms-azure-resource: true
      prefixLength:
        description: The Length of the Public IP Prefix.
        format: int32
        type: integer
      provisioningState:
        description: "The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'."
        type: string
      publicIPAddressVersion:
        description: "The public IP address version. Possible values are: 'IPv4' and 'IPv6'."
        enum:
          - IPv4
          - IPv6
        type: string
        x-ms-enum:
          modelAsString: true
          name: IPVersion
      publicIPAddresses:
        description: The list of all referenced PublicIPAddresses
        items:
          $ref: "#/definitions/ReferencedPublicIpAddress"
        type: array
      resourceGuid:
        description: The resource GUID property of the public IP prefix resource.
        type: string
  PublicIPPrefixSku:
    description: SKU of a public IP prefix
    properties:
      name:
        description: Name of a public IP prefix SKU.
        enum:
          - Standard
        type: string
        x-ms-enum:
          modelAsString: true
          name: PublicIPPrefixSkuName
  ReferencedPublicIpAddress:
    properties:
      id:
        description: The PublicIPAddress Reference
        type: string
