Provides details about a specific Amazon API Gateway Version 2 API.
data "aws_apigatewayv2_api" "example" {
api_id = "aabbccddee"
}
The arguments of this data source act as filters for querying the available APIs in the current region. The given filters must match exactly one API whose data will be exported as attributes.
This argument supports the following arguments:
api_id
- (Required) API identifier.This data source exports the following attributes in addition to the arguments above:
api_endpoint
- URI of the API, of the form https://{api-id}.execute-api.{region}.amazonaws.com
for HTTP APIs and wss://{api-id}.execute-api.{region}.amazonaws.com
for WebSocket APIs.api_key_selection_expression
- An API key selection expression.
Applicable for WebSocket APIs.arn
- ARN of the API.cors_configuration
- Cross-origin resource sharing (CORS) configuration.
Applicable for HTTP APIs.description
- Description of the API.disable_execute_api_endpoint
- Whether clients can invoke the API by using the default execute-api
endpoint.execution_arn
- ARN prefix to be used in an aws_lambda_permission
's source_arn
attribute
or in an aws_iam_policy
to authorize access to the @connections
API.
See the Amazon API Gateway Developer Guide for details.name
- Name of the API.protocol_type
- API protocol.route_selection_expression
- The route selection expression for the API.tags
- Map of resource tags.version
- Version identifier for the API.The cors_configuration
object supports the following:
allow_credentials
- Whether credentials are included in the CORS request.allow_headers
- Set of allowed HTTP headers.allow_methods
- Set of allowed HTTP methods.allow_origins
- Set of allowed origins.expose_headers
- Set of exposed HTTP headers.max_age
- Number of seconds that the browser should cache preflight request results.