Data Source: awsApigatewayv2Export
Exports a definition of an API in a particular output format and specification.
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";
new aws.dataAwsApigatewayv2Export.DataAwsApigatewayv2Export(this, "test", {
apiId: "${aws_apigatewayv2_route.test.api_id}",
outputType: "JSON",
specification: "OAS30",
});
Argument Reference
The following arguments are supported:
apiId
- (Required) API identifier.specification
- (Required) Version of the API specification to use.oas30
, for OpenAPI 3.0, is the only supported value.outputType
- (Required) Output type of the exported definition file. Valid values arejson
andyaml
.exportVersion
- (Optional) Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is10
.includeExtensions
- (Optional) Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.stageName
- (Optional) Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- API identifier.body
- ID of the API.