1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cfg
  5. getAggregators
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

alicloud.cfg.getAggregators

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

    This data source provides the Config Aggregators of the current Alibaba Cloud user.

    NOTE: Available in v1.124.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.cfg.getAggregators({
        ids: ["ca-3ce2626622af0005****"],
        nameRegex: "the_resource_name",
    });
    export const firstConfigAggregatorId = example.then(example => example.aggregators?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.cfg.get_aggregators(ids=["ca-3ce2626622af0005****"],
        name_regex="the_resource_name")
    pulumi.export("firstConfigAggregatorId", example.aggregators[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.GetAggregators(ctx, &cfg.GetAggregatorsArgs{
    			Ids: []string{
    				"ca-3ce2626622af0005****",
    			},
    			NameRegex: pulumi.StringRef("the_resource_name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstConfigAggregatorId", example.Aggregators[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Cfg.GetAggregators.Invoke(new()
        {
            Ids = new[]
            {
                "ca-3ce2626622af0005****",
            },
            NameRegex = "the_resource_name",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstConfigAggregatorId"] = example.Apply(getAggregatorsResult => getAggregatorsResult.Aggregators[0]?.Id),
        };
    });
    
    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.GetAggregatorsArgs;
    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.getAggregators(GetAggregatorsArgs.builder()
                .ids("ca-3ce2626622af0005****")
                .nameRegex("the_resource_name")
                .build());
    
            ctx.export("firstConfigAggregatorId", example.applyValue(getAggregatorsResult -> getAggregatorsResult.aggregators()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:cfg:getAggregators
          Arguments:
            ids:
              - ca-3ce2626622af0005****
            nameRegex: the_resource_name
    outputs:
      firstConfigAggregatorId: ${example.aggregators[0].id}
    

    Using getAggregators

    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 getAggregators(args: GetAggregatorsArgs, opts?: InvokeOptions): Promise<GetAggregatorsResult>
    function getAggregatorsOutput(args: GetAggregatorsOutputArgs, opts?: InvokeOptions): Output<GetAggregatorsResult>
    def get_aggregators(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) -> GetAggregatorsResult
    def get_aggregators_output(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[GetAggregatorsResult]
    func GetAggregators(ctx *Context, args *GetAggregatorsArgs, opts ...InvokeOption) (*GetAggregatorsResult, error)
    func GetAggregatorsOutput(ctx *Context, args *GetAggregatorsOutputArgs, opts ...InvokeOption) GetAggregatorsResultOutput

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

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

    The following arguments are supported:

    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of aggregator ids.
    NameRegex string
    A regex string to filter results by aggregator name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of aggregator ids.
    NameRegex string
    A regex string to filter results by aggregator name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of aggregator ids.
    nameRegex String
    A regex string to filter results by aggregator name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of aggregator ids.
    nameRegex string
    A regex string to filter results by aggregator name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of aggregator ids.
    name_regex str
    A regex string to filter results by aggregator 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: 0: creating 1: normal 2: deleting.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of aggregator ids.
    nameRegex String
    A regex string to filter results by aggregator name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.

    getAggregators Result

    The following output properties are available:

    Aggregators List<Pulumi.AliCloud.Cfg.Outputs.GetAggregatorsAggregator>
    A list of config aggregators. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Aggregator names.
    EnableDetails bool
    NameRegex string
    OutputFile string
    Status string
    The status of the resource.
    Aggregators []GetAggregatorsAggregator
    A list of config aggregators. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Aggregator names.
    EnableDetails bool
    NameRegex string
    OutputFile string
    Status string
    The status of the resource.
    aggregators List<GetAggregatorsAggregator>
    A list of config aggregators. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Aggregator names.
    enableDetails Boolean
    nameRegex String
    outputFile String
    status String
    The status of the resource.
    aggregators GetAggregatorsAggregator[]
    A list of config aggregators. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Aggregator names.
    enableDetails boolean
    nameRegex string
    outputFile string
    status string
    The status of the resource.
    aggregators Sequence[GetAggregatorsAggregator]
    A list of config aggregators. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Aggregator names.
    enable_details bool
    name_regex str
    output_file str
    status str
    The status of the resource.
    aggregators List<Property Map>
    A list of config aggregators. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Aggregator names.
    enableDetails Boolean
    nameRegex String
    outputFile String
    status String
    The status of the resource.

    Supporting Types

    GetAggregatorsAggregator

    AccountId string
    Aggregator account uid.
    AggregatorAccounts List<Pulumi.AliCloud.Cfg.Inputs.GetAggregatorsAggregatorAggregatorAccount>
    Account information in aggregator.
    AggregatorId string
    The id of aggregator.
    AggregatorName string
    The name of aggregator.
    AggregatorType string
    The type of aggregator.
    Description string
    The description of aggregator.
    Id string
    The id of the aggregator.
    Status string
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    AccountId string
    Aggregator account uid.
    AggregatorAccounts []GetAggregatorsAggregatorAggregatorAccount
    Account information in aggregator.
    AggregatorId string
    The id of aggregator.
    AggregatorName string
    The name of aggregator.
    AggregatorType string
    The type of aggregator.
    Description string
    The description of aggregator.
    Id string
    The id of the aggregator.
    Status string
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    accountId String
    Aggregator account uid.
    aggregatorAccounts List<GetAggregatorsAggregatorAggregatorAccount>
    Account information in aggregator.
    aggregatorId String
    The id of aggregator.
    aggregatorName String
    The name of aggregator.
    aggregatorType String
    The type of aggregator.
    description String
    The description of aggregator.
    id String
    The id of the aggregator.
    status String
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    accountId string
    Aggregator account uid.
    aggregatorAccounts GetAggregatorsAggregatorAggregatorAccount[]
    Account information in aggregator.
    aggregatorId string
    The id of aggregator.
    aggregatorName string
    The name of aggregator.
    aggregatorType string
    The type of aggregator.
    description string
    The description of aggregator.
    id string
    The id of the aggregator.
    status string
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    account_id str
    Aggregator account uid.
    aggregator_accounts Sequence[GetAggregatorsAggregatorAggregatorAccount]
    Account information in aggregator.
    aggregator_id str
    The id of aggregator.
    aggregator_name str
    The name of aggregator.
    aggregator_type str
    The type of aggregator.
    description str
    The description of aggregator.
    id str
    The id of the aggregator.
    status str
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
    accountId String
    Aggregator account uid.
    aggregatorAccounts List<Property Map>
    Account information in aggregator.
    aggregatorId String
    The id of aggregator.
    aggregatorName String
    The name of aggregator.
    aggregatorType String
    The type of aggregator.
    description String
    The description of aggregator.
    id String
    The id of the aggregator.
    status String
    The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.

    GetAggregatorsAggregatorAggregatorAccount

    AccountId string
    Aggregator account uid.
    AccountName string
    Aggregator account name.
    AccountType string
    Aggregator account source type.
    AccountId string
    Aggregator account uid.
    AccountName string
    Aggregator account name.
    AccountType string
    Aggregator account source type.
    accountId String
    Aggregator account uid.
    accountName String
    Aggregator account name.
    accountType String
    Aggregator account source type.
    accountId string
    Aggregator account uid.
    accountName string
    Aggregator account name.
    accountType string
    Aggregator account source type.
    account_id str
    Aggregator account uid.
    account_name str
    Aggregator account name.
    account_type str
    Aggregator account source type.
    accountId String
    Aggregator account uid.
    accountName String
    Aggregator account name.
    accountType String
    Aggregator account source type.

    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.56.0 published on Friday, May 31, 2024 by Pulumi