domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | google.managedidentities.domains |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Required. The unique name of the domain using the form: projects/{project_id}/locations/global/domains/{domain_name}. |
admin | string | Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used. |
auditLogsEnabled | boolean | Optional. Configuration for audit logs. True if audit logs are enabled, else false. Default is audit logs disabled. |
authorizedNetworks | array | Optional. 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. |
createTime | string (google-datetime) | Output only. The time the instance was created. |
fqdn | string | Output 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. |
labels | object | Optional. Resource labels that can contain user-provided metadata. |
locations | array | Required. 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. |
reservedIpRange | string | Required. 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]. |
state | string | Output only. The current state of this domain. |
statusMessage | string | Output only. Additional information about the current status of this domain, if available. |
trusts | array | Output only. The current trusts associated with the domain. |
updateTime | string (google-datetime) | Output only. The last update time. |
| Name | Datatype | Description |
|---|---|---|
name | string | Required. The unique name of the domain using the form: projects/{project_id}/locations/global/domains/{domain_name}. |
admin | string | Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used. |
auditLogsEnabled | boolean | Optional. Configuration for audit logs. True if audit logs are enabled, else false. Default is audit logs disabled. |
authorizedNetworks | array | Optional. 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. |
createTime | string (google-datetime) | Output only. The time the instance was created. |
fqdn | string | Output 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. |
labels | object | Optional. Resource labels that can contain user-provided metadata. |
locations | array | Required. 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. |
reservedIpRange | string | Required. 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]. |
state | string | Output only. The current state of this domain. |
statusMessage | string | Output only. Additional information about the current status of this domain, if available. |
trusts | array | Output only. The current trusts associated with the domain. |
updateTime | string (google-datetime) | Output only. The last update time. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, domainsId | Gets information about a domain. | |
list | select | projectsId | filter, pageSize, orderBy, pageToken | Lists domains in a project. |
create | insert | projectsId | domainName | Creates a Microsoft AD domain. |
patch | update | projectsId, domainsId | updateMask | Updates the metadata and configuration of a domain. |
delete | delete | projectsId, domainsId | Deletes a domain. | |
check_migration_permission | exec | projectsId, domainsId | CheckMigrationPermission API gets the current state of DomainMigration | |
enable_migration | exec | projectsId, domainsId | Enable Domain Migration | |
disable_migration | exec | projectsId, domainsId | Disable Domain Migration | |
detach_trust | exec | projectsId, domainsId | Removes an AD trust. | |
restore | exec | projectsId, domainsId | RestoreDomain restores domain backup mentioned in the RestoreDomainRequest | |
extend_schema | exec | projectsId, domainsId | Extend Schema for Domain | |
reconfigure_trust | exec | projectsId, domainsId | Updates the DNS conditional forwarder. | |
validate_trust | exec | projectsId, domainsId | Validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests. | |
reset_admin_password | exec | projectsId, domainsId | Resets a domain's administrator password. | |
domain_join_machine | exec | projectsId, domainsId | DomainJoinMachine API joins a Compute Engine VM to the domain | |
attach_trust | exec | projectsId, domainsId | Adds an AD trust to a 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.
| Name | Datatype | Description |
|---|---|---|
domainsId | string | |
projectsId | string | |
domainName | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets information about a domain.
SELECT
name,
admin,
auditLogsEnabled,
authorizedNetworks,
createTime,
fqdn,
labels,
locations,
reservedIpRange,
state,
statusMessage,
trusts,
updateTime
FROM google.managedidentities.domains
WHERE projectsId = '{{ projectsId }}' -- required
AND domainsId = '{{ domainsId }}' -- required
;
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 }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a Microsoft AD domain.
INSERT INTO google.managedidentities.domains (
data__locations,
data__admin,
data__auditLogsEnabled,
data__authorizedNetworks,
data__labels,
data__name,
data__reservedIpRange,
projectsId,
domainName
)
SELECT
'{{ locations }}',
'{{ admin }}',
{{ auditLogsEnabled }},
'{{ authorizedNetworks }}',
'{{ labels }}',
'{{ name }}',
'{{ reservedIpRange }}',
'{{ projectsId }}',
'{{ domainName }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: domains
props:
- name: projectsId
value: string
description: Required parameter for the domains resource.
- name: locations
value: array
description: >
Required. 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.
- name: admin
value: string
description: >
Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, `setupadmin` will be used.
- name: auditLogsEnabled
value: boolean
description: >
Optional. Configuration for audit logs. True if audit logs are enabled, else false. Default is audit logs disabled.
- name: authorizedNetworks
value: array
description: >
Optional. The full names of the Google Compute Engine [networks](https://cloud.google.com/compute/docs/networks-and-firewalls#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.
- name: labels
value: object
description: >
Optional. Resource labels that can contain user-provided metadata.
- name: name
value: string
description: >
Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`.
- name: reservedIpRange
value: string
description: >
Required. 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].
- name: domainName
value: string
UPDATE examples
- patch
Updates the metadata and configuration of a domain.
UPDATE google.managedidentities.domains
SET
data__locations = '{{ locations }}',
data__admin = '{{ admin }}',
data__auditLogsEnabled = {{ auditLogsEnabled }},
data__authorizedNetworks = '{{ authorizedNetworks }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__reservedIpRange = '{{ reservedIpRange }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND domainsId = '{{ domainsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a domain.
DELETE FROM google.managedidentities.domains
WHERE projectsId = '{{ projectsId }}' --required
AND domainsId = '{{ domainsId }}' --required
;
Lifecycle Methods
- check_migration_permission
- enable_migration
- disable_migration
- detach_trust
- restore
- extend_schema
- reconfigure_trust
- validate_trust
- reset_admin_password
- domain_join_machine
- attach_trust
CheckMigrationPermission API gets the current state of DomainMigration
EXEC google.managedidentities.domains.check_migration_permission
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
;
Enable Domain Migration
EXEC google.managedidentities.domains.enable_migration
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"migratingDomains": "{{ migratingDomains }}"
}'
;
Disable Domain Migration
EXEC google.managedidentities.domains.disable_migration
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
;
Removes an AD trust.
EXEC google.managedidentities.domains.detach_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"trust": "{{ trust }}"
}'
;
RestoreDomain restores domain backup mentioned in the RestoreDomainRequest
EXEC google.managedidentities.domains.restore
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"backupId": "{{ backupId }}"
}'
;
Extend Schema for Domain
EXEC google.managedidentities.domains.extend_schema
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"description": "{{ description }}",
"gcsPath": "{{ gcsPath }}",
"fileContents": "{{ fileContents }}"
}'
;
Updates the DNS conditional forwarder.
EXEC google.managedidentities.domains.reconfigure_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"targetDnsIpAddresses": "{{ targetDnsIpAddresses }}",
"targetDomainName": "{{ targetDomainName }}"
}'
;
Validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests.
EXEC google.managedidentities.domains.validate_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"trust": "{{ trust }}"
}'
;
Resets a domain's administrator password.
EXEC google.managedidentities.domains.reset_admin_password
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
;
DomainJoinMachine API joins a Compute Engine VM to the domain
EXEC google.managedidentities.domains.domain_join_machine
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"force": {{ force }},
"ouName": "{{ ouName }}",
"vmIdToken": "{{ vmIdToken }}"
}'
;
Adds an AD trust to a domain.
EXEC google.managedidentities.domains.attach_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"trust": "{{ trust }}"
}'
;