Class: Google::Apis::DnsV1::ResponsePolicyRule

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 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.



1918
1919
1920
# File 'lib/google/apis/dns_v1/classes.rb', line 1918

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)


1892
1893
1894
# File 'lib/google/apis/dns_v1/classes.rb', line 1892

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)


1898
1899
1900
# File 'lib/google/apis/dns_v1/classes.rb', line 1898

def dns_name
  @dns_name
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


1903
1904
1905
# File 'lib/google/apis/dns_v1/classes.rb', line 1903

def kind
  @kind
end

#local_dataGoogle::Apis::DnsV1::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



1911
1912
1913
# File 'lib/google/apis/dns_v1/classes.rb', line 1911

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)


1916
1917
1918
# File 'lib/google/apis/dns_v1/classes.rb', line 1916

def rule_name
  @rule_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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