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
Successful response
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. |
Successful response
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 | pageSize , pageToken , filter , orderBy | 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. | |
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 | |
restore | exec | projectsId , domainsId | RestoreDomain restores domain backup mentioned in the RestoreDomainRequest | |
attach_trust | exec | projectsId , domainsId | Adds an AD trust to a domain. | |
reconfigure_trust | exec | projectsId , domainsId | Updates the DNS conditional forwarder. | |
detach_trust | exec | projectsId , domainsId | Removes an AD trust. | |
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. | |
extend_schema | exec | projectsId , domainsId | Extend Schema for Domain | |
enable_migration | exec | projectsId , domainsId | Enable Domain Migration | |
disable_migration | exec | projectsId , domainsId | Disable Domain Migration | |
check_migration_permission | exec | projectsId , domainsId | CheckMigrationPermission API gets the current state of DomainMigration |
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a Microsoft AD domain.
INSERT INTO google.managedidentities.domains (
data__name,
data__labels,
data__authorizedNetworks,
data__reservedIpRange,
data__locations,
data__admin,
data__auditLogsEnabled,
projectsId,
domainName
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ authorizedNetworks }}',
'{{ reservedIpRange }}',
'{{ locations }}',
'{{ admin }}',
{{ auditLogsEnabled }},
'{{ 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: name
value: string
description: >
Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`.
- name: labels
value: object
description: >
Optional. Resource labels that can contain user-provided metadata.
- 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: 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: 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: domainName
value: string
UPDATE
examples
- patch
Updates the metadata and configuration of a domain.
UPDATE google.managedidentities.domains
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__authorizedNetworks = '{{ authorizedNetworks }}',
data__reservedIpRange = '{{ reservedIpRange }}',
data__locations = '{{ locations }}',
data__admin = '{{ admin }}',
data__auditLogsEnabled = {{ auditLogsEnabled }}
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
- reset_admin_password
- domain_join_machine
- restore
- attach_trust
- reconfigure_trust
- detach_trust
- validate_trust
- extend_schema
- enable_migration
- disable_migration
- check_migration_permission
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=
'{
"vmIdToken": "{{ vmIdToken }}",
"ouName": "{{ ouName }}",
"force": {{ force }}
}';
RestoreDomain restores domain backup mentioned in the RestoreDomainRequest
EXEC google.managedidentities.domains.restore
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"backupId": "{{ backupId }}"
}';
Adds an AD trust to a domain.
EXEC google.managedidentities.domains.attach_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"trust": "{{ trust }}"
}';
Updates the DNS conditional forwarder.
EXEC google.managedidentities.domains.reconfigure_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"targetDomainName": "{{ targetDomainName }}",
"targetDnsIpAddresses": "{{ targetDnsIpAddresses }}"
}';
Removes an AD trust.
EXEC google.managedidentities.domains.detach_trust
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"trust": "{{ trust }}"
}';
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 }}"
}';
Extend Schema for Domain
EXEC google.managedidentities.domains.extend_schema
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required
@@json=
'{
"description": "{{ description }}",
"gcsPath": "{{ gcsPath }}",
"fileContents": "{{ fileContents }}"
}';
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;
CheckMigrationPermission API gets the current state of DomainMigration
EXEC google.managedidentities.domains.check_migration_permission
@projectsId='{{ projectsId }}' --required,
@domainsId='{{ domainsId }}' --required;