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.



2758
2759
2760
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2758

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)


2732
2733
2734
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2732

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)


2738
2739
2740
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2738

def dns_name
  @dns_name
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


2743
2744
2745
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2743

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



2751
2752
2753
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2751

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)


2756
2757
2758
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2756

def rule_name
  @rule_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2763
2764
2765
2766
2767
2768
2769
# File 'lib/google/apis/dns_v1beta2/classes.rb', line 2763

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