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.



2656
2657
2658
# File 'lib/google/apis/dns_v1/classes.rb', line 2656

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)


2630
2631
2632
# File 'lib/google/apis/dns_v1/classes.rb', line 2630

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)


2636
2637
2638
# File 'lib/google/apis/dns_v1/classes.rb', line 2636

def dns_name
  @dns_name
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


2641
2642
2643
# File 'lib/google/apis/dns_v1/classes.rb', line 2641

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



2649
2650
2651
# File 'lib/google/apis/dns_v1/classes.rb', line 2649

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)


2654
2655
2656
# File 'lib/google/apis/dns_v1/classes.rb', line 2654

def rule_name
  @rule_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2661
2662
2663
2664
2665
2666
2667
# File 'lib/google/apis/dns_v1/classes.rb', line 2661

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