Class: AWSCDK::VPCLattice::CfnRuleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
vpc_lattice/cfn_rule_props.rb

Overview

Properties for defining a CfnRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, match:, priority:, listener_identifier: nil, name: nil, service_identifier: nil, tags: nil) ⇒ CfnRuleProps

Returns a new instance of CfnRuleProps.

Parameters:



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

def initialize(action:, match:, priority:, listener_identifier: nil, name: nil, service_identifier: nil, tags: nil)
  @action = action.is_a?(Hash) ? ::AWSCDK::VPCLattice::CfnRule::ActionProperty.new(**action.transform_keys(&:to_sym)) : action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c192cGNsYXR0aWNlLkNmblJ1bGUuQWN0aW9uUHJvcGVydHkifV19fQ==")), "action")
  @match = match.is_a?(Hash) ? ::AWSCDK::VPCLattice::CfnRule::MatchProperty.new(**match.transform_keys(&:to_sym)) : match
  Jsii::Type.check_type(@match, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c192cGNsYXR0aWNlLkNmblJ1bGUuTWF0Y2hQcm9wZXJ0eSJ9XX19")), "match")
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority")
  @listener_identifier = listener_identifier
  Jsii::Type.check_type(@listener_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "listenerIdentifier") unless @listener_identifier.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @service_identifier = service_identifier
  Jsii::Type.check_type(@service_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceIdentifier") unless @service_identifier.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?
end

Instance Attribute Details

#actionAWSCDK::IResolvable, AWSCDK::VPCLattice::CfnRule::ActionProperty (readonly)

Describes the action for a rule.



37
38
39
# File 'vpc_lattice/cfn_rule_props.rb', line 37

def action
  @action
end

#listener_identifierString? (readonly)

The ID or ARN of the listener.



54
55
56
# File 'vpc_lattice/cfn_rule_props.rb', line 54

def listener_identifier
  @listener_identifier
end

#nameString? (readonly)

The name of the rule.

The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.

If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.



63
64
65
# File 'vpc_lattice/cfn_rule_props.rb', line 63

def name
  @name
end

#priorityNumeric (readonly)

The priority assigned to the rule.

Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.



49
50
51
# File 'vpc_lattice/cfn_rule_props.rb', line 49

def priority
  @priority
end

#service_identifierString? (readonly)

The ID or ARN of the service.



68
69
70
# File 'vpc_lattice/cfn_rule_props.rb', line 68

def service_identifier
  @service_identifier
end

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

The tags for the rule.



73
74
75
# File 'vpc_lattice/cfn_rule_props.rb', line 73

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
85
# File 'vpc_lattice/cfn_rule_props.rb', line 75

def self.jsii_properties
  {
    :action => "action",
    :match => "match",
    :priority => "priority",
    :listener_identifier => "listenerIdentifier",
    :name => "name",
    :service_identifier => "serviceIdentifier",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'vpc_lattice/cfn_rule_props.rb', line 87

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "match" => @match,
    "priority" => @priority,
    "listenerIdentifier" => @listener_identifier,
    "name" => @name,
    "serviceIdentifier" => @service_identifier,
    "tags" => @tags,
  })
  result.compact
end