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

# POST /v1/{+parent}/instances

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

Creates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).

## Path parameters

- `parent` string, required

## Query parameters

- `instanceId` string

## Request body

- Instance — A Filestore instance.
  - `statusMessage` string — Output only. Additional information about the instance state, if available.
  - `satisfiesPzs` boolean — Output only. Reserved for future use.
  - `protocol` 'FILE_PROTOCOL_UNSPECIFIED' | 'NFS_V3' | 'NFS_V4_1' — Immutable. The protocol indicates the access protocol for all shares in the instance. This field is immutable and it cannot be changed after the instance has been created. Default value: `NFS_V3`.
  - `name` string — Output only. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance}`.
  - `maxCapacityGb` string, int64 — Output only. The maximum capacity of the instance in GB.
  - `replication` Replication — Optional. The configuration used to replicate an instance.
    - `role` 'ROLE_UNSPECIFIED' | 'ACTIVE' | 'STANDBY' — Optional. The replication role. When creating a new replica, this field must be set to `STANDBY`.
    - `replicas` ReplicaConfig[] — Optional. Replication configuration for the replica instance associated with this instance. Only a single replica is supported.
      - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'READY' | 'REMOVING' | 'FAILED' | 'PROMOTING' | 'PAUSING' | 'PAUSED' | 'RESUMING' — Output only. The replica state.
      - `peerInstance` string — Optional. The name of the source instance for the replica, in the format `projects/{project}/locations/{location}/instances/{instance}`. This field is required when creating a replica.
      - `stateUpdateTime` string, google-datetime — Output only. The time when the replica state was updated.
      - `lastActiveSyncTime` string, google-datetime — Output only. The timestamp of the latest replication snapshot taken on the active instance and is already replicated safely.
      - `stateReasons` string[] — Output only. Additional information about the replication state, if available.
  - `performanceConfig` PerformanceConfig — Used for setting the performance configuration. If the user doesn't specify PerformanceConfig, automatically provision the default performance settings as described in https://cloud.google.com/filestore/docs/performance. Larger instances will be linearly set to more IOPS. If the instance's capacity is increased or decreased, its performance will be automatically adjusted upwards or downwards accordingly (respectively).
    - `iopsPerTb` IOPSPerTB — IOPS per TB. Filestore defines TB as 1024^4 bytes (TiB).
      - `maxIopsPerTb` string, int64 — Required. Maximum IOPS per TiB.
    - `fixedIops` FixedIOPS — Fixed IOPS (input/output operations per second) parameters.
      - `maxIops` string, int64 — Required. Maximum IOPS.
  - `createTime` string, google-datetime — Output only. The time when the instance was created.
  - `capacityStepSizeGb` string, int64 — Output only. The incremental increase or decrease in capacity, designated in some number of GB.
  - `fileShares` FileShareConfig[] — File system shares on the instance. For this version, only a single file share is supported.
    - `capacityGb` string, int64 — File share capacity in gigabytes (GB). Filestore defines 1 GB as 1024^3 bytes.
    - `name` string — Required. The name of the file share. Must use 1-16 characters for the basic service tier and 1-63 characters for all other service tiers. Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must start with a letter. Immutable.
    - `sourceBackupdrBackup` string — The resource name of the BackupDR backup, in the format `projects/{project_id}/locations/{location_id}/backupVaults/{backupvault_id}/dataSources/{datasource_id}/backups/{backup_id}`,
    - `sourceBackup` string — The resource name of the backup, in the format `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, that this file share has been restored from.
    - `nfsExportOptions` NfsExportOptions[] — Nfs Export Options. There is a limit of 10 export options per file share.
      - `squashMode` 'SQUASH_MODE_UNSPECIFIED' | 'NO_ROOT_SQUASH' | 'ROOT_SQUASH' — Either NO_ROOT_SQUASH, for allowing root access on the exported directory, or ROOT_SQUASH, for not allowing root access. The default is NO_ROOT_SQUASH.
      - `anonGid` string, int64 — An integer representing the anonymous group id with a default value of 65534. Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be returned if this field is specified for other squash_mode settings.
      - `ipRanges` string[] — List of either an IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the file share. Overlapping IP ranges are not allowed, both within and across NfsExportOptions. An error will be returned. The limit is 64 IP ranges/addresses for each FileShareConfig among all NfsExportOptions.
      - `network` string — Optional. The source VPC network for ip_ranges. Required for instances using Private Service Connect, optional otherwise. If provided, must be the same network specified in the `NetworkConfig.network` field.
      - `accessMode` 'ACCESS_MODE_UNSPECIFIED' | 'READ_ONLY' | 'READ_WRITE' — Either READ_ONLY, for allowing only read requests on the exported directory, or READ_WRITE, for allowing both read and write requests. The default is READ_WRITE.
      - `anonUid` string, int64 — An integer representing the anonymous user id with a default value of 65534. Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be returned if this field is specified for other squash_mode settings.
  - `description` string — The description of the instance (2048 characters or less).
  - `directoryServices` DirectoryServicesConfig — Directory Services configuration for Kerberos-based authentication.
    - `ldap` LdapConfig — LdapConfig contains all the parameters for connecting to LDAP servers.
      - `usersOu` string — Optional. The users Organizational Unit (OU) is optional. This parameter is a hint to allow faster lookup in the LDAP namespace. In case that this parameter is not provided, Filestore instance will query the whole LDAP namespace.
      - `domain` string — Required. The LDAP domain name in the format of `my-domain.com`.
      - `groupsOu` string — Optional. The groups Organizational Unit (OU) is optional. This parameter is a hint to allow faster lookup in the LDAP namespace. In case that this parameter is not provided, Filestore instance will query the whole LDAP namespace.
      - `servers` string[] — Required. The servers names are used for specifying the LDAP servers names. The LDAP servers names can come with two formats: 1. DNS name, for example: `ldap.example1.com`, `ldap.example2.com`. 2. IP address, for example: `10.0.0.1`, `10.0.0.2`, `10.0.0.3`. All servers names must be in the same format: either all DNS names or all IP addresses.
  - `kmsKeyName` string — KMS key name used for data encryption.
  - `deletionProtectionEnabled` boolean — Optional. Indicates whether the instance is protected against deletion.
  - `minCapacityGb` string, int64 — Output only. The minimum capacity of the instance in GB.
  - `deletionProtectionReason` string — Optional. The reason for enabling deletion protection.
  - `etag` string — Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.
  - `suspensionReasons` string[] — Output only. Field indicates all the reasons the instance is in "SUSPENDED" state.
  - `tier` 'TIER_UNSPECIFIED' | 'STANDARD' | 'PREMIUM' | 'BASIC_HDD' | 'BASIC_SSD' | 'HIGH_SCALE_SSD' | 'ENTERPRISE' | 'ZONAL' | 'REGIONAL' — The service tier of the instance.
  - `customPerformanceSupported` boolean — Output only. Indicates whether this instance supports configuring its performance. If true, the user can configure the instance's performance by using the 'performance_config' field.
  - `networks` NetworkConfig[] — VPC networks to which the instance is connected. For this version, only a single network is supported.
    - `reservedIpRange` string — Optional, reserved_ip_range can have one of the following two types of values. * CIDR range value when using DIRECT_PEERING connect mode. * [Allocated IP address range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) when using PRIVATE_SERVICE_ACCESS connect mode. When the name of an allocated IP address range is specified, it must be one of the ranges associated with the private service access connection. When specified as a direct CIDR value, it must be a /29 CIDR block for Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for Enterprise tier in one of the [internal IP address ranges](https://www.arin.net/reference/research/statistics/address_filters/) that identifies the range of IP addresses reserved for this instance. For example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The range you specify can't overlap with either existing subnets or assigned IP address ranges for other Filestore instances in the selected VPC network.
    - `modes` string[] — Internet protocol versions for which the instance has IP addresses assigned.
    - `network` string — The name of the Google Compute Engine [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected.
    - `connectMode` 'CONNECT_MODE_UNSPECIFIED' | 'DIRECT_PEERING' | 'PRIVATE_SERVICE_ACCESS' | 'PRIVATE_SERVICE_CONNECT' — The network connect mode of the Filestore instance. If not provided, the connect mode defaults to DIRECT_PEERING.
    - `pscConfig` PscConfig — Private Service Connect configuration.
      - `endpointProject` string — Optional. Consumer service project in which the Private Service Connect endpoint would be set up. This is optional, and only relevant in case the network is a shared VPC. If this is not specified, the endpoint would be setup in the VPC host project.
    - `ipAddresses` string[] — Output only. IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
  - `labels` object — Resource labels to represent user provided metadata.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'READY' | 'REPAIRING' | 'DELETING' | 'ERROR' | 'RESTORING' | 'SUSPENDED' | 'SUSPENDING' | 'RESUMING' | 'REVERTING' | 'PROMOTING' — Output only. The instance state.
  - `satisfiesPzi` boolean — Output only. Reserved for future use.
  - `tags` object — Optional. Input only. Immutable. Tag key-value pairs bound to this resource. Each key must be a namespaced name and each value a short name. Example: "123456789012/environment" : "production", "123456789013/costCenter" : "marketing" See the documentation for more information: - Namespaced name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - Short name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value
  - `performanceLimits` PerformanceLimits — The enforced performance limits, calculated from the instance's performance configuration.
    - `maxIops` string, int64 — Output only. The maximum IOPS.
    - `maxWriteIops` string, int64 — Output only. The maximum write IOPS.
    - `maxReadThroughputBps` string, int64 — Output only. The maximum read throughput in bytes per second.
    - `maxReadIops` string, int64 — Output only. The maximum read IOPS.
    - `maxWriteThroughputBps` string, int64 — Output only. The maximum write throughput in bytes per second.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/file.md) · [All operations](https://skmtc.dev/google/apis/file/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/file/revisions/f3d16365a416/schema)
