Skip to main content

domains

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

Overview

Namedomains
TypeResource
Idgoogle.managedidentities.domains

Fields

NameDatatypeDescription
namestringRequired. The unique name of the domain using the form: projects/{project_id}/locations/global/domains/{domain_name}.
adminstringOptional. The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.
auditLogsEnabledbooleanOptional. Configuration for audit logs. True if audit logs are enabled, else false. Default is audit logs disabled.
authorizedNetworksarrayOptional. The full names of the Google Compute Engine networks the domain instance is connected to. Networks can be added using UpdateDomain. The domain is only available on networks listed in authorized_networks. If CIDR subnets overlap between networks, domain creation will fail.
createTimestringOutput only. The time the instance was created.
fqdnstringOutput only. The fully-qualified domain name of the exposed domain used by clients to connect to the service. Similar to what would be chosen for an Active Directory set up on an internal network.
labelsobjectOptional. Resource labels that can contain user-provided metadata.
locationsarrayRequired. Locations where domain needs to be provisioned. The locations can be specified according to https://cloud.google.com/compute/docs/regions-zones, such as us-west1 or us-east4. Each domain supports up to 4 locations, separated by commas. Each location will use a /26 block.
reservedIpRangestringRequired. The CIDR range of internal addresses that are reserved for this domain. Reserved networks must be /24 or larger. Ranges must be unique and non-overlapping with existing subnets in [Domain].[authorized_networks].
statestringOutput only. The current state of this domain.
statusMessagestringOutput only. Additional information about the current status of this domain, if available.
trustsarrayOutput only. The current trusts associated with the domain.
updateTimestringOutput only. The last update time.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdomainsId, projectsIdGets information about a domain.
listSELECTprojectsIdLists domains in a project.
createINSERTprojectsIdCreates a Microsoft AD domain.
deleteDELETEdomainsId, projectsIdDeletes a domain.
patchUPDATEdomainsId, projectsIdUpdates the metadata and configuration of a domain.
attach_trustEXECdomainsId, projectsIdAdds an AD trust to a domain.
check_migration_permissionEXECdomainsId, projectsIdCheckMigrationPermission API gets the current state of DomainMigration
detach_trustEXECdomainsId, projectsIdRemoves an AD trust.
disable_migrationEXECdomainsId, projectsIdDisable Domain Migration
domain_join_machineEXECdomainsId, projectsIdDomainJoinMachine API joins a Compute Engine VM to the domain
enable_migrationEXECdomainsId, projectsIdEnable Domain Migration
extend_schemaEXECdomainsId, projectsIdExtend Schema for Domain
reconfigure_trustEXECdomainsId, projectsIdUpdates the DNS conditional forwarder.
reset_admin_passwordEXECdomainsId, projectsIdResets a domain's administrator password.
restoreEXECdomainsId, projectsIdRestoreDomain restores domain backup mentioned in the RestoreDomainRequest
validate_trustEXECdomainsId, projectsIdValidates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests.

SELECT examples

Lists domains in a project.

SELECT
name,
admin,
auditLogsEnabled,
authorizedNetworks,
createTime,
fqdn,
labels,
locations,
reservedIpRange,
state,
statusMessage,
trusts,
updateTime
FROM google.managedidentities.domains
WHERE projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new domains resource.

/*+ create */
INSERT INTO google.managedidentities.domains (
projectsId,
name,
labels,
authorizedNetworks,
reservedIpRange,
locations,
admin,
auditLogsEnabled
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ authorizedNetworks }}',
'{{ reservedIpRange }}',
'{{ locations }}',
'{{ admin }}',
{{ auditLogsEnabled }}
;

UPDATE example

Updates a domains resource.

/*+ update */
UPDATE google.managedidentities.domains
SET
name = '{{ name }}',
labels = '{{ labels }}',
authorizedNetworks = '{{ authorizedNetworks }}',
reservedIpRange = '{{ reservedIpRange }}',
locations = '{{ locations }}',
admin = '{{ admin }}',
auditLogsEnabled = true|false
WHERE
domainsId = '{{ domainsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified domains resource.

/*+ delete */
DELETE FROM google.managedidentities.domains
WHERE domainsId = '{{ domainsId }}'
AND projectsId = '{{ projectsId }}';