Class: Google::Apis::DnsV1::RrSetRoutingPolicy

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

Overview

A RRSetRoutingPolicy represents ResourceRecordSet data that is returned dynamically with the response varying based on configured properties such as geolocation or by weighted random selection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RrSetRoutingPolicy

Returns a new instance of RrSetRoutingPolicy.



2106
2107
2108
# File 'lib/google/apis/dns_v1/classes.rb', line 2106

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

Instance Attribute Details

#geoGoogle::Apis::DnsV1::RrSetRoutingPolicyGeoPolicy

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



2079
2080
2081
# File 'lib/google/apis/dns_v1/classes.rb', line 2079

def geo
  @geo
end

#health_checkString

The fully qualified URL of the HealthCheck to use for this RRSetRoutingPolicy. Format this URL like https://www.googleapis.com/compute/v1/projects/project/ global/healthChecks/healthCheck`. https://cloud.google.com/compute/docs/ reference/rest/v1/healthChecks Corresponds to the JSON propertyhealthCheck`

Returns:

  • (String)


2087
2088
2089
# File 'lib/google/apis/dns_v1/classes.rb', line 2087

def health_check
  @health_check
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


2092
2093
2094
# File 'lib/google/apis/dns_v1/classes.rb', line 2092

def kind
  @kind
end

#primary_backupGoogle::Apis::DnsV1::RrSetRoutingPolicyPrimaryBackupPolicy

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. Corresponds to the JSON property primaryBackup



2099
2100
2101
# File 'lib/google/apis/dns_v1/classes.rb', line 2099

def primary_backup
  @primary_backup
end

#wrrGoogle::Apis::DnsV1::RrSetRoutingPolicyWrrPolicy

Configures a RRSetRoutingPolicy that routes in a weighted round robin fashion. Corresponds to the JSON property wrr



2104
2105
2106
# File 'lib/google/apis/dns_v1/classes.rb', line 2104

def wrr
  @wrr
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2111
2112
2113
2114
2115
2116
2117
# File 'lib/google/apis/dns_v1/classes.rb', line 2111

def update!(**args)
  @geo = args[:geo] if args.key?(:geo)
  @health_check = args[:health_check] if args.key?(:health_check)
  @kind = args[:kind] if args.key?(:kind)
  @primary_backup = args[:primary_backup] if args.key?(:primary_backup)
  @wrr = args[:wrr] if args.key?(:wrr)
end