Data Source: awsApiGatewayResource
Use this data source to get the id of a Resource in API Gateway. To fetch the Resource, you must provide the REST API id as well as the full path.
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 dataAwsApiGatewayRestApiMyRestApi =
new aws.dataAwsApiGatewayRestApi.DataAwsApiGatewayRestApi(
this,
"my_rest_api",
{
name: "my-rest-api",
}
);
new aws.dataAwsApiGatewayResource.DataAwsApiGatewayResource(
this,
"my_resource",
{
path: "/endpoint/path",
restApiId: dataAwsApiGatewayRestApiMyRestApi.id,
}
);
Argument Reference
restApiId
- (Required) REST API id that owns the resource. If no REST API is found, an error will be returned.path
- (Required) Full path of the resource. If no path is found, an error will be returned.
Attributes Reference
id
- Set to the ID of the found Resource.parentId
- Set to the ID of the parent Resource.pathPart
- Set to the path relative to the parent Resource.