Class: Google::Apis::DnsV1beta2::RrSetRoutingPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dns_v1beta2/classes.rb,
lib/google/apis/dns_v1beta2/representations.rb,
lib/google/apis/dns_v1beta2/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.



1988
1989
1990
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1988

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

Instance Attribute Details

#geoGoogle::Apis::DnsV1beta2::RrSetRoutingPolicyGeoPolicy

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



1958
1959
1960
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1958

def geo
  @geo
end

#geo_policyGoogle::Apis::DnsV1beta2::RrSetRoutingPolicyGeoPolicy

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



1964
1965
1966
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1964

def geo_policy
  @geo_policy
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


1969
1970
1971
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1969

def kind
  @kind
end

#primary_backupGoogle::Apis::DnsV1beta2::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



1976
1977
1978
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1976

def primary_backup
  @primary_backup
end

#wrrGoogle::Apis::DnsV1beta2::RrSetRoutingPolicyWrrPolicy

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



1981
1982
1983
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1981

def wrr
  @wrr
end

#wrr_policyGoogle::Apis::DnsV1beta2::RrSetRoutingPolicyWrrPolicy

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



1986
1987
1988
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1986

def wrr_policy
  @wrr_policy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1993
1994
1995
1996
1997
1998
1999
2000
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1993

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