getStackGroups

This data source provides the Ros Stack Groups of the current Alibaba Cloud user.

NOTE: Available in v1.107.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.ros.getStackGroups({
ids: ["example_value"],
nameRegex: "the_resource_name",
});
export const firstRosStackGroupId = example.then(example => example.groups?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ros.get_stack_groups(ids=["example_value"],
name_regex="the_resource_name")
pulumi.export("firstRosStackGroupId", example.groups[0].id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Ros.GetStackGroups.Invoke(new()
{
Ids = new[]
{
"example_value",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["firstRosStackGroupId"] = example&#46;Apply(getStackGroupsResult => getStackGroupsResult&#46;Groups[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ros.GetStackGroups(ctx, &ros.GetStackGroupsArgs{
Ids: []string{
"example_value",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstRosStackGroupId", example.Groups[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ros.RosFunctions;
import com.pulumi.alicloud.ros.inputs.GetStackGroupsArgs;
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 = RosFunctions.getStackGroups(GetStackGroupsArgs.builder()
.ids("example_value")
.nameRegex("the_resource_name")
.build());
ctx.export("firstRosStackGroupId", example.groups()[0].id());
}
}
variables:
example:
fn::invoke:
function: alicloud:ros:getStackGroups
arguments:
ids:
- example_value
nameRegex: the_resource_name
outputs:
firstRosStackGroupId: ${example.groups[0].id}

Return

A collection of values returned by getStackGroups.

Parameters

argument

A collection of arguments for invoking getStackGroups.


suspend fun getStackGroups(enableDetails: Boolean? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, status: String? = null): GetStackGroupsResult

Return

A collection of values returned by getStackGroups.

Parameters

enableDetails

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

ids

A list of Stack Group IDs.

nameRegex

A regex string to filter results by Stack Group name.

outputFile

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

status

The status of Stack Group. Valid Values: ACTIVE, DELETED.

See also


Return

A collection of values returned by getStackGroups.

Parameters

argument

Builder for com.pulumi.alicloud.ros.kotlin.inputs.GetStackGroupsPlainArgs.

See also