Google Cloud DNS Response Policy Rules API

The ResponsePolicyRules API from Google Cloud DNS — 2 operation(s) for responsepolicyrules.

GitHub OpenAPI

Operations 6

GET /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule} Get responsePolicyRules #
PATCH /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule} Patch responsePolicyRules #
PUT /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule} Update responsePolicyRules #
DELETE /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule} Delete responsePolicyRules #
GET /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules List responsePolicyRules #
POST /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules Create responsePolicyRules #

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/google-cloud-dns:google-cloud-dns-responsepolicyrules-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

google-cloud-dns-responsepolicyrules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloud DNS Response Policy Rules API
  version: v1
  description: Generated from Google's published Discovery document for Cloud DNS API (dns v1, revision 20261106). 6 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://dns.googleapis.com
tags:
- name: ResponsePolicyRules
paths:
  /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}:
    get:
      operationId: dns.responsePolicyRules.get
      summary: Get responsePolicyRules
      description: Fetches the representation of an existing Response Policy Rule.
      parameters:
      - name: project
        in: path
        required: true
        description: Identifies the project addressed by this request.
        schema:
          type: string
      - name: responsePolicy
        in: path
        required: true
        description: User assigned name of the Response Policy containing the Response Policy Rule.
        schema:
          type: string
      - name: responsePolicyRule
        in: path
        required: true
        description: User assigned name of the Response Policy Rule addressed by this request.
        schema:
          type: string
      - name: clientOperationId
        in: query
        required: false
        description: For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePolicyRule'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/cloud-platform.read-only
        - https://www.googleapis.com/auth/ndev.clouddns.readonly
        - https://www.googleapis.com/auth/ndev.clouddns.readwrite
      - apiKey: []
      tags:
      - ResponsePolicyRules
    patch:
      operationId: dns.responsePolicyRules.patch
      summary: Patch responsePolicyRules
      description: Applies a partial update to an existing Response Policy Rule.
      parameters:
      - name: project
        in: path
        required: true
        description: Identifies the project addressed by this request.
        schema:
          type: string
      - name: responsePolicy
        in: path
        required: true
        description: User assigned name of the Response Policy containing the Response Policy Rule.
        schema:
          type: string
      - name: responsePolicyRule
        in: path
        required: true
        description: User assigned name of the Response Policy Rule addressed by this request.
        schema:
          type: string
      - name: clientOperationId
        in: query
        required: false
        description: For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsePolicyRule'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePolicyRulesPatchResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/ndev.clouddns.readwrite
      - apiKey: []
      tags:
      - ResponsePolicyRules
    put:
      operationId: dns.responsePolicyRules.update
      summary: Update responsePolicyRules
      description: Updates an existing Response Policy Rule.
      parameters:
      - name: project
        in: path
        required: true
        description: Identifies the project addressed by this request.
        schema:
          type: string
      - name: responsePolicy
        in: path
        required: true
        description: User assigned name of the Response Policy containing the Response Policy Rule.
        schema:
          type: string
      - name: responsePolicyRule
        in: path
        required: true
        description: User assigned name of the Response Policy Rule addressed by this request.
        schema:
          type: string
      - name: clientOperationId
        in: query
        required: false
        description: For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsePolicyRule'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePolicyRulesUpdateResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/ndev.clouddns.readwrite
      - apiKey: []
      tags:
      - ResponsePolicyRules
    delete:
      operationId: dns.responsePolicyRules.delete
      summary: Delete responsePolicyRules
      description: Deletes a previously created Response Policy Rule.
      parameters:
      - name: project
        in: path
        required: true
        description: Identifies the project addressed by this request.
        schema:
          type: string
      - name: responsePolicy
        in: path
        required: true
        description: User assigned name of the Response Policy containing the Response Policy Rule.
        schema:
          type: string
      - name: responsePolicyRule
        in: path
        required: true
        description: User assigned name of the Response Policy Rule addressed by this request.
        schema:
          type: string
      - name: clientOperationId
        in: query
        required: false
        description: For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/ndev.clouddns.readwrite
      - apiKey: []
      tags:
      - ResponsePolicyRules
  /dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules:
    get:
      operationId: dns.responsePolicyRules.list
      summary: List responsePolicyRules
      description: Enumerates all Response Policy Rules associated with a project.
      parameters:
      - name: project
        in: path
        required: true
        description: Identifies the project addressed by this request.
        schema:
          type: string
      - name: responsePolicy
        in: path
        required: true
        description: User assigned name of the Response Policy to list.
        schema:
          type: string
      - name: maxResults
        in: query
        required: false
        description: Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
        schema:
          format: int32
          type: integer
      - name: pageToken
        in: query
        required: false
        description: Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePolicyRulesListResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/cloud-platform.read-only
        - https://www.googleapis.com/auth/ndev.clouddns.readonly
        - https://www.googleapis.com/auth/ndev.clouddns.readwrite
      - apiKey: []
      tags:
      - ResponsePolicyRules
    post:
      operationId: dns.responsePolicyRules.create
      summary: Create responsePolicyRules
      description: Creates a new Response Policy Rule.
      parameters:
      - name: project
        in: path
        required: true
        description: Identifies the project addressed by this request.
        schema:
          type: string
      - name: responsePolicy
        in: path
        required: true
        description: User assigned name of the Response Policy containing the Response Policy Rule.
        schema:
          type: string
      - name: clientOperationId
        in: query
        required: false
        description: For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsePolicyRule'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePolicyRule'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/ndev.clouddns.readwrite
      - apiKey: []
      tags:
      - ResponsePolicyRules
components:
  schemas:
    RRSetRoutingPolicyLoadBalancerTarget:
      description: The configuration for an individual load balancer to health check.
      properties:
        ipAddress:
          description: The frontend IP address of the load balancer to health check.
          type: string
        port:
          description: The configured port of the load balancer.
          type: string
        ipProtocol:
          description: The protocol of the load balancer to health check.
          type: string
          enum:
          - undefined
          - tcp
          - udp
        project:
          description: The project ID in which the load balancer is located.
          type: string
        kind:
          default: dns#rRSetRoutingPolicyLoadBalancerTarget
          readOnly: true
          type: string
        loadBalancerType:
          description: 'The type of load balancer specified by this target. This value must match the configuration of the load balancer located at the LoadBalancerTarget''s IP address, port, and region. Use the following: - *regionalL4ilb*: for a regional internal passthrough Network Load Balancer. - *regionalL7ilb*: for a regional internal Application Load Balancer. - *globalL7ilb*: for a global internal Application Load Balancer. '
          type: string
          enum:
          - none
          - globalL7ilb
          - regionalL4ilb
          - regionalL7ilb
        region:
          type: string
          description: The region in which the load balancer is located.
        networkUrl:
          description: The fully qualified URL of the network that the load balancer is attached to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`.
          type: string
      type: object
    ResponsePolicyRuleLocalData:
      type: object
      properties:
        localDatas:
          type: array
          items:
            $ref: '#/components/schemas/ResourceRecordSet'
          description: All resource record sets for this selector, one per resource record type. The name must match the dns_name.
    RRSetRoutingPolicyPrimaryBackupPolicy:
      description: Configures a RRSetRoutingPolicy such that all queries are responded with the primary_targets if they are healthy. And if all of them are unhealthy, then we fallback to a geo localized policy.
      properties:
        kind:
          type: string
          default: dns#rRSetRoutingPolicyPrimaryBackupPolicy
          readOnly: true
        backupGeoTargets:
          $ref: '#/components/schemas/RRSetRoutingPolicyGeoPolicy'
          description: Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to `BACKUP`, this policy essentially becomes a geo routing policy.
        trickleTraffic:
          type: number
          description: When serving state is `PRIMARY`, this field provides the option of sending a small percentage of the traffic to the backup targets.
          format: double
        primaryTargets:
          $ref: '#/components/schemas/RRSetRoutingPolicyHealthCheckTargets'
          description: Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the `backup_geo_targets`.
      type: object
    RRSetRoutingPolicyWrrPolicy:
      type: object
      description: Configures a RRSetRoutingPolicy that routes in a weighted round robin fashion.
      properties:
        kind:
          type: string
          readOnly: true
          default: dns#rRSetRoutingPolicyWrrPolicy
        items:
          items:
            $ref: '#/components/schemas/RRSetRoutingPolicyWrrPolicyWrrPolicyItem'
          type: array
    ResponsePolicyRulesUpdateResponse:
      type: object
      properties:
        responsePolicyRule:
          $ref: '#/components/schemas/ResponsePolicyRule'
    RRSetRoutingPolicyGeoPolicyGeoPolicyItem:
      description: ResourceRecordSet data for one geo location.
      type: object
      properties:
        kind:
          default: dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem
          readOnly: true
          type: string
        healthCheckedTargets:
          $ref: '#/components/schemas/RRSetRoutingPolicyHealthCheckTargets'
          description: For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with `rrdata` within this item.
        location:
          description: The geo-location granularity is a GCP region. This location string should correspond to a GCP region. e.g. "us-east1", "southamerica-east1", "asia-east1", etc.
          type: string
        signatureRrdatas:
          items:
            type: string
          type: array
          description: DNSSEC generated signatures for all the `rrdata` within this item. When using health-checked targets for DNSSEC-enabled zones, you can only use at most one health-checked IP address per item.
        rrdatas:
          items:
            type: string
          type: array
    ResponsePolicyRulesListResponse:
      type: object
      properties:
        responsePolicyRules:
          description: The Response Policy Rule resources.
          items:
            $ref: '#/components/schemas/ResponsePolicyRule'
          type: array
        nextPageToken:
          description: This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.
          type: string
    RRSetRoutingPolicyGeoPolicy:
      description: Configures a `RRSetRoutingPolicy` that routes based on the geo location of the querying user.
      type: object
      properties:
        kind:
          readOnly: true
          default: dns#rRSetRoutingPolicyGeoPolicy
          type: string
        items:
          description: The primary geo routing configuration. If there are multiple items with the same location, an error is returned instead.
          items:
            $ref: '#/components/schemas/RRSetRoutingPolicyGeoPolicyGeoPolicyItem'
          type: array
        enableFencing:
          description: Without fencing, if health check fails for all configured items in the current geo bucket, we failover to the next nearest geo bucket. With fencing, if health checking is enabled, as long as some targets in the current geo bucket are healthy, we return only the healthy targets. However, if all targets are unhealthy, we don't failover to the next nearest bucket; instead, we return all the items in the current bucket even when all targets are unhealthy.
          type: boolean
    RRSetRoutingPolicy:
      description: A RRSetRoutingPolicy represents ResourceRecordSet data that is returned dynamically with the response varying based on configured properties such as geolocation or by weighted random selection.
      type: object
      properties:
        wrr:
          $ref: '#/components/schemas/RRSetRoutingPolicyWrrPolicy'
        primaryBackup:
          $ref: '#/components/schemas/RRSetRoutingPolicyPrimaryBackupPolicy'
        geo:
          $ref: '#/components/schemas/RRSetRoutingPolicyGeoPolicy'
        kind:
          type: string
          readOnly: true
          default: dns#rRSetRoutingPolicy
        healthCheck:
          description: The fully qualified URL of the HealthCheck to use for this RRSetRoutingPolicy. Format this URL like `https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks/{healthCheck}`. https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks
          type: string
    RRSetRoutingPolicyHealthCheckTargets:
      type: object
      properties:
        internalLoadBalancers:
          type: array
          description: Configuration for internal load balancers to be health checked.
          items:
            $ref: '#/components/schemas/RRSetRoutingPolicyLoadBalancerTarget'
        externalEndpoints:
          items:
            type: string
          type: array
          description: The Internet IP addresses to be health checked. The format matches the format of ResourceRecordSet.rrdata as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
      description: HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response. Set either `internal_load_balancer` or `external_endpoints`. Do not set both.
    RRSetRoutingPolicyWrrPolicyWrrPolicyItem:
      properties:
        signatureRrdatas:
          items:
            type: string
          description: DNSSEC generated signatures for all the `rrdata` within this item. When using health-checked targets for DNSSEC-enabled zones, you can only use at most one health-checked IP address per item.
          type: array
        weight:
          description: The weight corresponding to this `WrrPolicyItem` object. When multiple `WrrPolicyItem` objects are configured, the probability of returning an `WrrPolicyItem` object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.
          format: double
          type: number
        rrdatas:
          items:
            type: string
          type: array
        kind:
          readOnly: true
          type: string
          default: dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem
        healthCheckedTargets:
          $ref: '#/components/schemas/RRSetRoutingPolicyHealthCheckTargets'
          description: Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of `rrdata` or `health_checked_targets` can be set.
      type: object
      description: A routing block which contains the routing information for one WRR item.
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    ResponsePolicyRule:
      type: object
      description: A Response Policy Rule is a selector that applies its behavior to queries that match the selector. Selectors are DNS names, which may be wildcards or exact matches. Each DNS query subject to a Response Policy matches at most one ResponsePolicyRule, as identified by the dns_name field with the longest matching suffix.
      properties:
        localData:
          $ref: '#/components/schemas/ResponsePolicyRuleLocalData'
          description: Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed.
        kind:
          readOnly: true
          default: dns#responsePolicyRule
          type: string
        ruleName:
          type: string
          description: An identifier for this rule. Must be unique with the ResponsePolicy.
        dnsName:
          description: The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
          type: string
        behavior:
          description: Answer this query with a behavior rather than DNS data.
          type: string
          enum:
          - behaviorUnspecified
          - bypassResponsePolicy
    ResponsePolicyRulesPatchResponse:
      properties:
        responsePolicyRule:
          $ref: '#/components/schemas/ResponsePolicyRule'
      type: object
    ResourceRecordSet:
      description: A unit of data that is returned by the DNS servers.
      type: object
      properties:
        name:
          type: string
          description: For example, www.example.com.
        rrdatas:
          description: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.
          type: array
          items:
            type: string
        type:
          type: string
          description: The identifier of a supported record type. See the list of Supported DNS record types.
        ttl:
          description: Number of seconds that this `ResourceRecordSet` can be cached by resolvers.
          format: int32
          type: integer
        routingPolicy:
          $ref: '#/components/schemas/RRSetRoutingPolicy'
          description: Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid `ResourceRecordSet` contains only `rrdata` (for static resolution) or a `routing_policy` (for dynamic resolution).
        signatureRrdatas:
          items:
            type: string
          type: array
        kind:
          readOnly: true
          default: dns#resourceRecordSet
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/ndev.clouddns.readonly: View your DNS records hosted by Google Cloud DNS
            https://www.googleapis.com/auth/ndev.clouddns.readwrite: View and manage your DNS records hosted by Google Cloud DNS
            https://www.googleapis.com/auth/cloud-platform: See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
            https://www.googleapis.com/auth/cloud-platform.read-only: View your data across Google Cloud services and see the email address of your Google Account
externalDocs:
  url: https://cloud.google.com/dns/docs
x-provenance:
  method: harvested
  publisher: Google
  source: https://dns.googleapis.com/$discovery/rest?version=v1
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261106)