# CfnSecurityKeyProps

Properties for defining a `CfnSecurityKey`.

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

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_connect as connect } from 'aws-cdk-lib';
const cfnSecurityKeyProps: connect.CfnSecurityKeyProps = {
  instanceId: 'instanceId',
  key: 'key',
};
```

Python:

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

cfn_security_key_props = connect.CfnSecurityKeyProps(
    instance_id="instanceId",
    key="key"
)
```

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.connect.*;

CfnSecurityKeyProps cfnSecurityKeyProps = CfnSecurityKeyProps.builder()
        .instanceId("instanceId")
        .key("key")
        .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.Connect;

var cfnSecurityKeyProps = new CfnSecurityKeyProps {
    InstanceId = "instanceId",
    Key = "key"
};
```

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"

cfnSecurityKeyProps := &CfnSecurityKeyProps{
	InstanceId: jsii.String("instanceId"),
	Key: jsii.String("key"),
}
```

## Properties

- `instanceId`: string | [IInstanceRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_connect.IInstanceRef.html) (required) — The Amazon Resource Name (ARN) of the instance.

  *Minimum* : `1`

  *Maximum* : `100`

- `key`: string (required) — A valid security key in PEM format. For example:.

  `"-----BEGIN PUBLIC KEY-----\ [a lot of characters] ----END PUBLIC KEY-----"`

  *Minimum* : `1`

  *Maximum* : `1024`
