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. (STATE_UNSPECIFIED, CREATING, READY, UPDATING, DELETING, REPAIRING, PERFORMING_MAINTENANCE, UNAVAILABLE) |
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. (STATE_UNSPECIFIED, CREATING, READY, UPDATING, DELETING, REPAIRING, PERFORMING_MAINTENANCE, UNAVAILABLE) |
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, orderBy, pageSize, 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. | |
attach_trust | exec | projectsId, domainsId | Adds an AD trust to a domain. | |
check_migration_permission | exec | projectsId, domainsId | CheckMigrationPermission API gets the current state of DomainMigration | |
detach_trust | exec | projectsId, domainsId | Removes an AD trust. | |
disable_migration | exec | projectsId, domainsId | Disable Domain Migration | |
domain_join_machine | exec | projectsId, domainsId | DomainJoinMachine API joins a Compute Engine VM to the domain | |
enable_migration | exec | projectsId, domainsId | Enable Domain Migration | |
extend_schema | exec | projectsId, domainsId | Extend Schema for Domain | |
reconfigure_trust | exec | projectsId, domainsId | Updates the DNS conditional forwarder. | |
reset_admin_password | exec | projectsId, domainsId | Resets a domain's administrator password. | |
restore | exec | projectsId, domainsId | RestoreDomain restores domain backup mentioned in the RestoreDomainRequest | |
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. |
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 orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a Microsoft AD domain.
INSERT INTO google.managedidentities.domains (
data__admin,
data__auditLogsEnabled,
data__authorizedNetworks,
data__labels,
data__locations,
data__name,
data__reservedIpRange,
projectsId,
domainName
)
SELECT
'{{ admin }}',
{{ auditLogsEnabled }},
'{{ authorizedNetworks }}',
'{{ labels }}',
'{{ locations }}',
'{{ name }}',
'{{ reservedIpRange }}',
'{{ projectsId }}',
'{{ domainName }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: domains
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the domains resource.
- name: admin
value: "{{ admin }}"
description: |
Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, `setupadmin` will be used.
- name: auditLogsEnabled
value: {{ auditLogsEnabled }}
description: |
Optional. Configuration for audit logs. True if audit logs are enabled, else false. Default is audit logs disabled.
- name: authorizedNetworks
value:
- "{{ authorizedNetworks }}"
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: "{{ labels }}"
description: |
Optional. Resource labels that can contain user-provided metadata.
- name: locations
value:
- "{{ locations }}"
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: name
value: "{{ name }}"
description: |
Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`.
- name: reservedIpRange
value: "{{ reservedIpRange }}"
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: "{{ domainName }}"
UPDATE examples
- patch
Updates the metadata and configuration of a domain.
UPDATE google.managedidentities.domains
SET
data__admin = '{{ admin }}',
data__auditLogsEnabled = {{ auditLogsEnabled }},
data__authorizedNetworks = '{{ authorizedNetworks }}',
data__labels = '{{ labels }}',
data__locations = '{{ locations }}',
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
- attach_trust
- check_migration_permission
- detach_trust
- disable_migration
- domain_join_machine
- enable_migration
- extend_schema
- reconfigure_trust
- reset_admin_password
- restore
- validate_trust
Adds an AD trust to a domain.
EXEC google.managedidentities.domains.attach_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"trust": "{{ trust }}"
}'
;
CheckMigrationPermission API gets the current state of DomainMigration
EXEC google.managedidentities.domains.check_migration_permission
@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 }}"
}'
;
Disable Domain Migration
EXEC google.managedidentities.domains.disable_migration
@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 }}"
}'
;
Enable Domain Migration
EXEC google.managedidentities.domains.enable_migration
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"migratingDomains": "{{ migratingDomains }}"
}'
;
Extend Schema for Domain
EXEC google.managedidentities.domains.extend_schema
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"description": "{{ description }}",
"fileContents": "{{ fileContents }}",
"gcsPath": "{{ gcsPath }}"
}'
;
Updates the DNS conditional forwarder.
EXEC google.managedidentities.domains.reconfigure_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"targetDnsIpAddresses": "{{ targetDnsIpAddresses }}",
"targetDomainName": "{{ targetDomainName }}"
}'
;
Resets a domain's administrator password.
EXEC google.managedidentities.domains.reset_admin_password
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
;
RestoreDomain restores domain backup mentioned in the RestoreDomainRequest
EXEC google.managedidentities.domains.restore
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"backupId": "{{ backupId }}"
}'
;
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 }}"
}'
;