Skip to main content

aws_api_gateway_documentation_parts Resource

Use the aws_api_gateway_documentation_parts InSpec audit resource to test properties of multiple documentation parts for an AWS API Gateway.

The AWS::ApiGateway::DocumentationParts resource creates a documentation part for an API.

For additional information, including details on parameters and properties, see the AWS ApiGateway Documentation Part 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 part exists.

describe aws_api_gateway_documentation_parts(rest_api_id: 'REST_API_ID') do
  it { should exist }
end

Parameters

rest_api_id (required)

The string identifier of the associated REST API.

Properties

ids
The identifier for the documentation part resource.
types
The type of API entity to which the documentation content applies.
paths
The URL path of the target.
methods
The HTTP verb of a method.
status_codes
The HTTP status code of a response.
names
The name of the targeted API entity.
properties
A content map of API-specific key-value pairs describing the targeted API entity.

Examples

Ensure that the documentation part ID exists.

describe aws_api_gateway_documentation_parts(rest_api_id: 'REST_API_ID') do
  its('ids') { should include 'DOCUMENTATION_PART_ID' }
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_parts(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_parts(rest_api_id: 'REST_API_ID') do
  it { should_not exist }
end

be_available

Use should to check if the documentation part is available.

describe aws_api_gateway_documentation_parts(rest_api_id: 'REST_API_ID') do
  it { should be_available }
end

AWS Permissions

Your Principal will need the APIGateway:Client::DocumentationParts action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results