Class: AWSCDK::EC2::CfnTrafficMirrorTargetProps

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

Overview

Properties for defining a CfnTrafficMirrorTarget.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, gateway_load_balancer_endpoint_id: nil, network_interface_id: nil, network_load_balancer_arn: nil, tags: nil) ⇒ CfnTrafficMirrorTargetProps

Returns a new instance of CfnTrafficMirrorTargetProps.

Parameters:

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

    The description of the Traffic Mirror target.

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

    The ID of the Gateway Load Balancer endpoint.

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

    The network interface ID that is associated with the target.

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

    The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.

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

    The tags to assign to the Traffic Mirror target.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 14

def initialize(description: nil, gateway_load_balancer_endpoint_id: nil, network_interface_id: nil, network_load_balancer_arn: nil, tags: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @gateway_load_balancer_endpoint_id = gateway_load_balancer_endpoint_id
  Jsii::Type.check_type(@gateway_load_balancer_endpoint_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gatewayLoadBalancerEndpointId") unless @gateway_load_balancer_endpoint_id.nil?
  @network_interface_id = network_interface_id
  Jsii::Type.check_type(@network_interface_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkInterfaceId") unless @network_interface_id.nil?
  @network_load_balancer_arn = network_load_balancer_arn
  Jsii::Type.check_type(@network_load_balancer_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkLoadBalancerArn") unless @network_load_balancer_arn.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

#descriptionString? (readonly)

The description of the Traffic Mirror target.



31
32
33
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 31

def description
  @description
end

#gateway_load_balancer_endpoint_idString? (readonly)

The ID of the Gateway Load Balancer endpoint.



36
37
38
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 36

def gateway_load_balancer_endpoint_id
  @gateway_load_balancer_endpoint_id
end

#network_interface_idString? (readonly)

The network interface ID that is associated with the target.



41
42
43
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 41

def network_interface_id
  @network_interface_id
end

#network_load_balancer_arnString? (readonly)

The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.



46
47
48
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 46

def network_load_balancer_arn
  @network_load_balancer_arn
end

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

The tags to assign to the Traffic Mirror target.



51
52
53
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 51

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
61
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 53

def self.jsii_properties
  {
    :description => "description",
    :gateway_load_balancer_endpoint_id => "gatewayLoadBalancerEndpointId",
    :network_interface_id => "networkInterfaceId",
    :network_load_balancer_arn => "networkLoadBalancerArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



63
64
65
66
67
68
69
70
71
72
73
# File 'ec2/cfn_traffic_mirror_target_props.rb', line 63

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "gatewayLoadBalancerEndpointId" => @gateway_load_balancer_endpoint_id,
    "networkInterfaceId" => @network_interface_id,
    "networkLoadBalancerArn" => @network_load_balancer_arn,
    "tags" => @tags,
  })
  result.compact
end