Resource: awsApiGatewayResource
Provides an API Gateway Resource.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsApiGatewayRestApiMyDemoApi =
new aws.apiGatewayRestApi.ApiGatewayRestApi(this, "MyDemoAPI", {
description: "This is my API for demonstration purposes",
name: "MyDemoAPI",
});
new aws.apiGatewayResource.ApiGatewayResource(this, "MyDemoResource", {
parentId: awsApiGatewayRestApiMyDemoApi.rootResourceId,
pathPart: "mydemoresource",
restApiId: awsApiGatewayRestApiMyDemoApi.id,
});
Argument Reference
The following arguments are supported:
restApiId
- (Required) ID of the associated REST APIparentId
- (Required) ID of the parent API resourcepathPart
- (Required) Last path segment of this API resource.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- Resource's identifier.path
- Complete path for this API resource, including all parent paths.
Import
awsApiGatewayResource
can be imported using restApiId/resourceId
, e.g.,