# CfnApiKeyProps

Properties for defining a `CfnApiKey`.

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

- Source: Generated at build time
- Type last changed: v2.103.0 · 26 Oct 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_appsync as appsync } from 'aws-cdk-lib';
const cfnApiKeyProps: appsync.CfnApiKeyProps = {
  apiId: 'apiId',

  // the properties below are optional
  description: 'description',
  expires: 123,
};
```

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_appsync as appsync

cfn_api_key_props = appsync.CfnApiKeyProps(
    api_id="apiId",

    # the properties below are optional
    description="description",
    expires=123
)
```

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

CfnApiKeyProps cfnApiKeyProps = CfnApiKeyProps.builder()
        .apiId("apiId")

        // the properties below are optional
        .description("description")
        .expires(123)
        .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.AppSync;

var cfnApiKeyProps = new CfnApiKeyProps {
    ApiId = "apiId",

    // the properties below are optional
    Description = "description",
    Expires = 123
};
```

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"

cfnApiKeyProps := &CfnApiKeyProps{
	ApiId: jsii.String("apiId"),

	// the properties below are optional
	Description: jsii.String("description"),
	Expires: jsii.Number(123),
}
```

## Properties

- `apiId`: string (required) — Unique AWS AppSync GraphQL API ID for this API key.

- `description`: string — Unique description of your API key.

- `expires`: number — The time after which the API key expires.

  The date is represented as seconds since the epoch, rounded down to the nearest hour.
