Class: AWSCDK::EC2::GatewayVPCEndpointProps

Inherits:
GatewayVPCEndpointOptions
  • Object
show all
Defined in:
ec2/gateway_vpc_endpoint_props.rb

Overview

Construction properties for a GatewayVpcEndpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service:, subnets: nil, vpc:) ⇒ GatewayVPCEndpointProps

Returns a new instance of GatewayVPCEndpointProps.

Parameters:



10
11
12
13
14
15
16
17
# File 'ec2/gateway_vpc_endpoint_props.rb', line 10

def initialize(service:, subnets: nil, vpc:)
  @service = service
  Jsii::Type.check_type(@service, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklHYXRld2F5VnBjRW5kcG9pbnRTZXJ2aWNlIn0=")), "service")
  @subnets = subnets.is_a?(Array) ? subnets.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : subnets
  Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuU3VibmV0U2VsZWN0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "subnets") unless @subnets.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc")
end

Instance Attribute Details

#serviceAWSCDK::EC2::IGatewayVPCEndpointService (readonly)

The service to use for this gateway VPC endpoint.



22
23
24
# File 'ec2/gateway_vpc_endpoint_props.rb', line 22

def service
  @service
end

#subnetsArray<AWSCDK::EC2::SubnetSelection>? (readonly)

Note:

Default: - All subnets in the VPC

Where to add endpoint routing.

By default, this endpoint will be routable from all subnets in the VPC. Specify a list of subnet selection objects here to be more specific.

Examples:

# Example automatically generated from non-compiling source. May contain errors.
vpc = nil

vpc.add_gateway_endpoint("DynamoDbEndpoint", {
    service: EC2::GatewayVPCEndpointAWSService::DYNAMODB,
    # Add only to ISOLATED subnets
    subnets: [
        {subnet_type: EC2::SubnetType::PRIVATE_ISOLATED},
    ],
})

Returns:



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

def subnets
  @subnets
end

#vpcAWSCDK::EC2::IVPC (readonly)

The VPC network in which the gateway endpoint will be used.

Returns:



45
46
47
# File 'ec2/gateway_vpc_endpoint_props.rb', line 45

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :service => "service",
    :subnets => "subnets",
    :vpc => "vpc",
  }
end

Instance Method Details

#to_jsiiObject



55
56
57
58
59
60
61
62
63
64
# File 'ec2/gateway_vpc_endpoint_props.rb', line 55

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "service" => @service,
    "subnets" => @subnets,
    "vpc" => @vpc,
  })
  result.compact
end