Class: AWSCDK::EC2::InterfaceVPCEndpointOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::InterfaceVPCEndpointOptions
- Defined in:
- ec2/interface_vpc_endpoint_options.rb
Overview
Options to add an interface endpoint to a VPC.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dns_record_ip_type ⇒ AWSCDK::EC2::VPCEndpointDNSRecordIPType?
readonly
Type of DNS records created for the VPC endpoint.
-
#ip_address_type ⇒ AWSCDK::EC2::VPCEndpointIPAddressType?
readonly
The IP address type for the endpoint.
-
#lookup_supported_azs ⇒ Boolean?
readonly
Limit to only those availability zones where the endpoint service can be created.
-
#open ⇒ Boolean?
readonly
Whether to automatically allow VPC traffic to the endpoint.
-
#private_dns_enabled ⇒ Boolean?
readonly
Whether to associate a private hosted zone with the specified VPC.
-
#private_dns_only_for_inbound_resolver_endpoint ⇒ AWSCDK::EC2::VPCEndpointPrivateDNSOnlyForInboundResolverEndpoint?
readonly
Whether to enable private DNS only for inbound endpoints.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
The security groups to associate with this interface VPC endpoint.
-
#service ⇒ AWSCDK::EC2::IInterfaceVPCEndpointService
readonly
The service to use for this interface VPC endpoint.
-
#service_region ⇒ String?
readonly
The region where the VPC endpoint service is located.
-
#subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
The subnets in which to create an endpoint network interface.
Class Method Summary collapse
Instance Method Summary collapse
-
#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) ⇒ InterfaceVPCEndpointOptions
constructor
A new instance of InterfaceVPCEndpointOptions.
- #to_jsii ⇒ Object
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) ⇒ InterfaceVPCEndpointOptions
Returns a new instance of InterfaceVPCEndpointOptions.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 17 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) @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? end |
Instance Attribute Details
#dns_record_ip_type ⇒ AWSCDK::EC2::VPCEndpointDNSRecordIPType? (readonly)
Default: not specified
Type of DNS records created for the VPC endpoint.
48 49 50 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 48 def dns_record_ip_type @dns_record_ip_type end |
#ip_address_type ⇒ AWSCDK::EC2::VPCEndpointIPAddressType? (readonly)
Default: not specified
The IP address type for the endpoint.
53 54 55 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 53 def ip_address_type @ip_address_type end |
#lookup_supported_azs ⇒ Boolean? (readonly)
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.
61 62 63 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 61 def lookup_supported_azs @lookup_supported_azs end |
#open ⇒ Boolean? (readonly)
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.
69 70 71 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 69 def open @open end |
#private_dns_enabled ⇒ Boolean? (readonly)
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.
77 78 79 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 77 def private_dns_enabled @private_dns_enabled end |
#private_dns_only_for_inbound_resolver_endpoint ⇒ AWSCDK::EC2::VPCEndpointPrivateDNSOnlyForInboundResolverEndpoint? (readonly)
Default: not specified
Whether to enable private DNS only for inbound endpoints.
82 83 84 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 82 def private_dns_only_for_inbound_resolver_endpoint @private_dns_only_for_inbound_resolver_endpoint end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - a new security group is created
The security groups to associate with this interface VPC endpoint.
87 88 89 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 87 def security_groups @security_groups end |
#service ⇒ AWSCDK::EC2::IInterfaceVPCEndpointService (readonly)
The service to use for this interface VPC endpoint.
43 44 45 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 43 def service @service end |
#service_region ⇒ String? (readonly)
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.
94 95 96 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 94 def service_region @service_region end |
#subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - private subnets
The subnets in which to create an endpoint network interface.
At most one per availability zone.
102 103 104 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 102 def subnets @subnets end |
Class Method Details
.jsii_properties ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 104 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", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'ec2/interface_vpc_endpoint_options.rb', line 119 def to_jsii result = {} 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, }) result.compact end |