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

data "aws_api_gateway_rest_api" "my_rest_api" {
name = "my-rest-api"
}
data "aws_api_gateway_resource" "my_resource" {
rest_api_id = data.aws_api_gateway_rest_api.my_rest_api.id
path = "/endpoint/path"
}

Argument Reference

--

--

Example Usage

data "aws_api_gateway_export" "example" {
rest_api_id = aws_api_gateway_stage.example.rest_api_id
stage_name = aws_api_gateway_stage.example.stage_name
export_type = "oas30"
}

Argument Reference

  • export_type - (Required) Type of export. Acceptable values are oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.
  • rest_api_id - (Required) Identifier of the associated REST API.
  • stage_name - (Required) Name of the Stage that will…

--

--

Rakesh Tripathi

Rakesh Tripathi

Consulting Engineer, Software Developer, Infra, Quora