automated_dns_records
Creates, updates, deletes, gets or lists an automated_dns_records resource.
Overview
| Name | automated_dns_records |
| Type | Resource |
| Id | google.networkconnectivity.automated_dns_records |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Identifier. The name of an AutomatedDnsRecord. Format: projects/{project}/locations/{location}/automatedDnsRecords/{automated_dns_record} See: https://google.aip.dev/122#fields-representing-resource-names |
consumerNetwork | string | Required. Immutable. The full resource path of the consumer network this AutomatedDnsRecord is visible to. Example: "projects/{projectNumOrId}/global/networks/{networkName}". |
createTime | string (google-datetime) | Output only. The timestamp of when the record was created. |
creationMode | string | Required. Immutable. The creation mode of the AutomatedDnsRecord. This field is immutable. (CREATION_MODE_UNSPECIFIED, CONSUMER_API, SERVICE_CONNECTION_MAP) |
currentConfig | object | Output only. The current settings for this record as identified by (hostname, dns_suffix, type) in Cloud DNS. The current_config field reflects the actual settings of the DNS record in Cloud DNS based on the hostname, dns_suffix, and type. * Absence: If current_config is unset, it means a DNS record with the specified hostname, dns_suffix, and type does not currently exist in Cloud DNS. This could be because the AutomatedDnsRecord has never been successfully programmed, has been deleted, or there was an error during provisioning. * Presence: If current_config is present: * It can be different from the original_config. This can happen due to several reasons: * Out-of-band changes: A consumer might have directly modified the DNS record in Cloud DNS. * OVERWRITE operations from other AutomatedDnsRecord resources: Another AutomatedDnsRecord with the same identifying attributes (hostname, dns_suffix, type) but a different configuration might have overwritten the record using insert_mode: OVERWRITE. Therefore, the presence of current_config indicates that a corresponding DNS record exists, but its values (TTL and RRData) might not always align with the original_config of the AutomatedDnsRecord. (id: Config) |
description | string | A human-readable description of the record. |
dnsSuffix | string | Required. Immutable. The dns suffix for this record to use in longest-suffix matching. Requires a trailing dot. Example: "example.com." |
dnsZone | string | Output only. DnsZone is the DNS zone managed by automation. Format: projects/{project}/managedZones/{managedZone} |
etag | string | Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
fqdn | string | Output only. The FQDN created by combining the hostname and dns suffix. Should include a trailing dot. |
hostname | string | Required. Immutable. The hostname for the DNS record. This value will be prepended to the dns_suffix to create the full domain name (FQDN) for the record. For example, if hostname is "corp.db" and dns_suffix is "example.com.", the resulting record will be "corp.db.example.com.". Should not include a trailing dot. |
labels | object | Optional. User-defined labels. |
originalConfig | object | Required. Immutable. The configuration settings used to create this DNS record. These settings define the desired state of the record as specified by the producer. (id: Config) |
recordType | string | Required. Immutable. The identifier of a supported record type. (RECORD_TYPE_UNSPECIFIED, A, AAAA, TXT, CNAME) |
serviceClass | string | Required. Immutable. The service class identifier which authorizes this AutomatedDnsRecord. Any API calls targeting this AutomatedDnsRecord must have networkconnectivity.serviceClasses.use IAM permission for the provided service class. |
state | string | Output only. The current operational state of this AutomatedDnsRecord as managed by Service Connectivity Automation. (STATE_UNSPECIFIED, PROGRAMMED, FAILED_DEPROGRAMMING, CREATING, DELETING) |
stateDetails | string | Output only. A human-readable message providing more context about the current state, such as an error description if the state is FAILED_DEPROGRAMMING. |
updateTime | string (google-datetime) | Output only. The timestamp of when the record was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Identifier. The name of an AutomatedDnsRecord. Format: projects/{project}/locations/{location}/automatedDnsRecords/{automated_dns_record} See: https://google.aip.dev/122#fields-representing-resource-names |
consumerNetwork | string | Required. Immutable. The full resource path of the consumer network this AutomatedDnsRecord is visible to. Example: "projects/{projectNumOrId}/global/networks/{networkName}". |
createTime | string (google-datetime) | Output only. The timestamp of when the record was created. |
creationMode | string | Required. Immutable. The creation mode of the AutomatedDnsRecord. This field is immutable. (CREATION_MODE_UNSPECIFIED, CONSUMER_API, SERVICE_CONNECTION_MAP) |
currentConfig | object | Output only. The current settings for this record as identified by (hostname, dns_suffix, type) in Cloud DNS. The current_config field reflects the actual settings of the DNS record in Cloud DNS based on the hostname, dns_suffix, and type. * Absence: If current_config is unset, it means a DNS record with the specified hostname, dns_suffix, and type does not currently exist in Cloud DNS. This could be because the AutomatedDnsRecord has never been successfully programmed, has been deleted, or there was an error during provisioning. * Presence: If current_config is present: * It can be different from the original_config. This can happen due to several reasons: * Out-of-band changes: A consumer might have directly modified the DNS record in Cloud DNS. * OVERWRITE operations from other AutomatedDnsRecord resources: Another AutomatedDnsRecord with the same identifying attributes (hostname, dns_suffix, type) but a different configuration might have overwritten the record using insert_mode: OVERWRITE. Therefore, the presence of current_config indicates that a corresponding DNS record exists, but its values (TTL and RRData) might not always align with the original_config of the AutomatedDnsRecord. (id: Config) |
description | string | A human-readable description of the record. |
dnsSuffix | string | Required. Immutable. The dns suffix for this record to use in longest-suffix matching. Requires a trailing dot. Example: "example.com." |
dnsZone | string | Output only. DnsZone is the DNS zone managed by automation. Format: projects/{project}/managedZones/{managedZone} |
etag | string | Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
fqdn | string | Output only. The FQDN created by combining the hostname and dns suffix. Should include a trailing dot. |
hostname | string | Required. Immutable. The hostname for the DNS record. This value will be prepended to the dns_suffix to create the full domain name (FQDN) for the record. For example, if hostname is "corp.db" and dns_suffix is "example.com.", the resulting record will be "corp.db.example.com.". Should not include a trailing dot. |
labels | object | Optional. User-defined labels. |
originalConfig | object | Required. Immutable. The configuration settings used to create this DNS record. These settings define the desired state of the record as specified by the producer. (id: Config) |
recordType | string | Required. Immutable. The identifier of a supported record type. (RECORD_TYPE_UNSPECIFIED, A, AAAA, TXT, CNAME) |
serviceClass | string | Required. Immutable. The service class identifier which authorizes this AutomatedDnsRecord. Any API calls targeting this AutomatedDnsRecord must have networkconnectivity.serviceClasses.use IAM permission for the provided service class. |
state | string | Output only. The current operational state of this AutomatedDnsRecord as managed by Service Connectivity Automation. (STATE_UNSPECIFIED, PROGRAMMED, FAILED_DEPROGRAMMING, CREATING, DELETING) |
stateDetails | string | Output only. A human-readable message providing more context about the current state, such as an error description if the state is FAILED_DEPROGRAMMING. |
updateTime | string (google-datetime) | Output only. The timestamp of when the record was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, automatedDnsRecordsId | Gets details of a single AutomatedDnsRecord. | |
list | select | projectsId, locationsId | orderBy, pageToken, filter, pageSize | Lists AutomatedDnsRecords in a given project and location. |
create | insert | projectsId, locationsId | automatedDnsRecordId, insertMode, requestId | Creates a new AutomatedDnsRecord in a given project and location. |
delete | delete | projectsId, locationsId, automatedDnsRecordsId | deleteMode, etag, requestId | Deletes a single AutomatedDnsRecord. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
automatedDnsRecordsId | string | |
locationsId | string | |
projectsId | string | |
automatedDnsRecordId | string | |
deleteMode | string | |
etag | string | |
filter | string | |
insertMode | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string |
SELECT examples
- get
- list
Gets details of a single AutomatedDnsRecord.
SELECT
name,
consumerNetwork,
createTime,
creationMode,
currentConfig,
description,
dnsSuffix,
dnsZone,
etag,
fqdn,
hostname,
labels,
originalConfig,
recordType,
serviceClass,
state,
stateDetails,
updateTime
FROM google.networkconnectivity.automated_dns_records
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND automatedDnsRecordsId = '{{ automatedDnsRecordsId }}' -- required
;
Lists AutomatedDnsRecords in a given project and location.
SELECT
name,
consumerNetwork,
createTime,
creationMode,
currentConfig,
description,
dnsSuffix,
dnsZone,
etag,
fqdn,
hostname,
labels,
originalConfig,
recordType,
serviceClass,
state,
stateDetails,
updateTime
FROM google.networkconnectivity.automated_dns_records
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a new AutomatedDnsRecord in a given project and location.
INSERT INTO google.networkconnectivity.automated_dns_records (
data__creationMode,
data__etag,
data__dnsSuffix,
data__name,
data__recordType,
data__originalConfig,
data__description,
data__hostname,
data__labels,
data__serviceClass,
data__consumerNetwork,
projectsId,
locationsId,
automatedDnsRecordId,
insertMode,
requestId
)
SELECT
'{{ creationMode }}',
'{{ etag }}',
'{{ dnsSuffix }}',
'{{ name }}',
'{{ recordType }}',
'{{ originalConfig }}',
'{{ description }}',
'{{ hostname }}',
'{{ labels }}',
'{{ serviceClass }}',
'{{ consumerNetwork }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ automatedDnsRecordId }}',
'{{ insertMode }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: automated_dns_records
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the automated_dns_records resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the automated_dns_records resource.
- name: creationMode
value: "{{ creationMode }}"
description: |
Required. Immutable. The creation mode of the AutomatedDnsRecord. This field is immutable.
valid_values: ['CREATION_MODE_UNSPECIFIED', 'CONSUMER_API', 'SERVICE_CONNECTION_MAP']
- name: etag
value: "{{ etag }}"
description: |
Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- name: dnsSuffix
value: "{{ dnsSuffix }}"
description: |
Required. Immutable. The dns suffix for this record to use in longest-suffix matching. Requires a trailing dot. Example: "example.com."
- name: name
value: "{{ name }}"
description: |
Immutable. Identifier. The name of an AutomatedDnsRecord. Format: projects/{project}/locations/{location}/automatedDnsRecords/{automated_dns_record} See: https://google.aip.dev/122#fields-representing-resource-names
- name: recordType
value: "{{ recordType }}"
description: |
Required. Immutable. The identifier of a supported record type.
valid_values: ['RECORD_TYPE_UNSPECIFIED', 'A', 'AAAA', 'TXT', 'CNAME']
- name: originalConfig
description: |
Required. Immutable. The configuration settings used to create this DNS record. These settings define the desired state of the record as specified by the producer.
value:
ttl: "{{ ttl }}"
rrdatas:
- "{{ rrdatas }}"
- name: description
value: "{{ description }}"
description: |
A human-readable description of the record.
- name: hostname
value: "{{ hostname }}"
description: |
Required. Immutable. The hostname for the DNS record. This value will be prepended to the `dns_suffix` to create the full domain name (FQDN) for the record. For example, if `hostname` is "corp.db" and `dns_suffix` is "example.com.", the resulting record will be "corp.db.example.com.". Should not include a trailing dot.
- name: labels
value: "{{ labels }}"
description: |
Optional. User-defined labels.
- name: serviceClass
value: "{{ serviceClass }}"
description: |
Required. Immutable. The service class identifier which authorizes this AutomatedDnsRecord. Any API calls targeting this AutomatedDnsRecord must have `networkconnectivity.serviceClasses.use` IAM permission for the provided service class.
- name: consumerNetwork
value: "{{ consumerNetwork }}"
description: |
Required. Immutable. The full resource path of the consumer network this AutomatedDnsRecord is visible to. Example: "projects/{projectNumOrId}/global/networks/{networkName}".
- name: automatedDnsRecordId
value: "{{ automatedDnsRecordId }}"
- name: insertMode
value: "{{ insertMode }}"
- name: requestId
value: "{{ requestId }}"
DELETE examples
- delete
Deletes a single AutomatedDnsRecord.
DELETE FROM google.networkconnectivity.automated_dns_records
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND automatedDnsRecordsId = '{{ automatedDnsRecordsId }}' --required
AND deleteMode = '{{ deleteMode }}'
AND etag = '{{ etag }}'
AND requestId = '{{ requestId }}'
;