ModifyInstanceConnectEndpoint
Modifies the specified EC2 Instance Connect Endpoint.
For more information, see Modify an EC2 Instance Connect Endpoint in the Amazon EC2 User Guide.
Request Parameters
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
- DryRun
-
Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.Type: Boolean
Required: No
- InstanceConnectEndpointId
-
The ID of the EC2 Instance Connect Endpoint to modify.
Type: String
Required: Yes
- IpAddressType
-
The new IP address type for the EC2 Instance Connect Endpoint.
Note
PreserveClientIp
is only supported on IPv4 EC2 Instance Connect Endpoints. To usePreserveClientIp
, the value forIpAddressType
must beipv4
.Type: String
Valid Values:
ipv4 | dualstack | ipv6
Required: No
- PreserveClientIp
-
Indicates whether the client IP address is preserved as the source when you connect to a resource. The following are the possible values.
-
true
- Use the IP address of the client. Your instance must have an IPv4 address. -
false
- Use the IP address of the network interface.
Type: Boolean
Required: No
-
- SecurityGroupId.N
-
Changes the security groups for the EC2 Instance Connect Endpoint. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.
Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 16 items.
Required: No
Response Elements
The following elements are returned by the service.
- requestId
-
The ID of the request.
Type: String
- return
-
Is
true
if the request succeeds and an error otherwise.Type: Boolean
Errors
For information about the errors that are common to all actions, see Common client error codes.
Examples
Example: Modify an EC2 Instance Connect Endpoint
This example modifies all the parameters of an EC2 Instance Connect Endpoint in a single request.
Sample Request
https://ec2.amazonaws.com/?Action=ModifyInstanceConnectEndpoint
&InstanceConnectEndpointId=eice-0123456789example
&SecurityGroupId.1=sg-0123456789example
&IpAddressType=dualstack
&PreserveClientIp=false
&AUTHPARAMS
Sample Response
<ModifyInstanceConnectEndpointResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<return>true</return>
</ModifyInstanceConnectEndpointResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: