inspec/docs/resources/aws_sns_topics.md.erb
Matthew Dromazos 1bb565c708 New Skeletal Resource aws_sns_topics (#2696)
* Initial commit of skeletal resource aws_sns_topics
* Adds clarification in documentation
* Adds functionality for calling the next token returned from aws api.
* Wraps api calls in the catch_aws_errs method

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-03-22 12:55:23 -04:00

52 lines
1.2 KiB
Text

---
title: About the aws_sns_topics Resource
---
# aws\_sns\_topics
Use the `aws_sns_topics` InSpec audit resource to test all or a group of the SNS Topic ARNs in an account.
User the 'aws_sns_topic' InSpec audit resource to test a single SNS Topic in an account.
<br>
## Syntax
An `aws_sns_topics` resource block takes no filter conditions.
# Get all SNS Topic arns
describe aws_sns_topics do
its('topic_arns') { should include 'arn:aws:sns:us-east-1:333344445555:MyTopic' }
end
<br>
## Examples
The following examples show how to use this InSpec audit resource.
As this is the initial release of `aws_sns_topics`, its limited functionality precludes examples.
<br>
## Matchers
### exists
The control will pass if the filter returns at least one result. Use should_not if you expect zero matches.
# Test if there is any SNS Topics
describe aws_sns_topics
it { should exist }
end
## Properties
### topic\_arns
Provides an array of all SNS Topic arns.
# Test that a specific SNS Topic exists
describe aws_sns_topics do
its('topic_arns') { should include 'arn:aws:sns:us-east-1:333344445555:MyTopic' }
end