get Aggregators
This data source provides the Config Aggregators of the current Alibaba Cloud user.
NOTE: Available since 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);Content copied to clipboard
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)Content copied to clipboard
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),
};
});Content copied to clipboard
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
})
}Content copied to clipboard
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()));
}
}Content copied to clipboard
variables:
example:
fn::invoke:
function: alicloud:cfg:getAggregators
arguments:
ids:
- ca-3ce2626622af0005****
nameRegex: the_resource_name
outputs:
firstConfigAggregatorId: ${example.aggregators[0].id}Content copied to clipboard
Return
A collection of values returned by getAggregators.
Parameters
argument
A collection of arguments for invoking getAggregators.
suspend fun getAggregators(enableDetails: Boolean? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, status: String? = null): GetAggregatorsResult
Return
A collection of values returned by getAggregators.
Parameters
enable Details
Default to false. Set it to true can output more details about resource attributes.
ids
A list of aggregator ids.
name Regex
A regex string to filter results by aggregator name.
output File
File name where to save data source results (after running pulumi preview).
status
The status of the resource. Valid Values: 0: creating 1: normal 2: deleting.
See also
suspend fun getAggregators(argument: suspend GetAggregatorsPlainArgsBuilder.() -> Unit): GetAggregatorsResult
Return
A collection of values returned by getAggregators.
Parameters
argument
Builder for com.pulumi.alicloud.cfg.kotlin.inputs.GetAggregatorsPlainArgs.