Class: Google::Apis::DomainsV1::PrimaryBackupPolicy

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

Overview

Configures a RRSetRoutingPolicy such that all queries are responded with the primary_targets if they are healthy. And if all of them are unhealthy, then we fallback to a geo localized policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PrimaryBackupPolicy

Returns a new instance of PrimaryBackupPolicy.



1596
1597
1598
# File 'lib/google/apis/domains_v1/classes.rb', line 1596

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

Instance Attribute Details

#backup_geo_targetsGoogle::Apis::DomainsV1::GeoPolicy

Configures a RRSetRoutingPolicy that routes based on the geo location of the querying user. Corresponds to the JSON property backupGeoTargets



1581
1582
1583
# File 'lib/google/apis/domains_v1/classes.rb', line 1581

def backup_geo_targets
  @backup_geo_targets
end

#primary_targetsGoogle::Apis::DomainsV1::HealthCheckTargets

HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response. Corresponds to the JSON property primaryTargets



1588
1589
1590
# File 'lib/google/apis/domains_v1/classes.rb', line 1588

def primary_targets
  @primary_targets
end

#trickle_trafficFloat

When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets. Corresponds to the JSON property trickleTraffic

Returns:

  • (Float)


1594
1595
1596
# File 'lib/google/apis/domains_v1/classes.rb', line 1594

def trickle_traffic
  @trickle_traffic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1601
1602
1603
1604
1605
# File 'lib/google/apis/domains_v1/classes.rb', line 1601

def update!(**args)
  @backup_geo_targets = args[:backup_geo_targets] if args.key?(:backup_geo_targets)
  @primary_targets = args[:primary_targets] if args.key?(:primary_targets)
  @trickle_traffic = args[:trickle_traffic] if args.key?(:trickle_traffic)
end