Skip to main content

clusters

Creates, updates, deletes, gets or lists a clusters resource.

Overview

Nameclusters
TypeResource
Idgoogle.redis.clusters

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. 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}
allowFewerZonesDeploymentbooleanOptional. Immutable. Allows customers to specify if they are okay with deploying a multi-zone cluster in less than 3 zones. Once set, if there is a zonal outage during the cluster creation, the cluster will only be deployed in 2 zones, and stay within the 2 zones for its lifecycle.
asyncClusterEndpointsDeletionEnabledbooleanOptional. 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.
authorizationModestringOptional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
automatedBackupConfigobjectOptional. The automated backup config for the cluster. (id: AutomatedBackupConfig)
backupCollectionstringOptional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection}
clusterEndpointsarrayOptional. A list of cluster endpoints.
createTimestring (google-datetime)Output only. The timestamp associated with the cluster creation request.
crossClusterReplicationConfigobjectOptional. Cross cluster replication config. (id: CrossClusterReplicationConfig)
deletionProtectionEnabledbooleanOptional. The delete operation will fail when the value is set to true.
discoveryEndpointsarrayOutput only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.
encryptionInfoobjectOutput only. Encryption information of the data at rest of the cluster. (id: EncryptionInfo)
gcsSourceobjectOptional. Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. Read permission is required to import from the provided Cloud Storage objects. (id: GcsBackupSource)
kmsKeystringOptional. The KMS key used to encrypt the at-rest data of the cluster.
maintenancePolicyobjectOptional. ClusterMaintenancePolicy determines when to allow or deny updates. (id: ClusterMaintenancePolicy)
maintenanceScheduleobjectOutput only. ClusterMaintenanceSchedule Output only Published maintenance schedule. (id: ClusterMaintenanceSchedule)
managedBackupSourceobjectOptional. Backups generated and managed by memorystore service. (id: ManagedBackupSource)
nodeTypestringOptional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.
ondemandMaintenancebooleanOptional. Input only. Ondemand maintenance for the cluster. This field can be used to trigger ondemand critical update on the cluster.
persistenceConfigobjectOptional. Persistence config (RDB, AOF) for the cluster. (id: ClusterPersistenceConfig)
preciseSizeGbnumber (double)Output only. Precise value of redis memory size in GB for the entire cluster.
pscConfigsarrayOptional. 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.
pscConnectionsarrayOutput only. The list of PSC connections that are auto-created through service connectivity automation.
pscServiceAttachmentsarrayOutput only. Service attachment details to configure Psc connections
redisConfigsobjectOptional. Key/Value pairs of customer overrides for mutable Redis Configs
replicaCountinteger (int32)Optional. The number of replica nodes per shard.
satisfiesPzibooleanOptional. Output only. Reserved for future use.
satisfiesPzsbooleanOptional. Output only. Reserved for future use.
shardCountinteger (int32)Optional. Number of shards for the Redis cluster.
simulateMaintenanceEventbooleanOptional. Input only. Simulate a maintenance event.
sizeGbinteger (int32)Output only. Redis memory size in GB for the entire cluster rounded up to the next integer.
statestringOutput only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
stateInfoobjectOutput only. Additional information about the current state of the cluster. (id: StateInfo)
transitEncryptionModestringOptional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
uidstringOutput only. System assigned, unique identifier for the cluster.
zoneDistributionConfigobjectOptional. This config will be used to determine how the customer wants us to distribute cluster resources within the region. (id: ZoneDistributionConfig)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, clustersIdGets the details of a specific Redis cluster.
listselectprojectsId, locationsIdpageSize, pageTokenLists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * projects/{project_id}/locations/{location_id} If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.
createinsertprojectsId, locationsIdclusterId, requestIdCreates 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.
patchupdateprojectsId, locationsId, clustersIdupdateMask, requestIdUpdates the metadata and configuration of a specific Redis cluster. 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.
deletedeleteprojectsId, locationsId, clustersIdrequestIdDeletes a specific Redis cluster. Cluster stops serving and data is deleted.
reschedule_cluster_maintenanceexecprojectsId, locationsId, clustersIdReschedules upcoming maintenance event.
backupexecprojectsId, locationsId, clustersIdBackup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

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.

NameDatatypeDescription
clustersIdstring
locationsIdstring
projectsIdstring
clusterIdstring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the details of a specific Redis cluster.

SELECT
name,
allowFewerZonesDeployment,
asyncClusterEndpointsDeletionEnabled,
authorizationMode,
automatedBackupConfig,
backupCollection,
clusterEndpoints,
createTime,
crossClusterReplicationConfig,
deletionProtectionEnabled,
discoveryEndpoints,
encryptionInfo,
gcsSource,
kmsKey,
maintenancePolicy,
maintenanceSchedule,
managedBackupSource,
nodeType,
ondemandMaintenance,
persistenceConfig,
preciseSizeGb,
pscConfigs,
pscConnections,
pscServiceAttachments,
redisConfigs,
replicaCount,
satisfiesPzi,
satisfiesPzs,
shardCount,
simulateMaintenanceEvent,
sizeGb,
state,
stateInfo,
transitEncryptionMode,
uid,
zoneDistributionConfig
FROM google.redis.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required;

INSERT examples

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.

INSERT INTO google.redis.clusters (
data__gcsSource,
data__managedBackupSource,
data__name,
data__replicaCount,
data__authorizationMode,
data__transitEncryptionMode,
data__shardCount,
data__pscConfigs,
data__nodeType,
data__persistenceConfig,
data__redisConfigs,
data__zoneDistributionConfig,
data__crossClusterReplicationConfig,
data__deletionProtectionEnabled,
data__maintenancePolicy,
data__clusterEndpoints,
data__simulateMaintenanceEvent,
data__kmsKey,
data__ondemandMaintenance,
data__automatedBackupConfig,
data__asyncClusterEndpointsDeletionEnabled,
data__allowFewerZonesDeployment,
projectsId,
locationsId,
clusterId,
requestId
)
SELECT
'{{ gcsSource }}',
'{{ managedBackupSource }}',
'{{ name }}',
{{ replicaCount }},
'{{ authorizationMode }}',
'{{ transitEncryptionMode }}',
{{ shardCount }},
'{{ pscConfigs }}',
'{{ nodeType }}',
'{{ persistenceConfig }}',
'{{ redisConfigs }}',
'{{ zoneDistributionConfig }}',
'{{ crossClusterReplicationConfig }}',
{{ deletionProtectionEnabled }},
'{{ maintenancePolicy }}',
'{{ clusterEndpoints }}',
{{ simulateMaintenanceEvent }},
'{{ kmsKey }}',
{{ ondemandMaintenance }},
'{{ automatedBackupConfig }}',
{{ asyncClusterEndpointsDeletionEnabled }},
{{ allowFewerZonesDeployment }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ clusterId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the metadata and configuration of a specific Redis cluster. 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.

UPDATE google.redis.clusters
SET
data__gcsSource = '{{ gcsSource }}',
data__managedBackupSource = '{{ managedBackupSource }}',
data__name = '{{ name }}',
data__replicaCount = {{ replicaCount }},
data__authorizationMode = '{{ authorizationMode }}',
data__transitEncryptionMode = '{{ transitEncryptionMode }}',
data__shardCount = {{ shardCount }},
data__pscConfigs = '{{ pscConfigs }}',
data__nodeType = '{{ nodeType }}',
data__persistenceConfig = '{{ persistenceConfig }}',
data__redisConfigs = '{{ redisConfigs }}',
data__zoneDistributionConfig = '{{ zoneDistributionConfig }}',
data__crossClusterReplicationConfig = '{{ crossClusterReplicationConfig }}',
data__deletionProtectionEnabled = {{ deletionProtectionEnabled }},
data__maintenancePolicy = '{{ maintenancePolicy }}',
data__clusterEndpoints = '{{ clusterEndpoints }}',
data__simulateMaintenanceEvent = {{ simulateMaintenanceEvent }},
data__kmsKey = '{{ kmsKey }}',
data__ondemandMaintenance = {{ ondemandMaintenance }},
data__automatedBackupConfig = '{{ automatedBackupConfig }}',
data__asyncClusterEndpointsDeletionEnabled = {{ asyncClusterEndpointsDeletionEnabled }},
data__allowFewerZonesDeployment = {{ allowFewerZonesDeployment }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

DELETE FROM google.redis.clusters
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND requestId = '{{ requestId }}';

Lifecycle Methods

Reschedules upcoming maintenance event.

EXEC google.redis.clusters.reschedule_cluster_maintenance 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"rescheduleType": "{{ rescheduleType }}",
"scheduleTime": "{{ scheduleTime }}"
}';