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.



1927
1928
1929
# File 'lib/google/apis/dns_v1/classes.rb', line 1927

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



1908
1909
1910
# File 'lib/google/apis/dns_v1/classes.rb', line 1908

def geo
  @geo
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


1913
1914
1915
# File 'lib/google/apis/dns_v1/classes.rb', line 1913

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



1920
1921
1922
# File 'lib/google/apis/dns_v1/classes.rb', line 1920

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



1925
1926
1927
# File 'lib/google/apis/dns_v1/classes.rb', line 1925

def wrr
  @wrr
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1932
1933
1934
1935
1936
1937
# File 'lib/google/apis/dns_v1/classes.rb', line 1932

def update!(**args)
  @geo = args[:geo] if args.key?(:geo)
  @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