AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

ConfigRule

import "github.com/aws/aws-sdk-go/service/configservice"

type ConfigRule struct { ConfigRuleArn *string `type:"string"` ConfigRuleId *string `type:"string"` ConfigRuleName *string `min:"1" type:"string"` ConfigRuleState *string `type:"string" enum:"ConfigRuleState"` CreatedBy *string `min:"1" type:"string"` Description *string `type:"string"` InputParameters *string `min:"1" type:"string"` MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` Scope *Scope `type:"structure"` Source *Source `type:"structure" required:"true"` }

An AWS Config rule represents an AWS Lambda function that you create for a custom rule or a predefined function for an AWS managed rule. The function evaluates configuration items to assess whether your AWS resources comply with your desired configurations. This function can run when AWS Config detects a configuration change to an AWS resource and at a periodic frequency that you choose (for example, every 24 hours).

You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.

For more information about developing and using AWS Config rules, see Evaluating AWS Resource Configurations with AWS Config (https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) in the AWS Config Developer Guide.

ConfigRuleArn

Type: *string

The Amazon Resource Name (ARN) of the AWS Config rule.

ConfigRuleId

Type: *string

The ID of the AWS Config rule.

ConfigRuleName

Type: *string

The name that you assign to the AWS Config rule. The name is required if you are adding a new rule.

ConfigRuleState

Type: *string

Indicates whether the AWS Config rule is active or is currently being deleted by AWS Config. It can also indicate the evaluation status for the AWS Config rule.

AWS Config sets the state of the rule to EVALUATING temporarily after you use the StartConfigRulesEvaluation request to evaluate your resources against the AWS Config rule.

AWS Config sets the state of the rule to DELETING_RESULTS temporarily after you use the DeleteEvaluationResults request to delete the current evaluation results for the AWS Config rule.

AWS Config temporarily sets the state of a rule to DELETING after you use the DeleteConfigRule request to delete the rule. After AWS Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.

CreatedBy

Type: *string

Service principal name of the service that created the rule.

The field is populated only if the service linked rule is created by a service. The field is empty if you create your own rule.

Description

Type: *string

The description that you provide for the AWS Config rule.

InputParameters

Type: *string

A string, in JSON format, that is passed to the AWS Config rule Lambda function.

MaximumExecutionFrequency

Type: *string

The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for MaximumExecutionFrequency when:

  • You are using an AWS managed rule that is triggered at a periodic frequency.

  • Your custom rule is triggered when AWS Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.

By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the MaximumExecutionFrequency parameter.

Scope

Defines which resources trigger an evaluation for an AWS Config rule. The scope can include one or more resource types, a combination of a tag key and value, or a combination of one resource type and one resource ID. Specify a scope to constrain which resources trigger an evaluation for a rule. Otherwise, evaluations for the rule are triggered when any resource in your recording group changes in configuration.

Source

Provides the AWS Config rule owner (AWS or customer), the rule identifier, and the events that trigger the evaluation of your AWS resources.

Method

GoString

func (s ConfigRule) GoString() string

GoString returns the string representation

SetConfigRuleArn

func (s *ConfigRule) SetConfigRuleArn(v string) *ConfigRule

SetConfigRuleArn sets the ConfigRuleArn field's value.

SetConfigRuleId

func (s *ConfigRule) SetConfigRuleId(v string) *ConfigRule

SetConfigRuleId sets the ConfigRuleId field's value.

SetConfigRuleName

func (s *ConfigRule) SetConfigRuleName(v string) *ConfigRule

SetConfigRuleName sets the ConfigRuleName field's value.

SetConfigRuleState

func (s *ConfigRule) SetConfigRuleState(v string) *ConfigRule

SetConfigRuleState sets the ConfigRuleState field's value.

SetCreatedBy

func (s *ConfigRule) SetCreatedBy(v string) *ConfigRule

SetCreatedBy sets the CreatedBy field's value.

SetDescription

func (s *ConfigRule) SetDescription(v string) *ConfigRule

SetDescription sets the Description field's value.

SetInputParameters

func (s *ConfigRule) SetInputParameters(v string) *ConfigRule

SetInputParameters sets the InputParameters field's value.

SetMaximumExecutionFrequency

func (s *ConfigRule) SetMaximumExecutionFrequency(v string) *ConfigRule

SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value.

SetScope

func (s *ConfigRule) SetScope(v *Scope) *ConfigRule

SetScope sets the Scope field's value.

SetSource

func (s *ConfigRule) SetSource(v *Source) *ConfigRule

SetSource sets the Source field's value.

String

func (s ConfigRule) String() string

String returns the string representation

Validate

func (s *ConfigRule) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: