Alibaba Cloud v3.38.0, Jun 2 23
Alibaba Cloud v3.38.0, Jun 2 23
alicloud.cfg.getAggregateConfigRules
Explore with Pulumi AI
This data source provides the Config Aggregate Config Rules of the current Alibaba Cloud user.
NOTE: Available in v1.124.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Cfg.GetAggregateConfigRules.Invoke(new()
{
AggregatorId = "ca-3a9b626622af001d****",
Ids = new[]
{
"cr-5154626622af0034****",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["firstConfigAggregateConfigRuleId"] = example.Apply(getAggregateConfigRulesResult => getAggregateConfigRulesResult.Rules[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cfg"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cfg.GetAggregateConfigRules(ctx, &cfg.GetAggregateConfigRulesArgs{
AggregatorId: "ca-3a9b626622af001d****",
Ids: []string{
"cr-5154626622af0034****",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstConfigAggregateConfigRuleId", example.Rules[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cfg.CfgFunctions;
import com.pulumi.alicloud.cfg.inputs.GetAggregateConfigRulesArgs;
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 example = CfgFunctions.getAggregateConfigRules(GetAggregateConfigRulesArgs.builder()
.aggregatorId("ca-3a9b626622af001d****")
.ids("cr-5154626622af0034****")
.nameRegex("the_resource_name")
.build());
ctx.export("firstConfigAggregateConfigRuleId", example.applyValue(getAggregateConfigRulesResult -> getAggregateConfigRulesResult.rules()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.cfg.get_aggregate_config_rules(aggregator_id="ca-3a9b626622af001d****",
ids=["cr-5154626622af0034****"],
name_regex="the_resource_name")
pulumi.export("firstConfigAggregateConfigRuleId", example.rules[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.cfg.getAggregateConfigRules({
aggregatorId: "ca-3a9b626622af001d****",
ids: ["cr-5154626622af0034****"],
nameRegex: "the_resource_name",
});
export const firstConfigAggregateConfigRuleId = example.then(example => example.rules?.[0]?.id);
variables:
example:
fn::invoke:
Function: alicloud:cfg:getAggregateConfigRules
Arguments:
aggregatorId: ca-3a9b626622af001d****
ids:
- cr-5154626622af0034****
nameRegex: the_resource_name
outputs:
firstConfigAggregateConfigRuleId: ${example.rules[0].id}
Using getAggregateConfigRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAggregateConfigRules(args: GetAggregateConfigRulesArgs, opts?: InvokeOptions): Promise<GetAggregateConfigRulesResult>
function getAggregateConfigRulesOutput(args: GetAggregateConfigRulesOutputArgs, opts?: InvokeOptions): Output<GetAggregateConfigRulesResult>
def get_aggregate_config_rules(aggregate_config_rule_name: Optional[str] = None,
aggregator_id: Optional[str] = None,
enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
risk_level: Optional[int] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAggregateConfigRulesResult
def get_aggregate_config_rules_output(aggregate_config_rule_name: Optional[pulumi.Input[str]] = None,
aggregator_id: Optional[pulumi.Input[str]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
risk_level: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAggregateConfigRulesResult]
func GetAggregateConfigRules(ctx *Context, args *GetAggregateConfigRulesArgs, opts ...InvokeOption) (*GetAggregateConfigRulesResult, error)
func GetAggregateConfigRulesOutput(ctx *Context, args *GetAggregateConfigRulesOutputArgs, opts ...InvokeOption) GetAggregateConfigRulesResultOutput
> Note: This function is named GetAggregateConfigRules
in the Go SDK.
public static class GetAggregateConfigRules
{
public static Task<GetAggregateConfigRulesResult> InvokeAsync(GetAggregateConfigRulesArgs args, InvokeOptions? opts = null)
public static Output<GetAggregateConfigRulesResult> Invoke(GetAggregateConfigRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAggregateConfigRulesResult> getAggregateConfigRules(GetAggregateConfigRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cfg/getAggregateConfigRules:getAggregateConfigRules
arguments:
# arguments dictionary
The following arguments are supported:
- Aggregator
Id string The ID of aggregator.
- Aggregate
Config stringRule Name The config rule name.
- Enable
Details bool Default to
false
. Set it totrue
can output more details about resource attributes.- Ids List<string>
A list of Aggregate Config Rule IDs.
- Name
Regex string A regex string to filter results by Aggregate Config Rule name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Risk
Level int Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- Status string
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.
- Aggregator
Id string The ID of aggregator.
- Aggregate
Config stringRule Name The config rule name.
- Enable
Details bool Default to
false
. Set it totrue
can output more details about resource attributes.- Ids []string
A list of Aggregate Config Rule IDs.
- Name
Regex string A regex string to filter results by Aggregate Config Rule name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Risk
Level int Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- Status string
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.
- aggregator
Id String The ID of aggregator.
- aggregate
Config StringRule Name The config rule name.
- enable
Details Boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids List<String>
A list of Aggregate Config Rule IDs.
- name
Regex String A regex string to filter results by Aggregate Config Rule name.
- output
File String File name where to save data source results (after running
pulumi preview
).- risk
Level Integer Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- status String
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.
- aggregator
Id string The ID of aggregator.
- aggregate
Config stringRule Name The config rule name.
- enable
Details boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids string[]
A list of Aggregate Config Rule IDs.
- name
Regex string A regex string to filter results by Aggregate Config Rule name.
- output
File string File name where to save data source results (after running
pulumi preview
).- risk
Level number Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- status string
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.
- aggregator_
id str The ID of aggregator.
- aggregate_
config_ strrule_ name The config rule name.
- enable_
details bool Default to
false
. Set it totrue
can output more details about resource attributes.- ids Sequence[str]
A list of Aggregate Config Rule IDs.
- name_
regex str A regex string to filter results by Aggregate Config Rule name.
- output_
file str File name where to save data source results (after running
pulumi preview
).- risk_
level int Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- status str
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.
- aggregator
Id String The ID of aggregator.
- aggregate
Config StringRule Name The config rule name.
- enable
Details Boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids List<String>
A list of Aggregate Config Rule IDs.
- name
Regex String A regex string to filter results by Aggregate Config Rule name.
- output
File String File name where to save data source results (after running
pulumi preview
).- risk
Level Number Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- status String
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.
getAggregateConfigRules Result
The following output properties are available:
- Aggregator
Id string The ID of Aggregator.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
A list of Aggregate Config Rule names.
- Rules
List<Pulumi.
Ali Cloud. Cfg. Outputs. Get Aggregate Config Rules Rule> A list of Config Aggregate Config Rules. Each element contains the following attributes:
- Aggregate
Config stringRule Name The name of the rule.
- Enable
Details bool - Name
Regex string - Output
File string - Risk
Level int The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical,2
: warning,3
: info.- Status string
The status of the rule.
- Aggregator
Id string The ID of Aggregator.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
A list of Aggregate Config Rule names.
- Rules
[]Get
Aggregate Config Rules Rule A list of Config Aggregate Config Rules. Each element contains the following attributes:
- Aggregate
Config stringRule Name The name of the rule.
- Enable
Details bool - Name
Regex string - Output
File string - Risk
Level int The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical,2
: warning,3
: info.- Status string
The status of the rule.
- aggregator
Id String The ID of Aggregator.
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
A list of Aggregate Config Rule names.
- rules
List<Get
Aggregate Config Rules Rule> A list of Config Aggregate Config Rules. Each element contains the following attributes:
- aggregate
Config StringRule Name The name of the rule.
- enable
Details Boolean - name
Regex String - output
File String - risk
Level Integer The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical,2
: warning,3
: info.- status String
The status of the rule.
- aggregator
Id string The ID of Aggregator.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
A list of Aggregate Config Rule names.
- rules
Get
Aggregate Config Rules Rule[] A list of Config Aggregate Config Rules. Each element contains the following attributes:
- aggregate
Config stringRule Name The name of the rule.
- enable
Details boolean - name
Regex string - output
File string - risk
Level number The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical,2
: warning,3
: info.- status string
The status of the rule.
- aggregator_
id str The ID of Aggregator.
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
A list of Aggregate Config Rule names.
- rules
Sequence[Get
Aggregate Config Rules Rule] A list of Config Aggregate Config Rules. Each element contains the following attributes:
- aggregate_
config_ strrule_ name The name of the rule.
- enable_
details bool - name_
regex str - output_
file str - risk_
level int The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical,2
: warning,3
: info.- status str
The status of the rule.
- aggregator
Id String The ID of Aggregator.
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
A list of Aggregate Config Rule names.
- rules List<Property Map>
A list of Config Aggregate Config Rules. Each element contains the following attributes:
- aggregate
Config StringRule Name The name of the rule.
- enable
Details Boolean - name
Regex String - output
File String - risk
Level Number The risk level of the resources that are not compliant with the rule. Valid values:
1
: critical,2
: warning,3
: info.- status String
The status of the rule.
Supporting Types
GetAggregateConfigRulesRule
- Account
Id string The Aliyun User ID.
- Aggregate
Config stringRule Name The config rule name.
- Aggregator
Id string The ID of aggregator.
- Compliance
Pack stringId The ID of Compliance Package.
- Compliances
List<Pulumi.
Ali Cloud. Cfg. Inputs. Get Aggregate Config Rules Rule Compliance> The Compliance information.
- Config
Rule stringArn The config rule arn.
- Config
Rule stringId The ID of the rule.
- Config
Rule stringTrigger Types The trigger types of config rules.
- Description string
The description of the rule.
- Event
Source string Event source of the Config Rule.
- Exclude
Resource stringIds Scope The id of the resources to be evaluated against the rule.
- Id string
The ID of the Aggregate Config Rule.
- Input
Parameters Dictionary<string, object> The settings of the input parameters for the rule.
- Maximum
Execution stringFrequency The frequency of the compliance evaluations.
- Modified
Timestamp string The timestamp when the rule was last modified.
- Region
Ids stringScope The scope of resource region ids.
- Resource
Group stringIds Scope The scope of resource group ids.
- Resource
Types List<string>Scopes - Risk
Level int Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- Source
Identifier string The identifier of the managed rule or the arn of the custom function.
- Source
Owner string The source owner of the Config Rule.
- Status string
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.- Tag
Key stringScope The scope of tay key.
- Tag
Value stringScope The scope of tay value.
- Account
Id string The Aliyun User ID.
- Aggregate
Config stringRule Name The config rule name.
- Aggregator
Id string The ID of aggregator.
- Compliance
Pack stringId The ID of Compliance Package.
- Compliances
[]Get
Aggregate Config Rules Rule Compliance The Compliance information.
- Config
Rule stringArn The config rule arn.
- Config
Rule stringId The ID of the rule.
- Config
Rule stringTrigger Types The trigger types of config rules.
- Description string
The description of the rule.
- Event
Source string Event source of the Config Rule.
- Exclude
Resource stringIds Scope The id of the resources to be evaluated against the rule.
- Id string
The ID of the Aggregate Config Rule.
- Input
Parameters map[string]interface{} The settings of the input parameters for the rule.
- Maximum
Execution stringFrequency The frequency of the compliance evaluations.
- Modified
Timestamp string The timestamp when the rule was last modified.
- Region
Ids stringScope The scope of resource region ids.
- Resource
Group stringIds Scope The scope of resource group ids.
- Resource
Types []stringScopes - Risk
Level int Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- Source
Identifier string The identifier of the managed rule or the arn of the custom function.
- Source
Owner string The source owner of the Config Rule.
- Status string
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.- Tag
Key stringScope The scope of tay key.
- Tag
Value stringScope The scope of tay value.
- account
Id String The Aliyun User ID.
- aggregate
Config StringRule Name The config rule name.
- aggregator
Id String The ID of aggregator.
- compliance
Pack StringId The ID of Compliance Package.
- compliances
List<Get
Aggregate Config Rules Rule Compliance> The Compliance information.
- config
Rule StringArn The config rule arn.
- config
Rule StringId The ID of the rule.
- config
Rule StringTrigger Types The trigger types of config rules.
- description String
The description of the rule.
- event
Source String Event source of the Config Rule.
- exclude
Resource StringIds Scope The id of the resources to be evaluated against the rule.
- id String
The ID of the Aggregate Config Rule.
- input
Parameters Map<String,Object> The settings of the input parameters for the rule.
- maximum
Execution StringFrequency The frequency of the compliance evaluations.
- modified
Timestamp String The timestamp when the rule was last modified.
- region
Ids StringScope The scope of resource region ids.
- resource
Group StringIds Scope The scope of resource group ids.
- resource
Types List<String>Scopes - risk
Level Integer Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- source
Identifier String The identifier of the managed rule or the arn of the custom function.
- source
Owner String The source owner of the Config Rule.
- status String
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.- tag
Key StringScope The scope of tay key.
- tag
Value StringScope The scope of tay value.
- account
Id string The Aliyun User ID.
- aggregate
Config stringRule Name The config rule name.
- aggregator
Id string The ID of aggregator.
- compliance
Pack stringId The ID of Compliance Package.
- compliances
Get
Aggregate Config Rules Rule Compliance[] The Compliance information.
- config
Rule stringArn The config rule arn.
- config
Rule stringId The ID of the rule.
- config
Rule stringTrigger Types The trigger types of config rules.
- description string
The description of the rule.
- event
Source string Event source of the Config Rule.
- exclude
Resource stringIds Scope The id of the resources to be evaluated against the rule.
- id string
The ID of the Aggregate Config Rule.
- input
Parameters {[key: string]: any} The settings of the input parameters for the rule.
- maximum
Execution stringFrequency The frequency of the compliance evaluations.
- modified
Timestamp string The timestamp when the rule was last modified.
- region
Ids stringScope The scope of resource region ids.
- resource
Group stringIds Scope The scope of resource group ids.
- resource
Types string[]Scopes - risk
Level number Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- source
Identifier string The identifier of the managed rule or the arn of the custom function.
- source
Owner string The source owner of the Config Rule.
- status string
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.- tag
Key stringScope The scope of tay key.
- tag
Value stringScope The scope of tay value.
- account_
id str The Aliyun User ID.
- aggregate_
config_ strrule_ name The config rule name.
- aggregator_
id str The ID of aggregator.
- compliance_
pack_ strid The ID of Compliance Package.
- compliances
Sequence[Get
Aggregate Config Rules Rule Compliance] The Compliance information.
- config_
rule_ strarn The config rule arn.
- config_
rule_ strid The ID of the rule.
- config_
rule_ strtrigger_ types The trigger types of config rules.
- description str
The description of the rule.
- event_
source str Event source of the Config Rule.
- exclude_
resource_ strids_ scope The id of the resources to be evaluated against the rule.
- id str
The ID of the Aggregate Config Rule.
- input_
parameters Mapping[str, Any] The settings of the input parameters for the rule.
- maximum_
execution_ strfrequency The frequency of the compliance evaluations.
- modified_
timestamp str The timestamp when the rule was last modified.
- region_
ids_ strscope The scope of resource region ids.
- resource_
group_ strids_ scope The scope of resource group ids.
- resource_
types_ Sequence[str]scopes - risk_
level int Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- source_
identifier str The identifier of the managed rule or the arn of the custom function.
- source_
owner str The source owner of the Config Rule.
- status str
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.- tag_
key_ strscope The scope of tay key.
- tag_
value_ strscope The scope of tay value.
- account
Id String The Aliyun User ID.
- aggregate
Config StringRule Name The config rule name.
- aggregator
Id String The ID of aggregator.
- compliance
Pack StringId The ID of Compliance Package.
- compliances List<Property Map>
The Compliance information.
- config
Rule StringArn The config rule arn.
- config
Rule StringId The ID of the rule.
- config
Rule StringTrigger Types The trigger types of config rules.
- description String
The description of the rule.
- event
Source String Event source of the Config Rule.
- exclude
Resource StringIds Scope The id of the resources to be evaluated against the rule.
- id String
The ID of the Aggregate Config Rule.
- input
Parameters Map<Any> The settings of the input parameters for the rule.
- maximum
Execution StringFrequency The frequency of the compliance evaluations.
- modified
Timestamp String The timestamp when the rule was last modified.
- region
Ids StringScope The scope of resource region ids.
- resource
Group StringIds Scope The scope of resource group ids.
- resource
Types List<String>Scopes - risk
Level Number Optional, ForceNew) The Risk Level. Valid values
1
: critical,2
: warning,3
: info.- source
Identifier String The identifier of the managed rule or the arn of the custom function.
- source
Owner String The source owner of the Config Rule.
- status String
The state of the config rule, valid values:
ACTIVE
,DELETING
,EVALUATING
andINACTIVE
.- tag
Key StringScope The scope of tay key.
- tag
Value StringScope The scope of tay value.
GetAggregateConfigRulesRuleCompliance
- Compliance
Type string The Compliance Type.
- Count int
The Count.
- Compliance
Type string The Compliance Type.
- Count int
The Count.
- compliance
Type String The Compliance Type.
- count Integer
The Count.
- compliance
Type string The Compliance Type.
- count number
The Count.
- compliance_
type str The Compliance Type.
- count int
The Count.
- compliance
Type String The Compliance Type.
- count Number
The Count.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.