Class: Google::Apis::NetworkservicesV1::ServiceLbPolicy

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

Overview

ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ServiceLbPolicy

Returns a new instance of ServiceLbPolicy.



3863
3864
3865
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3863

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

Instance Attribute Details

#auto_capacity_drainGoogle::Apis::NetworkservicesV1::ServiceLbPolicyAutoCapacityDrain

Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing. Corresponds to the JSON property autoCapacityDrain



3818
3819
3820
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3818

def auto_capacity_drain
  @auto_capacity_drain
end

#create_timeString

Output only. The timestamp when this resource was created. Corresponds to the JSON property createTime

Returns:

  • (String)


3823
3824
3825
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3823

def create_time
  @create_time
end

#descriptionString

Optional. A free-text description of the resource. Max length 1024 characters. Corresponds to the JSON property description

Returns:

  • (String)


3828
3829
3830
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3828

def description
  @description
end

#failover_configGoogle::Apis::NetworkservicesV1::ServiceLbPolicyFailoverConfig

Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy. Corresponds to the JSON property failoverConfig



3834
3835
3836
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3834

def failover_config
  @failover_config
end

#isolation_configGoogle::Apis::NetworkservicesV1::ServiceLbPolicyIsolationConfig

Configuration to provide isolation support for the associated Backend Service. Corresponds to the JSON property isolationConfig



3839
3840
3841
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3839

def isolation_config
  @isolation_config
end

#labelsHash<String,String>

Optional. Set of label tags associated with the ServiceLbPolicy resource. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


3844
3845
3846
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3844

def labels
  @labels
end

#load_balancing_algorithmString

Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION. Corresponds to the JSON property loadBalancingAlgorithm

Returns:

  • (String)


3850
3851
3852
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3850

def load_balancing_algorithm
  @load_balancing_algorithm
end

#nameString

Identifier. Name of the ServiceLbPolicy resource. It matches pattern projects/ project/locations/location/serviceLbPolicies/service_lb_policy_name`. Corresponds to the JSON propertyname`

Returns:

  • (String)


3856
3857
3858
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3856

def name
  @name
end

#update_timeString

Output only. The timestamp when this resource was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


3861
3862
3863
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3861

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
# File 'lib/google/apis/networkservices_v1/classes.rb', line 3868

def update!(**args)
  @auto_capacity_drain = args[:auto_capacity_drain] if args.key?(:auto_capacity_drain)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @failover_config = args[:failover_config] if args.key?(:failover_config)
  @isolation_config = args[:isolation_config] if args.key?(:isolation_config)
  @labels = args[:labels] if args.key?(:labels)
  @load_balancing_algorithm = args[:load_balancing_algorithm] if args.key?(:load_balancing_algorithm)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end