Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi
alicloud.ros.getStackGroups
Start a Neo task
Explain and create an alicloud.ros.getStackGroups resource
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)
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
})
}
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.Apply(getStackGroupsResult => getStackGroupsResult.Groups[0]?.Id),
};
});
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}
Using getStackGroups
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 getStackGroups(args: GetStackGroupsArgs, opts?: InvokeOptions): Promise<GetStackGroupsResult>
function getStackGroupsOutput(args: GetStackGroupsOutputArgs, opts?: InvokeOptions): Output<GetStackGroupsResult>def get_stack_groups(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) -> GetStackGroupsResult
def get_stack_groups_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[GetStackGroupsResult]func GetStackGroups(ctx *Context, args *GetStackGroupsArgs, opts ...InvokeOption) (*GetStackGroupsResult, error)
func GetStackGroupsOutput(ctx *Context, args *GetStackGroupsOutputArgs, opts ...InvokeOption) GetStackGroupsResultOutput> Note: This function is named GetStackGroups in the Go SDK.
public static class GetStackGroups
{
public static Task<GetStackGroupsResult> InvokeAsync(GetStackGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetStackGroupsResult> Invoke(GetStackGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetStackGroupsResult> getStackGroups(GetStackGroupsArgs args, InvokeOptions options)
public static Output<GetStackGroupsResult> getStackGroups(GetStackGroupsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:ros/getStackGroups:getStackGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Enable
Details bool - Default to
false. Set it totruecan output more details about resource attributes. - Ids List<string>
- A list of Stack Group IDs.
- Name
Regex string - A regex string to filter results by Stack Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of Stack Group. Valid Values:
ACTIVE,DELETED.
- Enable
Details bool - Default to
false. Set it totruecan output more details about resource attributes. - Ids []string
- A list of Stack Group IDs.
- Name
Regex string - A regex string to filter results by Stack Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of Stack Group. Valid Values:
ACTIVE,DELETED.
- enable
Details Boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids List<String>
- A list of Stack Group IDs.
- name
Regex String - A regex string to filter results by Stack Group name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of Stack Group. Valid Values:
ACTIVE,DELETED.
- enable
Details boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids string[]
- A list of Stack Group IDs.
- name
Regex string - A regex string to filter results by Stack Group name.
- output
File string - File name where to save data source results (after running
pulumi preview). - status string
- The status of Stack Group. Valid Values:
ACTIVE,DELETED.
- enable_
details bool - Default to
false. Set it totruecan output more details about resource attributes. - ids Sequence[str]
- A list of Stack Group IDs.
- name_
regex str - A regex string to filter results by Stack Group name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- The status of Stack Group. Valid Values:
ACTIVE,DELETED.
- enable
Details Boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids List<String>
- A list of Stack Group IDs.
- name
Regex String - A regex string to filter results by Stack Group name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of Stack Group. Valid Values:
ACTIVE,DELETED.
getStackGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Ros. Outputs. Get Stack Groups Group> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Enable
Details bool - Name
Regex string - Output
File string - Status string
- Groups
[]Get
Stack Groups Group - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Enable
Details bool - Name
Regex string - Output
File string - Status string
- groups
List<Get
Stack Groups Group> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - name
Regex String - output
File String - status String
- groups
Get
Stack Groups Group[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enable
Details boolean - name
Regex string - output
File string - status string
- groups
Sequence[Get
Stack Groups Group] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_
details bool - name_
regex str - output_
file str - status str
- groups List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - name
Regex String - output
File String - status String
Supporting Types
GetStackGroupsGroup
- Administration
Role stringName - The name of the RAM administrator role assumed by ROS.
- Description string
- The description of the stack group.
- Execution
Role stringName - The name of the RAM execution role assumed by the administrator role.
- Id string
- The ID of the Stack Group.
- Parameters
List<Pulumi.
Ali Cloud. Ros. Inputs. Get Stack Groups Group Parameter> - The parameters.
- Stack
Group stringId - The id of Stack Group.
- Stack
Group stringName - The name of the stack group..
- Status string
- The status of Stack Group.
- Template
Body string - The structure that contains the template body.
- Administration
Role stringName - The name of the RAM administrator role assumed by ROS.
- Description string
- The description of the stack group.
- Execution
Role stringName - The name of the RAM execution role assumed by the administrator role.
- Id string
- The ID of the Stack Group.
- Parameters
[]Get
Stack Groups Group Parameter - The parameters.
- Stack
Group stringId - The id of Stack Group.
- Stack
Group stringName - The name of the stack group..
- Status string
- The status of Stack Group.
- Template
Body string - The structure that contains the template body.
- administration
Role StringName - The name of the RAM administrator role assumed by ROS.
- description String
- The description of the stack group.
- execution
Role StringName - The name of the RAM execution role assumed by the administrator role.
- id String
- The ID of the Stack Group.
- parameters
List<Get
Stack Groups Group Parameter> - The parameters.
- stack
Group StringId - The id of Stack Group.
- stack
Group StringName - The name of the stack group..
- status String
- The status of Stack Group.
- template
Body String - The structure that contains the template body.
- administration
Role stringName - The name of the RAM administrator role assumed by ROS.
- description string
- The description of the stack group.
- execution
Role stringName - The name of the RAM execution role assumed by the administrator role.
- id string
- The ID of the Stack Group.
- parameters
Get
Stack Groups Group Parameter[] - The parameters.
- stack
Group stringId - The id of Stack Group.
- stack
Group stringName - The name of the stack group..
- status string
- The status of Stack Group.
- template
Body string - The structure that contains the template body.
- administration_
role_ strname - The name of the RAM administrator role assumed by ROS.
- description str
- The description of the stack group.
- execution_
role_ strname - The name of the RAM execution role assumed by the administrator role.
- id str
- The ID of the Stack Group.
- parameters
Sequence[Get
Stack Groups Group Parameter] - The parameters.
- stack_
group_ strid - The id of Stack Group.
- stack_
group_ strname - The name of the stack group..
- status str
- The status of Stack Group.
- template_
body str - The structure that contains the template body.
- administration
Role StringName - The name of the RAM administrator role assumed by ROS.
- description String
- The description of the stack group.
- execution
Role StringName - The name of the RAM execution role assumed by the administrator role.
- id String
- The ID of the Stack Group.
- parameters List<Property Map>
- The parameters.
- stack
Group StringId - The id of Stack Group.
- stack
Group StringName - The name of the stack group..
- status String
- The status of Stack Group.
- template
Body String - The structure that contains the template body.
GetStackGroupsGroupParameter
- Parameter
Key string - The parameter key.
- Parameter
Value string - The parameter value.
- Parameter
Key string - The parameter key.
- Parameter
Value string - The parameter value.
- parameter
Key String - The parameter key.
- parameter
Value String - The parameter value.
- parameter
Key string - The parameter key.
- parameter
Value string - The parameter value.
- parameter_
key str - The parameter key.
- parameter_
value str - The parameter value.
- parameter
Key String - The parameter key.
- parameter
Value String - The parameter value.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
