AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::AppSync::ApiKey

CfnApiKey

The `AWS::AppSync::ApiKey` resource creates a unique key that you can distribute to clients who are executing GraphQL operations with AWS AppSync that require an API key.

Import

import { CfnApiKey } from 'aws-cdk-lib/aws-appsync';

Or use the module namespace:

import * as appsync from 'aws-cdk-lib/aws-appsync';
// appsync.CfnApiKey

Properties

Configuration passed to the constructor as CfnApiKeyProps.

apiIdRequired
string

Unique AWS AppSync GraphQL API ID for this API key.

descriptionOptional
string

Unique description of your API key.

expiresOptional
number

The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the AWS AppSync Cheat Sheet

Everything you need to know about AWS AppSync on one page. HD quality, print-friendly.

Download Free Infographic