AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::AppSync::Api

CfnApi

The `AWS::AppSync::Api` resource creates an AWS AppSync API that you can use for an AWS AppSync API with your preferred configuration, such as an Event API that provides real-time message publishing and message subscriptions over WebSockets.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnApiProps.

nameRequired
string

The name of the `Api` .

eventConfigOptional
IResolvable | EventConfigProperty

Describes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.

ownerContactOptional
string

The owner contact information for an API resource. This field accepts any string input with a length of 0 - 256 characters.

tagsOptional
CfnTag[]

A set of tags (key-value pairs) for this API.

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