Documentation ¶
Overview ¶
Package rule provides the ability to filter *configservice.ConfigRule objects
Index ¶
- type Rule
- func (r *Rule) Arn(arn string) *Rule
- func (r *Rule) Assert(t *testing.T, rules ...*configservice.ConfigRule) *Rule
- func (r *Rule) CreatedBy(service string) *Rule
- func (r *Rule) Description(desc string) *Rule
- func (r *Rule) Filter(filter shared.Filter) *Rule
- func (r *Rule) First(t *testing.T, rules ...*configservice.ConfigRule) *Rule
- func (r *Rule) Frequency(freq string) *Rule
- func (r *Rule) ID(id string) *Rule
- func (r *Rule) Name(name string) *Rule
- func (r *Rule) ScopeID(id string) *Rule
- func (r *Rule) ScopeTagKey(key string) *Rule
- func (r *Rule) ScopeTagValue(value string) *Rule
- func (r *Rule) ScopeTypes(types ...string) *Rule
- func (r *Rule) Selected() *configservice.ConfigRule
- func (r *Rule) SourceDetailEventSource(source string) *Rule
- func (r *Rule) SourceDetailFrequency(freq string) *Rule
- func (r *Rule) SourceDetailMessageType(typ string) *Rule
- func (r *Rule) SourceID(id string) *Rule
- func (r *Rule) SourceOwner(owner string) *Rule
- func (r *Rule) State(state string) *Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct {
// contains filtered or unexported fields
}
Rule contains the necessary properties for testing *configservice.ConfigRule objects
func (*Rule) Arn ¶
Arn adds the Arn filter to the filter list the Arn filter: filters rules by Arn where 'arn' provided is the expected ConfigRuleArn value
func (*Rule) Assert ¶
func (r *Rule) Assert(t *testing.T, rules ...*configservice.ConfigRule) *Rule
Assert applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched rule if rules is not provided, *configservice.ConfigRule objects will be retreived from AWS
func (*Rule) CreatedBy ¶
CreatedBy adds the CreatedBy filter to the filter list the CreatedBy filter: filters rules by CreatedBy where 'service' provided is the expected CreatedBy value
func (*Rule) Description ¶
Description adds the Description filter to the filter list the Description filter: filters rules by Description where 'desc' provided is the expected Description value
func (*Rule) First ¶
func (r *Rule) First(t *testing.T, rules ...*configservice.ConfigRule) *Rule
First applies all filters that have been called, resets the list of filters, fails the test if there are no matches, and stores the first match if rules is not provided, *configservice.ConfigRule objects will be retreived from AWS
func (*Rule) Frequency ¶
Frequency adds the Frequency filter to the filter list the Frequency filter: filters rules by Frequency where 'freq' provided is the expected MaximumExecutionFrequency value
func (*Rule) ID ¶
ID adds the ID filter to the filter list the ID filter: filters rules by ID where 'id' provided is the expected ConfigRuleId value
func (*Rule) Name ¶
Name adds the Name filter to the filter list the Name filter: filters rules by Name where 'name' provided is the expected ConfigRuleName value
func (*Rule) ScopeID ¶
ScopeID adds the ScopeID filter to the filter list the ScopeID filter: filters rules by ScopeID where 'id' provided is the expected ComplianceResourceId value
func (*Rule) ScopeTagKey ¶
ScopeTagKey adds the ScopeTagKey filter to the filter list the ScopeTagKey filter: filters rules by ScopeTagKey where 'key' provided is the expected TagKey value
func (*Rule) ScopeTagValue ¶
ScopeTagValue adds the ScopeTagValue filter to the filter list the ScopeTagValue filter: filters rules by ScopeTagValue where 'value' provided is the expected TagValue value
func (*Rule) ScopeTypes ¶
ScopeTypes adds the ScopeTypes filter to the filter list the ScopeTypes filter: filters rules by ScopeTypes where 'types' provided is the expected ComplianceResourceTypes value
func (*Rule) Selected ¶
func (r *Rule) Selected() *configservice.ConfigRule
Selected returns the currently selected *configservice.ConfigRule
func (*Rule) SourceDetailEventSource ¶
SourceDetailEventSource adds the SourceDetailEventSource filter to the filter list the SourceDetailEventSource filter: filters rules by SourceDetailEventSource where 'source' provided is the expected EventSource value
func (*Rule) SourceDetailFrequency ¶
SourceDetailFrequency adds the SourceDetailFrequency filter to the filter list the SourceDetailFrequency filter: filters rules by SourceDetailFrequency where 'freq' provided is the expected MaximumExecutionFrequency value
func (*Rule) SourceDetailMessageType ¶
SourceDetailMessageType adds the SourceDetailMessageType filter to the filter list the SourceDetailMessageType filter: filters rules by SourceDetailMessageType where 'typ' provided is the expected MessageType value
func (*Rule) SourceID ¶
SourceID adds the SourceID filter to the filter list the SourceID filter: filters rules by SourceID where 'id' provided is the expected SourceIdentifier value
func (*Rule) SourceOwner ¶
SourceOwner adds the SourceOwner filter to the filter list the SourceOwner filter: filters rules by SourceOwner where 'owner' provided is the expected Owner value