Class: AWSCDK::VPCLattice::CfnRuleProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::VPCLattice::CfnRuleProps
- Defined in:
- vpc_lattice/cfn_rule_props.rb
Overview
Properties for defining a CfnRule.
Instance Attribute Summary collapse
-
#action ⇒ AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnRule::ActionProperty
readonly
Describes the action for a rule.
-
#listener_identifier ⇒ String?
readonly
The ID or ARN of the listener.
-
#match ⇒ AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnRule::MatchProperty
readonly
The rule match.
-
#name ⇒ String?
readonly
The name of the rule.
-
#priority ⇒ Numeric
readonly
The priority assigned to the rule.
-
#service_identifier ⇒ String?
readonly
The ID or ARN of the service.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags for the rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, match:, priority:, listener_identifier: nil, name: nil, service_identifier: nil, tags: nil) ⇒ CfnRuleProps
constructor
A new instance of CfnRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, match:, priority:, listener_identifier: nil, name: nil, service_identifier: nil, tags: nil) ⇒ CfnRuleProps
Returns a new instance of CfnRuleProps.
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 = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#action ⇒ AWSCDK::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_identifier ⇒ String? (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 |
#match ⇒ AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnRule::MatchProperty (readonly)
The rule match.
42 43 44 |
# File 'vpc_lattice/cfn_rule_props.rb', line 42 def match @match end |
#name ⇒ String? (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 |
#priority ⇒ Numeric (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_identifier ⇒ String? (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 |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags for the rule.
73 74 75 |
# File 'vpc_lattice/cfn_rule_props.rb', line 73 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |