Skip to main content

aws_api_gateway_deployments Resource

Use the aws_api_gateway_deployments InSpec audit resource to test properties of multiple AWS ApiGateway Deployments.

The AWS::ApiGateway::Deployment resource deploys an API Gateway RestAPI resource to a stage so that clients can call the API over the internet. The stage acts as an environment.

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

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

Parameters

rest_api_id (required)

Properties

ids
The identifier for the deployment resource.
descriptions
The description for the deployment resource.
created_dates
The date and time that the deployment resource was created.
api_summaries
A summary of the RestApi at the date and time that the deployment resource was created.

Examples

Ensure that the deployment ID exists.

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

be_available

Use should to check if the deployment is available.

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

AWS Permissions

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

Edit this page on GitHub

Thank you for your feedback!

×