aws_ec2_network_insights_analysis_plural resource
Use the aws_ec2_network_insights_analysis_plural InSpec audit resource to test properties of multiple AWS EC2 network insights analyses.
The AWS::EC2::NetworkInsightsAnalysis resource specifies a network insights analysis.
For additional information, including details on parameters and properties, see the AWS documentation on AWS EC2 Network Insights Analysis.
Syntax
Ensure that network insights analysis ID exists.
describe aws_ec2_network_insights_analysis_plural do
it { should exist }
end
Parameters
This resource does not require any parameters.
Properties
network_insights_analysis_ids- The ID of the network insights analysis.
Field:
network_insights_analysis_idnetwork_insights_analysis_arns- The Amazon Resource Name (ARN) of the network insights analysis.
Field:
network_insights_analysis_arnnetwork_insights_path_ids- The ID of the path.
Field:
network_insights_path_idfilter_in_arns- The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.
Field:
filter_in_arnsstart_dates- The time the analysis started.
Field:
start_datestatuses- The status of the network insights analysis.
Field:
statusstatus_messages- The status message, if the status is failed.
Field:
status_messagenetwork_path_found- Indicates whether the destination is reachable from the source.
Field:
network_path_foundforward_path_components- The components in the path from source to destination.
Field:
forward_path_componentsreturn_path_components- The components in the path from destination to source.
Field:
return_path_componentsexplanations- The explanations.
Field:
explanationsalternate_path_hints- Potential intermediate components.
Field:
alternate_path_hints- The tags of the insights analysis.
Field:
tags
Examples
Ensure a network insights analysis ID is available:
describe aws_ec2_network_insights_analysis_plural do
its('network_insights_analysis_ids') { should include 'NETWORK_INSIGHTS_ANALYSIS_ID' }
end
Ensure that the network insights path ID is available:
describe aws_ec2_network_insights_analysis_plural do
its('network_insights_path_ids') { should include 'NETWORK_INSIGHTS_PATH_ID' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the describe method returns at least one result.
exist
Use should to test that the entity exists.
describe aws_ec2_network_insights_analysis_plural do
it { should exist }
end
Use should_not to test the entity does not exist.
describe aws_ec2_network_insights_analysis_plural do
it { should_not exist }
end
AWS Permissions
Your AWS principal will need the EC2:Client:DescribeNetworkInsightsAnalysesResult action with Effect set to Allow.