AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ApiGateway::Resource

CfnResource

The `AWS::ApiGateway::Resource` resource creates a resource in an API.

Import

import { CfnResource } from 'aws-cdk-lib/aws-apigateway';

Or use the module namespace:

import * as apigateway from 'aws-cdk-lib/aws-apigateway';
// apigateway.CfnResource

Properties

Configuration passed to the constructor as CfnResourceProps.

parentIdRequired
string | IResourceRef

The parent resource's identifier.

pathPartRequired
string

The last path segment for this resource.

restApiIdRequired
string | IRestApiRef

The string identifier of the associated RestApi.

CloudFormation Resource

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

Get the Amazon API Gateway Cheat Sheet

Everything you need to know about Amazon API Gateway on one page. HD quality, print-friendly.

Download Free Infographic