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 defaultAggregator = new alicloud.cfg.Aggregator("default", {
aggregatorAccounts: [{
accountId: _default.then(_default => _default.accounts?.[0]?.accountId),
accountName: _default.then(_default => _default.accounts?.[0]?.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",
},
});
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")
default_aggregator = alicloud.cfg.Aggregator("default",
aggregator_accounts=[{
"account_id": default.accounts[0].account_id,
"account_name": default.accounts[0].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",
})
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
}
defaultAggregator, err := cfg.NewAggregator(ctx, "default", &cfg.AggregatorArgs{
AggregatorAccounts: cfg.AggregatorAggregatorAccountArray{
&cfg.AggregatorAggregatorAccountArgs{
AccountId: pulumi.String(_default.Accounts[0].AccountId),
AccountName: pulumi.String(_default.Accounts[0].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
})
}
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 defaultAggregator = new AliCloud.Cfg.Aggregator("default", new()
{
AggregatorAccounts = new[]
{
new AliCloud.Cfg.Inputs.AggregatorAggregatorAccountArgs
{
AccountId = @default.Apply(@default => @default.Apply(getAccountsResult => getAccountsResult.Accounts[0]?.AccountId)),
AccountName = @default.Apply(@default => @default.Apply(getAccountsResult => getAccountsResult.Accounts[0]?.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" },
},
});
});
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());
var defaultAggregator = new Aggregator("defaultAggregator", AggregatorArgs.builder()
.aggregatorAccounts(AggregatorAggregatorAccountArgs.builder()
.accountId(default_.accounts()[0].accountId())
.accountName(default_.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());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultAggregator:
type: alicloud:cfg:Aggregator
name: default
properties:
aggregatorAccounts:
- accountId: ${default.accounts[0].accountId}
accountName: ${default.accounts[0].displayName}
accountType: ResourceDirectory
aggregatorName: ${name}
description: ${name}
aggregatorType: CUSTOM
defaultAggregateConfigRule:
type: alicloud:cfg:AggregateConfigRule
name: default
properties:
aggregateConfigRuleName: contains-tag
aggregatorId: ${defaultAggregator.id}
configRuleTriggerTypes: ConfigurationItemChangeNotification
sourceOwner: ALIYUN
sourceIdentifier: contains-tag
riskLevel: 1
resourceTypesScopes:
- ACS::ECS::Instance
inputParameters:
key: example
value: example
variables:
default:
fn::invoke:
Function: alicloud:resourcemanager:getAccounts
Arguments:
status: CreateSuccess
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 string
- The unique name of the resource.
- args AggregateConfigRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args AggregateConfigRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AggregateConfigRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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
The AggregateConfigRule resource accepts the following input properties:
- Aggregate
Config stringRule Name - The name of the rule.
- Aggregator
Id string - The Aggregator Id.
- Config
Rule stringTrigger Types - 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 List<string>Scopes - 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
: critical2
: warning3
: info. - Source
Identifier 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.
- Source
Owner 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.
- Exclude
Resource stringIds Scope - 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 Dictionary<string, string> - The settings map of the input parameters for the rule.
- Maximum
Execution stringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - Region
Ids stringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- Resource
Group stringIds Scope - 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
. - Tag
Key stringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- Tag
Value stringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- Aggregate
Config stringRule Name - The name of the rule.
- Aggregator
Id string - The Aggregator Id.
- Config
Rule stringTrigger Types - 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 []stringScopes - 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
: critical2
: warning3
: info. - Source
Identifier 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.
- Source
Owner 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.
- Exclude
Resource stringIds Scope - 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 map[string]string - The settings map of the input parameters for the rule.
- Maximum
Execution stringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - Region
Ids stringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- Resource
Group stringIds Scope - 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
. - Tag
Key stringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- Tag
Value stringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate
Config StringRule Name - The name of the rule.
- aggregator
Id String - The Aggregator Id.
- config
Rule StringTrigger Types - 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 List<String>Scopes - Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
- risk
Level Integer - The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical2
: warning3
: info. - source
Identifier 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.
- source
Owner 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.
- exclude
Resource StringIds Scope - 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 Map<String,String> - The settings map of the input parameters for the rule.
- maximum
Execution StringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region
Ids StringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Group StringIds Scope - 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
. - tag
Key StringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag
Value StringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate
Config stringRule Name - The name of the rule.
- aggregator
Id string - The Aggregator Id.
- config
Rule stringTrigger Types - 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 string[]Scopes - Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
- risk
Level number - The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical2
: warning3
: info. - source
Identifier 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.
- source
Owner 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.
- exclude
Resource stringIds Scope - 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 {[key: string]: string} - The settings map of the input parameters for the rule.
- maximum
Execution stringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region
Ids stringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Group stringIds Scope - 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
. - tag
Key stringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag
Value stringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate_
config_ strrule_ name - The name of the rule.
- aggregator_
id str - The Aggregator Id.
- config_
rule_ strtrigger_ types - 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_ Sequence[str]scopes - 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
: critical2
: warning3
: info. - source_
identifier 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 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_ strids_ scope - 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_ strfrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region_
ids_ strscope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource_
group_ strids_ scope - 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_ strscope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag_
value_ strscope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate
Config StringRule Name - The name of the rule.
- aggregator
Id String - The Aggregator Id.
- config
Rule StringTrigger Types - 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 List<String>Scopes - Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
- risk
Level Number - The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical2
: warning3
: info. - source
Identifier 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.
- source
Owner 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.
- exclude
Resource StringIds Scope - 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 Map<String> - The settings map of the input parameters for the rule.
- maximum
Execution StringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region
Ids StringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Group StringIds Scope - 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
. - tag
Key StringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag
Value StringScope - 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:
- Config
Rule stringId - (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 stringId - (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 StringId - (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 stringId - (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_ strid - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- id str
- The provider-assigned unique ID for this managed resource.
- config
Rule StringId - (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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Aggregate
Config stringRule Name - The name of the rule.
- Aggregator
Id string - The Aggregator Id.
- Config
Rule stringId - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- Config
Rule stringTrigger Types - 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.
- Exclude
Resource stringIds Scope - 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 Dictionary<string, string> - The settings map of the input parameters for the rule.
- Maximum
Execution stringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - Region
Ids stringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- Resource
Group stringIds Scope - The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
- Resource
Types List<string>Scopes - 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
: critical2
: warning3
: info. - Source
Identifier 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.
- Source
Owner 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
. - Tag
Key stringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- Tag
Value stringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- Aggregate
Config stringRule Name - The name of the rule.
- Aggregator
Id string - The Aggregator Id.
- Config
Rule stringId - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- Config
Rule stringTrigger Types - 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.
- Exclude
Resource stringIds Scope - 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 map[string]string - The settings map of the input parameters for the rule.
- Maximum
Execution stringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - Region
Ids stringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- Resource
Group stringIds Scope - The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
- Resource
Types []stringScopes - 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
: critical2
: warning3
: info. - Source
Identifier 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.
- Source
Owner 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
. - Tag
Key stringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- Tag
Value stringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate
Config StringRule Name - The name of the rule.
- aggregator
Id String - The Aggregator Id.
- config
Rule StringId - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- config
Rule StringTrigger Types - 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.
- exclude
Resource StringIds Scope - 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 Map<String,String> - The settings map of the input parameters for the rule.
- maximum
Execution StringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region
Ids StringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Group StringIds Scope - The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Types List<String>Scopes - Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
- risk
Level Integer - The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical2
: warning3
: info. - source
Identifier 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.
- source
Owner 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
. - tag
Key StringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag
Value StringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate
Config stringRule Name - The name of the rule.
- aggregator
Id string - The Aggregator Id.
- config
Rule stringId - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- config
Rule stringTrigger Types - 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.
- exclude
Resource stringIds Scope - 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 {[key: string]: string} - The settings map of the input parameters for the rule.
- maximum
Execution stringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region
Ids stringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Group stringIds Scope - The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Types string[]Scopes - Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
- risk
Level number - The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical2
: warning3
: info. - source
Identifier 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.
- source
Owner 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
. - tag
Key stringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag
Value stringScope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate_
config_ strrule_ name - The name of the rule.
- aggregator_
id str - The Aggregator Id.
- config_
rule_ strid - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- config_
rule_ strtrigger_ types - 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_ strids_ scope - 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_ strfrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region_
ids_ strscope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource_
group_ strids_ scope - The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
- resource_
types_ Sequence[str]scopes - 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
: critical2
: warning3
: info. - source_
identifier 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 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_ strscope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag_
value_ strscope - The rule monitors the tag value, use with the
tag_key_scope
options. only applies to rules created based on managed rules.
- aggregate
Config StringRule Name - The name of the rule.
- aggregator
Id String - The Aggregator Id.
- config
Rule StringId - (Available since v1.141.0) The rule ID of Aggregate Config Rule.
- config
Rule StringTrigger Types - 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.
- exclude
Resource StringIds Scope - 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 Map<String> - The settings map of the input parameters for the rule.
- maximum
Execution StringFrequency - The frequency of the compliance evaluations. Valid values:
One_Hour
,Three_Hours
,Six_Hours
,Twelve_Hours
,TwentyFour_Hours
. System default value isTwentyFour_Hours
and valid when theconfig_rule_trigger_types
isScheduledNotification
. - region
Ids StringScope - The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Group StringIds Scope - The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
- resource
Types List<String>Scopes - Resource types to be evaluated. Alibaba Cloud services that support Cloud Config.
- risk
Level Number - The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical2
: warning3
: info. - source
Identifier 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.
- source
Owner 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
. - tag
Key StringScope - The rule monitors the tag key, only applies to rules created based on managed rules.
- tag
Value StringScope - 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>"
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.