Class: Google::Apis::DnsV1beta2::ResponsePolicyRule

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 Response Policy Rule is a selector that applies its behavior to queries that match the selector. Selectors are DNS names, which may be wildcards or exact matches. Each DNS query subject to a Response Policy matches at most one ResponsePolicyRule, as identified by the dns_name field with the longest matching suffix.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResponsePolicyRule

Returns a new instance of ResponsePolicyRule.



1996
1997
1998
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1996

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

Instance Attribute Details

#behaviorString

Answer this query with a behavior rather than DNS data. Corresponds to the JSON property behavior

Returns:

  • (String)


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

def behavior
  @behavior
end

#dns_nameString

The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule. Corresponds to the JSON property dnsName

Returns:

  • (String)


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

def dns_name
  @dns_name
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


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

def kind
  @kind
end

#local_dataGoogle::Apis::DnsV1beta2::ResponsePolicyRuleLocalData

Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. Corresponds to the JSON property localData



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

def local_data
  @local_data
end

#rule_nameString

An identifier for this rule. Must be unique with the ResponsePolicy. Corresponds to the JSON property ruleName

Returns:

  • (String)


1994
1995
1996
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 1994

def rule_name
  @rule_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2001
2002
2003
2004
2005
2006
2007
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2001

def update!(**args)
  @behavior = args[:behavior] if args.key?(:behavior)
  @dns_name = args[:dns_name] if args.key?(:dns_name)
  @kind = args[:kind] if args.key?(:kind)
  @local_data = args[:local_data] if args.key?(:local_data)
  @rule_name = args[:rule_name] if args.key?(:rule_name)
end