Reference documentation and code samples for the Google Cloud Memorystore for Redis V1 API class Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.
REST client for the CloudRedisCluster service.
Configures and manages Cloud Memorystore for Redis clusters
Google Cloud Memorystore for Redis Cluster
The redis.googleapis.com service implements the Google Cloud Memorystore
for Redis API and defines the following resource model for managing Redis
clusters:
- The service works with a collection of cloud projects, named:
/projects/ - Each project has a collection of available locations, named:
/locations/ - Each location has a collection of Redis clusters, named:
/clusters/* - As such, Redis clusters are resources of the form:
/projects/{project_id}/locations/{location_id}/clusters/{instance_id}
Note that location_id must be a GCP region; for example:
projects/redpepper-1290/locations/us-central1/clusters/my-redis
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the CloudRedisCluster Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CloudRedisCluster clients ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.configure do |config| config.timeout = 10.0 end
#add_auth_token
def add_auth_token(request, options = nil) -> ::Gapic::Operation
def add_auth_token(token_auth_user: nil, auth_token: nil) -> ::Gapic::OperationAdds a auth token for a user of a token based auth enabled cluster.
def add_auth_token(request, options = nil) -> ::Gapic::Operationadd_auth_token via a request object, either of type
AddAuthTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::AddAuthTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def add_auth_token(token_auth_user: nil, auth_token: nil) -> ::Gapic::Operationadd_auth_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- token_auth_user (::String) — Required. The name of the token auth user resource that this auth token will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
- auth_token (::Google::Cloud::Redis::Cluster::V1::AuthToken, ::Hash) — Required. The auth token to add.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::AddAuthTokenRequest.new # Call the add_auth_token method. result = client.add_auth_token request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#add_token_auth_user
def add_token_auth_user(request, options = nil) -> ::Gapic::Operation
def add_token_auth_user(cluster: nil, token_auth_user: nil) -> ::Gapic::OperationAdds a token auth user for a token based auth enabled cluster.
def add_token_auth_user(request, options = nil) -> ::Gapic::Operationadd_token_auth_user via a request object, either of type
AddTokenAuthUserRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::AddTokenAuthUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def add_token_auth_user(cluster: nil, token_auth_user: nil) -> ::Gapic::Operationadd_token_auth_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- cluster (::String) — Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}
- token_auth_user (::String) — Required. The id of the token auth user to add.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::AddTokenAuthUserRequest.new # Call the add_token_auth_user method. result = client.add_token_auth_user request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#backup_cluster
def backup_cluster(request, options = nil) -> ::Gapic::Operation
def backup_cluster(name: nil, ttl: nil, backup_id: nil) -> ::Gapic::OperationBackup 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.
def backup_cluster(request, options = nil) -> ::Gapic::Operationbackup_cluster via a request object, either of type
BackupClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::BackupClusterRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def backup_cluster(name: nil, ttl: nil, backup_id: nil) -> ::Gapic::Operationbackup_cluster via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis cluster resource name using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}wherelocation_idrefers to a GCP region. - ttl (::Google::Protobuf::Duration, ::Hash) — Optional. TTL for the backup to expire. Value range is 1 day to 100 years. If not specified, the default value is 100 years.
- backup_id (::String) — Optional. The id of the backup to be created. If not specified, the default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::BackupClusterRequest.new # Call the backup_cluster method. result = client.backup_cluster request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the CloudRedisCluster Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_acl_policy
def create_acl_policy(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicy
def create_acl_policy(parent: nil, acl_policy_id: nil, acl_policy: nil, request_id: nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyCreates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.
def create_acl_policy(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicycreate_acl_policy via a request object, either of type
Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_acl_policy(parent: nil, acl_policy_id: nil, acl_policy: nil, request_id: nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicycreate_acl_policy via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the cluster location using the form:
projects/{project_id}/locations/{location_id}wherelocation_idrefers to a Google Cloud region. -
acl_policy_id (::String) —
Required. The logical name of the ACL policy in the customer project with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the customer project / location
- acl_policy (::Google::Cloud::Redis::Cluster::V1::AclPolicy, ::Hash) — Required. The ACL policy that is to be created.
- request_id (::String) — Optional. Idempotent request UUID. .
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::AclPolicy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest.new # Call the create_acl_policy method. result = client.create_acl_policy request # The returned object is of type Google::Cloud::Redis::Cluster::V1::AclPolicy. p result
#create_cluster
def create_cluster(request, options = nil) -> ::Gapic::Operation
def create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::OperationCreates 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.
def create_cluster(request, options = nil) -> ::Gapic::Operationcreate_cluster via a request object, either of type
Google::Cloud::Redis::Cluster::V1::CreateClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::CreateClusterRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::Operationcreate_cluster via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the cluster location using the form:
projects/{project_id}/locations/{location_id}wherelocation_idrefers to a GCP region. -
cluster_id (::String) —
Required. The logical name of the Redis cluster in the customer project with the following restrictions:
- Must contain only lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the customer project / location
- cluster (::Google::Cloud::Redis::Cluster::V1::Cluster, ::Hash) — Required. The cluster that is to be created.
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::CreateClusterRequest.new # Call the create_cluster method. result = client.create_cluster request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_acl_policy
def delete_acl_policy(request, options = nil) -> ::Gapic::Operation
def delete_acl_policy(name: nil, request_id: nil, etag: nil) -> ::Gapic::OperationDeletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.
def delete_acl_policy(request, options = nil) -> ::Gapic::Operationdelete_acl_policy via a request object, either of type
DeleteAclPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::DeleteAclPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_acl_policy(name: nil, request_id: nil, etag: nil) -> ::Gapic::Operationdelete_acl_policy via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis ACL policy resource name using the form:
projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}wherelocation_idrefers to a Google Cloud region. - request_id (::String) — Optional. Idempotent request UUID.
- etag (::String) — Optional. Etag of the ACL policy. If this is different from the server's etag, the request will fail with an ABORTED error.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::DeleteAclPolicyRequest.new # Call the delete_acl_policy method. result = client.delete_acl_policy request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_auth_token
def delete_auth_token(request, options = nil) -> ::Gapic::Operation
def delete_auth_token(name: nil) -> ::Gapic::OperationRemoves a auth token for a user of a token based auth enabled instance.
def delete_auth_token(request, options = nil) -> ::Gapic::Operationdelete_auth_token via a request object, either of type
DeleteAuthTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::DeleteAuthTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_auth_token(name: nil) -> ::Gapic::Operationdelete_auth_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the token auth user resource that this auth token will be deleted from. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::DeleteAuthTokenRequest.new # Call the delete_auth_token method. result = client.delete_auth_token request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_backup
def delete_backup(request, options = nil) -> ::Gapic::Operation
def delete_backup(name: nil, request_id: nil) -> ::Gapic::OperationDeletes a specific backup.
def delete_backup(request, options = nil) -> ::Gapic::Operationdelete_backup via a request object, either of type
DeleteBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_backup(name: nil, request_id: nil) -> ::Gapic::Operationdelete_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis backup resource name using the form:
projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id} - request_id (::String) — Optional. Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest.new # Call the delete_backup method. result = client.delete_backup request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_cluster
def delete_cluster(request, options = nil) -> ::Gapic::Operation
def delete_cluster(name: nil, request_id: nil) -> ::Gapic::OperationDeletes a specific Redis cluster. Cluster stops serving and data is deleted.
def delete_cluster(request, options = nil) -> ::Gapic::Operationdelete_cluster via a request object, either of type
DeleteClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_cluster(name: nil, request_id: nil) -> ::Gapic::Operationdelete_cluster via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis cluster resource name using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}wherelocation_idrefers to a GCP region. - request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest.new # Call the delete_cluster method. result = client.delete_cluster request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_token_auth_user
def delete_token_auth_user(request, options = nil) -> ::Gapic::Operation
def delete_token_auth_user(name: nil, request_id: nil, force: nil) -> ::Gapic::OperationDeletes a token auth user for a token based auth enabled cluster.
def delete_token_auth_user(request, options = nil) -> ::Gapic::Operationdelete_token_auth_user via a request object, either of type
DeleteTokenAuthUserRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::DeleteTokenAuthUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_token_auth_user(name: nil, request_id: nil, force: nil) -> ::Gapic::Operationdelete_token_auth_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the token auth user to delete. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- force (::Boolean) — Optional. If set to true, any child auth tokens of this user will also be deleted. Otherwise, the request will only work if the user has no auth tokens.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::DeleteTokenAuthUserRequest.new # Call the delete_token_auth_user method. result = client.delete_token_auth_user request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#export_backup
def export_backup(request, options = nil) -> ::Gapic::Operation
def export_backup(gcs_bucket: nil, name: nil) -> ::Gapic::OperationExports a specific backup to a customer target Cloud Storage URI.
def export_backup(request, options = nil) -> ::Gapic::Operationexport_backup via a request object, either of type
ExportBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ExportBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def export_backup(gcs_bucket: nil, name: nil) -> ::Gapic::Operationexport_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- gcs_bucket (::String) — Google Cloud Storage bucket, like "my-bucket".
-
name (::String) — Required. Redis backup resource name using the form:
projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ExportBackupRequest.new # Call the export_backup method. result = client.export_backup request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_acl_policy
def get_acl_policy(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicy
def get_acl_policy(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyGets the details of a specific Redis Cluster ACL policy.
def get_acl_policy(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyget_acl_policy via a request object, either of type
GetAclPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_acl_policy(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyget_acl_policy via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis ACL policy resource name using the form:
projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}wherelocation_idrefers to a Google Cloud region.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::AclPolicy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetAclPolicyRequest.new # Call the get_acl_policy method. result = client.get_acl_policy request # The returned object is of type Google::Cloud::Redis::Cluster::V1::AclPolicy. p result
#get_acl_policy_revision
def get_acl_policy_revision(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision
def get_acl_policy_revision(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyRevisionGets details of a specific ACL policy revision.
def get_acl_policy_revision(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyRevisionget_acl_policy_revision via a request object, either of type
GetAclPolicyRevisionRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRevisionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_acl_policy_revision(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::AclPolicyRevisionget_acl_policy_revision via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis ACL policy revision resource name using the form:
projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}/revisions/{revision_id}wherelocation_idrefers to a Google Cloud region.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetAclPolicyRevisionRequest.new # Call the get_acl_policy_revision method. result = client.get_acl_policy_revision request # The returned object is of type Google::Cloud::Redis::Cluster::V1::AclPolicyRevision. p result
#get_auth_token
def get_auth_token(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AuthToken
def get_auth_token(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::AuthTokenGets a specific auth token for a specific token auth user.
def get_auth_token(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::AuthTokenget_auth_token via a request object, either of type
GetAuthTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetAuthTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_auth_token(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::AuthTokenget_auth_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of auth token for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::AuthToken)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetAuthTokenRequest.new # Call the get_auth_token method. result = client.get_auth_token request # The returned object is of type Google::Cloud::Redis::Cluster::V1::AuthToken. p result
#get_backup
def get_backup(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::Backup
def get_backup(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::BackupGets the details of a specific backup.
def get_backup(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::Backupget_backup via a request object, either of type
GetBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_backup(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::Backupget_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis backup resource name using the form:
projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::Backup)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetBackupRequest.new # Call the get_backup method. result = client.get_backup request # The returned object is of type Google::Cloud::Redis::Cluster::V1::Backup. p result
#get_backup_collection
def get_backup_collection(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::BackupCollection
def get_backup_collection(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::BackupCollectionGet a backup collection.
def get_backup_collection(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::BackupCollectionget_backup_collection via a request object, either of type
GetBackupCollectionRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_backup_collection(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::BackupCollectionget_backup_collection via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis backupCollection resource name using the form:
projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}wherelocation_idrefers to a GCP region.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::BackupCollection)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest.new # Call the get_backup_collection method. result = client.get_backup_collection request # The returned object is of type Google::Cloud::Redis::Cluster::V1::BackupCollection. p result
#get_cluster
def get_cluster(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::Cluster
def get_cluster(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::ClusterGets the details of a specific Redis cluster.
def get_cluster(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::Clusterget_cluster via a request object, either of type
GetClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetClusterRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_cluster(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::Clusterget_cluster via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis cluster resource name using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}wherelocation_idrefers to a GCP region.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::Cluster)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetClusterRequest.new # Call the get_cluster method. result = client.get_cluster request # The returned object is of type Google::Cloud::Redis::Cluster::V1::Cluster. p result
#get_cluster_certificate_authority
def get_cluster_certificate_authority(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::CertificateAuthority
def get_cluster_certificate_authority(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::CertificateAuthorityGets the details of certificate authority information for Redis cluster.
def get_cluster_certificate_authority(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::CertificateAuthorityget_cluster_certificate_authority via a request object, either of type
GetClusterCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetClusterCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_cluster_certificate_authority(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::CertificateAuthorityget_cluster_certificate_authority via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis cluster certificate authority resource name using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthoritywherelocation_idrefers to a GCP region.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::CertificateAuthority)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetClusterCertificateAuthorityRequest.new # Call the get_cluster_certificate_authority method. result = client.get_cluster_certificate_authority request # The returned object is of type Google::Cloud::Redis::Cluster::V1::CertificateAuthority. p result
#get_shared_regional_certificate_authority
def get_shared_regional_certificate_authority(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthority
def get_shared_regional_certificate_authority(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthorityGets the details of regional certificate authority information for Redis cluster.
def get_shared_regional_certificate_authority(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthorityget_shared_regional_certificate_authority via a request object, either of type
GetSharedRegionalCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetSharedRegionalCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_shared_regional_certificate_authority(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthorityget_shared_regional_certificate_authority via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Regional certificate authority resource name using the form:
projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthoritywherelocation_idrefers to a Google Cloud region.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthority)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetSharedRegionalCertificateAuthorityRequest.new # Call the get_shared_regional_certificate_authority method. result = client.get_shared_regional_certificate_authority request # The returned object is of type Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthority. p result
#get_token_auth_user
def get_token_auth_user(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::TokenAuthUser
def get_token_auth_user(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::TokenAuthUserGets a specific token auth user for a basic auth enabled cluster.
def get_token_auth_user(request, options = nil) -> ::Google::Cloud::Redis::Cluster::V1::TokenAuthUserget_token_auth_user via a request object, either of type
GetTokenAuthUserRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::GetTokenAuthUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_token_auth_user(name: nil) -> ::Google::Cloud::Redis::Cluster::V1::TokenAuthUserget_token_auth_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of token auth user for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Redis::Cluster::V1::TokenAuthUser)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::GetTokenAuthUserRequest.new # Call the get_token_auth_user method. result = client.get_token_auth_user request # The returned object is of type Google::Cloud::Redis::Cluster::V1::TokenAuthUser. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new CloudRedisCluster REST client object.
- (config) — Configure the CloudRedisCluster client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new do |config| config.timeout = 10.0 end
#list_acl_policies
def list_acl_policies(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>
def list_acl_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>Lists all ACL policies 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.
def list_acl_policies(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>list_acl_policies via a request object, either of type
ListAclPoliciesRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListAclPoliciesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_acl_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>list_acl_policies via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the ACL policy location using the form:
projects/{project_id}/locations/{location_id}wherelocation_idrefers to a Google Cloud region. -
page_size (::Integer) — Optional. The maximum number of items to return.
If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's
next_page_tokento determine if there are more ACL policies left to be queried.The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. The
next_page_tokenvalue returned from a previousListAclPoliciesrequest, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListAclPoliciesRequest.new # Call the list_acl_policies method. result = client.list_acl_policies request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::AclPolicy. p item end
#list_acl_policy_revisions
def list_acl_policy_revisions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>
def list_acl_policy_revisions(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>Lists all ACL policy revisions in a given ACL policy.
def list_acl_policy_revisions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>list_acl_policy_revisions via a request object, either of type
ListAclPolicyRevisionsRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListAclPolicyRevisionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_acl_policy_revisions(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>list_acl_policy_revisions via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of the ACL policy to list revisions for. Format: "projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}"
- page_size (::Integer) — Optional. The maximum number of items to return.
-
page_token (::String) — Optional. The
next_page_tokenvalue returned from a previousListAclPolicyRevisionsrequest, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListAclPolicyRevisionsRequest.new # Call the list_acl_policy_revisions method. result = client.list_acl_policy_revisions request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision. p item end
#list_auth_tokens
def list_auth_tokens(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>
def list_auth_tokens(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>Lists all the auth tokens for a specific token auth user.
def list_auth_tokens(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>list_auth_tokens via a request object, either of type
ListAuthTokensRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListAuthTokensRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_auth_tokens(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>list_auth_tokens via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The parent resource that this auth token will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
-
page_size (::Integer) — Optional. The maximum number of items to return. The maximum value is 1000;
values above 1000 will be coerced to 1000. If not specified, a default
value of 1000 will be used by the service. Regardless of the page_size
value, the response may include a partial list and a caller should only
rely on response's
next_page_tokento determine if there are more clusters left to be queried. -
page_token (::String) — Optional. The
next_page_tokenvalue returned from a previous [ListTokenAuthUsers] request, if any. - filter (::String) — Optional. Expression for filtering results.
- order_by (::String) — Optional. Sort results by a defined order.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListAuthTokensRequest.new # Call the list_auth_tokens method. result = client.list_auth_tokens request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::AuthToken. p item end
#list_backup_collections
def list_backup_collections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>
def list_backup_collections(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.
If location_id is specified as - (wildcard), then all regions
available to the project are queried, and the results are aggregated.
def list_backup_collections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>list_backup_collections via a request object, either of type
ListBackupCollectionsRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_backup_collections(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>list_backup_collections via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the backupCollection location using the
form:
projects/{project_id}/locations/{location_id}wherelocation_idrefers to a GCP region. -
page_size (::Integer) — Optional. The maximum number of items to return.
If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's
next_page_tokento determine if there are more clusters left to be queried. -
page_token (::String) — Optional. The
next_page_tokenvalue returned from a previous [ListBackupCollections] request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest.new # Call the list_backup_collections method. result = client.list_backup_collections request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::BackupCollection. p item end
#list_backups
def list_backups(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>
def list_backups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>Lists all backups owned by a backup collection.
def list_backups(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>list_backups via a request object, either of type
ListBackupsRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListBackupsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_backups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>list_backups via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the backupCollection using the form:
projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} -
page_size (::Integer) — Optional. The maximum number of items to return.
If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's
next_page_tokento determine if there are more clusters left to be queried. -
page_token (::String) — Optional. The
next_page_tokenvalue returned from a previous [ListBackupCollections] request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListBackupsRequest.new # Call the list_backups method. result = client.list_backups request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::Backup. p item end
#list_clusters
def list_clusters(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Cluster>
def list_clusters(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Cluster>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.
def list_clusters(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Cluster>list_clusters via a request object, either of type
ListClustersRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListClustersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_clusters(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Cluster>list_clusters via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the cluster location using the form:
projects/{project_id}/locations/{location_id}wherelocation_idrefers to a GCP region. -
page_size (::Integer) — The maximum number of items to return.
If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's
next_page_tokento determine if there are more clusters left to be queried. -
page_token (::String) — The
next_page_tokenvalue returned from a previous [ListClusters][CloudRedis.ListClusters] request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Cluster>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Cluster>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListClustersRequest.new # Call the list_clusters method. result = client.list_clusters request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::Cluster. p item end
#list_token_auth_users
def list_token_auth_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>
def list_token_auth_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>Lists all the token auth users for a token based auth enabled cluster.
def list_token_auth_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>list_token_auth_users via a request object, either of type
ListTokenAuthUsersRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_token_auth_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>list_token_auth_users via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The parent resource that this token based auth user will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}
-
page_size (::Integer) — Optional. The maximum number of items to return.
If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's The maximum value is 1000; values above 1000 will be coerced to 1000.
next_page_tokento determine if there are more clusters left to be queried. -
page_token (::String) — Optional. The
next_page_tokenvalue returned from a previous [ListTokenAuthUsers] request, if any. - filter (::String) — Optional. Expression for filtering results.
- order_by (::String) — Optional. Sort results by a defined order.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersRequest.new # Call the list_token_auth_users method. result = client.list_token_auth_users request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Redis::Cluster::V1::TokenAuthUser. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::OperationsGet the associated client for long-running operations.
#reschedule_cluster_maintenance
def reschedule_cluster_maintenance(request, options = nil) -> ::Gapic::Operation
def reschedule_cluster_maintenance(name: nil, reschedule_type: nil, schedule_time: nil) -> ::Gapic::OperationReschedules upcoming maintenance event.
def reschedule_cluster_maintenance(request, options = nil) -> ::Gapic::Operationreschedule_cluster_maintenance via a request object, either of type
RescheduleClusterMaintenanceRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def reschedule_cluster_maintenance(name: nil, reschedule_type: nil, schedule_time: nil) -> ::Gapic::Operationreschedule_cluster_maintenance via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Redis Cluster instance resource name using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}wherelocation_idrefers to a GCP region. - reschedule_type (::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest::RescheduleType) — Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
-
schedule_time (::Google::Protobuf::Timestamp, ::Hash) — Optional. Timestamp when the maintenance shall be rescheduled to if
reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
example
2012-11-15T16:19:00.094Z.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest.new # Call the reschedule_cluster_maintenance method. result = client.reschedule_cluster_maintenance request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_acl_policy
def update_acl_policy(request, options = nil) -> ::Gapic::Operation
def update_acl_policy(acl_policy: nil, update_mask: nil, request_id: nil) -> ::Gapic::OperationUpdates the ACL policy.
The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.
Completed longrunning.Operation will contain the new ACL policy object in the response field.
def update_acl_policy(request, options = nil) -> ::Gapic::Operationupdate_acl_policy via a request object, either of type
UpdateAclPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::UpdateAclPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_acl_policy(acl_policy: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operationupdate_acl_policy via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- acl_policy (::Google::Cloud::Redis::Cluster::V1::AclPolicy, ::Hash) — Required. The ACL policy to be updated.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
Optional. Mask of fields to be updated. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from
AclPolicy:-
rules
-
- request_id (::String) — Optional. Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::UpdateAclPolicyRequest.new # Call the update_acl_policy method. result = client.update_acl_policy request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#update_cluster
def update_cluster(request, options = nil) -> ::Gapic::Operation
def update_cluster(update_mask: nil, cluster: nil, request_id: nil) -> ::Gapic::OperationUpdates 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.
def update_cluster(request, options = nil) -> ::Gapic::Operationupdate_cluster via a request object, either of type
UpdateClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Redis::Cluster::V1::UpdateClusterRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_cluster(update_mask: nil, cluster: nil, request_id: nil) -> ::Gapic::Operationupdate_cluster via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster:
-
size_gb -
replica_count
-
- cluster (::Google::Cloud::Redis::Cluster::V1::Cluster, ::Hash) — Required. Update description. Only fields specified in update_mask are updated.
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/redis/cluster/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Redis::Cluster::V1::UpdateClusterRequest.new # Call the update_cluster method. result = client.update_cluster request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end