Class: AWSCDK::Route53Resolver::CfnResolverRuleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
route53_resolver/cfn_resolver_rule_props.rb

Overview

Properties for defining a CfnResolverRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule_type:, delegation_record: nil, domain_name: nil, name: nil, resolver_endpoint_id: nil, tags: nil, target_ips: nil) ⇒ CfnResolverRuleProps

Returns a new instance of CfnResolverRuleProps.

Parameters:

  • rule_type (String)

    When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD or DELEGATE .

  • delegation_record (String, nil) (defaults to: nil)

    DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network.

  • domain_name (String, nil) (defaults to: nil)

    DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps .

  • name (String, nil) (defaults to: nil)

    The name for the Resolver rule, which you specified when you created the Resolver rule.

  • resolver_endpoint_id (String, nil) (defaults to: nil)

    The ID of the endpoint that the rule is associated with.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Tags help organize and categorize your Resolver rules.

  • target_ips (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Route53Resolver::CfnResolverRule::TargetAddressProperty>, nil) (defaults to: nil)

    An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 16

def initialize(rule_type:, delegation_record: nil, domain_name: nil, name: nil, resolver_endpoint_id: nil, tags: nil, target_ips: nil)
  @rule_type = rule_type
  Jsii::Type.check_type(@rule_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleType")
  @delegation_record = delegation_record
  Jsii::Type.check_type(@delegation_record, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delegationRecord") unless @delegation_record.nil?
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName") unless @domain_name.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @resolver_endpoint_id = resolver_endpoint_id
  Jsii::Type.check_type(@resolver_endpoint_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resolverEndpointId") unless @resolver_endpoint_id.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @target_ips = target_ips
  Jsii::Type.check_type(@target_ips, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1M3Jlc29sdmVyLkNmblJlc29sdmVyUnVsZS5UYXJnZXRBZGRyZXNzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "targetIps") unless @target_ips.nil?
end

Instance Attribute Details

#delegation_recordString? (readonly)

DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network.



50
51
52
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 50

def delegation_record
  @delegation_record
end

#domain_nameString? (readonly)

DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps .

If a query matches multiple Resolver rules (example.com and www.example.com), the query is routed using the Resolver rule that contains the most specific domain name (www.example.com).



57
58
59
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 57

def domain_name
  @domain_name
end

#nameString? (readonly)

The name for the Resolver rule, which you specified when you created the Resolver rule.

The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.



64
65
66
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 64

def name
  @name
end

#resolver_endpoint_idString? (readonly)

The ID of the endpoint that the rule is associated with.



69
70
71
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 69

def resolver_endpoint_id
  @resolver_endpoint_id
end

#rule_typeString (readonly)

When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD or DELEGATE .

If a query matches multiple Resolver rules (example.com and www.example.com), outbound DNS queries are routed using the Resolver rule that contains the most specific domain name (www.example.com).

When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM .

For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify FORWARD for RuleType . To then have Resolver process queries for apex.example.com, you create a rule and specify SYSTEM for RuleType .

Currently, only Resolver can create rules that have a value of RECURSIVE for RuleType .



45
46
47
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 45

def rule_type
  @rule_type
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Tags help organize and categorize your Resolver rules.

Each tag consists of a key and an optional value, both of which you define.



76
77
78
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 76

def tags
  @tags
end

#target_ipsAWSCDK::IResolvable, ... (readonly)

An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.

Typically, these are the IP addresses of DNS resolvers on your network.



83
84
85
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 83

def target_ips
  @target_ips
end

Class Method Details

.jsii_propertiesObject



85
86
87
88
89
90
91
92
93
94
95
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 85

def self.jsii_properties
  {
    :rule_type => "ruleType",
    :delegation_record => "delegationRecord",
    :domain_name => "domainName",
    :name => "name",
    :resolver_endpoint_id => "resolverEndpointId",
    :tags => "tags",
    :target_ips => "targetIps",
  }
end

Instance Method Details

#to_jsiiObject



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'route53_resolver/cfn_resolver_rule_props.rb', line 97

def to_jsii
  result = {}
  result.merge!({
    "ruleType" => @rule_type,
    "delegationRecord" => @delegation_record,
    "domainName" => @domain_name,
    "name" => @name,
    "resolverEndpointId" => @resolver_endpoint_id,
    "tags" => @tags,
    "targetIps" => @target_ips,
  })
  result.compact
end