Skip to main content

aws.apigateway

Supported Platform

  • aws

Description

Amazon API Gateway resource for assessing the configuration of the AWS API Gateway service

The aws.apigateway resource can be used to assess the configuration of the AWS API Gateway service.

Fields

IDTYPEDESCRIPTION
restApis[]aws.apigateway.restapilist of aws.apigateway.restapi objects representing all rest APIs across all enabled regions in the account

Examples

Return a list of aws.apigateway.restapi resources for all REST APIs configured with the account across all enabled regions

aws.apigateway.restApis;

Return a list of aws.apigateway.restapi resources for all REST APIs configured with the account across all enabled regions and the value for specified fields

aws.apigateway.restApis {
createdDate
description
stages
region
arn
id
name
}

Checks that all methods in Amazon API Gateway have caching enabled and encrypted

aws.apigateway.restApis.all(
stages.all(
methodSettings["CachingEnabled"] == true &&
methodSettings["CacheDataEncrypted"] == true
)
);

Checks that all methods in Amazon API Gateway have logging enabled

aws.apigateway.restApis.all(
stages.all(
methodSettings["LoggingLevel"] == "ERROR" ||
methodSettings["LoggingLevel"] == "INFO"
)
);

References