Skip to content

EC2  >  Operations  >  create_instance_connect_endpoint

create_instance_connect_endpoint

Operation

create_instance_connect_endpoint async

create_instance_connect_endpoint(input: CreateInstanceConnectEndpointInput, plugins: list[Plugin] | None = None) -> CreateInstanceConnectEndpointOutput

Creates an EC2 Instance Connect Endpoint.

An EC2 Instance Connect Endpoint allows you to connect to an instance, without requiring the instance to have a public IPv4 or public IPv6 address. For more information, see Connect to your instances using EC2 Instance Connect Endpoint in the Amazon EC2 User Guide.

Parameters:

Name Type Description Default
input CreateInstanceConnectEndpointInput

An instance of CreateInstanceConnectEndpointInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateInstanceConnectEndpointOutput

An instance of CreateInstanceConnectEndpointOutput.

Input

CreateInstanceConnectEndpointInput dataclass

Bases: _SerdeShape

Dataclass for CreateInstanceConnectEndpointInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

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

This field is autopopulated if not provided.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

ip_address_type class-attribute instance-attribute
ip_address_type: str | None = ...

The IP address type of the endpoint.

If no value is specified, the default value is determined by the IP address type of the subnet:

  • dualstack - If the subnet has both IPv4 and IPv6 CIDRs

  • ipv4 - If the subnet has only IPv4 CIDRs

  • ipv6 - If the subnet has only IPv6 CIDRs

Note

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

preserve_client_ip class-attribute instance-attribute
preserve_client_ip: bool | None = ...

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.

Note

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

Default: false

security_group_ids class-attribute instance-attribute
security_group_ids: list[str] | None = ...

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.

subnet_id class-attribute instance-attribute
subnet_id: str | None = ...

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

tag_specifications class-attribute instance-attribute
tag_specifications: list[TagSpecification] | None = ...

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

Output

CreateInstanceConnectEndpointOutput dataclass

Bases: _SerdeShape

Dataclass for CreateInstanceConnectEndpointOutput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive idempotency token provided by the client in the the request.

instance_connect_endpoint class-attribute instance-attribute
instance_connect_endpoint: Ec2InstanceConnectEndpoint | None = ...

Information about the EC2 Instance Connect Endpoint.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.