clusters
Creates, updates, deletes, gets or lists a clusters
resource.
Overview
Name | clusters |
Type | Resource |
Id | google.redis.clusters |
Fields
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} |
authorizationMode | string | Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. |
createTime | string | Output only. The timestamp associated with the cluster creation request. |
crossClusterReplicationConfig | object | Cross cluster replication config. |
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. |
maintenancePolicy | object | Maintenance policy per cluster. |
maintenanceSchedule | object | Upcoming maitenance schedule. |
nodeType | string | Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node. |
persistenceConfig | object | Configuration of the persistence functionality. |
preciseSizeGb | number | Output only. Precise value of redis memory size in GB for the entire cluster. |
pscConfigs | array | Required. 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. PSC connections for discovery of the cluster topology and accessing the cluster. |
redisConfigs | object | Optional. Key/Value pairs of customer overrides for mutable Redis Configs |
replicaCount | integer | Optional. The number of replica nodes per shard. |
shardCount | integer | Optional. Number of shards for the Redis cluster. |
sizeGb | integer | 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 | Represents additional information about the state of the cluster. |
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 | Zone distribution config for allocation of cluster resources. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clustersId, locationsId, projectsId | Gets the details of a specific Redis cluster. |
list | SELECT | locationsId, projectsId | 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 | locationsId, projectsId | 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. |
delete | DELETE | clustersId, locationsId, projectsId | Deletes a specific Redis cluster. Cluster stops serving and data is deleted. |
patch | UPDATE | clustersId, locationsId, projectsId | 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. |
reschedule_cluster_maintenance | EXEC | clustersId, locationsId, projectsId | Reschedules upcoming maintenance event. |
SELECT
examples
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,
authorizationMode,
createTime,
crossClusterReplicationConfig,
deletionProtectionEnabled,
discoveryEndpoints,
maintenancePolicy,
maintenanceSchedule,
nodeType,
persistenceConfig,
preciseSizeGb,
pscConfigs,
pscConnections,
redisConfigs,
replicaCount,
shardCount,
sizeGb,
state,
stateInfo,
transitEncryptionMode,
uid,
zoneDistributionConfig
FROM google.redis.clusters
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new clusters
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.redis.clusters (
locationsId,
projectsId,
name,
replicaCount,
authorizationMode,
transitEncryptionMode,
shardCount,
pscConfigs,
nodeType,
persistenceConfig,
redisConfigs,
zoneDistributionConfig,
crossClusterReplicationConfig,
deletionProtectionEnabled,
maintenancePolicy
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ replicaCount }}',
'{{ authorizationMode }}',
'{{ transitEncryptionMode }}',
'{{ shardCount }}',
'{{ pscConfigs }}',
'{{ nodeType }}',
'{{ persistenceConfig }}',
'{{ redisConfigs }}',
'{{ zoneDistributionConfig }}',
'{{ crossClusterReplicationConfig }}',
{{ deletionProtectionEnabled }},
'{{ maintenancePolicy }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: state
value: string
- name: uid
value: string
- name: replicaCount
value: integer
- name: authorizationMode
value: string
- name: transitEncryptionMode
value: string
- name: sizeGb
value: integer
- name: shardCount
value: integer
- name: pscConfigs
value:
- - name: network
value: string
- name: discoveryEndpoints
value:
- - name: address
value: string
- name: port
value: integer
- name: pscConfig
value:
- name: network
value: string
- name: pscConnections
value:
- - name: pscConnectionId
value: string
- name: address
value: string
- name: forwardingRule
value: string
- name: projectId
value: string
- name: network
value: string
- name: stateInfo
value:
- name: updateInfo
value:
- name: targetShardCount
value: integer
- name: targetReplicaCount
value: integer
- name: nodeType
value: string
- name: persistenceConfig
value:
- name: mode
value: string
- name: rdbConfig
value:
- name: rdbSnapshotPeriod
value: string
- name: rdbSnapshotStartTime
value: string
- name: aofConfig
value:
- name: appendFsync
value: string
- name: redisConfigs
value: object
- name: preciseSizeGb
value: number
- name: zoneDistributionConfig
value:
- name: mode
value: string
- name: zone
value: string
- name: crossClusterReplicationConfig
value:
- name: clusterRole
value: string
- name: primaryCluster
value:
- name: cluster
value: string
- name: uid
value: string
- name: secondaryClusters
value:
- - name: cluster
value: string
- name: uid
value: string
- name: updateTime
value: string
- name: membership
value:
- name: secondaryClusters
value:
- - name: cluster
value: string
- name: uid
value: string
- name: deletionProtectionEnabled
value: boolean
- name: maintenancePolicy
value:
- name: createTime
value: string
- name: updateTime
value: string
- name: weeklyMaintenanceWindow
value:
- - name: day
value: string
- name: startTime
value:
- name: hours
value: integer
- name: minutes
value: integer
- name: seconds
value: integer
- name: nanos
value: integer
- name: duration
value: string
- name: maintenanceSchedule
value:
- name: startTime
value: string
- name: endTime
value: string
- name: scheduleDeadlineTime
value: string
UPDATE
example
Updates a clusters
resource.
/*+ update */
UPDATE google.redis.clusters
SET
name = '{{ name }}',
replicaCount = '{{ replicaCount }}',
authorizationMode = '{{ authorizationMode }}',
transitEncryptionMode = '{{ transitEncryptionMode }}',
shardCount = '{{ shardCount }}',
pscConfigs = '{{ pscConfigs }}',
nodeType = '{{ nodeType }}',
persistenceConfig = '{{ persistenceConfig }}',
redisConfigs = '{{ redisConfigs }}',
zoneDistributionConfig = '{{ zoneDistributionConfig }}',
crossClusterReplicationConfig = '{{ crossClusterReplicationConfig }}',
deletionProtectionEnabled = true|false,
maintenancePolicy = '{{ maintenancePolicy }}'
WHERE
clustersId = '{{ clustersId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified clusters
resource.
/*+ delete */
DELETE FROM google.redis.clusters
WHERE clustersId = '{{ clustersId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';