Class: AWSCDK::EC2::CfnTransitGatewayMeteringPolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_transit_gateway_metering_policy_props.rb

Overview

Properties for defining a CfnTransitGatewayMeteringPolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transit_gateway_id:, middlebox_attachment_ids: nil, tags: nil) ⇒ CfnTransitGatewayMeteringPolicyProps

Returns a new instance of CfnTransitGatewayMeteringPolicyProps.

Parameters:

  • transit_gateway_id (String)

    The ID of the transit gateway associated with the metering policy.

  • middlebox_attachment_ids (Array<String>, nil) (defaults to: nil)

    The IDs of the middlebox attachments associated with the metering policy.

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

    The tags assigned to the transit gateway metering policy.



12
13
14
15
16
17
18
19
# File 'ec2/cfn_transit_gateway_metering_policy_props.rb', line 12

def initialize(transit_gateway_id:, middlebox_attachment_ids: nil, tags: nil)
  @transit_gateway_id = transit_gateway_id
  Jsii::Type.check_type(@transit_gateway_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitGatewayId")
  @middlebox_attachment_ids = middlebox_attachment_ids
  Jsii::Type.check_type(@middlebox_attachment_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "middleboxAttachmentIds") unless @middlebox_attachment_ids.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

#middlebox_attachment_idsArray<String>? (readonly)

The IDs of the middlebox attachments associated with the metering policy.



30
31
32
# File 'ec2/cfn_transit_gateway_metering_policy_props.rb', line 30

def middlebox_attachment_ids
  @middlebox_attachment_ids
end

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

The tags assigned to the transit gateway metering policy.



35
36
37
# File 'ec2/cfn_transit_gateway_metering_policy_props.rb', line 35

def tags
  @tags
end

#transit_gateway_idString (readonly)

The ID of the transit gateway associated with the metering policy.



25
26
27
# File 'ec2/cfn_transit_gateway_metering_policy_props.rb', line 25

def transit_gateway_id
  @transit_gateway_id
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 'ec2/cfn_transit_gateway_metering_policy_props.rb', line 37

def self.jsii_properties
  {
    :transit_gateway_id => "transitGatewayId",
    :middlebox_attachment_ids => "middleboxAttachmentIds",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
# File 'ec2/cfn_transit_gateway_metering_policy_props.rb', line 45

def to_jsii
  result = {}
  result.merge!({
    "transitGatewayId" => @transit_gateway_id,
    "middleboxAttachmentIds" => @middlebox_attachment_ids,
    "tags" => @tags,
  })
  result.compact
end