Share via


Dns Forwarding Rulesets - List

Lists DNS forwarding rulesets in all resource groups of a subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsForwardingRulesets?api-version=2025-05-01
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsForwardingRulesets?api-version=2025-05-01&$top={$top}

URI Parameters

Name In Required Type Description
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.

$top
query

integer (int32)

The maximum number of results to return. If not specified, returns up to 100 results.

Responses

Name Type Description
200 OK

DnsForwardingRulesetListResult

Azure operation completed successfully.

Other Status Codes

CloudError

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

List DNS forwarding rulesets by subscription

Sample request

GET https://management.azure.com/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/providers/Microsoft.Network/dnsForwardingRulesets?api-version=2025-05-01

Sample response

{
  "nextLink": "https://management.azure.com/api/mresolver/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/providers/Microsoft.Network/dnsForwardingRulesets?$skipToken=skipToken&api-version=2025-05-01",
  "value": [
    {
      "name": "sampleDnsForwardingRuleset",
      "type": "Microsoft.Network/dnsForwardingRulesets",
      "etag": "00000000-0000-0000-0000-000000000000",
      "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset",
      "location": "westus2",
      "properties": {
        "dnsResolverOutboundEndpoints": [
          {
            "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"
          },
          {
            "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"
          }
        ],
        "provisioningState": "Succeeded",
        "resourceGuid": "a7e1a32c-498c-401c-a805-5bc3518257b8"
      },
      "systemData": {
        "createdAt": "2021-04-03T01:01:01.1075056Z",
        "createdByType": "Application",
        "lastModifiedAt": "2021-04-04T02:03:01.1974346Z",
        "lastModifiedByType": "Application"
      },
      "tags": {
        "key1": "value1"
      }
    },
    {
      "name": "sampleDnsForwardingRuleset",
      "type": "Microsoft.Network/dnsForwardingRulesets",
      "etag": "00000000-0000-0000-0000-000000000000",
      "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset1",
      "location": "westus2",
      "properties": {
        "dnsResolverOutboundEndpoints": [
          {
            "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint2"
          },
          {
            "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint3"
          }
        ],
        "provisioningState": "Succeeded",
        "resourceGuid": "a7e1a32c-498c-401c-a805-5bc3518257b8"
      },
      "systemData": {
        "createdAt": "2021-04-04T01:01:01.1075056Z",
        "createdByType": "Application",
        "lastModifiedAt": "2021-04-05T02:03:01.1974346Z",
        "lastModifiedByType": "Application"
      },
      "tags": {
        "key1": "value1"
      }
    }
  ]
}

Definitions

Name Description
CloudError

An error message

CloudErrorBody

The body of an error message

createdByType

The type of identity that created the resource.

DnsForwardingRuleset

Describes a DNS forwarding ruleset.

DnsForwardingRulesetListResult

The response of a DnsForwardingRuleset list operation.

ProvisioningState

The current provisioning state of the resource.

SubResource

Reference to another ARM resource.

systemData

Metadata pertaining to creation and last modification of the resource.

CloudError

An error message

Name Type Description
error

CloudErrorBody

The error message body

CloudErrorBody

The body of an error message

Name Type Description
code

string

The error code

details

CloudErrorBody[]

Extra error information

message

string

A description of what caused the error

target

string

The target resource of the error message

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DnsForwardingRuleset

Describes a DNS forwarding ruleset.

Name Type Description
etag

string

"If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.")

id

string (arm-id)

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

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.dnsResolverOutboundEndpoints

SubResource[]

The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers.

properties.provisioningState

ProvisioningState

The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored.

properties.resourceGuid

string

The resourceGuid for the DNS forwarding ruleset.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

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

DnsForwardingRulesetListResult

The response of a DnsForwardingRuleset list operation.

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

DnsForwardingRuleset[]

The DnsForwardingRuleset items on this page

ProvisioningState

The current provisioning state of the resource.

Value Description
Creating
Updating
Deleting
Succeeded
Failed
Canceled

SubResource

Reference to another ARM resource.

Name Type Description
id

string

Resource ID.

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.