Skip to main content

domains

Creates, updates, deletes, gets or lists a domains resource.

Overview

Namedomains
TypeResource
Idgoogleadmin.directory.domains

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
creationTimestring (int64)Creation time of the domain. Expressed in Unix time format. (Read-only).
domainAliasesarrayA list of domain alias objects. (Read-only)
domainNamestringThe domain name of the customer.
etagstringETag of the resource.
isPrimarybooleanIndicates if the domain is a primary domain (Read-only).
kindstringKind of resource this is. (default: admin#directory#domain)
verifiedbooleanIndicates the verification state of a domain. (Read-only).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomer, domainNameRetrieves a domain of the customer.
listselectcustomerLists the domains of the customer.
insertinsertcustomerInserts a domain of the customer.
deletedeletecustomer, domainNameDeletes a domain of the customer.

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.

NameDatatypeDescription
customerstring
domainNamestring

SELECT examples

Retrieves a domain of the customer.

SELECT
creationTime,
domainAliases,
domainName,
etag,
isPrimary,
kind,
verified
FROM googleadmin.directory.domains
WHERE customer = '{{ customer }}' -- required
AND domainName = '{{ domainName }}' -- required;

INSERT examples

Inserts a domain of the customer.

INSERT INTO googleadmin.directory.domains (
data__kind,
data__domainAliases,
data__verified,
data__etag,
data__creationTime,
data__isPrimary,
data__domainName,
customer
)
SELECT
'{{ kind }}',
'{{ domainAliases }}',
{{ verified }},
'{{ etag }}',
'{{ creationTime }}',
{{ isPrimary }},
'{{ domainName }}',
'{{ customer }}'
RETURNING
creationTime,
domainAliases,
domainName,
etag,
isPrimary,
kind,
verified
;

DELETE examples

Deletes a domain of the customer.

DELETE FROM googleadmin.directory.domains
WHERE customer = '{{ customer }}' --required
AND domainName = '{{ domainName }}' --required;