create_instance_connect_endpoint
¶
create_instance_connect_endpoint(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
subnet_id: Optional[SubnetId] = None,
security_group_ids: Optional[SecurityGroupIdStringListRequest] = None,
preserve_client_ip: Optional[Boolean] = None,
client_token: Optional[String] = None,
tag_specifications: Optional[TagSpecificationList] = None,
ip_address_type: Optional[IpAddressType] = None,
) -> CreateInstanceConnectEndpointResult
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:
-
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation. -
subnet_id(Optional[SubnetId], default:None) –The ID of the subnet in which to create the EC2 Instance Connect Endpoint.
-
security_group_ids(Optional[SecurityGroupIdStringListRequest], default: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.
-
preserve_client_ip(Optional[Boolean], default: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.
PreserveClientIpis only supported on IPv4 EC2 Instance Connect Endpoints. To usePreserveClientIp, the value forIpAddressTypemust beipv4.Default:
false -
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the EC2 Instance Connect Endpoint during creation.
-
ip_address_type(Optional[IpAddressType], default: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
PreserveClientIpis only supported on IPv4 EC2 Instance Connect Endpoints. To usePreserveClientIp, the value forIpAddressTypemust beipv4. -
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 | |