Skip to main content

domains

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

Overview

Namedomains
TypeResource
Idfirebase.apphosting.domains

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the domain, e.g. /projects/p/locations/l/backends/b/domains/foo.com
annotationsobjectOptional. Annotations as key value pairs.
createTimestring (google-datetime)Output only. Time at which the domain was created.
customDomainStatusobjectOutput only. Represents the state and configuration of a CUSTOM type domain. It is only present on Domains of that type. (id: CustomDomainStatus)
deleteTimestring (google-datetime)Output only. Time at which the domain was deleted.
disabledbooleanOptional. Whether the domain is disabled. Defaults to false.
displayNamestringOptional. Mutable human-readable name for the domain. 63 character limit. e.g. prod domain.
etagstringOutput only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource.
labelsobjectOptional. Labels as key value pairs.
reconcilingbooleanOutput only. A field that, if true, indicates that the build has an ongoing LRO.
serveobjectOptional. The serving behavior of the domain. If specified, the domain will serve content other than its backend's live content. (id: ServingBehavior)
typestringOutput only. The type of the domain.
uidstringOutput only. System-assigned, unique identifier.
updateTimestring (google-datetime)Output only. Time at which the domain was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backendsId, domainsIdGets information about a domain.
listselectprojectsId, locationsId, backendsIdpageSize, pageToken, filter, orderBy, showDeletedLists domains of a backend.
createinsertprojectsId, locationsId, backendsIddomainId, requestId, validateOnlyLinks a new domain to a backend.
patchupdateprojectsId, locationsId, backendsId, domainsIdupdateMask, requestId, validateOnly, allowMissingUpdates the information for a single domain.
deletedeleteprojectsId, locationsId, backendsId, domainsIdrequestId, etag, validateOnlyDeletes a single domain.

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
backendsIdstring
domainsIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
domainIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
showDeletedboolean
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Gets information about a domain.

SELECT
name,
annotations,
createTime,
customDomainStatus,
deleteTime,
disabled,
displayName,
etag,
labels,
reconciling,
serve,
type,
uid,
updateTime
FROM firebase.apphosting.domains
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backendsId = '{{ backendsId }}' -- required
AND domainsId = '{{ domainsId }}' -- required;

INSERT examples

Links a new domain to a backend.

INSERT INTO firebase.apphosting.domains (
data__name,
data__displayName,
data__disabled,
data__serve,
data__labels,
data__annotations,
projectsId,
locationsId,
backendsId,
domainId,
requestId,
validateOnly
)
SELECT
'{{ name }}',
'{{ displayName }}',
{{ disabled }},
'{{ serve }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backendsId }}',
'{{ domainId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the information for a single domain.

UPDATE firebase.apphosting.domains
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__disabled = {{ disabled }},
data__serve = '{{ serve }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backendsId = '{{ backendsId }}' --required
AND domainsId = '{{ domainsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
AND allowMissing = {{ allowMissing}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single domain.

DELETE FROM firebase.apphosting.domains
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backendsId = '{{ backendsId }}' --required
AND domainsId = '{{ domainsId }}' --required
AND requestId = '{{ requestId }}'
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}';