aws-cdk-lib.aws_appsync.ApiKeyConfig

interface ApiKeyConfig

LanguageType name
.NETAmazon.CDK.AWS.AppSync.ApiKeyConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#ApiKeyConfig
Javasoftware.amazon.awscdk.services.appsync.ApiKeyConfig
Pythonaws_cdk.aws_appsync.ApiKeyConfig
TypeScript (source)aws-cdk-lib » aws_appsync » ApiKeyConfig

Configuration for API Key authorization in AppSync.

Example

// 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

NameTypeDescription
description?stringDescription of API key.
expires?ExpirationThe time from creation time after which the API key expires.
name?stringUnique name of the API Key.

description?

Type: string (optional, default: 'Default API Key created by CDK')

Description of API key.


expires?

Type: Expiration (optional, default: 7 days rounded down to nearest hour)

The time from creation time after which the API key expires.

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?

Type: string (optional, default: 'DefaultAPIKey')

Unique name of the API Key.