Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.Ros.GetStackGroups.InvokeAsync(new AliCloud.Ros.GetStackGroupsArgs
        {
            Ids = 
            {
                "example_value",
            },
            NameRegex = "the_resource_name",
        }));
        this.FirstRosStackGroupId = example.Apply(example => example.Groups?[0]?.Id);
    }

    [Output("firstRosStackGroupId")]
    public Output<string> FirstRosStackGroupId { get; set; }
}
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.applyValue(getStackGroupsResult -> getStackGroupsResult.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)
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);
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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:ros/getStackGroups:getStackGroups
  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 Stack Group IDs.

NameRegex string

A regex string to filter results by Stack Group name.

OutputFile string
Status string

The status of Stack Group.

EnableDetails bool

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

Ids []string

A list of Stack Group IDs.

NameRegex string

A regex string to filter results by Stack Group name.

OutputFile string
Status string

The status of Stack Group.

enableDetails Boolean

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

ids List<String>

A list of Stack Group IDs.

nameRegex String

A regex string to filter results by Stack Group name.

outputFile String
status String

The status of Stack Group.

enableDetails boolean

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

ids string[]

A list of Stack Group IDs.

nameRegex string

A regex string to filter results by Stack Group name.

outputFile string
status string

The status of Stack Group.

enable_details bool

Default to false. Set it to true can 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
status str

The status of Stack Group.

enableDetails Boolean

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

ids List<String>

A list of Stack Group IDs.

nameRegex String

A regex string to filter results by Stack Group name.

outputFile String
status String

The status of Stack Group.

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 string

The name of the RAM administrator role assumed by ROS.

Description string

The description of the stack group.

ExecutionRoleName string

The name of the RAM execution role assumed by the administrator role.

Id string

The ID of the Stack Group.

Parameters List<Pulumi.AliCloud.Ros.Inputs.GetStackGroupsGroupParameter>

The parameters.

StackGroupId string

The id of Stack Group.

StackGroupName string

The name of the stack group..

Status string

The status of Stack Group.

TemplateBody string

The structure that contains the template body.

AdministrationRoleName string

The name of the RAM administrator role assumed by ROS.

Description string

The description of the stack group.

ExecutionRoleName string

The name of the RAM execution role assumed by the administrator role.

Id string

The ID of the Stack Group.

Parameters []GetStackGroupsGroupParameter

The parameters.

StackGroupId string

The id of Stack Group.

StackGroupName string

The name of the stack group..

Status string

The status of Stack Group.

TemplateBody string

The structure that contains the template body.

administrationRoleName String

The name of the RAM administrator role assumed by ROS.

description String

The description of the stack group.

executionRoleName String

The name of the RAM execution role assumed by the administrator role.

id String

The ID of the Stack Group.

parameters List<GetStackGroupsGroupParameter>

The parameters.

stackGroupId String

The id of Stack Group.

stackGroupName String

The name of the stack group..

status String

The status of Stack Group.

templateBody String

The structure that contains the template body.

administrationRoleName string

The name of the RAM administrator role assumed by ROS.

description string

The description of the stack group.

executionRoleName string

The name of the RAM execution role assumed by the administrator role.

id string

The ID of the Stack Group.

parameters GetStackGroupsGroupParameter[]

The parameters.

stackGroupId string

The id of Stack Group.

stackGroupName string

The name of the stack group..

status string

The status of Stack Group.

templateBody string

The structure that contains the template body.

administration_role_name str

The name of the RAM administrator role assumed by ROS.

description str

The description of the stack group.

execution_role_name str

The name of the RAM execution role assumed by the administrator role.

id str

The ID of the Stack Group.

parameters Sequence[GetStackGroupsGroupParameter]

The parameters.

stack_group_id str

The id of Stack Group.

stack_group_name str

The name of the stack group..

status str

The status of Stack Group.

template_body str

The structure that contains the template body.

administrationRoleName String

The name of the RAM administrator role assumed by ROS.

description String

The description of the stack group.

executionRoleName String

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.

stackGroupId String

The id of Stack Group.

stackGroupName String

The name of the stack group..

status String

The status of Stack Group.

templateBody String

The structure that contains the template body.

GetStackGroupsGroupParameter

ParameterKey string

The parameter key.

ParameterValue string

The parameter value.

ParameterKey string

The parameter key.

ParameterValue string

The parameter value.

parameterKey String

The parameter key.

parameterValue String

The parameter value.

parameterKey string

The parameter key.

parameterValue string

The parameter value.

parameter_key str

The parameter key.

parameter_value str

The parameter value.

parameterKey String

The parameter key.

parameterValue String

The parameter value.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.