Provides a resource to manage an API Gateway Documentation Version.
resource "aws_api_gateway_documentation_version" "example" {
version = "example_version"
rest_api_id = aws_api_gateway_rest_api.example.id
description = "Example description"
depends_on = [aws_api_gateway_documentation_part.example]
}
resource "aws_api_gateway_rest_api" "example" {
name = "example_api"
}
resource "aws_api_gateway_documentation_part" "example" {
location {
type = "API"
}
properties = "{\"description\":\"Example\"}"
rest_api_id = aws_api_gateway_rest_api.example.id
}
This resource supports the following arguments:
version
- (Required) Version identifier of the API documentation snapshot.rest_api_id
- (Required) ID of the associated Rest APIdescription
- (Optional) Description of the API documentation version.This resource exports the following attributes in addition to the arguments above:
In Terraform v1.5.0 and later, use an import
block to import API Gateway documentation versions using REST-API-ID/VERSION
. For example:
import {
to = aws_api_gateway_documentation_version.example
id = "5i4e1ko720/example-version"
}
Using terraform import
, import API Gateway documentation versions using REST-API-ID/VERSION
. For example:
% terraform import aws_api_gateway_documentation_version.example 5i4e1ko720/example-version