InterfaceVpcEndpoint

class aws_cdk.aws_ec2.InterfaceVpcEndpoint(scope, id, *, vpc, service, lookup_supported_azs=None, open=None, private_dns_enabled=None, security_groups=None, subnets=None)

Bases: aws_cdk.aws_ec2.VpcEndpoint

A interface VPC endpoint.

resource: :resource:: AWS::EC2::VPCEndpoint

Parameters
  • scope (Construct) –

  • id (str) –

  • vpc (IVpc) – The VPC network in which the interface endpoint will be used.

  • service (IInterfaceVpcEndpointService) – The service to use for this interface VPC endpoint.

  • lookup_supported_azs (Optional[bool]) – 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. Default: false

  • open (Optional[bool]) – 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. Default: true

  • private_dns_enabled (Optional[bool]) – 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. Default: set by the instance of IInterfaceVpcEndpointService, or true if not defined by the instance of IInterfaceVpcEndpointService

  • security_groups (Optional[List[ISecurityGroup]]) – The security groups to associate with this interface VPC endpoint. Default: - a new security group is created

  • subnets (Optional[SubnetSelection]) – The subnets in which to create an endpoint network interface. At most one per availability zone. Default: - private subnets

Methods

add_to_policy(statement)

Adds a statement to the policy document of the VPC endpoint. The statement must have a Principal.

Not all interface VPC endpoints support policy. For more information see https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html

Parameters

statement (PolicyStatement) – the IAM statement to add.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

connections

Access to network connections.

Return type

Connections

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

Return type

ResourceEnvironment

node

The construct tree node associated with this construct.

Return type

ConstructNode

security_group_id

The identifier of the first security group associated with this interface VPC endpoint.

deprecated :deprecated: use the connections object

stability :stability: deprecated

Return type

str

stack

The stack in which this resource is defined.

Return type

Stack

vpc_endpoint_creation_timestamp

The date and time the interface VPC endpoint was created.

attribute: :attribute:: true

Return type

str

vpc_endpoint_dns_entries

The DNS entries for the interface VPC endpoint.

attribute: :attribute:: true

Return type

List[str]

vpc_endpoint_id

The interface VPC endpoint identifier.

Return type

str

vpc_endpoint_network_interface_ids

One or more network interfaces for the interface VPC endpoint.

attribute: :attribute:: true

Return type

List[str]

Static Methods

classmethod from_interface_vpc_endpoint_attributes(scope, id, *, port, vpc_endpoint_id, security_group_id=None, security_groups=None)

Imports an existing interface VPC endpoint.

Parameters
  • scope (Construct) –

  • id (str) –

  • port (Union[int, float]) – The port of the service of the interface VPC endpoint.

  • vpc_endpoint_id (str) – The interface VPC endpoint identifier.

  • security_group_id (Optional[str]) – The identifier of the security group associated with the interface VPC endpoint.

  • security_groups (Optional[List[ISecurityGroup]]) – The security groups associated with the interface VPC endpoint.

Return type

IInterfaceVpcEndpoint

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool