Azure Networking Services Security Rules API

The Security Rules API from Azure Networking Services — 4 operation(s) for security rules.

GitHub OpenAPI

Operations 6

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules Default security rules list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName} Default security rules get #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules Security rules list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName} Security rules get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName} Security rules create or update #
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName} Security rules delete #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/azure-networking-services:azure-networking-services-security-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

azure-networking-services-security-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WebApplicationFirewallManagement Security Rules API
  version: '2026-03-01'
  description: APIs to manage Microsoft Azure network resources.
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Security Rules
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules
  : get:
      operationId: DefaultSecurityRules_List
      tags:
      - Security Rules
      description: Gets all default security rules in a network security group.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: networkSecurityGroupName
        in: path
        description: The name of the network security group.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityRuleListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Default security rules list
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}
  : get:
      operationId: DefaultSecurityRules_Get
      tags:
      - Security Rules
      description: Get the specified default network security rule.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: networkSecurityGroupName
        in: path
        description: The name of the network security group.
        required: true
        schema:
          type: string
      - name: defaultSecurityRuleName
        in: path
        description: The name of the default security rule.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityRule'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Default security rules get
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules
  : get:
      operationId: SecurityRules_List
      tags:
      - Security Rules
      description: Gets all security rules in a network security group.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: networkSecurityGroupName
        in: path
        description: The name of the network security group.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityRuleListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Security rules list
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}
  : get:
      operationId: SecurityRules_Get
      tags:
      - Security Rules
      description: Get the specified network security rule.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: networkSecurityGroupName
        in: path
        description: The name of the network security group.
        required: true
        schema:
          type: string
      - name: securityRuleName
        in: path
        description: The name of the security rule.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityRule'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Security rules get
      x-summary-source: derived
    put:
      operationId: SecurityRules_CreateOrUpdate
      tags:
      - Security Rules
      description: Creates or updates a security rule in the specified network security group.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: networkSecurityGroupName
        in: path
        description: The name of the network security group.
        required: true
        schema:
          type: string
      - name: securityRuleName
        in: path
        description: The name of the security rule.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource 'SecurityRule' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityRule'
        '201':
          description: Resource 'SecurityRule' create operation succeeded
          headers:
            Azure-AsyncOperation:
              description: A link to the status monitor
              schema:
                type: string
            Retry-After:
              description: The Retry-After header can indicate how long the client should wait before polling the operation status.
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityRule'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
        final-state-schema: '#/definitions/SecurityRule'
      x-ms-long-running-operation: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecurityRule'
        description: Parameters supplied to the create or update network security rule operation.
        required: true
      summary: Security rules create or update
      x-summary-source: derived
    delete:
      operationId: SecurityRules_Delete
      tags:
      - Security Rules
      description: Deletes the specified network security rule.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: networkSecurityGroupName
        in: path
        description: The name of the network security group.
        required: true
        schema:
          type: string
      - name: securityRuleName
        in: path
        description: The name of the security rule.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource deleted successfully.
        '202':
          description: Resource deletion accepted.
          headers:
            Location:
              description: The Location header contains the URL where the status of the long running operation can be checked.
              schema:
                type: string
            Retry-After:
              description: The Retry-After header can indicate how long the client should wait before polling the operation status.
              schema:
                type: integer
                format: int32
        '204':
          description: Resource does not exist.
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-long-running-operation: true
      summary: Security rules delete
      x-summary-source: derived
components:
  schemas:
    SubResourceModel:
      type: object
      description: Reference to another subresource.
      properties:
        name:
          type: string
          description: Name of the resource.
        type:
          type: string
          description: Resource type.
          readOnly: true
      allOf:
      - $ref: '#/components/schemas/SubResource'
      x-ms-azure-resource: true
    SecurityRuleListResult:
      type: object
      description: The response of a SecurityRule list operation.
      properties:
        value:
          type: array
          description: The SecurityRule items on this page
          items:
            $ref: '#/components/schemas/SecurityRule'
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
      required:
      - value
    ApplicationSecurityGroup:
      type: object
      description: An application security group in a resource group.
      properties:
        properties:
          $ref: '#/components/schemas/ApplicationSecurityGroupPropertiesFormat'
          description: Properties of the application security group.
          x-ms-client-flatten: true
        etag:
          type: string
          description: A unique read-only string that changes whenever the resource is updated.
          readOnly: true
      allOf:
      - $ref: '#/components/schemas/Resource'
    SecurityRuleProtocol:
      type: string
      description: Network protocol this rule applies to.
      enum:
      - Tcp
      - Udp
      - Icmp
      - Esp
      - '*'
      - Ah
      x-ms-enum:
        name: SecurityRuleProtocol
        modelAsString: true
        values:
        - name: Tcp
          value: Tcp
          description: Tcp
        - name: Udp
          value: Udp
          description: Udp
        - name: Icmp
          value: Icmp
          description: Icmp
        - name: Esp
          value: Esp
          description: Esp
        - name: Asterisk
          value: '*'
          description: '*'
        - name: Ah
          value: Ah
          description: Ah
    SubResource:
      type: object
      description: Reference to another subresource.
      properties:
        id:
          type: string
          description: Resource ID.
    SecurityRulePropertiesFormat:
      type: object
      description: Security rule resource.
      properties:
        description:
          type: string
          description: A description for this rule. Restricted to 140 chars.
        protocol:
          $ref: '#/components/schemas/SecurityRuleProtocol'
          description: Network protocol this rule applies to.
        sourcePortRange:
          type: string
          description: The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
        destinationPortRange:
          type: string
          description: The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
        sourceAddressPrefix:
          type: string
          description: The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
        sourceAddressPrefixes:
          type: array
          description: The CIDR or source IP ranges.
          items:
            type: string
        sourceApplicationSecurityGroups:
          type: array
          description: The application security group specified as source.
          items:
            $ref: '#/components/schemas/ApplicationSecurityGroup'
        destinationAddressPrefix:
          type: string
          description: The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
        destinationAddressPrefixes:
          type: array
          description: The destination address prefixes. CIDR or destination IP ranges.
          items:
            type: string
        destinationApplicationSecurityGroups:
          type: array
          description: The application security group specified as destination.
          items:
            $ref: '#/components/schemas/ApplicationSecurityGroup'
        sourcePortRanges:
          type: array
          description: The source port ranges.
          items:
            type: string
        destinationPortRanges:
          type: array
          description: The destination port ranges.
          items:
            type: string
        access:
          $ref: '#/components/schemas/SecurityRuleAccess'
          description: The network traffic is allowed or denied.
        priority:
          type: integer
          format: int32
          description: The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
        direction:
          $ref: '#/components/schemas/SecurityRuleDirection'
          description: The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.
        provisioningState:
          $ref: '#/components/schemas/ProvisioningState'
          description: The provisioning state of the security rule resource.
          readOnly: true
      required:
      - protocol
      - access
      - priority
      - direction
    Resource:
      type: object
      description: Common resource representation.
      properties:
        id:
          type: string
          description: Resource ID.
        name:
          type: string
          description: Resource name.
          readOnly: true
        type:
          type: string
          description: Resource type.
          readOnly: true
        location:
          type: string
          description: Resource location.
        tags:
          type: object
          description: Resource tags.
          additionalProperties:
            type: string
      x-ms-azure-resource: true
    CloudError:
      type: object
      description: An error response from the service.
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: Cloud error body.
      x-ms-external: true
    SecurityRuleAccess:
      type: string
      description: Whether network traffic is allowed or denied.
      enum:
      - Allow
      - Deny
      x-ms-enum:
        name: SecurityRuleAccess
        modelAsString: true
        values:
        - name: Allow
          value: Allow
          description: Allow
        - name: Deny
          value: Deny
          description: Deny
    ProvisioningState:
      type: string
      description: Provisioning states of a resource.
      enum:
      - Failed
      - Succeeded
      - Canceled
      - Creating
      - Updating
      - Deleting
      x-ms-enum:
        name: ProvisioningState
        modelAsString: true
        values:
        - name: Failed
          value: Failed
          description: Failed
        - name: Succeeded
          value: Succeeded
          description: Succeeded
        - name: Canceled
          value: Canceled
          description: Canceled
        - name: Creating
          value: Creating
          description: Creating
        - name: Updating
          value: Updating
          description: Updating
        - name: Deleting
          value: Deleting
          description: Deleting
    SecurityRule:
      type: object
      description: Network security rule.
      properties:
        properties:
          $ref: '#/components/schemas/SecurityRulePropertiesFormat'
          description: Properties of the security rule.
          x-ms-client-flatten: true
        etag:
          type: string
          description: A unique read-only string that changes whenever the resource is updated.
          readOnly: true
      allOf:
      - $ref: '#/components/schemas/SubResourceModel'
    ApplicationSecurityGroupPropertiesFormat:
      type: object
      description: Application security group properties.
      properties:
        resourceGuid:
          type: string
          description: The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
          readOnly: true
        provisioningState:
          $ref: '#/components/schemas/ProvisioningState'
          description: The provisioning state of the application security group resource.
          readOnly: true
    SecurityRuleDirection:
      type: string
      description: The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.
      enum:
      - Inbound
      - Outbound
      x-ms-enum:
        name: SecurityRuleDirection
        modelAsString: true
        values:
        - name: Inbound
          value: Inbound
          description: Inbound
        - name: Outbound
          value: Outbound
          description: Outbound
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription. The value must be an UUID.
      required: true
      schema:
        type: string
        format: uuid
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The name of the resource group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.