# ApiKeyConfig

Configuration for API Key authorization in AppSync.

- Source: [`aws-appsync/lib/graphqlapi.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts#L95)
- Type last changed: v2.60.0 · 12 Jan 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_appsync as appsync } from 'aws-cdk-lib';

declare const expiration: cdk.Expiration;
const apiKeyConfig: appsync.ApiKeyConfig = {
  description: 'description',
  expires: expiration,
  name: 'name',
};
```

## Properties

- `description`: string — Description of API key.

  **Default:** 'Default API Key created by CDK'

- `expires`: [Expiration](/cdk/api/v2/docs/aws-cdk-lib.Expiration.html) — The time from creation time after which the API key expires.

  **Default:** 7 days rounded down to nearest hour

  It must be a minimum of 1 day and a maximum of 365 days from date of creation.
  Rounded down to the nearest hour.

- `name`: string = 'DefaultAPIKey' — Unique name of the API Key.
