/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the config-2014-11-12.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ConfigService.Model
{
///
/// Container for the parameters to the PutConfigRule operation.
/// 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 Managed Rules and Config Custom Rules.
/// You can use PutConfigRule
to create both Config Managed Rules and Config
/// Custom Rules.
///
///
///
/// Config 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.
///
///
///
/// Config Custom Rules are rules that you create from scratch. There are two ways to
/// create Config custom rules: with Lambda functions (
/// Lambda Developer Guide) and with Guard (Guard
/// GitHub Repository), a policy-as-code language. Config custom rules created with
/// Lambda are called Config Custom Lambda Rules and Config custom rules created
/// with Guard are called Config Custom Policy Rules.
///
///
///
/// If you are adding a new Config 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.
///
///
///
/// For any new Config 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
/// Resources with Config Rules in the Config Developer Guide.
///
///
///
/// PutConfigRule
is an idempotent API. Subsequent requests won’t create
/// a duplicate resource if one was already created. If a following request has different
/// tags
values, Config will ignore these differences and treat it as an
/// idempotent request of the previous. In this case, tags
will not be updated,
/// even if they are different.
///
///
///
public partial class PutConfigRuleRequest : AmazonConfigServiceRequest
{
private ConfigRule _configRule;
private List _tags = new List();
///
/// Gets and sets the property ConfigRule.
///
/// The rule that you want to add to your account.
///
///
[AWSProperty(Required=true)]
public ConfigRule ConfigRule
{
get { return this._configRule; }
set { this._configRule = value; }
}
// Check to see if ConfigRule property is set
internal bool IsSetConfigRule()
{
return this._configRule != null;
}
///
/// Gets and sets the property Tags.
///
/// An array of tag object.
///
///
[AWSProperty(Min=0, Max=50)]
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
}
}