aws_api_gateway_documentation_versions Resource
Use the aws_api_gateway_documentation_versions
InSpec audit resource to test properties of multiple AWS API Gateway documentation versions.
The AWS::ApiGateway::DocumentationParts
resource creates a documentation versions for an API.
For additional information, including details on parameters and properties, see the AWS ApiGateway Documentation Version documentation.
Install
This resource is available in the Chef InSpec AWS resource pack.
For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.
Syntax
Ensure that the documentation version exists.
describe aws_api_gateway_documentation_versions(rest_api_id: 'REST_API_ID') do
it { should exist }
end
Parameters
rest_api_id
(required)
Properties
created_dates
- The date when the API documentation snapshot is created.
Field:
created_date
versions
- The version identifier of the API documentation snapshot.
Field:
version
descriptions
- The description of the API documentation snapshot.
Field:
description
Examples
Ensure that the documentation versions ID exists.
describe aws_api_gateway_documentation_versions(rest_api_id: 'REST_API_ID') do
its('versions') { should include 'VERSION' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.This resource has the following special matchers.
exist
Use should
to test that the entity exists.
describe aws_api_gateway_documentation_versions(rest_api_id: 'REST_API_ID') do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_api_gateway_documentation_versions(rest_api_id: 'REST_API_ID') do
it { should_not exist }
end
be_available
Use should
to check if the documentation versions is available.
describe aws_api_gateway_documentation_versions(rest_api_id: 'REST_API_ID') do
it { should be_available }
end
AWS Permissions
Your Principal will need the APIGateway:Client::DocumentationVersions
action with Effect
set to Allow
.