Skip to main content

aws_apigateway_account Resource

Use the aws_apigateway_account InSpec audit resource to test properties of a single specific AWS API Gateway account.

The AWS::ApiGateway::Account resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.

For additional information, including details on parameters and properties, see the AWS documentation on AWS API Gateway accounts..

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 account exists.

describe aws_apigateway_account do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

cloudwatch_role_arn
The ARN of an Amazon CloudWatch role for the current account.
throttle_settings.burst_limit
The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.
throttle_settings.rate_limit
The API request steady-state rate limit.
features
A list of features supported for the account. When usage plans are enabled, the features list will include an entry of “UsagePlans”.
api_key_version
The version of the API keys used for the account.

Examples

Ensure a Cloudwatch role ARN is available.

describe aws_apigateway_account do
  its('cloudwatch_role_arn') { should eq 'CloudWatchRoleARN' }
end

Ensure that the burst limit is 1.

describe aws_apigateway_account do
    its('throttle_settings.burst_limit') { should eq '1' }
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_apigateway_account do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_apigateway_account do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_apigateway_account do
  it { should be_available }
end

AWS Permissions

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

Edit this page on GitHub

Thank you for your feedback!

×









Search Results