clusters
Creates, updates, deletes, gets or lists a clusters
resource.
Overview
Name | clusters |
Type | Resource |
Id | google.redis.clusters |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
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} |
allowFewerZonesDeployment | boolean | Optional. 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. |
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. |
authorizationMode | string | Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. |
automatedBackupConfig | object | Optional. The automated backup config for the cluster. (id: AutomatedBackupConfig) |
backupCollection | string | Optional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection} |
clusterEndpoints | array | Optional. A list of cluster endpoints. |
createTime | string (google-datetime) | Output only. The timestamp associated with the cluster creation request. |
crossClusterReplicationConfig | object | Optional. Cross cluster replication config. (id: CrossClusterReplicationConfig) |
deletionProtectionEnabled | boolean | Optional. The delete operation will fail when the value is set to true. |
discoveryEndpoints | array | Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported. |
encryptionInfo | object | Output only. Encryption information of the data at rest of the cluster. (id: EncryptionInfo) |
gcsSource | object | Optional. 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) |
kmsKey | string | Optional. The KMS key used to encrypt the at-rest data of the cluster. |
maintenancePolicy | object | Optional. ClusterMaintenancePolicy determines when to allow or deny updates. (id: ClusterMaintenancePolicy) |
maintenanceSchedule | object | Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule. (id: ClusterMaintenanceSchedule) |
managedBackupSource | object | Optional. Backups generated and managed by memorystore service. (id: ManagedBackupSource) |
nodeType | string | Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node. |
ondemandMaintenance | boolean | Optional. Input only. Ondemand maintenance for the cluster. This field can be used to trigger ondemand critical update on the cluster. |
persistenceConfig | object | Optional. Persistence config (RDB, AOF) for the cluster. (id: ClusterPersistenceConfig) |
preciseSizeGb | number (double) | Output only. Precise value of redis memory size in GB for the entire cluster. |
pscConfigs | array | 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. |
pscConnections | array | Output only. The list of PSC connections that are auto-created through service connectivity automation. |
pscServiceAttachments | array | Output only. Service attachment details to configure Psc connections |
redisConfigs | object | Optional. Key/Value pairs of customer overrides for mutable Redis Configs |
replicaCount | integer (int32) | Optional. The number of replica nodes per shard. |
satisfiesPzi | boolean | Optional. Output only. Reserved for future use. |
satisfiesPzs | boolean | Optional. Output only. Reserved for future use. |
shardCount | integer (int32) | Optional. Number of shards for the Redis cluster. |
simulateMaintenanceEvent | boolean | Optional. Input only. Simulate a maintenance event. |
sizeGb | integer (int32) | Output only. Redis memory size in GB for the entire cluster rounded up to the next integer. |
state | string | Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED |
stateInfo | object | Output only. Additional information about the current state of the cluster. (id: StateInfo) |
transitEncryptionMode | string | Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. |
uid | string | Output only. System assigned, unique identifier for the cluster. |
zoneDistributionConfig | object | Optional. This config will be used to determine how the customer wants us to distribute cluster resources within the region. (id: ZoneDistributionConfig) |
Successful response
Name | Datatype | Description |
---|---|---|
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} |
allowFewerZonesDeployment | boolean | Optional. 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. |
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. |
authorizationMode | string | Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. |
automatedBackupConfig | object | Optional. The automated backup config for the cluster. (id: AutomatedBackupConfig) |
backupCollection | string | Optional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection} |
clusterEndpoints | array | Optional. A list of cluster endpoints. |
createTime | string (google-datetime) | Output only. The timestamp associated with the cluster creation request. |
crossClusterReplicationConfig | object | Optional. Cross cluster replication config. (id: CrossClusterReplicationConfig) |
deletionProtectionEnabled | boolean | Optional. The delete operation will fail when the value is set to true. |
discoveryEndpoints | array | Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported. |
encryptionInfo | object | Output only. Encryption information of the data at rest of the cluster. (id: EncryptionInfo) |
gcsSource | object | Optional. 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) |
kmsKey | string | Optional. The KMS key used to encrypt the at-rest data of the cluster. |
maintenancePolicy | object | Optional. ClusterMaintenancePolicy determines when to allow or deny updates. (id: ClusterMaintenancePolicy) |
maintenanceSchedule | object | Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule. (id: ClusterMaintenanceSchedule) |
managedBackupSource | object | Optional. Backups generated and managed by memorystore service. (id: ManagedBackupSource) |
nodeType | string | Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node. |
ondemandMaintenance | boolean | Optional. Input only. Ondemand maintenance for the cluster. This field can be used to trigger ondemand critical update on the cluster. |
persistenceConfig | object | Optional. Persistence config (RDB, AOF) for the cluster. (id: ClusterPersistenceConfig) |
preciseSizeGb | number (double) | Output only. Precise value of redis memory size in GB for the entire cluster. |
pscConfigs | array | 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. |
pscConnections | array | Output only. The list of PSC connections that are auto-created through service connectivity automation. |
pscServiceAttachments | array | Output only. Service attachment details to configure Psc connections |
redisConfigs | object | Optional. Key/Value pairs of customer overrides for mutable Redis Configs |
replicaCount | integer (int32) | Optional. The number of replica nodes per shard. |
satisfiesPzi | boolean | Optional. Output only. Reserved for future use. |
satisfiesPzs | boolean | Optional. Output only. Reserved for future use. |
shardCount | integer (int32) | Optional. Number of shards for the Redis cluster. |
simulateMaintenanceEvent | boolean | Optional. Input only. Simulate a maintenance event. |
sizeGb | integer (int32) | Output only. Redis memory size in GB for the entire cluster rounded up to the next integer. |
state | string | Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED |
stateInfo | object | Output only. Additional information about the current state of the cluster. (id: StateInfo) |
transitEncryptionMode | string | Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. |
uid | string | Output only. System assigned, unique identifier for the cluster. |
zoneDistributionConfig | object | Optional. 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , clustersId | Gets the details of a specific Redis cluster. | |
list | select | projectsId , locationsId | pageSize , pageToken | Lists 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. |
create | insert | projectsId , locationsId | clusterId , requestId | 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. |
patch | update | projectsId , locationsId , clustersId | updateMask , requestId | 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. |
delete | delete | projectsId , locationsId , clustersId | requestId | Deletes a specific Redis cluster. Cluster stops serving and data is deleted. |
reschedule_cluster_maintenance | exec | projectsId , locationsId , clustersId | Reschedules upcoming maintenance event. | |
backup | exec | projectsId , locationsId , clustersId | Backup 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.
Name | Datatype | Description |
---|---|---|
clustersId | string | |
locationsId | string | |
projectsId | string | |
clusterId | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
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;
Lists 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.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: projectsId
value: string
description: Required parameter for the clusters resource.
- name: locationsId
value: string
description: Required parameter for the clusters resource.
- name: gcsSource
value: object
description: >
Optional. 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.
- name: managedBackupSource
value: object
description: >
Optional. Backups generated and managed by memorystore service.
- name: name
value: string
description: >
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}`
- name: replicaCount
value: integer
description: >
Optional. The number of replica nodes per shard.
- name: authorizationMode
value: string
description: >
Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
valid_values: ['AUTH_MODE_UNSPECIFIED', 'AUTH_MODE_IAM_AUTH', 'AUTH_MODE_DISABLED']
- name: transitEncryptionMode
value: string
description: >
Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
valid_values: ['TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', 'TRANSIT_ENCRYPTION_MODE_DISABLED', 'TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION']
- name: shardCount
value: integer
description: >
Optional. Number of shards for the Redis cluster.
- name: pscConfigs
value: array
description: >
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.
- name: nodeType
value: string
description: >
Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.
valid_values: ['NODE_TYPE_UNSPECIFIED', 'REDIS_SHARED_CORE_NANO', 'REDIS_HIGHMEM_MEDIUM', 'REDIS_HIGHMEM_XLARGE', 'REDIS_STANDARD_SMALL']
- name: persistenceConfig
value: object
description: >
Optional. Persistence config (RDB, AOF) for the cluster.
- name: redisConfigs
value: object
description: >
Optional. Key/Value pairs of customer overrides for mutable Redis Configs
- name: zoneDistributionConfig
value: object
description: >
Optional. This config will be used to determine how the customer wants us to distribute cluster resources within the region.
- name: crossClusterReplicationConfig
value: object
description: >
Optional. Cross cluster replication config.
- name: deletionProtectionEnabled
value: boolean
description: >
Optional. The delete operation will fail when the value is set to true.
- name: maintenancePolicy
value: object
description: >
Optional. ClusterMaintenancePolicy determines when to allow or deny updates.
- name: clusterEndpoints
value: array
description: >
Optional. A list of cluster endpoints.
- name: simulateMaintenanceEvent
value: boolean
description: >
Optional. Input only. Simulate a maintenance event.
- name: kmsKey
value: string
description: >
Optional. The KMS key used to encrypt the at-rest data of the cluster.
- name: ondemandMaintenance
value: boolean
description: >
Optional. Input only. Ondemand maintenance for the cluster. This field can be used to trigger ondemand critical update on the cluster.
- name: automatedBackupConfig
value: object
description: >
Optional. The automated backup config for the cluster.
- name: asyncClusterEndpointsDeletionEnabled
value: boolean
description: >
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.
- name: allowFewerZonesDeployment
value: boolean
description: >
Optional. 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.
- name: clusterId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
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
- delete
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
- reschedule_cluster_maintenance
- backup
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 }}"
}';
Backup 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.
EXEC google.redis.clusters.backup
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"ttl": "{{ ttl }}",
"backupId": "{{ backupId }}"
}';