class Google::Apis::RedisV1beta1::CloudRedisService

Google Cloud Memorystore for Redis API

Creates and manages Redis instances on the Google Cloud Platform.

@example

require 'google/apis/redis_v1beta1'

Redis = Google::Apis::RedisV1beta1 # Alias the module
service = Redis::CloudRedisService.new

@see cloud.google.com/memorystore/docs/redis/

Attributes

key[RW]

@return [String]

API key. Your API key identifies your project and provides you with API access,
quota, and reports. Required unless you provide an OAuth 2.0 token.
quota_user[RW]

@return [String]

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/google/apis/redis_v1beta1/service.rb, line 45
def initialize
  super('https://redis.googleapis.com/', '',
        client_name: 'google-apis-redis_v1beta1',
        client_version: Google::Apis::RedisV1beta1::GEM_VERSION)
  @batch_path = 'batch'
end

Public Instance Methods

cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. @param [String] name

The name of the operation resource to be cancelled.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Empty] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Empty]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 576
def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+name}:cancel', options)
  command.response_representation = Google::Apis::RedisV1beta1::Empty::Representation
  command.response_class = Google::Apis::RedisV1beta1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
create_project_location_instance(parent, instance_object = nil, instance_id: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's [default network](https: //cloud.google.com/vpc/docs/vpc). The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. @param [String] parent

Required. The resource name of the instance location using the form: `projects/
`project_id`/locations/`location_id`` where `location_id` refers to a GCP
region.

@param [Google::Apis::RedisV1beta1::Instance] instance_object @param [String] instance_id

Required. The logical name of the Redis instance 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-40 characters. *
Must end with a number or a letter. * Must be unique within the customer
project / location

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 161
def create_project_location_instance(parent, instance_object = nil, instance_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+parent}/instances', options)
  command.request_representation = Google::Apis::RedisV1beta1::Instance::Representation
  command.request_object = instance_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['instanceId'] = instance_id unless instance_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Deletes a specific Redis instance. Instance stops serving and data is deleted. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 196
def delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code. UNIMPLEMENTED`. @param [String] name

The name of the operation resource to be deleted.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Empty] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Empty]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 609
def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::RedisV1beta1::Empty::Representation
  command.response_class = Google::Apis::RedisV1beta1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
export_instance(name, export_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Export Redis instance data into a Redis RDB format file in Cloud Storage. Redis will continue serving during this operation. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [Google::Apis::RedisV1beta1::ExportInstanceRequest] export_instance_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 232
def export_instance(name, export_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+name}:export', options)
  command.request_representation = Google::Apis::RedisV1beta1::ExportInstanceRequest::Representation
  command.request_object = export_instance_request_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
failover_instance(name, failover_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [Google::Apis::RedisV1beta1::FailoverInstanceRequest] failover_instance_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 268
def failover_instance(name, failover_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+name}:failover', options)
  command.request_representation = Google::Apis::RedisV1beta1::FailoverInstanceRequest::Representation
  command.request_object = failover_instance_request_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets information about a location. @param [String] name

Resource name for the location.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Location] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Location]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 72
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::RedisV1beta1::Location::Representation
  command.response_class = Google::Apis::RedisV1beta1::Location
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets the details of a specific Redis instance. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Instance] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Instance]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 302
def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::RedisV1beta1::Instance::Representation
  command.response_class = Google::Apis::RedisV1beta1::Instance
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_location_instance_auth_string(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::InstanceAuthString] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::InstanceAuthString]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 336
def get_project_location_instance_auth_string(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}/authString', options)
  command.response_representation = Google::Apis::RedisV1beta1::InstanceAuthString::Representation
  command.response_class = Google::Apis::RedisV1beta1::InstanceAuthString
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. @param [String] name

The name of the operation resource.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 640
def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
import_instance(name, import_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [Google::Apis::RedisV1beta1::ImportInstanceRequest] import_instance_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 373
def import_instance(name, import_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+name}:import', options)
  command.request_representation = Google::Apis::RedisV1beta1::ImportInstanceRequest::Representation
  command.request_object = import_instance_request_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_location_instances(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Lists all Redis instances 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. @param [String] parent

Required. The resource name of the instance location using the form: `projects/
`project_id`/locations/`location_id`` where `location_id` refers to a GCP
region.

@param [Fixnum] page_size

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_token` to determine if there are more instances left to be
queried.

@param [String] page_token

The `next_page_token` value returned from a previous ListInstances request, if
any.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::ListInstancesResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::ListInstancesResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 420
def list_project_location_instances(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+parent}/instances', options)
  command.response_representation = Google::Apis::RedisV1beta1::ListInstancesResponse::Representation
  command.response_class = Google::Apis::RedisV1beta1::ListInstancesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `“/v1/`name=users/*`/operations”` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. @param [String] name

The name of the operation's parent resource.

@param [String] filter

The standard list filter.

@param [Fixnum] page_size

The standard list page size.

@param [String] page_token

The standard list page token.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::ListOperationsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::ListOperationsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 683
def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}/operations', options)
  command.response_representation = Google::Apis::RedisV1beta1::ListOperationsResponse::Representation
  command.response_class = Google::Apis::RedisV1beta1::ListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Lists information about the supported locations for this service. @param [String] name

The resource that owns the locations collection, if applicable.

@param [String] filter

A filter to narrow down results to a preferred subset. The filtering language
accepts strings like "displayName=tokyo", and is documented in more detail in [
AIP-160](https://google.aip.dev/160).

@param [Fixnum] page_size

The maximum number of results to return. If not set, the service selects a
default.

@param [String] page_token

A page token received from the `next_page_token` field in the response. Send
that page token to receive the subsequent page.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::ListLocationsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::ListLocationsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 112
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
  command.response_representation = Google::Apis::RedisV1beta1::ListLocationsResponse::Representation
  command.response_class = Google::Apis::RedisV1beta1::ListLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
patch_project_location_instance(name, instance_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Updates the metadata and configuration of a specific Redis instance. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. @param [String] name

Required. Unique name of the resource in this scope including project and
location using the form: `projects/`project_id`/locations/`location_id`/
instances/`instance_id`` Note: Redis instances are managed and addressed at
regional level so location_id here refers to a GCP region; however, users may
choose which specific zone (or collection of zones for cross-zone instances)
an instance should be provisioned in. Refer to location_id and
alternative_location_id fields for more details.

@param [Google::Apis::RedisV1beta1::Instance] instance_object @param [String] update_mask

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 Instance: * `displayName` * `labels` * `memorySizeGb` * `redisConfig`

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 466
def patch_project_location_instance(name, instance_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta1/{+name}', options)
  command.request_representation = Google::Apis::RedisV1beta1::Instance::Representation
  command.request_object = instance_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
reschedule_instance_maintenance(name, reschedule_maintenance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Reschedule maintenance for a given instance in a given project and location. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [Google::Apis::RedisV1beta1::RescheduleMaintenanceRequest] reschedule_maintenance_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 502
def reschedule_instance_maintenance(name, reschedule_maintenance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+name}:rescheduleMaintenance', options)
  command.request_representation = Google::Apis::RedisV1beta1::RescheduleMaintenanceRequest::Representation
  command.request_object = reschedule_maintenance_request_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
upgrade_instance(name, upgrade_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Upgrades Redis instance to the newer Redis version specified in the request. @param [String] name

Required. Redis instance resource name using the form: `projects/`project_id`/
locations/`location_id`/instances/`instance_id`` where `location_id` refers to
a GCP region.

@param [Google::Apis::RedisV1beta1::UpgradeInstanceRequest] upgrade_instance_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::RedisV1beta1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::RedisV1beta1::Operation]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/redis_v1beta1/service.rb, line 537
def upgrade_instance(name, upgrade_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+name}:upgrade', options)
  command.request_representation = Google::Apis::RedisV1beta1::UpgradeInstanceRequest::Representation
  command.request_object = upgrade_instance_request_object
  command.response_representation = Google::Apis::RedisV1beta1::Operation::Representation
  command.response_class = Google::Apis::RedisV1beta1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

Protected Instance Methods

apply_command_defaults(command) click to toggle source
# File lib/google/apis/redis_v1beta1/service.rb, line 698
def apply_command_defaults(command)
  command.query['key'] = key unless key.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
end