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

# POST /v1/{+parent}/instances

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

Creates a new instance in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `instanceId` string
- `requestId` string

## Request body

- Instance — A resource that represents a Secure Source Manager instance.
  - `workforceIdentityFederationConfig` WorkforceIdentityFederationConfig — WorkforceIdentityFederationConfig allows this instance to support users from external identity providers.
    - `enabled` boolean — Optional. Immutable. Whether Workforce Identity Federation is enabled.
  - `labels` object — Optional. Labels as key value pairs. Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding).
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'PAUSED' | 'UNKNOWN' — Output only. Current state of the instance.
  - `privateConfig` PrivateConfig — PrivateConfig includes settings for private instance.
    - `pscAllowedProjects` string[] — Optional. Additional allowed projects for setting up PSC connections. Instance host project is automatically allowed and does not need to be included in this list.
    - `httpServiceAttachment` string — Output only. Service Attachment for HTTP, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`.
    - `isPrivate` boolean — Required. Immutable. Indicate if it's private instance.
    - `sshServiceAttachment` string — Output only. Service Attachment for SSH, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`.
    - `caPool` string — Optional. Immutable. CA pool resource, resource must in the format of `projects/{project}/locations/{location}/caPools/{ca_pool}`.
    - `customHostConfig` CustomHostConfig — Custom host config for the instance.
      - `api` string — Required. The custom API hostname for the instance, e.g., "api.source.internal.mycompany.com"
      - `gitSsh` string — Required. The custom git ssh hostname for the instance, e.g., "ssh.source.internal.mycompany.com"
      - `gitHttp` string — Required. The custom git http hostname for the instance, e.g., "git.source.internal.mycompany.com"
      - `html` string — Required. The custom UI hostname for the instance, e.g., "git.source.internal.mycompany.com"
  - `createTime` string, google-datetime — Output only. Create timestamp.
  - `updateTime` string, google-datetime — Output only. Update timestamp.
  - `hostConfig` HostConfig — HostConfig has different instance endpoints.
    - `html` string — Output only. HTML hostname.
    - `api` string — Output only. API hostname.
    - `gitHttp` string — Output only. Git HTTP hostname.
    - `gitSsh` string — Output only. Git SSH hostname.
  - `stateNote` 'STATE_NOTE_UNSPECIFIED' | 'PAUSED_CMEK_UNAVAILABLE' | 'INSTANCE_RESUMING' — Output only. An optional field providing information about the current instance state.
  - `name` string — Identifier. A unique identifier for an instance. The name should be of the format: `projects/{project_number}/locations/{location_id}/instances/{instance_id}` `project_number`: Maps to a unique int64 id assigned to each project. `location_id`: Refers to the region where the instance will be deployed. Since Secure Source Manager is a regional service, it must be one of the valid GCP regions. `instance_id`: User provided name for the instance, must be unique for a project_number and location_id combination.
  - `kmsKey` string — Optional. Immutable. Customer-managed encryption key name, in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.

## Response `200`

Successful response

---

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