Skip to main content

aws_api_gateway_v2_domain_names Resource

Use the aws_api_gateway_v2_domain_names InSpec audit resource to test properties of multiple AWS API Gateway V2 domain names.

For additional information, including parameters and properties, see the AWS documentation on AWS APIGatewayV2 DomainName.

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 domain name exists.

describe aws_api_gateway_v2_domain_names do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

authorizer_credentials_arns
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.

Field: authorizer_credentials_arn

api_mapping_selection_expressions
The API mapping selection expression.

Field: api_mapping_selection_expression

domain_names
A domain name for the API.

Field: domain_name

domain_name_configurations
The configuration of the domain name.

Field: domain_name_configurations

mutual_tls_authentications
This is TLS authentication.

Field: mutual_tls_authentication

tags
The collection of tags associated with a domain name.

Field: tags

Examples

Test to ensure a domain name is available

describe aws_api_gateway_v2_domain_names do
  its('domain_names') { should eq 'DOMAIN_NAME' }
end

Test to verify if domain configurations are set

describe aws_api_gateway_v2_domain_names do
  its('domain_name_configurations') { should eq 'AVAILABLE' }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

The control passes if the get method returns at least one result.

exist

Use should to test that the entity exists.

describe aws_api_gateway_v2_domain_names do
  it { should exist }
end

not exist

Use should_not to test that the entity does not exist.

describe aws_api_gateway_v2_domain_names do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the APIGatewayv2:Client:GetDomainNamesResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results