1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cfg
  5. AggregateConfigRule
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cfg.AggregateConfigRule

Explore with Pulumi AI

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

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = alicloud.resourcemanager.getAccounts({
    status: "CreateSuccess",
});
const last = _default.then(_default => _default.accounts).length.then(length => length - 1);
const defaultAggregator = new alicloud.cfg.Aggregator("default", {
    aggregatorAccounts: [{
        accountId: _default.then(_default => _default.accounts[last].accountId),
        accountName: _default.then(_default => _default.accounts[last].displayName),
        accountType: "ResourceDirectory",
    }],
    aggregatorName: name,
    description: name,
    aggregatorType: "CUSTOM",
});
const defaultAggregateConfigRule = new alicloud.cfg.AggregateConfigRule("default", {
    aggregateConfigRuleName: "contains-tag",
    aggregatorId: defaultAggregator.id,
    configRuleTriggerTypes: "ConfigurationItemChangeNotification",
    sourceOwner: "ALIYUN",
    sourceIdentifier: "contains-tag",
    riskLevel: 1,
    resourceTypesScopes: ["ACS::ECS::Instance"],
    inputParameters: {
        key: "example",
        value: "example",
    },
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-example"
default = alicloud.resourcemanager.get_accounts(status="CreateSuccess")
last = len(default.accounts) - 1
default_aggregator = alicloud.cfg.Aggregator("default",
    aggregator_accounts=[{
        "account_id": default.accounts[last].account_id,
        "account_name": default.accounts[last].display_name,
        "account_type": "ResourceDirectory",
    }],
    aggregator_name=name,
    description=name,
    aggregator_type="CUSTOM")
default_aggregate_config_rule = alicloud.cfg.AggregateConfigRule("default",
    aggregate_config_rule_name="contains-tag",
    aggregator_id=default_aggregator.id,
    config_rule_trigger_types="ConfigurationItemChangeNotification",
    source_owner="ALIYUN",
    source_identifier="contains-tag",
    risk_level=1,
    resource_types_scopes=["ACS::ECS::Instance"],
    input_parameters={
        "key": "example",
        "value": "example",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cfg"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := resourcemanager.GetAccounts(ctx, &resourcemanager.GetAccountsArgs{
			Status: pulumi.StringRef("CreateSuccess"),
		}, nil)
		if err != nil {
			return err
		}
		last := pulumi.Float64(len(_default.Accounts)) - 1
		defaultAggregator, err := cfg.NewAggregator(ctx, "default", &cfg.AggregatorArgs{
			AggregatorAccounts: cfg.AggregatorAggregatorAccountArray{
				&cfg.AggregatorAggregatorAccountArgs{
					AccountId:   pulumi.String(_default.Accounts[last].AccountId),
					AccountName: pulumi.String(_default.Accounts[last].DisplayName),
					AccountType: pulumi.String("ResourceDirectory"),
				},
			},
			AggregatorName: pulumi.String(name),
			Description:    pulumi.String(name),
			AggregatorType: pulumi.String("CUSTOM"),
		})
		if err != nil {
			return err
		}
		_, err = cfg.NewAggregateConfigRule(ctx, "default", &cfg.AggregateConfigRuleArgs{
			AggregateConfigRuleName: pulumi.String("contains-tag"),
			AggregatorId:            defaultAggregator.ID(),
			ConfigRuleTriggerTypes:  pulumi.String("ConfigurationItemChangeNotification"),
			SourceOwner:             pulumi.String("ALIYUN"),
			SourceIdentifier:        pulumi.String("contains-tag"),
			RiskLevel:               pulumi.Int(1),
			ResourceTypesScopes: pulumi.StringArray{
				pulumi.String("ACS::ECS::Instance"),
			},
			InputParameters: pulumi.StringMap{
				"key":   pulumi.String("example"),
				"value": pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf-example";
    var @default = AliCloud.ResourceManager.GetAccounts.Invoke(new()
    {
        Status = "CreateSuccess",
    });

    var last = @default.Apply(@default => @default.Apply(getAccountsResult => getAccountsResult.Accounts)).Length.Apply(length => length - 1);

    var defaultAggregator = new AliCloud.Cfg.Aggregator("default", new()
    {
        AggregatorAccounts = new[]
        {
            new AliCloud.Cfg.Inputs.AggregatorAggregatorAccountArgs
            {
                AccountId = @default.Apply(@default => @default.Apply(getAccountsResult => getAccountsResult.Accounts)[last].AccountId),
                AccountName = @default.Apply(@default => @default.Apply(getAccountsResult => getAccountsResult.Accounts)[last].DisplayName),
                AccountType = "ResourceDirectory",
            },
        },
        AggregatorName = name,
        Description = name,
        AggregatorType = "CUSTOM",
    });

    var defaultAggregateConfigRule = new AliCloud.Cfg.AggregateConfigRule("default", new()
    {
        AggregateConfigRuleName = "contains-tag",
        AggregatorId = defaultAggregator.Id,
        ConfigRuleTriggerTypes = "ConfigurationItemChangeNotification",
        SourceOwner = "ALIYUN",
        SourceIdentifier = "contains-tag",
        RiskLevel = 1,
        ResourceTypesScopes = new[]
        {
            "ACS::ECS::Instance",
        },
        InputParameters = 
        {
            { "key", "example" },
            { "value", "example" },
        },
    });

});
Copy
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 default = ResourcemanagerFunctions.getAccounts(GetAccountsArgs.builder()
            .status("CreateSuccess")
            .build());

        final var last = default_.accounts().length() - 1;

        var defaultAggregator = new Aggregator("defaultAggregator", AggregatorArgs.builder()
            .aggregatorAccounts(AggregatorAggregatorAccountArgs.builder()
                .accountId(default_.accounts()[last].accountId())
                .accountName(default_.accounts()[last].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());

    }
}
Copy
Coming soon!

Create AggregateConfigRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AggregateConfigRule(name: string, args: AggregateConfigRuleArgs, opts?: CustomResourceOptions);
@overload
def AggregateConfigRule(resource_name: str,
                        args: AggregateConfigRuleArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def AggregateConfigRule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        resource_types_scopes: Optional[Sequence[str]] = None,
                        aggregator_id: Optional[str] = None,
                        config_rule_trigger_types: Optional[str] = None,
                        source_owner: Optional[str] = None,
                        aggregate_config_rule_name: Optional[str] = None,
                        source_identifier: Optional[str] = None,
                        risk_level: Optional[int] = None,
                        exclude_resource_ids_scope: Optional[str] = None,
                        resource_group_ids_scope: Optional[str] = None,
                        region_ids_scope: Optional[str] = None,
                        maximum_execution_frequency: Optional[str] = None,
                        input_parameters: Optional[Mapping[str, str]] = None,
                        description: Optional[str] = None,
                        status: Optional[str] = None,
                        tag_key_scope: Optional[str] = None,
                        tag_value_scope: Optional[str] = None)
func NewAggregateConfigRule(ctx *Context, name string, args AggregateConfigRuleArgs, opts ...ResourceOption) (*AggregateConfigRule, error)
public AggregateConfigRule(string name, AggregateConfigRuleArgs args, CustomResourceOptions? opts = null)
public AggregateConfigRule(String name, AggregateConfigRuleArgs args)
public AggregateConfigRule(String name, AggregateConfigRuleArgs args, CustomResourceOptions options)
type: alicloud:cfg:AggregateConfigRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AggregateConfigRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AggregateConfigRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AggregateConfigRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AggregateConfigRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AggregateConfigRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var aggregateConfigRuleResource = new AliCloud.Cfg.AggregateConfigRule("aggregateConfigRuleResource", new()
{
    ResourceTypesScopes = new[]
    {
        "string",
    },
    AggregatorId = "string",
    ConfigRuleTriggerTypes = "string",
    SourceOwner = "string",
    AggregateConfigRuleName = "string",
    SourceIdentifier = "string",
    RiskLevel = 0,
    ExcludeResourceIdsScope = "string",
    ResourceGroupIdsScope = "string",
    RegionIdsScope = "string",
    MaximumExecutionFrequency = "string",
    InputParameters = 
    {
        { "string", "string" },
    },
    Description = "string",
    Status = "string",
    TagKeyScope = "string",
    TagValueScope = "string",
});
Copy
example, err := cfg.NewAggregateConfigRule(ctx, "aggregateConfigRuleResource", &cfg.AggregateConfigRuleArgs{
	ResourceTypesScopes: pulumi.StringArray{
		pulumi.String("string"),
	},
	AggregatorId:              pulumi.String("string"),
	ConfigRuleTriggerTypes:    pulumi.String("string"),
	SourceOwner:               pulumi.String("string"),
	AggregateConfigRuleName:   pulumi.String("string"),
	SourceIdentifier:          pulumi.String("string"),
	RiskLevel:                 pulumi.Int(0),
	ExcludeResourceIdsScope:   pulumi.String("string"),
	ResourceGroupIdsScope:     pulumi.String("string"),
	RegionIdsScope:            pulumi.String("string"),
	MaximumExecutionFrequency: pulumi.String("string"),
	InputParameters: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Description:   pulumi.String("string"),
	Status:        pulumi.String("string"),
	TagKeyScope:   pulumi.String("string"),
	TagValueScope: pulumi.String("string"),
})
Copy
var aggregateConfigRuleResource = new AggregateConfigRule("aggregateConfigRuleResource", AggregateConfigRuleArgs.builder()
    .resourceTypesScopes("string")
    .aggregatorId("string")
    .configRuleTriggerTypes("string")
    .sourceOwner("string")
    .aggregateConfigRuleName("string")
    .sourceIdentifier("string")
    .riskLevel(0)
    .excludeResourceIdsScope("string")
    .resourceGroupIdsScope("string")
    .regionIdsScope("string")
    .maximumExecutionFrequency("string")
    .inputParameters(Map.of("string", "string"))
    .description("string")
    .status("string")
    .tagKeyScope("string")
    .tagValueScope("string")
    .build());
Copy
aggregate_config_rule_resource = alicloud.cfg.AggregateConfigRule("aggregateConfigRuleResource",
    resource_types_scopes=["string"],
    aggregator_id="string",
    config_rule_trigger_types="string",
    source_owner="string",
    aggregate_config_rule_name="string",
    source_identifier="string",
    risk_level=0,
    exclude_resource_ids_scope="string",
    resource_group_ids_scope="string",
    region_ids_scope="string",
    maximum_execution_frequency="string",
    input_parameters={
        "string": "string",
    },
    description="string",
    status="string",
    tag_key_scope="string",
    tag_value_scope="string")
Copy
const aggregateConfigRuleResource = new alicloud.cfg.AggregateConfigRule("aggregateConfigRuleResource", {
    resourceTypesScopes: ["string"],
    aggregatorId: "string",
    configRuleTriggerTypes: "string",
    sourceOwner: "string",
    aggregateConfigRuleName: "string",
    sourceIdentifier: "string",
    riskLevel: 0,
    excludeResourceIdsScope: "string",
    resourceGroupIdsScope: "string",
    regionIdsScope: "string",
    maximumExecutionFrequency: "string",
    inputParameters: {
        string: "string",
    },
    description: "string",
    status: "string",
    tagKeyScope: "string",
    tagValueScope: "string",
});
Copy
type: alicloud:cfg:AggregateConfigRule
properties:
    aggregateConfigRuleName: string
    aggregatorId: string
    configRuleTriggerTypes: string
    description: string
    excludeResourceIdsScope: string
    inputParameters:
        string: string
    maximumExecutionFrequency: string
    regionIdsScope: string
    resourceGroupIdsScope: string
    resourceTypesScopes:
        - string
    riskLevel: 0
    sourceIdentifier: string
    sourceOwner: string
    status: string
    tagKeyScope: string
    tagValueScope: string
Copy

AggregateConfigRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AggregateConfigRule resource accepts the following input properties:

AggregateConfigRuleName
This property is required.
Changes to this property will trigger replacement.
string
The name of the rule.
AggregatorId
This property is required.
Changes to this property will trigger replacement.
string
The Aggregator Id.
ConfigRuleTriggerTypes This property is required. string
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
ResourceTypesScopes This property is required. List<string>
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
RiskLevel This property is required. int
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
SourceIdentifier
This property is required.
Changes to this property will trigger replacement.
string
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.
SourceOwner
This property is required.
Changes to this property will trigger replacement.
string
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.
Description string
The description of the rule.
ExcludeResourceIdsScope string
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.
InputParameters Dictionary<string, string>
The settings map of the input parameters for the rule.
MaximumExecutionFrequency string
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.
RegionIdsScope string
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope string
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
Status string
The rule status. The valid values: ACTIVE, INACTIVE.
TagKeyScope string
The rule monitors the tag key, only applies to rules created based on managed rules.
TagValueScope string
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
AggregateConfigRuleName
This property is required.
Changes to this property will trigger replacement.
string
The name of the rule.
AggregatorId
This property is required.
Changes to this property will trigger replacement.
string
The Aggregator Id.
ConfigRuleTriggerTypes This property is required. string
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
ResourceTypesScopes This property is required. []string
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
RiskLevel This property is required. int
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
SourceIdentifier
This property is required.
Changes to this property will trigger replacement.
string
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.
SourceOwner
This property is required.
Changes to this property will trigger replacement.
string
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.
Description string
The description of the rule.
ExcludeResourceIdsScope string
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.
InputParameters map[string]string
The settings map of the input parameters for the rule.
MaximumExecutionFrequency string
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.
RegionIdsScope string
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope string
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
Status string
The rule status. The valid values: ACTIVE, INACTIVE.
TagKeyScope string
The rule monitors the tag key, only applies to rules created based on managed rules.
TagValueScope string
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregateConfigRuleName
This property is required.
Changes to this property will trigger replacement.
String
The name of the rule.
aggregatorId
This property is required.
Changes to this property will trigger replacement.
String
The Aggregator Id.
configRuleTriggerTypes This property is required. String
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
resourceTypesScopes This property is required. List<String>
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
riskLevel This property is required. Integer
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
sourceIdentifier
This property is required.
Changes to this property will trigger replacement.
String
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.
sourceOwner
This property is required.
Changes to this property will trigger replacement.
String
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.
description String
The description of the rule.
excludeResourceIdsScope String
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.
inputParameters Map<String,String>
The settings map of the input parameters for the rule.
maximumExecutionFrequency String
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.
regionIdsScope String
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resourceGroupIdsScope String
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
status String
The rule status. The valid values: ACTIVE, INACTIVE.
tagKeyScope String
The rule monitors the tag key, only applies to rules created based on managed rules.
tagValueScope String
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregateConfigRuleName
This property is required.
Changes to this property will trigger replacement.
string
The name of the rule.
aggregatorId
This property is required.
Changes to this property will trigger replacement.
string
The Aggregator Id.
configRuleTriggerTypes This property is required. string
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
resourceTypesScopes This property is required. string[]
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
riskLevel This property is required. number
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
sourceIdentifier
This property is required.
Changes to this property will trigger replacement.
string
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.
sourceOwner
This property is required.
Changes to this property will trigger replacement.
string
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.
description string
The description of the rule.
excludeResourceIdsScope string
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.
inputParameters {[key: string]: string}
The settings map of the input parameters for the rule.
maximumExecutionFrequency string
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.
regionIdsScope string
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resourceGroupIdsScope string
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
status string
The rule status. The valid values: ACTIVE, INACTIVE.
tagKeyScope string
The rule monitors the tag key, only applies to rules created based on managed rules.
tagValueScope string
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregate_config_rule_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the rule.
aggregator_id
This property is required.
Changes to this property will trigger replacement.
str
The Aggregator Id.
config_rule_trigger_types This property is required. str
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
resource_types_scopes This property is required. Sequence[str]
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
risk_level This property is required. int
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
source_identifier
This property is required.
Changes to this property will trigger replacement.
str
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.
source_owner
This property is required.
Changes to this property will trigger replacement.
str
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.
description str
The description of the rule.
exclude_resource_ids_scope str
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.
input_parameters Mapping[str, str]
The settings map of the input parameters for the rule.
maximum_execution_frequency str
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.
region_ids_scope str
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resource_group_ids_scope str
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
status str
The rule status. The valid values: ACTIVE, INACTIVE.
tag_key_scope str
The rule monitors the tag key, only applies to rules created based on managed rules.
tag_value_scope str
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregateConfigRuleName
This property is required.
Changes to this property will trigger replacement.
String
The name of the rule.
aggregatorId
This property is required.
Changes to this property will trigger replacement.
String
The Aggregator Id.
configRuleTriggerTypes This property is required. String
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
resourceTypesScopes This property is required. List<String>
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
riskLevel This property is required. Number
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
sourceIdentifier
This property is required.
Changes to this property will trigger replacement.
String
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.
sourceOwner
This property is required.
Changes to this property will trigger replacement.
String
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.
description String
The description of the rule.
excludeResourceIdsScope String
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.
inputParameters Map<String>
The settings map of the input parameters for the rule.
maximumExecutionFrequency String
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.
regionIdsScope String
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resourceGroupIdsScope String
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
status String
The rule status. The valid values: ACTIVE, INACTIVE.
tagKeyScope String
The rule monitors the tag key, only applies to rules created based on managed rules.
tagValueScope String
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.

Outputs

All input properties are implicitly available as output properties. Additionally, the AggregateConfigRule resource produces the following output properties:

ConfigRuleId string
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
Id string
The provider-assigned unique ID for this managed resource.
ConfigRuleId string
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
Id string
The provider-assigned unique ID for this managed resource.
configRuleId String
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
id String
The provider-assigned unique ID for this managed resource.
configRuleId string
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
id string
The provider-assigned unique ID for this managed resource.
config_rule_id str
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
id str
The provider-assigned unique ID for this managed resource.
configRuleId String
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing AggregateConfigRule Resource

Get an existing AggregateConfigRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AggregateConfigRuleState, opts?: CustomResourceOptions): AggregateConfigRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aggregate_config_rule_name: Optional[str] = None,
        aggregator_id: Optional[str] = None,
        config_rule_id: Optional[str] = None,
        config_rule_trigger_types: Optional[str] = None,
        description: Optional[str] = None,
        exclude_resource_ids_scope: Optional[str] = None,
        input_parameters: Optional[Mapping[str, str]] = None,
        maximum_execution_frequency: Optional[str] = None,
        region_ids_scope: Optional[str] = None,
        resource_group_ids_scope: Optional[str] = None,
        resource_types_scopes: Optional[Sequence[str]] = None,
        risk_level: Optional[int] = None,
        source_identifier: Optional[str] = None,
        source_owner: Optional[str] = None,
        status: Optional[str] = None,
        tag_key_scope: Optional[str] = None,
        tag_value_scope: Optional[str] = None) -> AggregateConfigRule
func GetAggregateConfigRule(ctx *Context, name string, id IDInput, state *AggregateConfigRuleState, opts ...ResourceOption) (*AggregateConfigRule, error)
public static AggregateConfigRule Get(string name, Input<string> id, AggregateConfigRuleState? state, CustomResourceOptions? opts = null)
public static AggregateConfigRule get(String name, Output<String> id, AggregateConfigRuleState state, CustomResourceOptions options)
resources:  _:    type: alicloud:cfg:AggregateConfigRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AggregateConfigRuleName Changes to this property will trigger replacement. string
The name of the rule.
AggregatorId Changes to this property will trigger replacement. string
The Aggregator Id.
ConfigRuleId string
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
ConfigRuleTriggerTypes string
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
Description string
The description of the rule.
ExcludeResourceIdsScope string
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.
InputParameters Dictionary<string, string>
The settings map of the input parameters for the rule.
MaximumExecutionFrequency string
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.
RegionIdsScope string
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope string
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceTypesScopes List<string>
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
RiskLevel int
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
SourceIdentifier Changes to this property will trigger replacement. string
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.
SourceOwner Changes to this property will trigger replacement. string
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.
Status string
The rule status. The valid values: ACTIVE, INACTIVE.
TagKeyScope string
The rule monitors the tag key, only applies to rules created based on managed rules.
TagValueScope string
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
AggregateConfigRuleName Changes to this property will trigger replacement. string
The name of the rule.
AggregatorId Changes to this property will trigger replacement. string
The Aggregator Id.
ConfigRuleId string
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
ConfigRuleTriggerTypes string
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
Description string
The description of the rule.
ExcludeResourceIdsScope string
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.
InputParameters map[string]string
The settings map of the input parameters for the rule.
MaximumExecutionFrequency string
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.
RegionIdsScope string
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope string
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceTypesScopes []string
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
RiskLevel int
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
SourceIdentifier Changes to this property will trigger replacement. string
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.
SourceOwner Changes to this property will trigger replacement. string
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.
Status string
The rule status. The valid values: ACTIVE, INACTIVE.
TagKeyScope string
The rule monitors the tag key, only applies to rules created based on managed rules.
TagValueScope string
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregateConfigRuleName Changes to this property will trigger replacement. String
The name of the rule.
aggregatorId Changes to this property will trigger replacement. String
The Aggregator Id.
configRuleId String
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
configRuleTriggerTypes String
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
description String
The description of the rule.
excludeResourceIdsScope String
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.
inputParameters Map<String,String>
The settings map of the input parameters for the rule.
maximumExecutionFrequency String
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.
regionIdsScope String
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resourceGroupIdsScope String
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
resourceTypesScopes List<String>
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
riskLevel Integer
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
sourceIdentifier Changes to this property will trigger replacement. String
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.
sourceOwner Changes to this property will trigger replacement. String
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.
status String
The rule status. The valid values: ACTIVE, INACTIVE.
tagKeyScope String
The rule monitors the tag key, only applies to rules created based on managed rules.
tagValueScope String
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregateConfigRuleName Changes to this property will trigger replacement. string
The name of the rule.
aggregatorId Changes to this property will trigger replacement. string
The Aggregator Id.
configRuleId string
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
configRuleTriggerTypes string
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
description string
The description of the rule.
excludeResourceIdsScope string
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.
inputParameters {[key: string]: string}
The settings map of the input parameters for the rule.
maximumExecutionFrequency string
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.
regionIdsScope string
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resourceGroupIdsScope string
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
resourceTypesScopes string[]
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
riskLevel number
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
sourceIdentifier Changes to this property will trigger replacement. string
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.
sourceOwner Changes to this property will trigger replacement. string
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.
status string
The rule status. The valid values: ACTIVE, INACTIVE.
tagKeyScope string
The rule monitors the tag key, only applies to rules created based on managed rules.
tagValueScope string
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregate_config_rule_name Changes to this property will trigger replacement. str
The name of the rule.
aggregator_id Changes to this property will trigger replacement. str
The Aggregator Id.
config_rule_id str
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
config_rule_trigger_types str
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
description str
The description of the rule.
exclude_resource_ids_scope str
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.
input_parameters Mapping[str, str]
The settings map of the input parameters for the rule.
maximum_execution_frequency str
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.
region_ids_scope str
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resource_group_ids_scope str
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
resource_types_scopes Sequence[str]
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
risk_level int
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
source_identifier Changes to this property will trigger replacement. str
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.
source_owner Changes to this property will trigger replacement. str
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.
status str
The rule status. The valid values: ACTIVE, INACTIVE.
tag_key_scope str
The rule monitors the tag key, only applies to rules created based on managed rules.
tag_value_scope str
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.
aggregateConfigRuleName Changes to this property will trigger replacement. String
The name of the rule.
aggregatorId Changes to this property will trigger replacement. String
The Aggregator Id.
configRuleId String
(Available since v1.141.0) The rule ID of Aggregate Config Rule.
configRuleTriggerTypes String
The trigger type of the rule. Valid values: ConfigurationItemChangeNotification: The rule is triggered upon configuration changes. ScheduledNotification: The rule is triggered as scheduled.
description String
The description of the rule.
excludeResourceIdsScope String
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.
inputParameters Map<String>
The settings map of the input parameters for the rule.
maximumExecutionFrequency String
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.
regionIdsScope String
The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
resourceGroupIdsScope String
The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
resourceTypesScopes List<String>
Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
riskLevel Number
The risk level of the resources that are not compliant with the rule. Valid values: 1: critical 2: warning 3: info.
sourceIdentifier Changes to this property will trigger replacement. String
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.
sourceOwner Changes to this property will trigger replacement. String
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.
status String
The rule status. The valid values: ACTIVE, INACTIVE.
tagKeyScope String
The rule monitors the tag key, only applies to rules created based on managed rules.
tagValueScope String
The rule monitors the tag value, use with the tag_key_scope options. only applies to rules created based on managed rules.

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>"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.