Struct aws_sdk_config::client::fluent_builders::PutConfigRule
source · pub struct PutConfigRule { /* private fields */ }Expand description
Fluent builder constructing a request to PutConfigRule.
Adds or updates an Config rule to evaluate if your Amazon Web Services resources comply with your desired configurations. For information on how many Config rules you can have per account, see Service Limits in the Config Developer Guide.
There are two types of rules: Config Custom Rules and Config Managed Rules. You can use PutConfigRule to create both Config custom rules and Config managed rules.
Custom rules are rules that you can create using either Guard or Lambda functions. Guard (Guard GitHub Repository) is a policy-as-code language that allows you to write policies that are enforced by Config Custom Policy rules. Lambda uses custom code that you upload to evaluate a custom rule. If you are adding a new Custom Lambda rule, you first need to create an Lambda function that the rule invokes to evaluate your resources. When you use PutConfigRule to add a Custom Lambda rule to Config, you must specify the Amazon Resource Name (ARN) that Lambda assigns to the function. You specify the ARN in the SourceIdentifier key. This key is part of the Source object, which is part of the ConfigRule object.
Managed rules are predefined, customizable rules created by Config. For a list of managed rules, see List of Config Managed Rules. If you are adding an Config managed rule, you must specify the rule's identifier for the SourceIdentifier key.
For any new rule that you add, specify the ConfigRuleName in the ConfigRule object. Do not specify the ConfigRuleArn or the ConfigRuleId. These values are generated by Config for new rules.
If you are updating a rule that you added previously, you can specify the rule by ConfigRuleName, ConfigRuleId, or ConfigRuleArn in the ConfigRule data type that you use in this request.
For more information about developing and using Config rules, see Evaluating Amazon Web Services resource Configurations with Config in the Config Developer Guide.
Implementations§
source§impl PutConfigRule
impl PutConfigRule
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PutConfigRule, AwsResponseRetryClassifier>, SdkError<PutConfigRuleError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PutConfigRule, AwsResponseRetryClassifier>, SdkError<PutConfigRuleError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<PutConfigRuleOutput, SdkError<PutConfigRuleError>>
pub async fn send(
self
) -> Result<PutConfigRuleOutput, SdkError<PutConfigRuleError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn config_rule(self, input: ConfigRule) -> Self
pub fn config_rule(self, input: ConfigRule) -> Self
The rule that you want to add to your account.
sourcepub fn set_config_rule(self, input: Option<ConfigRule>) -> Self
pub fn set_config_rule(self, input: Option<ConfigRule>) -> Self
The rule that you want to add to your account.
Appends an item to Tags.
To override the contents of this collection use set_tags.
An array of tag object.
An array of tag object.
Trait Implementations§
source§impl Clone for PutConfigRule
impl Clone for PutConfigRule
source§fn clone(&self) -> PutConfigRule
fn clone(&self) -> PutConfigRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more