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

# POST /v1/{+parent}/clusters

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

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

## Path parameters

- `parent` string, required

## Query parameters

- `clusterId` string
- `requestId` string

## Request body

- Cluster — A cluster instance.
  - `gcsSource` GcsBackupSource — Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters.
    - `uris` string[] — Optional. URIs of the Cloud Storage objects to import. Example: gs://bucket1/object1, gs://bucket2/folder2/object2
  - `managedBackupSource` ManagedBackupSource — Backups that generated and managed by memorystore.
    - `backup` string — Optional. Example: //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} A shorter version (without the prefix) of the backup name is also supported, like projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} In this case, it assumes the backup is under redis.googleapis.com.
  - `name` string — Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
  - `createTime` string, google-datetime — Output only. The timestamp associated with the cluster creation request.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DELETING' — Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
  - `uid` string — Output only. System assigned, unique identifier for the cluster.
  - `replicaCount` integer — Optional. The number of replica nodes per shard.
  - `authorizationMode` 'AUTH_MODE_UNSPECIFIED' | 'AUTH_MODE_IAM_AUTH' | 'AUTH_MODE_DISABLED' | 'AUTH_MODE_TOKEN_AUTH' — Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
  - `transitEncryptionMode` 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED' | 'TRANSIT_ENCRYPTION_MODE_DISABLED' | 'TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION' — Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
  - `sizeGb` integer — Output only. Redis memory size in GB for the entire cluster rounded up to the next integer.
  - `shardCount` integer — Optional. Number of shards for the Redis cluster.
  - `pscConfigs` PscConfig[] — Optional. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.
    - `network` string — Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}.
  - `discoveryEndpoints` DiscoveryEndpoint[] — Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.
    - `address` string — Output only. Address of the exposed Redis endpoint used by clients to connect to the service. The address could be either IP or hostname.
    - `port` integer — Output only. The port number of the exposed Redis endpoint.
    - `pscConfig` PscConfig
      - `network` string — Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}.
  - `pscConnections` PscConnection[] — Output only. The list of PSC connections that are auto-created through service connectivity automation.
    - `port` integer — Output only. port will only be set for Primary/Reader or Discovery endpoint.
    - `pscConnectionId` string — Required. The PSC connection id of the forwarding rule connected to the service attachment.
    - `address` string — Required. The IP allocated on the consumer network for the PSC forwarding rule.
    - `forwardingRule` string — Required. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
    - `projectId` string — Optional. Project ID of the consumer project where the forwarding rule is created in.
    - `network` string — Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
    - `serviceAttachment` string — Required. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    - `pscConnectionStatus` 'PSC_CONNECTION_STATUS_UNSPECIFIED' | 'PSC_CONNECTION_STATUS_ACTIVE' | 'PSC_CONNECTION_STATUS_NOT_FOUND' — Output only. The status of the PSC connection. Please note that this value is updated periodically. To get the latest status of a PSC connection, follow https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details.
    - `connectionType` 'CONNECTION_TYPE_UNSPECIFIED' | 'CONNECTION_TYPE_DISCOVERY' | 'CONNECTION_TYPE_PRIMARY' | 'CONNECTION_TYPE_READER' — Output only. Type of the PSC connection.
  - `stateInfo` StateInfo — Represents additional information about the state of the cluster.
    - `updateInfo` UpdateInfo — Represents information about an updating cluster.
      - `targetShardCount` integer — Target number of shards for redis cluster
      - `targetReplicaCount` integer — Target number of replica nodes per shard.
      - `targetNodeType` 'NODE_TYPE_UNSPECIFIED' | 'REDIS_SHARED_CORE_NANO' | 'REDIS_HIGHMEM_MEDIUM' | 'REDIS_HIGHMEM_XLARGE' | 'REDIS_STANDARD_SMALL' | 'REDIS_HIGHCPU_MEDIUM' | 'REDIS_STANDARD_LARGE' | 'REDIS_HIGHMEM_2XLARGE' — Target node type for redis cluster.
  - `nodeType` 'NODE_TYPE_UNSPECIFIED' | 'REDIS_SHARED_CORE_NANO' | 'REDIS_HIGHMEM_MEDIUM' | 'REDIS_HIGHMEM_XLARGE' | 'REDIS_STANDARD_SMALL' | 'REDIS_HIGHCPU_MEDIUM' | 'REDIS_STANDARD_LARGE' | 'REDIS_HIGHMEM_2XLARGE' — Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.
  - `persistenceConfig` ClusterPersistenceConfig — Configuration of the persistence functionality.
    - `mode` 'PERSISTENCE_MODE_UNSPECIFIED' | 'DISABLED' | 'RDB' | 'AOF' — Optional. The mode of persistence.
    - `rdbConfig` RDBConfig — Configuration of the RDB based persistence.
      - `rdbSnapshotPeriod` 'SNAPSHOT_PERIOD_UNSPECIFIED' | 'ONE_HOUR' | 'SIX_HOURS' | 'TWELVE_HOURS' | 'TWENTY_FOUR_HOURS' — Optional. Period between RDB snapshots.
      - `rdbSnapshotStartTime` string, google-datetime — Optional. The time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.
    - `aofConfig` AOFConfig — Configuration of the AOF based persistence.
      - `appendFsync` 'APPEND_FSYNC_UNSPECIFIED' | 'NO' | 'EVERYSEC' | 'ALWAYS' — Optional. fsync configuration.
  - `redisConfigs` object — Optional. Key/Value pairs of customer overrides for mutable Redis Configs
  - `preciseSizeGb` number, double — Output only. Precise value of redis memory size in GB for the entire cluster.
  - `zoneDistributionConfig` ZoneDistributionConfig — Zone distribution config for allocation of cluster resources.
    - `mode` 'ZONE_DISTRIBUTION_MODE_UNSPECIFIED' | 'MULTI_ZONE' | 'SINGLE_ZONE' — Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not specified.
    - `zone` string — Optional. When SINGLE ZONE distribution is selected, zone field would be used to allocate all resources in that zone. This is not applicable to MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
    - `zones` string[] — Optional. Specify the zones of a multi-zone cluster where Redis Cluster allocates resources. This flag isn't applicable for single-zone clusters.
  - `crossClusterReplicationConfig` CrossClusterReplicationConfig — Cross cluster replication config.
    - `clusterRole` 'CLUSTER_ROLE_UNSPECIFIED' | 'NONE' | 'PRIMARY' | 'SECONDARY' — Output only. The role of the cluster in cross cluster replication.
    - `primaryCluster` RemoteCluster — Details of the remote cluster associated with this cluster in a cross cluster replication setup.
      - `cluster` string — Output only. The full resource path of the remote cluster in the format: projects//locations//clusters/
      - `uid` string — Output only. The unique identifier of the remote cluster.
    - `secondaryClusters` RemoteCluster[] — List of secondary clusters that are replicating from this primary cluster. This field is only set for a primary cluster.
      - `cluster` string — Output only. The full resource path of the remote cluster in the format: projects//locations//clusters/
      - `uid` string — Output only. The unique identifier of the remote cluster.
    - `updateTime` string, google-datetime — Output only. The last time cross cluster replication config was updated.
    - `membership` Membership — An output only view of all the member clusters participating in the cross cluster replication.
      - `primaryCluster` RemoteCluster — Details of the remote cluster associated with this cluster in a cross cluster replication setup.
        - `cluster` string — Output only. The full resource path of the remote cluster in the format: projects//locations//clusters/
        - `uid` string — Output only. The unique identifier of the remote cluster.
      - `secondaryClusters` RemoteCluster[] — Output only. The list of secondary clusters replicating from the primary cluster.
        - `cluster` string — Output only. The full resource path of the remote cluster in the format: projects//locations//clusters/
        - `uid` string — Output only. The unique identifier of the remote cluster.
  - `deletionProtectionEnabled` boolean — Optional. The delete operation will fail when the value is set to true.
  - `maintenancePolicy` ClusterMaintenancePolicy — Maintenance policy per cluster.
    - `createTime` string, google-datetime — Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.
    - `updateTime` string, google-datetime — Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.
    - `weeklyMaintenanceWindow` ClusterWeeklyMaintenanceWindow[] — Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.
      - `day` 'DAY_OF_WEEK_UNSPECIFIED' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY' — Optional. Allows to define schedule that runs specified day of the week.
      - `startTime` TimeOfDay — Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
        - `hours` integer — Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        - `minutes` integer — Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
        - `seconds` integer — Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
        - `nanos` integer — Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
  - `maintenanceSchedule` ClusterMaintenanceSchedule — Upcoming maintenance schedule.
    - `startTime` string, google-datetime — Output only. The start time of any upcoming scheduled maintenance for this instance.
    - `endTime` string, google-datetime — Output only. The end time of any upcoming scheduled maintenance for this instance.
  - `satisfiesPzs` boolean — Optional. Output only. Reserved for future use.
  - `satisfiesPzi` boolean — Optional. Output only. Reserved for future use.
  - `pscServiceAttachments` PscServiceAttachment[] — Output only. Service attachment details to configure Psc connections
    - `serviceAttachment` string — Output only. Service attachment URI which your self-created PscConnection should use as target
    - `connectionType` 'CONNECTION_TYPE_UNSPECIFIED' | 'CONNECTION_TYPE_DISCOVERY' | 'CONNECTION_TYPE_PRIMARY' | 'CONNECTION_TYPE_READER' — Output only. Type of a PSC connection targeting this service attachment.
  - `clusterEndpoints` ClusterEndpoint[] — Optional. A list of cluster endpoints.
    - `connections` ConnectionDetail[] — Required. A group of PSC connections. They are created in the same VPC network, one for each service attachment in the cluster.
      - `pscAutoConnection` PscAutoConnection — Details of consumer resources in a PSC connection that is created through Service Connectivity Automation.
        - `pscConnectionId` string — Output only. The PSC connection id of the forwarding rule connected to the service attachment.
        - `address` string — Output only. The IP allocated on the consumer network for the PSC forwarding rule.
        - `forwardingRule` string — Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
        - `projectId` string — Required. The consumer project_id where the forwarding rule is created from.
        - `network` string — Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
        - `serviceAttachment` string — Output only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
        - `pscConnectionStatus` 'PSC_CONNECTION_STATUS_UNSPECIFIED' | 'PSC_CONNECTION_STATUS_ACTIVE' | 'PSC_CONNECTION_STATUS_NOT_FOUND' — Output only. The status of the PSC connection. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.
        - `connectionType` 'CONNECTION_TYPE_UNSPECIFIED' | 'CONNECTION_TYPE_DISCOVERY' | 'CONNECTION_TYPE_PRIMARY' | 'CONNECTION_TYPE_READER' — Output only. Type of the PSC connection.
      - `pscConnection` PscConnection — Details of consumer resources in a PSC connection.
        - `port` integer — Output only. port will only be set for Primary/Reader or Discovery endpoint.
        - `pscConnectionId` string — Required. The PSC connection id of the forwarding rule connected to the service attachment.
        - `address` string — Required. The IP allocated on the consumer network for the PSC forwarding rule.
        - `forwardingRule` string — Required. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
        - `projectId` string — Optional. Project ID of the consumer project where the forwarding rule is created in.
        - `network` string — Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.
        - `serviceAttachment` string — Required. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
        - `pscConnectionStatus` 'PSC_CONNECTION_STATUS_UNSPECIFIED' | 'PSC_CONNECTION_STATUS_ACTIVE' | 'PSC_CONNECTION_STATUS_NOT_FOUND' — Output only. The status of the PSC connection. Please note that this value is updated periodically. To get the latest status of a PSC connection, follow https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details.
        - `connectionType` 'CONNECTION_TYPE_UNSPECIFIED' | 'CONNECTION_TYPE_DISCOVERY' | 'CONNECTION_TYPE_PRIMARY' | 'CONNECTION_TYPE_READER' — Output only. Type of the PSC connection.
  - `simulateMaintenanceEvent` boolean — Optional. Input only. Simulate a maintenance event.
  - `backupCollection` string — Optional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection}
  - `kmsKey` string — Optional. The KMS key used to encrypt the at-rest data of the cluster.
  - `ondemandMaintenance` boolean — Optional. Input only. Ondemand maintenance for the cluster. This field can be used to trigger ondemand critical update on the cluster.
  - `automatedBackupConfig` AutomatedBackupConfig — The automated backup config for a cluster.
    - `fixedFrequencySchedule` FixedFrequencySchedule — This schedule allows the backup to be triggered at a fixed frequency (currently only daily is supported).
      - `startTime` TimeOfDay — Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
        - `hours` integer — Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        - `minutes` integer — Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
        - `seconds` integer — Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
        - `nanos` integer — Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
    - `automatedBackupMode` 'AUTOMATED_BACKUP_MODE_UNSPECIFIED' | 'DISABLED' | 'ENABLED' — Optional. The automated backup mode. If the mode is disabled, the other fields will be ignored.
    - `retention` string, google-duration — Optional. How long to keep automated backups before the backups are deleted. The value should be between 1 day and 365 days. If not specified, the default value is 35 days.
  - `encryptionInfo` EncryptionInfo — EncryptionInfo describes the encryption information of a cluster or a backup.
    - `encryptionType` 'TYPE_UNSPECIFIED' | 'GOOGLE_DEFAULT_ENCRYPTION' | 'CUSTOMER_MANAGED_ENCRYPTION' — Output only. Type of encryption.
    - `kmsKeyVersions` string[] — Output only. KMS key versions that are being used to protect the data at-rest.
    - `kmsKeyPrimaryState` 'KMS_KEY_STATE_UNSPECIFIED' | 'ENABLED' | 'PERMISSION_DENIED' | 'DISABLED' | 'DESTROYED' | 'DESTROY_SCHEDULED' | 'EKM_KEY_UNREACHABLE_DETECTED' | 'BILLING_DISABLED' | 'UNKNOWN_FAILURE' — Output only. The state of the primary version of the KMS key perceived by the system. This field is not populated in backups.
    - `lastUpdateTime` string, google-datetime — Output only. The most recent time when the encryption info was updated.
  - `asyncClusterEndpointsDeletionEnabled` boolean — Optional. If true, cluster endpoints that are created and registered by customers can be deleted asynchronously. That is, such a cluster endpoint can be de-registered before the forwarding rules in the cluster endpoint are deleted.
  - `maintenanceVersion` string — Optional. This field can be used to trigger self service update to indicate the desired maintenance version. The input to this field can be determined by the available_maintenance_versions field.
  - `effectiveMaintenanceVersion` string — Output only. This field represents the actual maintenance version of the cluster.
  - `availableMaintenanceVersions` string[] — Output only. This field is used to determine the available maintenance versions for the self service update.
  - `allowFewerZonesDeployment` boolean — Optional. Immutable. Deprecated, do not use.
  - `labels` object — Optional. Labels to represent user-provided metadata.
  - `serverCaMode` 'SERVER_CA_MODE_UNSPECIFIED' | 'SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA' | 'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA' | 'SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA' — Optional. Server CA mode for the cluster.
  - `serverCaPool` string — Optional. Customer-managed CA pool for the cluster. Only applicable for BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. Format: "projects/{project}/locations/{region}/caPools/{ca_pool}".
  - `rotateServerCertificate` boolean — Optional. Input only. Rotate the server certificates.
  - `aclPolicy` string — Optional. The ACL policy to be applied to the cluster.
  - `aclPolicyInSync` boolean — Optional. Output only. Deprecated: Indicates whether the ACL rules applied to the cluster are in sync.

## Response `200`

Successful response

---

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