---
title: "POST /v1/{+parent}/domains"
method: POST
path: "/v1/{+parent}/domains"
tags: ["projects"]
---

# POST /v1/{+parent}/domains

`POST /v1/{+parent}/domains`

Creates a Microsoft AD domain.

## Path parameters

- `parent` string, required

## Query parameters

- `domainName` string

## Request body

- Domain — Represents a managed Microsoft Active Directory domain. If the domain is being changed, it will be placed into the UPDATING state, which indicates that the resource is being reconciled. At this point, Get will reflect an intermediate state.
  - `authorizedNetworks` string[] — Optional. The full names of the Google Compute Engine [networks](/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.
  - `admin` string — Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, `setupadmin` will be used.
  - `locations` string[] — 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.
  - `updateTime` string, google-datetime — Output only. The last update time.
  - `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].
  - `name` string — Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`.
  - `createTime` string, google-datetime — Output only. The time the instance was created.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'READY' | 'UPDATING' | 'DELETING' | 'REPAIRING' | 'PERFORMING_MAINTENANCE' | 'UNAVAILABLE' — Output only. The current state of this domain.
  - `labels` object — Optional. Resource labels that can contain user-provided metadata.
  - `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.
  - `auditLogsEnabled` boolean — Optional. Configuration for audit logs. True if audit logs are enabled, else false. Default is audit logs disabled.
  - `statusMessage` string — Output only. Additional information about the current status of this domain, if available.
  - `trusts` Trust[] — Output only. The current trusts associated with the domain.
    - `createTime` string, google-datetime — Output only. The time the instance was created.
    - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'UPDATING' | 'DELETING' | 'CONNECTED' | 'DISCONNECTED' — Output only. The current state of the trust.
    - `targetDnsIpAddresses` string[] — Required. The target DNS server IP addresses which can resolve the remote domain involved in the trust.
    - `targetDomainName` string — Required. The fully qualified target domain name which will be in trust with the current domain.
    - `trustHandshakeSecret` string — Required. The trust secret used for the handshake with the target domain. This will not be stored.
    - `stateDescription` string — Output only. Additional information about the current state of the trust, if available.
    - `trustType` 'TRUST_TYPE_UNSPECIFIED' | 'FOREST' | 'EXTERNAL' — Required. The type of trust represented by the trust resource.
    - `trustDirection` 'TRUST_DIRECTION_UNSPECIFIED' | 'INBOUND' | 'OUTBOUND' | 'BIDIRECTIONAL' — Required. The trust direction, which decides if the current domain is trusted, trusting, or both.
    - `selectiveAuthentication` boolean — Optional. The trust authentication type, which decides whether the trusted side has forest/domain wide access or selective access to an approved set of resources.
    - `updateTime` string, google-datetime — Output only. The last update time.
    - `lastTrustHeartbeatTime` string, google-datetime — Output only. The last heartbeat time when the trust was known to be connected.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/managedidentities.md) · [All operations](https://skmtc.net/google/apis/managedidentities/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/managedidentities/revisions/def2f0a79c2b/schema)
