Resource: awsApiGatewayDocumentationVersion
Provides a resource to manage an API Gateway Documentation Version.
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 awsApiGatewayRestApiExample = new aws.apiGatewayRestApi.ApiGatewayRestApi(
this,
"example",
{
name: "example_api",
}
);
const awsApiGatewayDocumentationPartExample =
new aws.apiGatewayDocumentationPart.ApiGatewayDocumentationPart(
this,
"example_1",
{
location: {
type: "API",
},
properties: '{"description":"Example"}',
restApiId: awsApiGatewayRestApiExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsApiGatewayDocumentationPartExample.overrideLogicalId("example");
const awsApiGatewayDocumentationVersionExample =
new aws.apiGatewayDocumentationVersion.ApiGatewayDocumentationVersion(
this,
"example_2",
{
depends_on: [`\${${awsApiGatewayDocumentationPartExample.fqn}}`],
description: "Example description",
restApiId: awsApiGatewayRestApiExample.id,
version: "example_version",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsApiGatewayDocumentationVersionExample.overrideLogicalId("example");
Argument Reference
The following argument is supported:
version
- (Required) Version identifier of the API documentation snapshot.restApiId
- (Required) ID of the associated Rest APIdescription
- (Optional) Description of the API documentation version.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
Import
API Gateway documentation versions can be imported using restApiId/version
, e.g.,