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: 2019-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/2019-07-01/ddosCustomPolicy.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: network-ddosCustomPolicy
  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}":
    delete:
      description: Deletes the specified DDoS custom policy.
      operationId: DdosCustomPolicies_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the DDoS custom policy.
          in: path
          name: ddosCustomPolicyName
          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.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ddosCustomPolicies
      x-ms-examples:
        Delete DDoS custom policy:
          parameters:
            api-version: 2019-07-01
            ddosCustomPolicyName: test-ddos-custom-policy
            parameters:
              properties: {}
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
    get:
      description: Gets information about the specified DDoS custom policy.
      operationId: DdosCustomPolicies_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the DDoS custom policy.
          in: path
          name: ddosCustomPolicyName
          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 the specified DDoS custom policy resource.
          schema:
            $ref: "#/definitions/DdosCustomPolicy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ddosCustomPolicies
      x-ms-examples:
        Get DDoS custom policy:
          parameters:
            api-version: 2019-07-01
            ddosCustomPolicyName: test-ddos-custom-policy
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy
                location: westus
                name: test-ddos-custom-policy
                properties:
                  provisioningState: Succeeded
                  publicIPAddresses:
                    - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip
                  resourceGuid: 00000000-0000-0000-0000-000000000000
                type: Microsoft.Network/ddosCustomPolicies
    patch:
      description: Update a DDoS custom policy tags.
      operationId: DdosCustomPolicies_UpdateTags
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the DDoS custom policy.
          in: path
          name: ddosCustomPolicyName
          required: true
          type: string
        - description: Parameters supplied to the update DDoS custom policy resource 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 DDoS custom policy resource.
          schema:
            $ref: "#/definitions/DdosCustomPolicy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ddosCustomPolicies
      x-ms-examples:
        DDoS Custom policy Update tags:
          parameters:
            api-version: 2019-07-01
            ddosCustomPolicyName: test-ddos-custom-policy
            parameters:
              tags:
                tag1: value1
                tag2: value2
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy
                location: westus
                name: test-ddos-custom-policy
                properties:
                  protocolCustomSettings:
                    - protocol: Tcp
                      triggerRateOverride: "20000"
                  provisioningState: Succeeded
                  publicIPAddresses: []
                  resourceGuid: 00000000-0000-0000-0000-000000000000
                tags:
                  tag1: value1
                  tag2: value2
                type: Microsoft.Network/ddosCustomPolicies
      x-ms-long-running-operation: true
    put:
      description: Creates or updates a DDoS custom policy.
      operationId: DdosCustomPolicies_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The name of the DDoS custom policy.
          in: path
          name: ddosCustomPolicyName
          required: true
          type: string
        - description: Parameters supplied to the create or update operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/DdosCustomPolicy"
        - 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 DDoS custom policy resource.
          schema:
            $ref: "#/definitions/DdosCustomPolicy"
        "201":
          description: Create successful. The operation returns the resulting DDoS custom policy resource.
          schema:
            $ref: "#/definitions/DdosCustomPolicy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ddosCustomPolicies
      x-ms-examples:
        Create DDoS custom policy:
          parameters:
            api-version: 2019-07-01
            ddosCustomPolicyName: test-ddos-custom-policy
            parameters:
              location: centraluseuap
              properties:
                protocolCustomSettings:
                  - protocol: Tcp
            resourceGroupName: rg1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy
                location: centraluseuap
                name: test-ddos-custom-policy
                properties:
                  protocolCustomSettings:
                    - protocol: Tcp
                      triggerRateOverride: "20000"
                  provisioningState: Succeeded
                  publicIPAddresses: []
                  resourceGuid: 00000000-0000-0000-0000-000000000000
                type: Microsoft.Network/ddosCustomPolicies
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy
                location: centraluseuap
                name: test-ddos-custom-policy
                properties:
                  protocolCustomSettings:
                    - protocol: Tcp
                      triggerRateOverride: "20000"
                  provisioningState: Succeeded
                  publicIPAddresses: []
                  resourceGuid: 00000000-0000-0000-0000-000000000000
                type: Microsoft.Network/ddosCustomPolicies
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
definitions:
  CloudError:
    description: An error response from the Batch service.
    properties:
      error:
        $ref: "#/definitions/CloudErrorBody"
        description: Cloud error body.
    x-ms-external: true
  CloudErrorBody:
    description: An error response from the Batch service.
    properties:
      code:
        description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
        type: string
      details:
        description: A list of additional details about the error.
        items:
          $ref: "#/definitions/CloudErrorBody"
        type: array
      message:
        description: A message describing the error, intended to be suitable for display in a user interface.
        type: string
      target:
        description: The target of the particular error. For example, the name of the property in error.
        type: string
    x-ms-external: true
  DdosCustomPolicy:
    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: A DDoS custom policy in a resource group.
    properties:
      etag:
        description: A unique read-only string that changes whenever the resource is updated.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/DdosCustomPolicyPropertiesFormat"
        description: Properties of the DDoS custom policy.
        x-ms-client-flatten: true
  DdosCustomPolicyPropertiesFormat:
    description: DDoS custom policy properties.
    properties:
      protocolCustomSettings:
        description: The protocol-specific DDoS policy customization parameters.
        items:
          $ref: "#/definitions/ProtocolCustomSettingsFormat"
        readOnly: false
        type: array
      provisioningState:
        description: The current provisioning state.
        enum:
          - Succeeded
          - Updating
          - Deleting
          - Failed
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ProvisioningState
      publicIPAddresses:
        description: The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
        items:
          description: Reference to another subresource.
          properties:
            id:
              description: Resource ID.
              type: string
          x-ms-azure-resource: true
        readOnly: true
        type: array
      resourceGuid:
        description: The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
        readOnly: true
        type: string
  ProtocolCustomSettingsFormat:
    description: DDoS custom policy properties.
    properties:
      protocol:
        description: The protocol for which the DDoS protection policy is being customized.
        enum:
          - Tcp
          - Udp
          - Syn
        readOnly: false
        type: string
        x-ms-enum:
          modelAsString: true
          name: DdosCustomPolicyProtocol
      sourceRateOverride:
        description: The customized DDoS protection source rate.
        readOnly: false
        type: string
      triggerRateOverride:
        description: The customized DDoS protection trigger rate.
        readOnly: false
        type: string
      triggerSensitivityOverride:
        description: "The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic."
        enum:
          - Relaxed
          - Low
          - Default
          - High
        readOnly: false
        type: string
        x-ms-enum:
          modelAsString: true
          name: DdosCustomPolicyTriggerSensitivityOverride
