create_instance_connect_endpoint
async
¶
create_instance_connect_endpoint(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 | |