1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ros
  5. getStacks
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.ros.getStacks

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

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

    NOTE: Available in v1.106.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.ros.getStacks({
        ids: ["example_value"],
        nameRegex: "the_resource_name",
    });
    export const firstRosStackId = example.then(example => example.stacks?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.ros.get_stacks(ids=["example_value"],
        name_regex="the_resource_name")
    pulumi.export("firstRosStackId", example.stacks[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.GetStacks(ctx, &ros.GetStacksArgs{
    			Ids: []string{
    				"example_value",
    			},
    			NameRegex: pulumi.StringRef("the_resource_name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstRosStackId", example.Stacks[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.GetStacks.Invoke(new()
        {
            Ids = new[]
            {
                "example_value",
            },
            NameRegex = "the_resource_name",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstRosStackId"] = example.Apply(getStacksResult => getStacksResult.Stacks[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.GetStacksArgs;
    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.getStacks(GetStacksArgs.builder()
                .ids("example_value")
                .nameRegex("the_resource_name")
                .build());
    
            ctx.export("firstRosStackId", example.applyValue(getStacksResult -> getStacksResult.stacks()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:ros:getStacks
          Arguments:
            ids:
              - example_value
            nameRegex: the_resource_name
    outputs:
      firstRosStackId: ${example.stacks[0].id}
    

    Using getStacks

    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 getStacks(args: GetStacksArgs, opts?: InvokeOptions): Promise<GetStacksResult>
    function getStacksOutput(args: GetStacksOutputArgs, opts?: InvokeOptions): Output<GetStacksResult>
    def get_stacks(enable_details: Optional[bool] = None,
                   ids: Optional[Sequence[str]] = None,
                   name_regex: Optional[str] = None,
                   output_file: Optional[str] = None,
                   parent_stack_id: Optional[str] = None,
                   show_nested_stack: Optional[bool] = None,
                   stack_name: Optional[str] = None,
                   status: Optional[str] = None,
                   tags: Optional[Mapping[str, Any]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetStacksResult
    def get_stacks_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,
                   parent_stack_id: Optional[pulumi.Input[str]] = None,
                   show_nested_stack: Optional[pulumi.Input[bool]] = None,
                   stack_name: Optional[pulumi.Input[str]] = None,
                   status: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetStacksResult]
    func GetStacks(ctx *Context, args *GetStacksArgs, opts ...InvokeOption) (*GetStacksResult, error)
    func GetStacksOutput(ctx *Context, args *GetStacksOutputArgs, opts ...InvokeOption) GetStacksResultOutput

    > Note: This function is named GetStacks in the Go SDK.

    public static class GetStacks 
    {
        public static Task<GetStacksResult> InvokeAsync(GetStacksArgs args, InvokeOptions? opts = null)
        public static Output<GetStacksResult> Invoke(GetStacksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStacksResult> getStacks(GetStacksArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ros/getStacks:getStacks
      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 IDs.
    NameRegex string
    A regex string to filter results by Stack name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ParentStackId string
    Parent Stack Id.
    ShowNestedStack bool
    The show nested stack.
    StackName string
    Stack Name.
    Status string
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    Tags Dictionary<string, object>
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Stack IDs.
    NameRegex string
    A regex string to filter results by Stack name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ParentStackId string
    Parent Stack Id.
    ShowNestedStack bool
    The show nested stack.
    StackName string
    Stack Name.
    Status string
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    Tags map[string]interface{}
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Stack IDs.
    nameRegex String
    A regex string to filter results by Stack name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    parentStackId String
    Parent Stack Id.
    showNestedStack Boolean
    The show nested stack.
    stackName String
    Stack Name.
    status String
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    tags Map<String,Object>
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Stack IDs.
    nameRegex string
    A regex string to filter results by Stack name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    parentStackId string
    Parent Stack Id.
    showNestedStack boolean
    The show nested stack.
    stackName string
    Stack Name.
    status string
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    tags {[key: string]: any}
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of Stack IDs.
    name_regex str
    A regex string to filter results by Stack name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    parent_stack_id str
    Parent Stack Id.
    show_nested_stack bool
    The show nested stack.
    stack_name str
    Stack Name.
    status str
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    tags Mapping[str, Any]
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Stack IDs.
    nameRegex String
    A regex string to filter results by Stack name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    parentStackId String
    Parent Stack Id.
    showNestedStack Boolean
    The show nested stack.
    stackName String
    Stack Name.
    status String
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    tags Map<Any>
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.

    getStacks Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Stacks List<Pulumi.AliCloud.Ros.Outputs.GetStacksStack>
    EnableDetails bool
    NameRegex string
    OutputFile string
    ParentStackId string
    ShowNestedStack bool
    StackName string
    Status string
    Tags Dictionary<string, object>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Stacks []GetStacksStack
    EnableDetails bool
    NameRegex string
    OutputFile string
    ParentStackId string
    ShowNestedStack bool
    StackName string
    Status string
    Tags map[string]interface{}
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    stacks List<GetStacksStack>
    enableDetails Boolean
    nameRegex String
    outputFile String
    parentStackId String
    showNestedStack Boolean
    stackName String
    status String
    tags Map<String,Object>
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    stacks GetStacksStack[]
    enableDetails boolean
    nameRegex string
    outputFile string
    parentStackId string
    showNestedStack boolean
    stackName string
    status string
    tags {[key: string]: any}
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    stacks Sequence[GetStacksStack]
    enable_details bool
    name_regex str
    output_file str
    parent_stack_id str
    show_nested_stack bool
    stack_name str
    status str
    tags Mapping[str, Any]
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    stacks List<Property Map>
    enableDetails Boolean
    nameRegex String
    outputFile String
    parentStackId String
    showNestedStack Boolean
    stackName String
    status String
    tags Map<Any>

    Supporting Types

    GetStacksStack

    DeletionProtection string
    Specifies whether to enable deletion protection on the stack.
    Description string
    The Description of the Stack.
    DisableRollback bool
    Specifies whether to disable rollback on stack creation failure..
    DriftDetectionTime string
    Drift DetectionTime.
    Id string
    The ID of the Stack.
    Parameters List<Pulumi.AliCloud.Ros.Inputs.GetStacksStackParameter>
    The parameters.
    ParentStackId string
    Parent Stack Id.
    RamRoleName string
    The RamRoleName.
    RootStackId string
    Root Stack Id.
    StackDriftStatus string
    Stack DriftStatus.
    StackId string
    Stack Id.
    StackName string
    Stack Name.
    StackPolicyBody string
    The structure that contains the stack policy body.
    Status string
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    StatusReason string
    Status Reason.
    Tags Dictionary<string, object>
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    TemplateDescription string
    Template Description.
    TimeoutInMinutes int
    Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.
    DeletionProtection string
    Specifies whether to enable deletion protection on the stack.
    Description string
    The Description of the Stack.
    DisableRollback bool
    Specifies whether to disable rollback on stack creation failure..
    DriftDetectionTime string
    Drift DetectionTime.
    Id string
    The ID of the Stack.
    Parameters []GetStacksStackParameter
    The parameters.
    ParentStackId string
    Parent Stack Id.
    RamRoleName string
    The RamRoleName.
    RootStackId string
    Root Stack Id.
    StackDriftStatus string
    Stack DriftStatus.
    StackId string
    Stack Id.
    StackName string
    Stack Name.
    StackPolicyBody string
    The structure that contains the stack policy body.
    Status string
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    StatusReason string
    Status Reason.
    Tags map[string]interface{}
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    TemplateDescription string
    Template Description.
    TimeoutInMinutes int
    Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.
    deletionProtection String
    Specifies whether to enable deletion protection on the stack.
    description String
    The Description of the Stack.
    disableRollback Boolean
    Specifies whether to disable rollback on stack creation failure..
    driftDetectionTime String
    Drift DetectionTime.
    id String
    The ID of the Stack.
    parameters List<GetStacksStackParameter>
    The parameters.
    parentStackId String
    Parent Stack Id.
    ramRoleName String
    The RamRoleName.
    rootStackId String
    Root Stack Id.
    stackDriftStatus String
    Stack DriftStatus.
    stackId String
    Stack Id.
    stackName String
    Stack Name.
    stackPolicyBody String
    The structure that contains the stack policy body.
    status String
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    statusReason String
    Status Reason.
    tags Map<String,Object>
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    templateDescription String
    Template Description.
    timeoutInMinutes Integer
    Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.
    deletionProtection string
    Specifies whether to enable deletion protection on the stack.
    description string
    The Description of the Stack.
    disableRollback boolean
    Specifies whether to disable rollback on stack creation failure..
    driftDetectionTime string
    Drift DetectionTime.
    id string
    The ID of the Stack.
    parameters GetStacksStackParameter[]
    The parameters.
    parentStackId string
    Parent Stack Id.
    ramRoleName string
    The RamRoleName.
    rootStackId string
    Root Stack Id.
    stackDriftStatus string
    Stack DriftStatus.
    stackId string
    Stack Id.
    stackName string
    Stack Name.
    stackPolicyBody string
    The structure that contains the stack policy body.
    status string
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    statusReason string
    Status Reason.
    tags {[key: string]: any}
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    templateDescription string
    Template Description.
    timeoutInMinutes number
    Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.
    deletion_protection str
    Specifies whether to enable deletion protection on the stack.
    description str
    The Description of the Stack.
    disable_rollback bool
    Specifies whether to disable rollback on stack creation failure..
    drift_detection_time str
    Drift DetectionTime.
    id str
    The ID of the Stack.
    parameters Sequence[GetStacksStackParameter]
    The parameters.
    parent_stack_id str
    Parent Stack Id.
    ram_role_name str
    The RamRoleName.
    root_stack_id str
    Root Stack Id.
    stack_drift_status str
    Stack DriftStatus.
    stack_id str
    Stack Id.
    stack_name str
    Stack Name.
    stack_policy_body str
    The structure that contains the stack policy body.
    status str
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    status_reason str
    Status Reason.
    tags Mapping[str, Any]
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    template_description str
    Template Description.
    timeout_in_minutes int
    Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.
    deletionProtection String
    Specifies whether to enable deletion protection on the stack.
    description String
    The Description of the Stack.
    disableRollback Boolean
    Specifies whether to disable rollback on stack creation failure..
    driftDetectionTime String
    Drift DetectionTime.
    id String
    The ID of the Stack.
    parameters List<Property Map>
    The parameters.
    parentStackId String
    Parent Stack Id.
    ramRoleName String
    The RamRoleName.
    rootStackId String
    Root Stack Id.
    stackDriftStatus String
    Stack DriftStatus.
    stackId String
    Stack Id.
    stackName String
    Stack Name.
    stackPolicyBody String
    The structure that contains the stack policy body.
    status String
    The status of Stack. Valid Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS.
    statusReason String
    Status Reason.
    tags Map<Any>
    Query the instance bound to the tag. The format of the incoming value is json string, including TagKey and TagValue. TagKey cannot be null, and TagValue can be empty. Format example {"key1":"value1"}.
    templateDescription String
    Template Description.
    timeoutInMinutes Number
    Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.

    GetStacksStackParameter

    ParameterKey string
    The key of parameters.
    ParameterValue string
    The value of parameters.
    ParameterKey string
    The key of parameters.
    ParameterValue string
    The value of parameters.
    parameterKey String
    The key of parameters.
    parameterValue String
    The value of parameters.
    parameterKey string
    The key of parameters.
    parameterValue string
    The value of parameters.
    parameter_key str
    The key of parameters.
    parameter_value str
    The value of parameters.
    parameterKey String
    The key of parameters.
    parameterValue String
    The value of parameters.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi