1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cfg
  5. getAggregateCompliancePacks
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.cfg.getAggregateCompliancePacks

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    This data source provides the Config Aggregate Compliance Packs 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.GetAggregateCompliancePacks.Invoke(new()
        {
            AggregatorId = "ca-3a9b626622af001d****",
            Ids = new[]
            {
                "cp-152a626622af00bc****",
            },
            NameRegex = "the_resource_name",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstConfigAggregateCompliancePackId"] = example.Apply(getAggregateCompliancePacksResult => getAggregateCompliancePacksResult.Packs[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.GetAggregateCompliancePacks(ctx, &cfg.GetAggregateCompliancePacksArgs{
    			AggregatorId: "ca-3a9b626622af001d****",
    			Ids: []string{
    				"cp-152a626622af00bc****",
    			},
    			NameRegex: pulumi.StringRef("the_resource_name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstConfigAggregateCompliancePackId", example.Packs[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.GetAggregateCompliancePacksArgs;
    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.getAggregateCompliancePacks(GetAggregateCompliancePacksArgs.builder()
                .aggregatorId("ca-3a9b626622af001d****")
                .ids("cp-152a626622af00bc****")
                .nameRegex("the_resource_name")
                .build());
    
            ctx.export("firstConfigAggregateCompliancePackId", example.applyValue(getAggregateCompliancePacksResult -> getAggregateCompliancePacksResult.packs()[0].id()));
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.cfg.get_aggregate_compliance_packs(aggregator_id="ca-3a9b626622af001d****",
        ids=["cp-152a626622af00bc****"],
        name_regex="the_resource_name")
    pulumi.export("firstConfigAggregateCompliancePackId", example.packs[0].id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.cfg.getAggregateCompliancePacks({
        aggregatorId: "ca-3a9b626622af001d****",
        ids: ["cp-152a626622af00bc****"],
        nameRegex: "the_resource_name",
    });
    export const firstConfigAggregateCompliancePackId = example.then(example => example.packs?.[0]?.id);
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:cfg:getAggregateCompliancePacks
          Arguments:
            aggregatorId: ca-3a9b626622af001d****
            ids:
              - cp-152a626622af00bc****
            nameRegex: the_resource_name
    outputs:
      firstConfigAggregateCompliancePackId: ${example.packs[0].id}
    

    Using getAggregateCompliancePacks

    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 getAggregateCompliancePacks(args: GetAggregateCompliancePacksArgs, opts?: InvokeOptions): Promise<GetAggregateCompliancePacksResult>
    function getAggregateCompliancePacksOutput(args: GetAggregateCompliancePacksOutputArgs, opts?: InvokeOptions): Output<GetAggregateCompliancePacksResult>
    def get_aggregate_compliance_packs(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,
                                       status: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetAggregateCompliancePacksResult
    def get_aggregate_compliance_packs_output(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,
                                       status: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetAggregateCompliancePacksResult]
    func GetAggregateCompliancePacks(ctx *Context, args *GetAggregateCompliancePacksArgs, opts ...InvokeOption) (*GetAggregateCompliancePacksResult, error)
    func GetAggregateCompliancePacksOutput(ctx *Context, args *GetAggregateCompliancePacksOutputArgs, opts ...InvokeOption) GetAggregateCompliancePacksResultOutput

    > Note: This function is named GetAggregateCompliancePacks in the Go SDK.

    public static class GetAggregateCompliancePacks 
    {
        public static Task<GetAggregateCompliancePacksResult> InvokeAsync(GetAggregateCompliancePacksArgs args, InvokeOptions? opts = null)
        public static Output<GetAggregateCompliancePacksResult> Invoke(GetAggregateCompliancePacksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAggregateCompliancePacksResult> getAggregateCompliancePacks(GetAggregateCompliancePacksArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cfg/getAggregateCompliancePacks:getAggregateCompliancePacks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AggregatorId string

    The ID of aggregator.

    EnableDetails bool

    Default to false. Set it to true can output more details about resource attributes.

    Ids List<string>

    A list of Aggregate Compliance Pack IDs.

    NameRegex string

    A regex string to filter results by Aggregate Compliance Pack name.

    OutputFile string

    File name where to save data source results (after running pulumi preview).

    Status string

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    AggregatorId string

    The ID of aggregator.

    EnableDetails bool

    Default to false. Set it to true can output more details about resource attributes.

    Ids []string

    A list of Aggregate Compliance Pack IDs.

    NameRegex string

    A regex string to filter results by Aggregate Compliance Pack name.

    OutputFile string

    File name where to save data source results (after running pulumi preview).

    Status string

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    aggregatorId String

    The ID of aggregator.

    enableDetails Boolean

    Default to false. Set it to true can output more details about resource attributes.

    ids List<String>

    A list of Aggregate Compliance Pack IDs.

    nameRegex String

    A regex string to filter results by Aggregate Compliance Pack name.

    outputFile String

    File name where to save data source results (after running pulumi preview).

    status String

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    aggregatorId string

    The ID of aggregator.

    enableDetails boolean

    Default to false. Set it to true can output more details about resource attributes.

    ids string[]

    A list of Aggregate Compliance Pack IDs.

    nameRegex string

    A regex string to filter results by Aggregate Compliance Pack name.

    outputFile string

    File name where to save data source results (after running pulumi preview).

    status string

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    aggregator_id str

    The ID of aggregator.

    enable_details bool

    Default to false. Set it to true can output more details about resource attributes.

    ids Sequence[str]

    A list of Aggregate Compliance Pack IDs.

    name_regex str

    A regex string to filter results by Aggregate Compliance Pack name.

    output_file str

    File name where to save data source results (after running pulumi preview).

    status str

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    aggregatorId String

    The ID of aggregator.

    enableDetails Boolean

    Default to false. Set it to true can output more details about resource attributes.

    ids List<String>

    A list of Aggregate Compliance Pack IDs.

    nameRegex String

    A regex string to filter results by Aggregate Compliance Pack name.

    outputFile String

    File name where to save data source results (after running pulumi preview).

    status String

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    getAggregateCompliancePacks Result

    The following output properties are available:

    AggregatorId string
    Id string

    The provider-assigned unique ID for this managed resource.

    Ids List<string>
    Names List<string>

    A list of Config Aggregate Compliance Pack names.

    Packs List<Pulumi.AliCloud.Cfg.Outputs.GetAggregateCompliancePacksPack>

    A list of Config Aggregate Compliance Packs. Each element contains the following attributes:

    EnableDetails bool
    NameRegex string
    OutputFile string
    Status string

    The status of the resource.

    AggregatorId string
    Id string

    The provider-assigned unique ID for this managed resource.

    Ids []string
    Names []string

    A list of Config Aggregate Compliance Pack names.

    Packs []GetAggregateCompliancePacksPack

    A list of Config Aggregate Compliance Packs. Each element contains the following attributes:

    EnableDetails bool
    NameRegex string
    OutputFile string
    Status string

    The status of the resource.

    aggregatorId String
    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>
    names List<String>

    A list of Config Aggregate Compliance Pack names.

    packs List<GetAggregateCompliancePacksPack>

    A list of Config Aggregate Compliance Packs. Each element contains the following attributes:

    enableDetails Boolean
    nameRegex String
    outputFile String
    status String

    The status of the resource.

    aggregatorId string
    id string

    The provider-assigned unique ID for this managed resource.

    ids string[]
    names string[]

    A list of Config Aggregate Compliance Pack names.

    packs GetAggregateCompliancePacksPack[]

    A list of Config Aggregate Compliance Packs. Each element contains the following attributes:

    enableDetails boolean
    nameRegex string
    outputFile string
    status string

    The status of the resource.

    aggregator_id str
    id str

    The provider-assigned unique ID for this managed resource.

    ids Sequence[str]
    names Sequence[str]

    A list of Config Aggregate Compliance Pack names.

    packs Sequence[GetAggregateCompliancePacksPack]

    A list of Config Aggregate Compliance Packs. Each element contains the following attributes:

    enable_details bool
    name_regex str
    output_file str
    status str

    The status of the resource.

    aggregatorId String
    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>
    names List<String>

    A list of Config Aggregate Compliance Pack names.

    packs List<Property Map>

    A list of Config Aggregate Compliance Packs. Each element contains the following attributes:

    enableDetails Boolean
    nameRegex String
    outputFile String
    status String

    The status of the resource.

    Supporting Types

    GetAggregateCompliancePacksPack

    AccountId string

    The Aliyun User Id.

    AggregateCompliancePackName string

    The Aggregate Compliance Package Name.

    AggregatorCompliancePackId string

    The Aggregate Compliance Package Id.

    CompliancePackTemplateId string

    The template ID of the Compliance Package.

    ConfigRules List<Pulumi.AliCloud.Cfg.Inputs.GetAggregateCompliancePacksPackConfigRule>

    A list of The Aggregate Compliance Package Rules.

    Description string

    The description of aggregate compliance pack.

    Id string

    The ID of the Aggregate Compliance Pack.

    RiskLevel int

    The Risk Level.

    Status string

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    AccountId string

    The Aliyun User Id.

    AggregateCompliancePackName string

    The Aggregate Compliance Package Name.

    AggregatorCompliancePackId string

    The Aggregate Compliance Package Id.

    CompliancePackTemplateId string

    The template ID of the Compliance Package.

    ConfigRules []GetAggregateCompliancePacksPackConfigRule

    A list of The Aggregate Compliance Package Rules.

    Description string

    The description of aggregate compliance pack.

    Id string

    The ID of the Aggregate Compliance Pack.

    RiskLevel int

    The Risk Level.

    Status string

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    accountId String

    The Aliyun User Id.

    aggregateCompliancePackName String

    The Aggregate Compliance Package Name.

    aggregatorCompliancePackId String

    The Aggregate Compliance Package Id.

    compliancePackTemplateId String

    The template ID of the Compliance Package.

    configRules List<GetAggregateCompliancePacksPackConfigRule>

    A list of The Aggregate Compliance Package Rules.

    description String

    The description of aggregate compliance pack.

    id String

    The ID of the Aggregate Compliance Pack.

    riskLevel Integer

    The Risk Level.

    status String

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    accountId string

    The Aliyun User Id.

    aggregateCompliancePackName string

    The Aggregate Compliance Package Name.

    aggregatorCompliancePackId string

    The Aggregate Compliance Package Id.

    compliancePackTemplateId string

    The template ID of the Compliance Package.

    configRules GetAggregateCompliancePacksPackConfigRule[]

    A list of The Aggregate Compliance Package Rules.

    description string

    The description of aggregate compliance pack.

    id string

    The ID of the Aggregate Compliance Pack.

    riskLevel number

    The Risk Level.

    status string

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    account_id str

    The Aliyun User Id.

    aggregate_compliance_pack_name str

    The Aggregate Compliance Package Name.

    aggregator_compliance_pack_id str

    The Aggregate Compliance Package Id.

    compliance_pack_template_id str

    The template ID of the Compliance Package.

    config_rules Sequence[GetAggregateCompliancePacksPackConfigRule]

    A list of The Aggregate Compliance Package Rules.

    description str

    The description of aggregate compliance pack.

    id str

    The ID of the Aggregate Compliance Pack.

    risk_level int

    The Risk Level.

    status str

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    accountId String

    The Aliyun User Id.

    aggregateCompliancePackName String

    The Aggregate Compliance Package Name.

    aggregatorCompliancePackId String

    The Aggregate Compliance Package Id.

    compliancePackTemplateId String

    The template ID of the Compliance Package.

    configRules List<Property Map>

    A list of The Aggregate Compliance Package Rules.

    description String

    The description of aggregate compliance pack.

    id String

    The ID of the Aggregate Compliance Pack.

    riskLevel Number

    The Risk Level.

    status String

    The status of the resource. Valid values ACTIVE, CREATING, INACTIVE.

    GetAggregateCompliancePacksPackConfigRule

    ConfigRuleId string

    The ID of the rule.

    ConfigRuleParameters []GetAggregateCompliancePacksPackConfigRuleConfigRuleParameter

    A list of parameter rules.

    ManagedRuleIdentifier string

    Managed Rule Identifier.

    configRuleId String

    The ID of the rule.

    configRuleParameters List<GetAggregateCompliancePacksPackConfigRuleConfigRuleParameter>

    A list of parameter rules.

    managedRuleIdentifier String

    Managed Rule Identifier.

    configRuleId string

    The ID of the rule.

    configRuleParameters GetAggregateCompliancePacksPackConfigRuleConfigRuleParameter[]

    A list of parameter rules.

    managedRuleIdentifier string

    Managed Rule Identifier.

    configRuleId String

    The ID of the rule.

    configRuleParameters List<Property Map>

    A list of parameter rules.

    managedRuleIdentifier String

    Managed Rule Identifier.

    GetAggregateCompliancePacksPackConfigRuleConfigRuleParameter

    ParameterName string

    The Parameter Name.

    ParameterValue string

    The Parameter Value.

    Required bool

    Required.

    ParameterName string

    The Parameter Name.

    ParameterValue string

    The Parameter Value.

    Required bool

    Required.

    parameterName String

    The Parameter Name.

    parameterValue String

    The Parameter Value.

    required Boolean

    Required.

    parameterName string

    The Parameter Name.

    parameterValue string

    The Parameter Value.

    required boolean

    Required.

    parameter_name str

    The Parameter Name.

    parameter_value str

    The Parameter Value.

    required bool

    Required.

    parameterName String

    The Parameter Name.

    parameterValue String

    The Parameter Value.

    required Boolean

    Required.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi