# CfnInstanceConnectEndpointProps

Properties for defining a `CfnInstanceConnectEndpoint`.

Used as props by: [CfnInstanceConnectEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnInstanceConnectEndpoint.html)

- Source: Generated at build time
- Type last changed: v2.97.0 · 22 Sep 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnInstanceConnectEndpointProps: ec2.CfnInstanceConnectEndpointProps = {
  subnetId: 'subnetId',

  // the properties below are optional
  clientToken: 'clientToken',
  preserveClientIp: false,
  securityGroupIds: ['securityGroupIds'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_instance_connect_endpoint_props = ec2.CfnInstanceConnectEndpointProps(
    subnet_id="subnetId",

    # the properties below are optional
    client_token="clientToken",
    preserve_client_ip=False,
    security_group_ids=["securityGroupIds"],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

CfnInstanceConnectEndpointProps cfnInstanceConnectEndpointProps = CfnInstanceConnectEndpointProps.builder()
        .subnetId("subnetId")

        // the properties below are optional
        .clientToken("clientToken")
        .preserveClientIp(false)
        .securityGroupIds(List.of("securityGroupIds"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var cfnInstanceConnectEndpointProps = new CfnInstanceConnectEndpointProps {
    SubnetId = "subnetId",

    // the properties below are optional
    ClientToken = "clientToken",
    PreserveClientIp = false,
    SecurityGroupIds = new [] { "securityGroupIds" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnInstanceConnectEndpointProps := &CfnInstanceConnectEndpointProps{
	SubnetId: jsii.String("subnetId"),

	// the properties below are optional
	ClientToken: jsii.String("clientToken"),
	PreserveClientIp: jsii.Boolean(false),
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `clientToken`: string — Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

- `preserveClientIp`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — 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.

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

  Default: `false`

- `securityGroupIds`: string[] — 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.

- `subnetId`: string (required) — The ID of the subnet in which to create the EC2 Instance Connect Endpoint.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags to apply to the EC2 Instance Connect Endpoint during creation.
