{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-load-balancer/json-schema/microsoft-azure-load-balancer-inbound-nat-rule-schema.json",
  "title": "InboundNatRule",
  "description": "Inbound NAT rule of the load balancer.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-load-balancer-load-balancers-api-openapi.yml#/components/schemas/InboundNatRule",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/InboundNatRulePropertiesFormat",
      "description": "Properties of load balancer inbound NAT 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": "#/$defs/SubResourceModel"
    }
  ],
  "$defs": {
    "InboundNatRulePropertiesFormat": {
      "type": "object",
      "description": "Properties of the inbound NAT rule.",
      "properties": {
        "frontendIPConfiguration": {
          "$ref": "#/$defs/SubResource",
          "description": "A reference to frontend IP addresses."
        },
        "backendIPConfiguration": {
          "$ref": "#/$defs/NetworkInterfaceIPConfiguration",
          "description": "A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP.",
          "readOnly": true
        },
        "protocol": {
          "$ref": "#/$defs/TransportProtocol",
          "description": "The reference to the transport protocol used by the load balancing rule."
        },
        "frontendPort": {
          "type": "integer",
          "format": "int32",
          "description": "The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534."
        },
        "backendPort": {
          "type": "integer",
          "format": "int32",
          "description": "The port used for the internal endpoint. Acceptable values range from 1 to 65535."
        },
        "idleTimeoutInMinutes": {
          "type": "integer",
          "format": "int32",
          "description": "The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP."
        },
        "enableFloatingIP": {
          "type": "boolean",
          "description": "Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint."
        },
        "enableTcpReset": {
          "type": "boolean",
          "description": "Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP."
        },
        "frontendPortRangeStart": {
          "type": "integer",
          "format": "int32",
          "description": "The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534."
        },
        "frontendPortRangeEnd": {
          "type": "integer",
          "format": "int32",
          "description": "The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534."
        },
        "backendAddressPool": {
          "$ref": "#/$defs/SubResource",
          "description": "A reference to backendAddressPool resource."
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the inbound NAT rule resource.",
          "readOnly": true
        }
      }
    },
    "NetworkInterfaceIPConfiguration": {
      "type": "object",
      "description": "IPConfiguration in a network interface.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/NetworkInterfaceIPConfigurationPropertiesFormat",
          "description": "Network interface IP configuration properties.",
          "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": "#/$defs/SubResourceModel"
        }
      ]
    },
    "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"
          }
        ]
      }
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    },
    "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": "#/$defs/SubResource"
        }
      ],
      "x-ms-azure-resource": true
    },
    "TransportProtocol": {
      "type": "string",
      "description": "The transport protocol for the endpoint.",
      "enum": [
        "Udp",
        "Tcp",
        "All",
        "Quic"
      ],
      "x-ms-enum": {
        "name": "TransportProtocol",
        "modelAsString": true,
        "values": [
          {
            "name": "Udp",
            "value": "Udp",
            "description": "Udp"
          },
          {
            "name": "Tcp",
            "value": "Tcp",
            "description": "Tcp"
          },
          {
            "name": "All",
            "value": "All",
            "description": "All"
          },
          {
            "name": "Quic",
            "value": "Quic",
            "description": "Quic"
          }
        ]
      }
    }
  }
}