Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi
alicloud.ros.getStacks
Explore with Pulumi AI
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, str]] = 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, pulumi.Input[str]]]] = 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:
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids List<string>
- A list of Stack IDs.
- Name
Regex string - A regex string to filter results by Stack name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Parent
Stack stringId - ParentStackId.
- Show
Nested boolStack - The show nested stack.
- Stack
Name string - StackName.
- 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
. - Dictionary<string, string>
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids []string
- A list of Stack IDs.
- Name
Regex string - A regex string to filter results by Stack name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Parent
Stack stringId - ParentStackId.
- Show
Nested boolStack - The show nested stack.
- Stack
Name string - StackName.
- 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
. - map[string]string
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Stack IDs.
- name
Regex String - A regex string to filter results by Stack name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - parent
Stack StringId - ParentStackId.
- show
Nested BooleanStack - The show nested stack.
- stack
Name String - StackName.
- 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
. - Map<String,String>
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids string[]
- A list of Stack IDs.
- name
Regex string - A regex string to filter results by Stack name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - parent
Stack stringId - ParentStackId.
- show
Nested booleanStack - The show nested stack.
- stack
Name string - StackName.
- 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
. - {[key: string]: string}
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
.
- enable_
details bool - Default to
false
. Set it totrue
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_ strid - ParentStackId.
- show_
nested_ boolstack - The show nested stack.
- stack_
name str - StackName.
- 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
. - Mapping[str, str]
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Stack IDs.
- name
Regex String - A regex string to filter results by Stack name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - parent
Stack StringId - ParentStackId.
- show
Nested BooleanStack - The show nested stack.
- stack
Name String - StackName.
- 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
. - Map<String>
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
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.
Ali Cloud. Ros. Outputs. Get Stacks Stack> - Enable
Details bool - Name
Regex string - Output
File string - Parent
Stack stringId - Show
Nested boolStack - Stack
Name string - Status string
- Dictionary<string, string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Stacks
[]Get
Stacks Stack - Enable
Details bool - Name
Regex string - Output
File string - Parent
Stack stringId - Show
Nested boolStack - Stack
Name string - Status string
- map[string]string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- stacks
List<Get
Stacks Stack> - enable
Details Boolean - name
Regex String - output
File String - parent
Stack StringId - show
Nested BooleanStack - stack
Name String - status String
- Map<String,String>
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- stacks
Get
Stacks Stack[] - enable
Details boolean - name
Regex string - output
File string - parent
Stack stringId - show
Nested booleanStack - stack
Name string - status string
- {[key: string]: string}
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- stacks
Sequence[Get
Stacks Stack] - enable_
details bool - name_
regex str - output_
file str - parent_
stack_ strid - show_
nested_ boolstack - stack_
name str - status str
- Mapping[str, str]
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- stacks List<Property Map>
- enable
Details Boolean - name
Regex String - output
File String - parent
Stack StringId - show
Nested BooleanStack - stack
Name String - status String
- Map<String>
Supporting Types
GetStacksStack
- Deletion
Protection string - Specifies whether to enable deletion protection on the stack.
- Description string
- The Description of the Stack.
- Disable
Rollback bool - Specifies whether to disable rollback on stack creation failure..
- Drift
Detection stringTime - Drift DetectionTime.
- Id string
- The ID of the Stack.
- Parameters
List<Pulumi.
Ali Cloud. Ros. Inputs. Get Stacks Stack Parameter> - The parameters.
- Parent
Stack stringId - Parent Stack Id.
- Ram
Role stringName - The RamRoleName.
- Root
Stack stringId - Root Stack Id.
- Stack
Drift stringStatus - Stack DriftStatus.
- Stack
Id string - Stack Id.
- Stack
Name string - Stack Name.
- Stack
Policy stringBody - 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
. - Status
Reason string - Status Reason.
- Dictionary<string, string>
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
. - Template
Description string - Template Description.
- Timeout
In intMinutes - 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 string - Specifies whether to enable deletion protection on the stack.
- Description string
- The Description of the Stack.
- Disable
Rollback bool - Specifies whether to disable rollback on stack creation failure..
- Drift
Detection stringTime - Drift DetectionTime.
- Id string
- The ID of the Stack.
- Parameters
[]Get
Stacks Stack Parameter - The parameters.
- Parent
Stack stringId - Parent Stack Id.
- Ram
Role stringName - The RamRoleName.
- Root
Stack stringId - Root Stack Id.
- Stack
Drift stringStatus - Stack DriftStatus.
- Stack
Id string - Stack Id.
- Stack
Name string - Stack Name.
- Stack
Policy stringBody - 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
. - Status
Reason string - Status Reason.
- map[string]string
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
. - Template
Description string - Template Description.
- Timeout
In intMinutes - 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 String - Specifies whether to enable deletion protection on the stack.
- description String
- The Description of the Stack.
- disable
Rollback Boolean - Specifies whether to disable rollback on stack creation failure..
- drift
Detection StringTime - Drift DetectionTime.
- id String
- The ID of the Stack.
- parameters
List<Get
Stacks Stack Parameter> - The parameters.
- parent
Stack StringId - Parent Stack Id.
- ram
Role StringName - The RamRoleName.
- root
Stack StringId - Root Stack Id.
- stack
Drift StringStatus - Stack DriftStatus.
- stack
Id String - Stack Id.
- stack
Name String - Stack Name.
- stack
Policy StringBody - 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
. - status
Reason String - Status Reason.
- Map<String,String>
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
. - template
Description String - Template Description.
- timeout
In IntegerMinutes - 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 string - Specifies whether to enable deletion protection on the stack.
- description string
- The Description of the Stack.
- disable
Rollback boolean - Specifies whether to disable rollback on stack creation failure..
- drift
Detection stringTime - Drift DetectionTime.
- id string
- The ID of the Stack.
- parameters
Get
Stacks Stack Parameter[] - The parameters.
- parent
Stack stringId - Parent Stack Id.
- ram
Role stringName - The RamRoleName.
- root
Stack stringId - Root Stack Id.
- stack
Drift stringStatus - Stack DriftStatus.
- stack
Id string - Stack Id.
- stack
Name string - Stack Name.
- stack
Policy stringBody - 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
. - status
Reason string - Status Reason.
- {[key: string]: string}
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
. - template
Description string - Template Description.
- timeout
In numberMinutes - 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_ strtime - Drift DetectionTime.
- id str
- The ID of the Stack.
- parameters
Sequence[Get
Stacks Stack Parameter] - The parameters.
- parent_
stack_ strid - Parent Stack Id.
- ram_
role_ strname - The RamRoleName.
- root_
stack_ strid - Root Stack Id.
- stack_
drift_ strstatus - Stack DriftStatus.
- stack_
id str - Stack Id.
- stack_
name str - Stack Name.
- stack_
policy_ strbody - 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.
- Mapping[str, str]
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
. - template_
description str - Template Description.
- timeout_
in_ intminutes - 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 String - Specifies whether to enable deletion protection on the stack.
- description String
- The Description of the Stack.
- disable
Rollback Boolean - Specifies whether to disable rollback on stack creation failure..
- drift
Detection StringTime - Drift DetectionTime.
- id String
- The ID of the Stack.
- parameters List<Property Map>
- The parameters.
- parent
Stack StringId - Parent Stack Id.
- ram
Role StringName - The RamRoleName.
- root
Stack StringId - Root Stack Id.
- stack
Drift StringStatus - Stack DriftStatus.
- stack
Id String - Stack Id.
- stack
Name String - Stack Name.
- stack
Policy StringBody - 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
. - status
Reason String - Status Reason.
- Map<String>
- Query the instance bound to the tag. The format of the incoming value is
json
string, includingTagKey
andTagValue
.TagKey
cannot be null, andTagValue
can be empty. Format example{"key1":"value1"}
. - template
Description String - Template Description.
- timeout
In NumberMinutes - Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.
GetStacksStackParameter
- Parameter
Key string - The key of parameters.
- Parameter
Value string - The value of parameters.
- Parameter
Key string - The key of parameters.
- Parameter
Value string - The value of parameters.
- parameter
Key String - The key of parameters.
- parameter
Value String - The value of parameters.
- parameter
Key string - The key of parameters.
- parameter
Value string - The value of parameters.
- parameter_
key str - The key of parameters.
- parameter_
value str - The value of parameters.
- parameter
Key String - The key of parameters.
- parameter
Value 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.