Class: AWSCDK::EC2::InterfaceVPCEndpointProps

Inherits:
InterfaceVPCEndpointOptions
  • Object
show all
Defined in:
ec2/interface_vpc_endpoint_props.rb

Overview

Construction properties for an InterfaceVpcEndpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service:, dns_record_ip_type: nil, ip_address_type: nil, lookup_supported_azs: nil, open: nil, private_dns_enabled: nil, private_dns_only_for_inbound_resolver_endpoint: nil, security_groups: nil, service_region: nil, subnets: nil, vpc:) ⇒ InterfaceVPCEndpointProps

Returns a new instance of InterfaceVPCEndpointProps.

Parameters:

  • service (AWSCDK::EC2::IInterfaceVPCEndpointService)

    The service to use for this interface VPC endpoint.

  • dns_record_ip_type (AWSCDK::EC2::VPCEndpointDNSRecordIPType, nil) (defaults to: nil)

    Type of DNS records created for the VPC endpoint.

  • ip_address_type (AWSCDK::EC2::VPCEndpointIPAddressType, nil) (defaults to: nil)

    The IP address type for the endpoint.

  • lookup_supported_azs (Boolean, nil) (defaults to: nil)

    Limit to only those availability zones where the endpoint service can be created.

  • open (Boolean, nil) (defaults to: nil)

    Whether to automatically allow VPC traffic to the endpoint.

  • private_dns_enabled (Boolean, nil) (defaults to: nil)

    Whether to associate a private hosted zone with the specified VPC.

  • private_dns_only_for_inbound_resolver_endpoint (AWSCDK::EC2::VPCEndpointPrivateDNSOnlyForInboundResolverEndpoint, nil) (defaults to: nil)

    Whether to enable private DNS only for inbound endpoints.

  • security_groups (Array<AWSCDK::EC2::ISecurityGroup>, nil) (defaults to: nil)

    The security groups to associate with this interface VPC endpoint.

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

    The region where the VPC endpoint service is located.

  • subnets (AWSCDK::EC2::SubnetSelection, nil) (defaults to: nil)

    The subnets in which to create an endpoint network interface.

  • vpc (AWSCDK::EC2::IVPC)

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



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'ec2/interface_vpc_endpoint_props.rb', line 18

def initialize(service:, dns_record_ip_type: nil, ip_address_type: nil, lookup_supported_azs: nil, open: nil, private_dns_enabled: nil, private_dns_only_for_inbound_resolver_endpoint: nil, security_groups: nil, service_region: nil, subnets: nil, vpc:)
  @service = service
  Jsii::Type.check_type(@service, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklJbnRlcmZhY2VWcGNFbmRwb2ludFNlcnZpY2UifQ==")), "service")
  @dns_record_ip_type = dns_record_ip_type
  Jsii::Type.check_type(@dns_record_ip_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlZwY0VuZHBvaW50RG5zUmVjb3JkSXBUeXBlIn0=")), "dnsRecordIpType") unless @dns_record_ip_type.nil?
  @ip_address_type = ip_address_type
  Jsii::Type.check_type(@ip_address_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlZwY0VuZHBvaW50SXBBZGRyZXNzVHlwZSJ9")), "ipAddressType") unless @ip_address_type.nil?
  @lookup_supported_azs = lookup_supported_azs
  Jsii::Type.check_type(@lookup_supported_azs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "lookupSupportedAzs") unless @lookup_supported_azs.nil?
  @open = open
  Jsii::Type.check_type(@open, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "open") unless @open.nil?
  @private_dns_enabled = private_dns_enabled
  Jsii::Type.check_type(@private_dns_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "privateDnsEnabled") unless @private_dns_enabled.nil?
  @private_dns_only_for_inbound_resolver_endpoint = private_dns_only_for_inbound_resolver_endpoint
  Jsii::Type.check_type(@private_dns_only_for_inbound_resolver_endpoint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlZwY0VuZHBvaW50UHJpdmF0ZURuc09ubHlGb3JJbmJvdW5kUmVzb2x2ZXJFbmRwb2ludCJ9")), "privateDnsOnlyForInboundResolverEndpoint") unless @private_dns_only_for_inbound_resolver_endpoint.nil?
  @security_groups = security_groups
  Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil?
  @service_region = service_region
  Jsii::Type.check_type(@service_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceRegion") unless @service_region.nil?
  @subnets = subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**subnets.transform_keys(&:to_sym)) : subnets
  Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "subnets") unless @subnets.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc")
end

Instance Attribute Details

#dns_record_ip_typeAWSCDK::EC2::VPCEndpointDNSRecordIPType? (readonly)

Note:

Default: not specified

Type of DNS records created for the VPC endpoint.



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

def dns_record_ip_type
  @dns_record_ip_type
end

#ip_address_typeAWSCDK::EC2::VPCEndpointIPAddressType? (readonly)

Note:

Default: not specified

The IP address type for the endpoint.



56
57
58
# File 'ec2/interface_vpc_endpoint_props.rb', line 56

def ip_address_type
  @ip_address_type
end

#lookup_supported_azsBoolean? (readonly)

Note:

Default: false

Limit to only those availability zones where the endpoint service can be created.

Setting this to 'true' requires a lookup to be performed at synthesis time. Account and region must be set on the containing stack for this to work.

Returns:

  • (Boolean, nil)


64
65
66
# File 'ec2/interface_vpc_endpoint_props.rb', line 64

def lookup_supported_azs
  @lookup_supported_azs
end

#openBoolean? (readonly)

Note:

Default: true

Whether to automatically allow VPC traffic to the endpoint.

If enabled, all traffic to the endpoint from within the VPC will be automatically allowed. This is done based on the VPC's CIDR range.

Returns:

  • (Boolean, nil)


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

def open
  @open
end

#private_dns_enabledBoolean? (readonly)

Note:

Default: set by the instance of IInterfaceVpcEndpointService, or true if not defined by the instance of IInterfaceVpcEndpointService

Whether to associate a private hosted zone with the specified VPC.

This allows you to make requests to the service using its default DNS hostname.

Returns:

  • (Boolean, nil)


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

def private_dns_enabled
  @private_dns_enabled
end

#private_dns_only_for_inbound_resolver_endpointAWSCDK::EC2::VPCEndpointPrivateDNSOnlyForInboundResolverEndpoint? (readonly)

Note:

Default: not specified

Whether to enable private DNS only for inbound endpoints.



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

def private_dns_only_for_inbound_resolver_endpoint
  @private_dns_only_for_inbound_resolver_endpoint
end

#security_groupsArray<AWSCDK::EC2::ISecurityGroup>? (readonly)

Note:

Default: - a new security group is created

The security groups to associate with this interface VPC endpoint.

Returns:



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

def security_groups
  @security_groups
end

#serviceAWSCDK::EC2::IInterfaceVPCEndpointService (readonly)

The service to use for this interface VPC endpoint.



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

def service
  @service
end

#service_regionString? (readonly)

Note:

Default: - Same region as the interface VPC endpoint

The region where the VPC endpoint service is located.

Only needs to be specified for cross-region VPC endpoints.

Returns:

  • (String, nil)


97
98
99
# File 'ec2/interface_vpc_endpoint_props.rb', line 97

def service_region
  @service_region
end

#subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

Default: - private subnets

The subnets in which to create an endpoint network interface.

At most one per availability zone.



105
106
107
# File 'ec2/interface_vpc_endpoint_props.rb', line 105

def subnets
  @subnets
end

#vpcAWSCDK::EC2::IVPC (readonly)

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

Returns:



109
110
111
# File 'ec2/interface_vpc_endpoint_props.rb', line 109

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'ec2/interface_vpc_endpoint_props.rb', line 111

def self.jsii_properties
  {
    :service => "service",
    :dns_record_ip_type => "dnsRecordIpType",
    :ip_address_type => "ipAddressType",
    :lookup_supported_azs => "lookupSupportedAzs",
    :open => "open",
    :private_dns_enabled => "privateDnsEnabled",
    :private_dns_only_for_inbound_resolver_endpoint => "privateDnsOnlyForInboundResolverEndpoint",
    :security_groups => "securityGroups",
    :service_region => "serviceRegion",
    :subnets => "subnets",
    :vpc => "vpc",
  }
end

Instance Method Details

#to_jsiiObject



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'ec2/interface_vpc_endpoint_props.rb', line 127

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "service" => @service,
    "dnsRecordIpType" => @dns_record_ip_type,
    "ipAddressType" => @ip_address_type,
    "lookupSupportedAzs" => @lookup_supported_azs,
    "open" => @open,
    "privateDnsEnabled" => @private_dns_enabled,
    "privateDnsOnlyForInboundResolverEndpoint" => @private_dns_only_for_inbound_resolver_endpoint,
    "securityGroups" => @security_groups,
    "serviceRegion" => @service_region,
    "subnets" => @subnets,
    "vpc" => @vpc,
  })
  result.compact
end