AggregateConfigRuleArgs

data class AggregateConfigRuleArgs(val aggregateConfigRuleName: Output<String>? = null, val aggregatorId: Output<String>? = null, val configRuleTriggerTypes: Output<String>? = null, val description: Output<String>? = null, val excludeResourceIdsScope: Output<String>? = null, val inputParameters: Output<Map<String, Any>>? = null, val maximumExecutionFrequency: Output<String>? = null, val regionIdsScope: Output<String>? = null, val resourceGroupIdsScope: Output<String>? = null, val resourceTypesScopes: Output<List<String>>? = null, val riskLevel: Output<Int>? = null, val sourceIdentifier: Output<String>? = null, val sourceOwner: Output<String>? = null, val status: Output<String>? = null, val tagKeyScope: Output<String>? = null, val tagValueScope: Output<String>? = null) : ConvertibleToJava<AggregateConfigRuleArgs>

Provides a Cloud Config Aggregate Config Rule resource. For information about Cloud Config Aggregate Config Rule and how to use it, see What is Aggregate Config Rule.

NOTE: Available since v1.124.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetAccountsArgs;
import com.pulumi.alicloud.cfg.Aggregator;
import com.pulumi.alicloud.cfg.AggregatorArgs;
import com.pulumi.alicloud.cfg.inputs.AggregatorAggregatorAccountArgs;
import com.pulumi.alicloud.cfg.AggregateConfigRule;
import com.pulumi.alicloud.cfg.AggregateConfigRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var defaultAccounts = ResourcemanagerFunctions.getAccounts(GetAccountsArgs.builder()
.status("CreateSuccess")
.build());
var defaultAggregator = new Aggregator("defaultAggregator", AggregatorArgs.builder()
.aggregatorAccounts(AggregatorAggregatorAccountArgs.builder()
.accountId(defaultAccounts.applyValue(getAccountsResult -> getAccountsResult.accounts()[0].accountId()))
.accountName(defaultAccounts.applyValue(getAccountsResult -> getAccountsResult.accounts()[0].displayName()))
.accountType("ResourceDirectory")
.build())
.aggregatorName(name)
.description(name)
.aggregatorType("CUSTOM")
.build());
var defaultAggregateConfigRule = new AggregateConfigRule("defaultAggregateConfigRule", AggregateConfigRuleArgs.builder()
.aggregateConfigRuleName("contains-tag")
.aggregatorId(defaultAggregator.id())
.configRuleTriggerTypes("ConfigurationItemChangeNotification")
.sourceOwner("ALIYUN")
.sourceIdentifier("contains-tag")
.riskLevel(1)
.resourceTypesScopes("ACS::ECS::Instance")
.inputParameters(Map.ofEntries(
Map.entry("key", "example"),
Map.entry("value", "example")
))
.build());
}
}

Import

Cloud Config Aggregate Config Rule can be imported using the id, e.g.

$ pulumi import alicloud:cfg/aggregateConfigRule:AggregateConfigRule example "<aggregator_id>:<config_rule_id>"

Constructors

Link copied to clipboard
fun AggregateConfigRuleArgs(aggregateConfigRuleName: Output<String>? = null, aggregatorId: Output<String>? = null, configRuleTriggerTypes: Output<String>? = null, description: Output<String>? = null, excludeResourceIdsScope: Output<String>? = null, inputParameters: Output<Map<String, Any>>? = null, maximumExecutionFrequency: Output<String>? = null, regionIdsScope: Output<String>? = null, resourceGroupIdsScope: Output<String>? = null, resourceTypesScopes: Output<List<String>>? = null, riskLevel: Output<Int>? = null, sourceIdentifier: Output<String>? = null, sourceOwner: Output<String>? = null, status: Output<String>? = null, tagKeyScope: Output<String>? = null, tagValueScope: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AggregateConfigRuleArgs

Properties

Link copied to clipboard
val aggregateConfigRuleName: Output<String>? = null

The name of the rule.

Link copied to clipboard
val aggregatorId: Output<String>? = null

The Aggregator Id.

Link copied to clipboard
val configRuleTriggerTypes: Output<String>? = null

The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.

Link copied to clipboard
val description: Output<String>? = null

The description of the rule.

Link copied to clipboard
val excludeResourceIdsScope: Output<String>? = null

The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.

Link copied to clipboard
val inputParameters: Output<Map<String, Any>>? = null

The settings map of the input parameters for the rule.

Link copied to clipboard
val maximumExecutionFrequency: Output<String>? = null

The frequency of the compliance evaluations. Valid values: One_Hour, Three_Hours, Six_Hours, Twelve_Hours, TwentyFour_Hours. System default value is TwentyFour_Hours and valid when the config_rule_trigger_types is ScheduledNotification.

Link copied to clipboard
val regionIdsScope: Output<String>? = null

The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.

Link copied to clipboard
val resourceGroupIdsScope: Output<String>? = null

The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.

Link copied to clipboard
val resourceTypesScopes: Output<List<String>>? = null
Link copied to clipboard
val riskLevel: Output<Int>? = null

The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.

Link copied to clipboard
val sourceIdentifier: Output<String>? = null

The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to List of Managed rules.

Link copied to clipboard
val sourceOwner: Output<String>? = null

Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: CUSTOM_FC: The rule is a custom rule and you own the rule. ALIYUN: The rule is a managed rule and Alibaba Cloud owns the rule.

Link copied to clipboard
val status: Output<String>? = null

The rule status. The valid values: ACTIVE, INACTIVE.

Link copied to clipboard
val tagKeyScope: Output<String>? = null

The rule monitors the tag key, only applies to rules created based on managed rules.

Link copied to clipboard
val tagValueScope: Output<String>? = null

The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.