Class: Google::Apis::ReplicapoolV1beta1::Pool

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Pool

Returns a new instance of Pool



540
541
542
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 540

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

Instance Attribute Details

#auto_restartBoolean Also known as: auto_restart?

Whether replicas in this pool should be restarted if they experience a failure. The default value is true. Corresponds to the JSON property autoRestart

Returns:

  • (Boolean)


453
454
455
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 453

def auto_restart
  @auto_restart
end

#base_instance_nameString

The base instance name to use for the replicas in this pool. This must match the regex a-z?. If specified, the instances in this replica pool will be named in the format -. The postfix will be a four character alphanumeric identifier generated by the service. If this is not specified by the user, a random base instance name is generated by the service. Corresponds to the JSON property baseInstanceName

Returns:

  • (String)


465
466
467
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 465

def base_instance_name
  @base_instance_name
end

#current_num_replicasFixnum

[Output Only] The current number of replicas in the pool. Corresponds to the JSON property currentNumReplicas

Returns:

  • (Fixnum)


470
471
472
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 470

def current_num_replicas
  @current_num_replicas
end

#descriptionString

An optional description of the replica pool. Corresponds to the JSON property description

Returns:

  • (String)


475
476
477
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 475

def description
  @description
end

#health_checksArray<Google::Apis::ReplicapoolV1beta1::HealthCheck>

Deprecated. Please use template[].healthChecks instead. Corresponds to the JSON property healthChecks



480
481
482
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 480

def health_checks
  @health_checks
end

#initial_num_replicasFixnum

The initial number of replicas this pool should have. You must provide a value greater than or equal to 0. Corresponds to the JSON property initialNumReplicas

Returns:

  • (Fixnum)


486
487
488
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 486

def initial_num_replicas
  @initial_num_replicas
end

#labelsArray<Google::Apis::ReplicapoolV1beta1::Label>

A list of labels to attach to this replica pool and all created virtual machines in this replica pool. Corresponds to the JSON property labels



492
493
494
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 492

def labels
  @labels
end

#nameString

The name of the replica pool. Must follow the regex a-z? and be 1-28 characters long. Corresponds to the JSON property name

Returns:

  • (String)


498
499
500
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 498

def name
  @name
end

#num_replicasFixnum

Deprecated! Use initial_num_replicas instead. Corresponds to the JSON property numReplicas

Returns:

  • (Fixnum)


503
504
505
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 503

def num_replicas
  @num_replicas
end

#resource_viewsArray<String>

The list of resource views that should be updated with all the replicas that are managed by this pool. Corresponds to the JSON property resourceViews

Returns:

  • (Array<String>)


509
510
511
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 509

def resource_views
  @resource_views
end

[Output Only] A self-link to the replica pool. Corresponds to the JSON property selfLink

Returns:

  • (String)


514
515
516
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 514

def self_link
  @self_link
end

#target_poolString

Deprecated, please use target_pools instead. Corresponds to the JSON property targetPool

Returns:

  • (String)


519
520
521
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 519

def target_pool
  @target_pool
end

#target_poolsArray<String>

A list of target pools to update with the replicas that are managed by this pool. If specified, the replicas in this replica pool will be added to the specified target pools for load balancing purposes. The replica pool must live in the same region as the specified target pools. These values must be the target pool resource names, and not fully qualified URLs. Corresponds to the JSON property targetPools

Returns:

  • (Array<String>)


528
529
530
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 528

def target_pools
  @target_pools
end

#templateGoogle::Apis::ReplicapoolV1beta1::Template

The template used for creating replicas in the pool. Corresponds to the JSON property template



533
534
535
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 533

def template
  @template
end

#typeString

Deprecated! Do not set. Corresponds to the JSON property type

Returns:

  • (String)


538
539
540
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 538

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 545

def update!(**args)
  @auto_restart = args[:auto_restart] if args.key?(:auto_restart)
  @base_instance_name = args[:base_instance_name] if args.key?(:base_instance_name)
  @current_num_replicas = args[:current_num_replicas] if args.key?(:current_num_replicas)
  @description = args[:description] if args.key?(:description)
  @health_checks = args[:health_checks] if args.key?(:health_checks)
  @initial_num_replicas = args[:initial_num_replicas] if args.key?(:initial_num_replicas)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @num_replicas = args[:num_replicas] if args.key?(:num_replicas)
  @resource_views = args[:resource_views] if args.key?(:resource_views)
  @self_link = args[:self_link] if args.key?(:self_link)
  @target_pool = args[:target_pool] if args.key?(:target_pool)
  @target_pools = args[:target_pools] if args.key?(:target_pools)
  @template = args[:template] if args.key?(:template)
  @type = args[:type] if args.key?(:type)
end