Class: Google::Apis::RedisV1::Instance

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/redis_v1/classes.rb,
lib/google/apis/redis_v1/representations.rb,
lib/google/apis/redis_v1/representations.rb

Overview

A Memorystore for Redis instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Instance

Returns a new instance of Instance.



465
466
467
# File 'lib/google/apis/redis_v1/classes.rb', line 465

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#alternative_location_idString

Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [ location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service. Corresponds to the JSON property alternativeLocationId

Returns:

  • (String)


262
263
264
# File 'lib/google/apis/redis_v1/classes.rb', line 262

def alternative_location_id
  @alternative_location_id
end

#auth_enabledBoolean Also known as: auth_enabled?

Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. Corresponds to the JSON property authEnabled

Returns:

  • (Boolean)


269
270
271
# File 'lib/google/apis/redis_v1/classes.rb', line 269

def auth_enabled
  @auth_enabled
end

#authorized_networkString

Optional. The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. Corresponds to the JSON property authorizedNetwork

Returns:

  • (String)


277
278
279
# File 'lib/google/apis/redis_v1/classes.rb', line 277

def authorized_network
  @authorized_network
end

#connect_modeString

Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING. Corresponds to the JSON property connectMode

Returns:

  • (String)


283
284
285
# File 'lib/google/apis/redis_v1/classes.rb', line 283

def connect_mode
  @connect_mode
end

#create_timeString

Output only. The time the instance was created. Corresponds to the JSON property createTime

Returns:

  • (String)


288
289
290
# File 'lib/google/apis/redis_v1/classes.rb', line 288

def create_time
  @create_time
end

#current_location_idString

Output only. The current zone where the Redis primary node is located. In basic tier, this will always be the same as [location_id]. In standard tier, this can be the zone of any node in the instance. Corresponds to the JSON property currentLocationId

Returns:

  • (String)


295
296
297
# File 'lib/google/apis/redis_v1/classes.rb', line 295

def current_location_id
  @current_location_id
end

#display_nameString

An arbitrary and optional user-provided name for the instance. Corresponds to the JSON property displayName

Returns:

  • (String)


300
301
302
# File 'lib/google/apis/redis_v1/classes.rb', line 300

def display_name
  @display_name
end

#hostString

Output only. Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service. Corresponds to the JSON property host

Returns:

  • (String)


306
307
308
# File 'lib/google/apis/redis_v1/classes.rb', line 306

def host
  @host
end

#labelsHash<String,String>

Resource labels to represent user provided metadata Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


311
312
313
# File 'lib/google/apis/redis_v1/classes.rb', line 311

def labels
  @labels
end

#location_idString

Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone. Corresponds to the JSON property locationId

Returns:

  • (String)


320
321
322
# File 'lib/google/apis/redis_v1/classes.rb', line 320

def location_id
  @location_id
end

#maintenance_policyGoogle::Apis::RedisV1::MaintenancePolicy

Maintenance policy for an instance. Corresponds to the JSON property maintenancePolicy



325
326
327
# File 'lib/google/apis/redis_v1/classes.rb', line 325

def maintenance_policy
  @maintenance_policy
end

#maintenance_scheduleGoogle::Apis::RedisV1::MaintenanceSchedule

Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated. Corresponds to the JSON property maintenanceSchedule



331
332
333
# File 'lib/google/apis/redis_v1/classes.rb', line 331

def maintenance_schedule
  @maintenance_schedule
end

#memory_size_gbFixnum

Required. Redis memory size in GiB. Corresponds to the JSON property memorySizeGb

Returns:

  • (Fixnum)


336
337
338
# File 'lib/google/apis/redis_v1/classes.rb', line 336

def memory_size_gb
  @memory_size_gb
end

#nameString

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. Corresponds to the JSON propertyname`

Returns:

  • (String)


347
348
349
# File 'lib/google/apis/redis_v1/classes.rb', line 347

def name
  @name
end

#nodesArray<Google::Apis::RedisV1::NodeInfo>

Output only. Info per node. Corresponds to the JSON property nodes



352
353
354
# File 'lib/google/apis/redis_v1/classes.rb', line 352

def nodes
  @nodes
end

#persistence_configGoogle::Apis::RedisV1::PersistenceConfig

Configuration of the persistence functionality. Corresponds to the JSON property persistenceConfig



357
358
359
# File 'lib/google/apis/redis_v1/classes.rb', line 357

def persistence_config
  @persistence_config
end

#persistence_iam_identityString

Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is "serviceAccount:". The value may change over time for a given instance so should be checked before each import/export operation. Corresponds to the JSON property persistenceIamIdentity

Returns:

  • (String)


365
366
367
# File 'lib/google/apis/redis_v1/classes.rb', line 365

def persistence_iam_identity
  @persistence_iam_identity
end

#portFixnum

Output only. The port number of the exposed Redis endpoint. Corresponds to the JSON property port

Returns:

  • (Fixnum)


370
371
372
# File 'lib/google/apis/redis_v1/classes.rb', line 370

def port
  @port
end

#read_endpointString

Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes will exhibit some lag behind the primary. Write requests must target 'host'. Corresponds to the JSON property readEndpoint

Returns:

  • (String)


378
379
380
# File 'lib/google/apis/redis_v1/classes.rb', line 378

def read_endpoint
  @read_endpoint
end

#read_endpoint_portFixnum

Output only. The port number of the exposed readonly redis endpoint. Standard tier only. Write requests should target 'port'. Corresponds to the JSON property readEndpointPort

Returns:

  • (Fixnum)


384
385
386
# File 'lib/google/apis/redis_v1/classes.rb', line 384

def read_endpoint_port
  @read_endpoint_port
end

#read_replicas_modeString

Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED. Corresponds to the JSON property readReplicasMode

Returns:

  • (String)


390
391
392
# File 'lib/google/apis/redis_v1/classes.rb', line 390

def read_replicas_mode
  @read_replicas_mode
end

#redis_configsHash<String,String>

Optional. Redis configuration parameters, according to http://redis.io/topics/ config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer:

  • activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries Corresponds to the JSON property redisConfigs

Returns:

  • (Hash<String,String>)


399
400
401
# File 'lib/google/apis/redis_v1/classes.rb', line 399

def redis_configs
  @redis_configs
end

#redis_versionString

Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * REDIS_3_2 for Redis 3.2 compatibility * REDIS_4_0 for Redis 4.0 compatibility (default) * REDIS_5_0 for Redis 5.0 compatibility * REDIS_6_X for Redis 6.x compatibility Corresponds to the JSON property redisVersion

Returns:

  • (String)


408
409
410
# File 'lib/google/apis/redis_v1/classes.rb', line 408

def redis_version
  @redis_version
end

#replica_countFixnum

Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0. Corresponds to the JSON property replicaCount

Returns:

  • (Fixnum)


416
417
418
# File 'lib/google/apis/redis_v1/classes.rb', line 416

def replica_count
  @replica_count
end

#reserved_ip_rangeString

Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused / 29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28. Corresponds to the JSON property reservedIpRange

Returns:

  • (String)


427
428
429
# File 'lib/google/apis/redis_v1/classes.rb', line 427

def reserved_ip_range
  @reserved_ip_range
end

#secondary_ip_rangeString

Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto". Corresponds to the JSON property secondaryIpRange

Returns:

  • (String)


436
437
438
# File 'lib/google/apis/redis_v1/classes.rb', line 436

def secondary_ip_range
  @secondary_ip_range
end

#server_ca_certsArray<Google::Apis::RedisV1::TlsCertificate>

Output only. List of server CA certificates for the instance. Corresponds to the JSON property serverCaCerts



441
442
443
# File 'lib/google/apis/redis_v1/classes.rb', line 441

def server_ca_certs
  @server_ca_certs
end

#stateString

Output only. The current state of this instance. Corresponds to the JSON property state

Returns:

  • (String)


446
447
448
# File 'lib/google/apis/redis_v1/classes.rb', line 446

def state
  @state
end

#status_messageString

Output only. Additional information about the current status of this instance, if available. Corresponds to the JSON property statusMessage

Returns:

  • (String)


452
453
454
# File 'lib/google/apis/redis_v1/classes.rb', line 452

def status_message
  @status_message
end

#tierString

Required. The service tier of the instance. Corresponds to the JSON property tier

Returns:

  • (String)


457
458
459
# File 'lib/google/apis/redis_v1/classes.rb', line 457

def tier
  @tier
end

#transit_encryption_modeString

Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance. Corresponds to the JSON property transitEncryptionMode

Returns:

  • (String)


463
464
465
# File 'lib/google/apis/redis_v1/classes.rb', line 463

def transit_encryption_mode
  @transit_encryption_mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# File 'lib/google/apis/redis_v1/classes.rb', line 470

def update!(**args)
  @alternative_location_id = args[:alternative_location_id] if args.key?(:alternative_location_id)
  @auth_enabled = args[:auth_enabled] if args.key?(:auth_enabled)
  @authorized_network = args[:authorized_network] if args.key?(:authorized_network)
  @connect_mode = args[:connect_mode] if args.key?(:connect_mode)
  @create_time = args[:create_time] if args.key?(:create_time)
  @current_location_id = args[:current_location_id] if args.key?(:current_location_id)
  @display_name = args[:display_name] if args.key?(:display_name)
  @host = args[:host] if args.key?(:host)
  @labels = args[:labels] if args.key?(:labels)
  @location_id = args[:location_id] if args.key?(:location_id)
  @maintenance_policy = args[:maintenance_policy] if args.key?(:maintenance_policy)
  @maintenance_schedule = args[:maintenance_schedule] if args.key?(:maintenance_schedule)
  @memory_size_gb = args[:memory_size_gb] if args.key?(:memory_size_gb)
  @name = args[:name] if args.key?(:name)
  @nodes = args[:nodes] if args.key?(:nodes)
  @persistence_config = args[:persistence_config] if args.key?(:persistence_config)
  @persistence_iam_identity = args[:persistence_iam_identity] if args.key?(:persistence_iam_identity)
  @port = args[:port] if args.key?(:port)
  @read_endpoint = args[:read_endpoint] if args.key?(:read_endpoint)
  @read_endpoint_port = args[:read_endpoint_port] if args.key?(:read_endpoint_port)
  @read_replicas_mode = args[:read_replicas_mode] if args.key?(:read_replicas_mode)
  @redis_configs = args[:redis_configs] if args.key?(:redis_configs)
  @redis_version = args[:redis_version] if args.key?(:redis_version)
  @replica_count = args[:replica_count] if args.key?(:replica_count)
  @reserved_ip_range = args[:reserved_ip_range] if args.key?(:reserved_ip_range)
  @secondary_ip_range = args[:secondary_ip_range] if args.key?(:secondary_ip_range)
  @server_ca_certs = args[:server_ca_certs] if args.key?(:server_ca_certs)
  @state = args[:state] if args.key?(:state)
  @status_message = args[:status_message] if args.key?(:status_message)
  @tier = args[:tier] if args.key?(:tier)
  @transit_encryption_mode = args[:transit_encryption_mode] if args.key?(:transit_encryption_mode)
end