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.



2605
2606
2607
# File 'lib/google/apis/dns_v1/classes.rb', line 2605

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)


2579
2580
2581
# File 'lib/google/apis/dns_v1/classes.rb', line 2579

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)


2585
2586
2587
# File 'lib/google/apis/dns_v1/classes.rb', line 2585

def dns_name
  @dns_name
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


2590
2591
2592
# File 'lib/google/apis/dns_v1/classes.rb', line 2590

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



2598
2599
2600
# File 'lib/google/apis/dns_v1/classes.rb', line 2598

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)


2603
2604
2605
# File 'lib/google/apis/dns_v1/classes.rb', line 2603

def rule_name
  @rule_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2610
2611
2612
2613
2614
2615
2616
# File 'lib/google/apis/dns_v1/classes.rb', line 2610

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