1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ros
  5. getStackGroups
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ros.getStackGroups

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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.applyValue(getStackGroupsResult -> getStackGroupsResult.groups()[0].id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:ros:getStackGroups
      arguments:
        ids:
          - example_value
        nameRegex: the_resource_name
outputs:
  firstRosStackGroupId: ${example.groups[0].id}
Copy

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>
Copy
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]
Copy
func GetStackGroups(ctx *Context, args *GetStackGroupsArgs, opts ...InvokeOption) (*GetStackGroupsResult, error)
func GetStackGroupsOutput(ctx *Context, args *GetStackGroupsOutputArgs, opts ...InvokeOption) GetStackGroupsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetStackGroupsResult> getStackGroups(GetStackGroupsArgs args, InvokeOptions options)
public static Output<GetStackGroupsResult> getStackGroups(GetStackGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ros/getStackGroups:getStackGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. List<string>
A list of Stack Group IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Stack Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of Stack Group. Valid Values: ACTIVE, DELETED.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. []string
A list of Stack Group IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Stack Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of Stack Group. Valid Values: ACTIVE, DELETED.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Stack Group IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Stack Group name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of Stack Group. Valid Values: ACTIVE, DELETED.
enableDetails boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. string[]
A list of Stack Group IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Stack Group name.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
The status of Stack Group. Valid Values: ACTIVE, DELETED.
enable_details bool
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Stack Group IDs.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The status of Stack Group. Valid Values: ACTIVE, DELETED.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Stack Group IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Stack Group name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of Stack Group. Valid Values: ACTIVE, DELETED.

getStackGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.Ros.Outputs.GetStackGroupsGroup>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
EnableDetails bool
NameRegex string
OutputFile string
Status string
Groups []GetStackGroupsGroup
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
EnableDetails bool
NameRegex string
OutputFile string
Status string
groups List<GetStackGroupsGroup>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
enableDetails Boolean
nameRegex String
outputFile String
status String
groups GetStackGroupsGroup[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
enableDetails boolean
nameRegex string
outputFile string
status string
groups Sequence[GetStackGroupsGroup]
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>
enableDetails Boolean
nameRegex String
outputFile String
status String

Supporting Types

GetStackGroupsGroup

AdministrationRoleName This property is required. string
The name of the RAM administrator role assumed by ROS.
Description This property is required. string
The description of the stack group.
ExecutionRoleName This property is required. string
The name of the RAM execution role assumed by the administrator role.
Id This property is required. string
The ID of the Stack Group.
Parameters This property is required. List<Pulumi.AliCloud.Ros.Inputs.GetStackGroupsGroupParameter>
The parameters.
StackGroupId This property is required. string
The id of Stack Group.
StackGroupName This property is required. string
The name of the stack group..
Status This property is required. string
The status of Stack Group.
TemplateBody This property is required. string
The structure that contains the template body.
AdministrationRoleName This property is required. string
The name of the RAM administrator role assumed by ROS.
Description This property is required. string
The description of the stack group.
ExecutionRoleName This property is required. string
The name of the RAM execution role assumed by the administrator role.
Id This property is required. string
The ID of the Stack Group.
Parameters This property is required. []GetStackGroupsGroupParameter
The parameters.
StackGroupId This property is required. string
The id of Stack Group.
StackGroupName This property is required. string
The name of the stack group..
Status This property is required. string
The status of Stack Group.
TemplateBody This property is required. string
The structure that contains the template body.
administrationRoleName This property is required. String
The name of the RAM administrator role assumed by ROS.
description This property is required. String
The description of the stack group.
executionRoleName This property is required. String
The name of the RAM execution role assumed by the administrator role.
id This property is required. String
The ID of the Stack Group.
parameters This property is required. List<GetStackGroupsGroupParameter>
The parameters.
stackGroupId This property is required. String
The id of Stack Group.
stackGroupName This property is required. String
The name of the stack group..
status This property is required. String
The status of Stack Group.
templateBody This property is required. String
The structure that contains the template body.
administrationRoleName This property is required. string
The name of the RAM administrator role assumed by ROS.
description This property is required. string
The description of the stack group.
executionRoleName This property is required. string
The name of the RAM execution role assumed by the administrator role.
id This property is required. string
The ID of the Stack Group.
parameters This property is required. GetStackGroupsGroupParameter[]
The parameters.
stackGroupId This property is required. string
The id of Stack Group.
stackGroupName This property is required. string
The name of the stack group..
status This property is required. string
The status of Stack Group.
templateBody This property is required. string
The structure that contains the template body.
administration_role_name This property is required. str
The name of the RAM administrator role assumed by ROS.
description This property is required. str
The description of the stack group.
execution_role_name This property is required. str
The name of the RAM execution role assumed by the administrator role.
id This property is required. str
The ID of the Stack Group.
parameters This property is required. Sequence[GetStackGroupsGroupParameter]
The parameters.
stack_group_id This property is required. str
The id of Stack Group.
stack_group_name This property is required. str
The name of the stack group..
status This property is required. str
The status of Stack Group.
template_body This property is required. str
The structure that contains the template body.
administrationRoleName This property is required. String
The name of the RAM administrator role assumed by ROS.
description This property is required. String
The description of the stack group.
executionRoleName This property is required. String
The name of the RAM execution role assumed by the administrator role.
id This property is required. String
The ID of the Stack Group.
parameters This property is required. List<Property Map>
The parameters.
stackGroupId This property is required. String
The id of Stack Group.
stackGroupName This property is required. String
The name of the stack group..
status This property is required. String
The status of Stack Group.
templateBody This property is required. String
The structure that contains the template body.

GetStackGroupsGroupParameter

ParameterKey This property is required. string
The parameter key.
ParameterValue This property is required. string
The parameter value.
ParameterKey This property is required. string
The parameter key.
ParameterValue This property is required. string
The parameter value.
parameterKey This property is required. String
The parameter key.
parameterValue This property is required. String
The parameter value.
parameterKey This property is required. string
The parameter key.
parameterValue This property is required. string
The parameter value.
parameter_key This property is required. str
The parameter key.
parameter_value This property is required. str
The parameter value.
parameterKey This property is required. String
The parameter key.
parameterValue This property is required. String
The parameter value.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi