Share via


Inbound Rules - List By Nat Gateway

Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the next page of inbound rules.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules?api-version=2026-04-01-preview

URI Parameters

Name In Required Type Description
natGatewayName
path True

string

pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$

Name of the nat gateway

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

InboundRuleListResult

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ListInboundRulesByNatGateway

Sample request

GET https://management.azure.com/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/natGateways/test-nat-gw/inboundRules?api-version=2026-04-01-preview

Sample response

{
  "value": [
    {
      "name": "rdp-inbound-rule",
      "type": "Microsoft.AzureStackHCI/natGateways/inboundRules",
      "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/natGateways/test-nat-gw/inboundRules/rdp-inbound-rule",
      "extendedLocation": {
        "name": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
        "type": "CustomLocation"
      },
      "properties": {
        "protocol": "Tcp",
        "frontendPort": 3389,
        "backendPort": 3389,
        "backendIPConfiguration": {
          "resourceId": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic/ipConfigurations/ipconfig1"
        },
        "publicIPAddress": {
          "resourceId": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/publicIPAddresses/test-public-ip"
        },
        "provisioningState": "Succeeded",
        "status": {
          "provisioningStatus": {
            "operationId": "12345678-1234-1234-1234-123456789012",
            "status": "Succeeded"
          }
        }
      }
    },
    {
      "name": "ssh-inbound-rule",
      "type": "Microsoft.AzureStackHCI/natGateways/inboundRules",
      "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/natGateways/test-nat-gw/inboundRules/ssh-inbound-rule",
      "extendedLocation": {
        "name": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
        "type": "CustomLocation"
      },
      "properties": {
        "protocol": "Tcp",
        "frontendPort": 22,
        "backendPort": 22,
        "backendIPConfiguration": {
          "resourceId": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic-2/ipConfigurations/ipconfig1"
        },
        "publicIPAddress": {
          "resourceId": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/publicIPAddresses/test-public-ip"
        },
        "provisioningState": "Succeeded",
        "status": {
          "provisioningStatus": {
            "operationId": "87654321-4321-4321-4321-210987654321",
            "status": "Succeeded"
          }
        }
      }
    }
  ]
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedLocation

The complex type of the extended location.

ExtendedLocationTypes

The type of extendedLocation.

InboundNATRuleProtocol

Protocol for inbound NAT rules

InboundRule

The inbound rule resource definition.

InboundRuleListResult

The response of a InboundRule list operation.

InboundRuleProperties

Inbound rule properties - extends InboundNATRuleProperties with additional status tracking

InboundRuleStatus

The observed state of inbound rule

InboundRuleStatusProvisioningStatus

Provisioning status of Inbound Rule

IPConfigurationArmReference

The Azure Resource ID of an IPConfiguration resource

ProvisioningStateEnum

Provisioning state of the resource.

PublicIPAddressArmReference

The Azure Resource ID of a Public IP resource

Status

The status of the operation performed on the resource [Succeeded, Failed, InProgress]

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExtendedLocation

The complex type of the extended location.

Name Type Description
name

string

The name of the extended location.

type

ExtendedLocationTypes

The type of the extended location.

ExtendedLocationTypes

The type of extendedLocation.

Value Description
CustomLocation

Custom extended location type

InboundNATRuleProtocol

Protocol for inbound NAT rules

Value Description
Tcp

TCP - load balance only tcp traffic

Udp

Udp - load balance only UDP traffic

InboundRule

The inbound rule resource definition.

Name Type Description
extendedLocation

ExtendedLocation

The extendedLocation of the resource.

id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties

InboundRuleProperties

The resource-specific properties for this resource.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

InboundRuleListResult

The response of a InboundRule list operation.

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

InboundRule[]

The InboundRule items on this page

InboundRuleProperties

Inbound rule properties - extends InboundNATRuleProperties with additional status tracking

Name Type Description
backendIPConfiguration

IPConfigurationArmReference

IP configuration for the target backend.

backendPort

integer (int32)

backend Port for the inbound rule

frontendPort

integer (int32)

Frontend Port for the inbound rule

protocol

InboundNATRuleProtocol

Protocol for the NAT rule

provisioningState

ProvisioningStateEnum

Provisioning state of the inbound rule

publicIPAddress

PublicIPAddressArmReference

Public IP Address for this NAT rule

status

InboundRuleStatus

The observed state of Inbound Rule

InboundRuleStatus

The observed state of inbound rule

Name Type Description
errorCode

string

InboundRule provisioning error code

errorMessage

string

Descriptive error message

provisioningStatus

InboundRuleStatusProvisioningStatus

InboundRule provisioning status

InboundRuleStatusProvisioningStatus

Provisioning status of Inbound Rule

Name Type Description
operationId

string

The ID of the operation performed on the inbound rule

status

Status

The status of the operation performed on the inbound rule [Succeeded, Failed, InProgress]

IPConfigurationArmReference

The Azure Resource ID of an IPConfiguration resource

Name Type Description
resourceId

string (arm-id)

The Azure Resource ID of an IPConfiguration resource

ProvisioningStateEnum

Provisioning state of the resource.

Value Description
Succeeded

Provisioning has succeeded

Failed

Provisioning has failed

InProgress

Provisioning is in progress

Accepted

Provisioning has been accepted

Deleting

Deletion of the resource is in progress

Canceled

Provisioning has been canceled

PublicIPAddressArmReference

The Azure Resource ID of a Public IP resource

Name Type Description
resourceId

string (arm-id)

The Azure Resource ID of a Public IP resource

Status

The status of the operation performed on the resource [Succeeded, Failed, InProgress]

Value Description
Succeeded

Operation succeeded

Failed

Operation failed

InProgress

Operation is in progress

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.