Class: AWSCDK::EC2::CfnInstanceConnectEndpointProps

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

Overview

Properties for defining a CfnInstanceConnectEndpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnet_id:, client_token: nil, preserve_client_ip: nil, security_group_ids: nil, tags: nil) ⇒ CfnInstanceConnectEndpointProps

Returns a new instance of CfnInstanceConnectEndpointProps.

Parameters:

  • subnet_id (String)

    The ID of the subnet in which to create the EC2 Instance Connect Endpoint.

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

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

  • preserve_client_ip (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether the client IP address is preserved as the source. The following are the possible values.

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

    One or more security groups to associate with the endpoint.

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

    The tags to apply to the EC2 Instance Connect Endpoint during creation.



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

def initialize(subnet_id:, client_token: nil, preserve_client_ip: nil, security_group_ids: nil, tags: nil)
  @subnet_id = subnet_id
  Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetId")
  @client_token = client_token
  Jsii::Type.check_type(@client_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientToken") unless @client_token.nil?
  @preserve_client_ip = preserve_client_ip
  Jsii::Type.check_type(@preserve_client_ip, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "preserveClientIp") unless @preserve_client_ip.nil?
  @security_group_ids = security_group_ids
  Jsii::Type.check_type(@security_group_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroupIds") unless @security_group_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

#client_tokenString? (readonly)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.



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

def client_token
  @client_token
end

#preserve_client_ipBoolean, ... (readonly)

Indicates whether the client IP address is preserved as the source. The following are the possible values.

  • true - Use the client IP address as the source.
  • false - Use the network interface IP address as the source.

PreserveClientIp is only supported on IPv4 EC2 Instance Connect Endpoints. To use PreserveClientIp , the value for IpAddressType must be ipv4 .

Default: false



48
49
50
# File 'ec2/cfn_instance_connect_endpoint_props.rb', line 48

def preserve_client_ip
  @preserve_client_ip
end

#security_group_idsArray<String>? (readonly)

One or more security groups to associate with the endpoint.

If you don't specify a security group, the default security group for your VPC will be associated with the endpoint.



55
56
57
# File 'ec2/cfn_instance_connect_endpoint_props.rb', line 55

def security_group_ids
  @security_group_ids
end

#subnet_idString (readonly)

The ID of the subnet in which to create the EC2 Instance Connect Endpoint.



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

def subnet_id
  @subnet_id
end

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

The tags to apply to the EC2 Instance Connect Endpoint during creation.



60
61
62
# File 'ec2/cfn_instance_connect_endpoint_props.rb', line 60

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



62
63
64
65
66
67
68
69
70
# File 'ec2/cfn_instance_connect_endpoint_props.rb', line 62

def self.jsii_properties
  {
    :subnet_id => "subnetId",
    :client_token => "clientToken",
    :preserve_client_ip => "preserveClientIp",
    :security_group_ids => "securityGroupIds",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



72
73
74
75
76
77
78
79
80
81
82
# File 'ec2/cfn_instance_connect_endpoint_props.rb', line 72

def to_jsii
  result = {}
  result.merge!({
    "subnetId" => @subnet_id,
    "clientToken" => @client_token,
    "preserveClientIp" => @preserve_client_ip,
    "securityGroupIds" => @security_group_ids,
    "tags" => @tags,
  })
  result.compact
end