Class: AWSCDK::EC2::CfnTransitGatewayMeteringPolicyEntryProps

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

Overview

Properties for defining a CfnTransitGatewayMeteringPolicyEntry.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metered_account:, policy_rule_number:, transit_gateway_metering_policy_id:, destination_cidr_block: nil, destination_port_range: nil, destination_transit_gateway_attachment_id: nil, destination_transit_gateway_attachment_type: nil, protocol: nil, source_cidr_block: nil, source_port_range: nil, source_transit_gateway_attachment_id: nil, source_transit_gateway_attachment_type: nil) ⇒ CfnTransitGatewayMeteringPolicyEntryProps

Returns a new instance of CfnTransitGatewayMeteringPolicyEntryProps.

Parameters:

  • metered_account (String)

    The AWS account ID to which the metered traffic is attributed.

  • policy_rule_number (Numeric)

    The rule number of the metering policy entry.

  • transit_gateway_metering_policy_id (String)

    The ID of the transit gateway metering policy for which the entry is being created.

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

    Describes an IPv4 CIDR block.

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

    Describes a range of ports.

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

    The ID of the source attachment through which traffic leaves a transit gateway.

  • destination_transit_gateway_attachment_type (String, nil) (defaults to: nil)
  • protocol (String, nil) (defaults to: nil)

    The protocol of the traffic.

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

    Describes an IPv4 CIDR block.

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

    Describes a range of ports.

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

    The ID of the source attachment through which traffic enters a transit gateway.

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


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 21

def initialize(metered_account:, policy_rule_number:, transit_gateway_metering_policy_id:, destination_cidr_block: nil, destination_port_range: nil, destination_transit_gateway_attachment_id: nil, destination_transit_gateway_attachment_type: nil, protocol: nil, source_cidr_block: nil, source_port_range: nil, source_transit_gateway_attachment_id: nil, source_transit_gateway_attachment_type: nil)
  @metered_account = 
  Jsii::Type.check_type(@metered_account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "meteredAccount")
  @policy_rule_number = policy_rule_number
  Jsii::Type.check_type(@policy_rule_number, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "policyRuleNumber")
  @transit_gateway_metering_policy_id = transit_gateway_metering_policy_id
  Jsii::Type.check_type(@transit_gateway_metering_policy_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitGatewayMeteringPolicyId")
  @destination_cidr_block = destination_cidr_block
  Jsii::Type.check_type(@destination_cidr_block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationCidrBlock") unless @destination_cidr_block.nil?
  @destination_port_range = destination_port_range
  Jsii::Type.check_type(@destination_port_range, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationPortRange") unless @destination_port_range.nil?
  @destination_transit_gateway_attachment_id = destination_transit_gateway_attachment_id
  Jsii::Type.check_type(@destination_transit_gateway_attachment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationTransitGatewayAttachmentId") unless @destination_transit_gateway_attachment_id.nil?
  @destination_transit_gateway_attachment_type = destination_transit_gateway_attachment_type
  Jsii::Type.check_type(@destination_transit_gateway_attachment_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationTransitGatewayAttachmentType") unless @destination_transit_gateway_attachment_type.nil?
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil?
  @source_cidr_block = source_cidr_block
  Jsii::Type.check_type(@source_cidr_block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceCidrBlock") unless @source_cidr_block.nil?
  @source_port_range = source_port_range
  Jsii::Type.check_type(@source_port_range, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourcePortRange") unless @source_port_range.nil?
  @source_transit_gateway_attachment_id = source_transit_gateway_attachment_id
  Jsii::Type.check_type(@source_transit_gateway_attachment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceTransitGatewayAttachmentId") unless @source_transit_gateway_attachment_id.nil?
  @source_transit_gateway_attachment_type = source_transit_gateway_attachment_type
  Jsii::Type.check_type(@source_transit_gateway_attachment_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceTransitGatewayAttachmentType") unless @source_transit_gateway_attachment_type.nil?
end

Instance Attribute Details

#destination_cidr_blockString? (readonly)

Describes an IPv4 CIDR block.



67
68
69
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 67

def destination_cidr_block
  @destination_cidr_block
end

#destination_port_rangeString? (readonly)

Describes a range of ports.



72
73
74
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 72

def destination_port_range
  @destination_port_range
end

#destination_transit_gateway_attachment_idString? (readonly)

The ID of the source attachment through which traffic leaves a transit gateway.



77
78
79
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 77

def destination_transit_gateway_attachment_id
  @destination_transit_gateway_attachment_id
end

#destination_transit_gateway_attachment_typeString? (readonly)



80
81
82
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 80

def destination_transit_gateway_attachment_type
  @destination_transit_gateway_attachment_type
end

#metered_accountString (readonly)

The AWS account ID to which the metered traffic is attributed.



52
53
54
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 52

def 
  @metered_account
end

#policy_rule_numberNumeric (readonly)

The rule number of the metering policy entry.



57
58
59
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 57

def policy_rule_number
  @policy_rule_number
end

#protocolString? (readonly)

The protocol of the traffic.



85
86
87
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 85

def protocol
  @protocol
end

#source_cidr_blockString? (readonly)

Describes an IPv4 CIDR block.



90
91
92
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 90

def source_cidr_block
  @source_cidr_block
end

#source_port_rangeString? (readonly)

Describes a range of ports.



95
96
97
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 95

def source_port_range
  @source_port_range
end

#source_transit_gateway_attachment_idString? (readonly)

The ID of the source attachment through which traffic enters a transit gateway.



100
101
102
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 100

def source_transit_gateway_attachment_id
  @source_transit_gateway_attachment_id
end

#source_transit_gateway_attachment_typeString? (readonly)



103
104
105
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 103

def source_transit_gateway_attachment_type
  @source_transit_gateway_attachment_type
end

#transit_gateway_metering_policy_idString (readonly)

The ID of the transit gateway metering policy for which the entry is being created.



62
63
64
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 62

def transit_gateway_metering_policy_id
  @transit_gateway_metering_policy_id
end

Class Method Details

.jsii_propertiesObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 105

def self.jsii_properties
  {
    :metered_account => "meteredAccount",
    :policy_rule_number => "policyRuleNumber",
    :transit_gateway_metering_policy_id => "transitGatewayMeteringPolicyId",
    :destination_cidr_block => "destinationCidrBlock",
    :destination_port_range => "destinationPortRange",
    :destination_transit_gateway_attachment_id => "destinationTransitGatewayAttachmentId",
    :destination_transit_gateway_attachment_type => "destinationTransitGatewayAttachmentType",
    :protocol => "protocol",
    :source_cidr_block => "sourceCidrBlock",
    :source_port_range => "sourcePortRange",
    :source_transit_gateway_attachment_id => "sourceTransitGatewayAttachmentId",
    :source_transit_gateway_attachment_type => "sourceTransitGatewayAttachmentType",
  }
end

Instance Method Details

#to_jsiiObject



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'ec2/cfn_transit_gateway_metering_policy_entry_props.rb', line 122

def to_jsii
  result = {}
  result.merge!({
    "meteredAccount" => @metered_account,
    "policyRuleNumber" => @policy_rule_number,
    "transitGatewayMeteringPolicyId" => @transit_gateway_metering_policy_id,
    "destinationCidrBlock" => @destination_cidr_block,
    "destinationPortRange" => @destination_port_range,
    "destinationTransitGatewayAttachmentId" => @destination_transit_gateway_attachment_id,
    "destinationTransitGatewayAttachmentType" => @destination_transit_gateway_attachment_type,
    "protocol" => @protocol,
    "sourceCidrBlock" => @source_cidr_block,
    "sourcePortRange" => @source_port_range,
    "sourceTransitGatewayAttachmentId" => @source_transit_gateway_attachment_id,
    "sourceTransitGatewayAttachmentType" => @source_transit_gateway_attachment_type,
  })
  result.compact
end