# REST Resource: projects.locations.dnsAuthorizations

- [Resource: DnsAuthorization](https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#DnsAuthorization)
  - [JSON representation](https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#DnsAuthorization.SCHEMA_REPRESENTATION)
- [DnsResourceRecord](https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#DnsResourceRecord)
  - [JSON representation](https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#DnsResourceRecord.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#Type)
- [Methods](https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#METHODS_SUMMARY)

## Resource: DnsAuthorization

A DnsAuthorization resource describes a way to perform domain authorization for certificate issuance.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "description": string, "domain": string, "dnsResourceRecord": { object (`https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#DnsResourceRecord`) }, "type": enum (`https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#Type`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. A user-defined name of the dns authorization. DnsAuthorization names must be unique globally and match pattern `projects/*/locations/*/dnsAuthorizations/*`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The creation timestamp of a DnsAuthorization. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The last update timestamp of a DnsAuthorization. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `labels` | `map (key: string, value: string)` Optional. Set of labels associated with a DnsAuthorization. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `description` | `string` Optional. One or more paragraphs of text description of a DnsAuthorization. |
| `domain` | `string` Required. Immutable. A domain that is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for `example.com` can be used to issue certificates for `example.com` and `*.example.com`. |
| `dnsResourceRecord` | ``object (`https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#DnsResourceRecord`)`` Output only. DNS Resource Record that needs to be added to DNS configuration. |
| `type` | ``enum (`https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations#Type`)`` Optional. Immutable. Type of DnsAuthorization. If unset during resource creation the following default will be used: - in location `global`: FIXED_RECORD, - in other locations: PER_PROJECT_RECORD. |

## DnsResourceRecord

The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate.

| JSON representation |
|---|
| ``` { "name": string, "type": string, "data": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Fully qualified name of the DNS Resource Record. e.g. `_acme-challenge.example.com` |
| `type` | `string` Output only. Type of the DNS Resource Record. Currently always set to "CNAME". |
| `data` | `string` Output only. Data of the DNS Resource Record. |

## Type

DnsAuthorization type.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Type is unspecified. |
| `FIXED_RECORD` | FIXED_RECORD DNS authorization uses DNS-01 validation method. |
| `PER_PROJECT_RECORD` | PER_PROJECT_RECORD DNS authorization allows for independent management of Google-managed certificates with DNS authorization across multiple projects. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations/create` | Creates a new DnsAuthorization in a given project and location. |
| ### `https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations/delete` | Deletes a single DnsAuthorization. |
| ### `https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations/get` | Gets details of a single DnsAuthorization. |
| ### `https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations/list` | Lists DnsAuthorizations in a given project and location. |
| ### `https://docs.cloud.google.com/certificate-manager/docs/reference/certificate-manager/rest/v1/projects.locations.dnsAuthorizations/patch` | Updates a DnsAuthorization. |