Creates an API Gateway REST API and a resource within it.

Terraform Template

resource "aws_api_gateway_resource" "MyDemoResource" {
  parent_id = aws_api_gateway_rest_api.MyDemoAPI.root_resource_id
  path_part = "mydemoresource"
  rest_api_id = aws_api_gateway_rest_api.MyDemoAPI.id
}

resource "aws_api_gateway_rest_api" "MyDemoAPI" {
  description = "This is my API for demonstration purposes"
  name = "MyDemoAPI"
}