Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.ecs.getEcsDeploymentSets
Explore with Pulumi AI
This data source provides the Ecs Deployment Sets of the current Alibaba Cloud user.
NOTE: Available in v1.140.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ecs.getEcsDeploymentSets({
ids: ["example_id"],
});
export const ecsDeploymentSetId1 = ids.then(ids => ids.sets?.[0]?.id);
const nameRegex = alicloud.ecs.getEcsDeploymentSets({
nameRegex: "^my-DeploymentSet",
});
export const ecsDeploymentSetId2 = nameRegex.then(nameRegex => nameRegex.sets?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ecs.get_ecs_deployment_sets(ids=["example_id"])
pulumi.export("ecsDeploymentSetId1", ids.sets[0].id)
name_regex = alicloud.ecs.get_ecs_deployment_sets(name_regex="^my-DeploymentSet")
pulumi.export("ecsDeploymentSetId2", name_regex.sets[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := ecs.GetEcsDeploymentSets(ctx, &ecs.GetEcsDeploymentSetsArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDeploymentSetId1", ids.Sets[0].Id)
nameRegex, err := ecs.GetEcsDeploymentSets(ctx, &ecs.GetEcsDeploymentSetsArgs{
NameRegex: pulumi.StringRef("^my-DeploymentSet"),
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDeploymentSetId2", nameRegex.Sets[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Ecs.GetEcsDeploymentSets.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.Ecs.GetEcsDeploymentSets.Invoke(new()
{
NameRegex = "^my-DeploymentSet",
});
return new Dictionary<string, object?>
{
["ecsDeploymentSetId1"] = ids.Apply(getEcsDeploymentSetsResult => getEcsDeploymentSetsResult.Sets[0]?.Id),
["ecsDeploymentSetId2"] = nameRegex.Apply(getEcsDeploymentSetsResult => getEcsDeploymentSetsResult.Sets[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetEcsDeploymentSetsArgs;
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 ids = EcsFunctions.getEcsDeploymentSets(GetEcsDeploymentSetsArgs.builder()
.ids("example_id")
.build());
ctx.export("ecsDeploymentSetId1", ids.applyValue(getEcsDeploymentSetsResult -> getEcsDeploymentSetsResult.sets()[0].id()));
final var nameRegex = EcsFunctions.getEcsDeploymentSets(GetEcsDeploymentSetsArgs.builder()
.nameRegex("^my-DeploymentSet")
.build());
ctx.export("ecsDeploymentSetId2", nameRegex.applyValue(getEcsDeploymentSetsResult -> getEcsDeploymentSetsResult.sets()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:ecs:getEcsDeploymentSets
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:ecs:getEcsDeploymentSets
Arguments:
nameRegex: ^my-DeploymentSet
outputs:
ecsDeploymentSetId1: ${ids.sets[0].id}
ecsDeploymentSetId2: ${nameRegex.sets[0].id}
Using getEcsDeploymentSets
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 getEcsDeploymentSets(args: GetEcsDeploymentSetsArgs, opts?: InvokeOptions): Promise<GetEcsDeploymentSetsResult>
function getEcsDeploymentSetsOutput(args: GetEcsDeploymentSetsOutputArgs, opts?: InvokeOptions): Output<GetEcsDeploymentSetsResult>
def get_ecs_deployment_sets(deployment_set_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
strategy: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEcsDeploymentSetsResult
def get_ecs_deployment_sets_output(deployment_set_name: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
strategy: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEcsDeploymentSetsResult]
func GetEcsDeploymentSets(ctx *Context, args *GetEcsDeploymentSetsArgs, opts ...InvokeOption) (*GetEcsDeploymentSetsResult, error)
func GetEcsDeploymentSetsOutput(ctx *Context, args *GetEcsDeploymentSetsOutputArgs, opts ...InvokeOption) GetEcsDeploymentSetsResultOutput
> Note: This function is named GetEcsDeploymentSets
in the Go SDK.
public static class GetEcsDeploymentSets
{
public static Task<GetEcsDeploymentSetsResult> InvokeAsync(GetEcsDeploymentSetsArgs args, InvokeOptions? opts = null)
public static Output<GetEcsDeploymentSetsResult> Invoke(GetEcsDeploymentSetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsDeploymentSetsResult> getEcsDeploymentSets(GetEcsDeploymentSetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ecs/getEcsDeploymentSets:getEcsDeploymentSets
arguments:
# arguments dictionary
The following arguments are supported:
- Deployment
Set stringName - The name of the deployment set.
- Ids List<string>
- A list of Deployment Set IDs.
- Name
Regex string - A regex string to filter results by Deployment Set name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Strategy string
- The deployment strategy. Valid values:
Availability
.
- Deployment
Set stringName - The name of the deployment set.
- Ids []string
- A list of Deployment Set IDs.
- Name
Regex string - A regex string to filter results by Deployment Set name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Strategy string
- The deployment strategy. Valid values:
Availability
.
- deployment
Set StringName - The name of the deployment set.
- ids List<String>
- A list of Deployment Set IDs.
- name
Regex String - A regex string to filter results by Deployment Set name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - strategy String
- The deployment strategy. Valid values:
Availability
.
- deployment
Set stringName - The name of the deployment set.
- ids string[]
- A list of Deployment Set IDs.
- name
Regex string - A regex string to filter results by Deployment Set name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - strategy string
- The deployment strategy. Valid values:
Availability
.
- deployment_
set_ strname - The name of the deployment set.
- ids Sequence[str]
- A list of Deployment Set IDs.
- name_
regex str - A regex string to filter results by Deployment Set name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - strategy str
- The deployment strategy. Valid values:
Availability
.
- deployment
Set StringName - The name of the deployment set.
- ids List<String>
- A list of Deployment Set IDs.
- name
Regex String - A regex string to filter results by Deployment Set name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - strategy String
- The deployment strategy. Valid values:
Availability
.
getEcsDeploymentSets Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Sets
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Ecs Deployment Sets Set> - Deployment
Set stringName - Name
Regex string - Output
File string - Strategy string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Sets
[]Get
Ecs Deployment Sets Set - Deployment
Set stringName - Name
Regex string - Output
File string - Strategy string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- sets
List<Get
Ecs Deployment Sets Set> - deployment
Set StringName - name
Regex String - output
File String - strategy String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- sets
Get
Ecs Deployment Sets Set[] - deployment
Set stringName - name
Regex string - output
File string - strategy string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- sets
Sequence[Get
Ecs Deployment Sets Set] - deployment_
set_ strname - name_
regex str - output_
file str - strategy str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- sets List<Property Map>
- deployment
Set StringName - name
Regex String - output
File String - strategy String
Supporting Types
GetEcsDeploymentSetsSet
- Create
Time string - The time when the deployment set was created.
- Deployment
Set stringId - The ID of the Deployment Set.
- Deployment
Set stringName - The name of the deployment set.
- Description string
- The description of the deployment set.
- Domain string
- The deployment domain.
- Granularity string
- The deployment granularity.
- Id string
- The ID of the Deployment Set.
- Instance
Amount int - The number of instances in the deployment set.
- Instance
Ids List<string> - The IDs of the instances in the deployment set.
- Strategy string
- The deployment strategy.
- Create
Time string - The time when the deployment set was created.
- Deployment
Set stringId - The ID of the Deployment Set.
- Deployment
Set stringName - The name of the deployment set.
- Description string
- The description of the deployment set.
- Domain string
- The deployment domain.
- Granularity string
- The deployment granularity.
- Id string
- The ID of the Deployment Set.
- Instance
Amount int - The number of instances in the deployment set.
- Instance
Ids []string - The IDs of the instances in the deployment set.
- Strategy string
- The deployment strategy.
- create
Time String - The time when the deployment set was created.
- deployment
Set StringId - The ID of the Deployment Set.
- deployment
Set StringName - The name of the deployment set.
- description String
- The description of the deployment set.
- domain String
- The deployment domain.
- granularity String
- The deployment granularity.
- id String
- The ID of the Deployment Set.
- instance
Amount Integer - The number of instances in the deployment set.
- instance
Ids List<String> - The IDs of the instances in the deployment set.
- strategy String
- The deployment strategy.
- create
Time string - The time when the deployment set was created.
- deployment
Set stringId - The ID of the Deployment Set.
- deployment
Set stringName - The name of the deployment set.
- description string
- The description of the deployment set.
- domain string
- The deployment domain.
- granularity string
- The deployment granularity.
- id string
- The ID of the Deployment Set.
- instance
Amount number - The number of instances in the deployment set.
- instance
Ids string[] - The IDs of the instances in the deployment set.
- strategy string
- The deployment strategy.
- create_
time str - The time when the deployment set was created.
- deployment_
set_ strid - The ID of the Deployment Set.
- deployment_
set_ strname - The name of the deployment set.
- description str
- The description of the deployment set.
- domain str
- The deployment domain.
- granularity str
- The deployment granularity.
- id str
- The ID of the Deployment Set.
- instance_
amount int - The number of instances in the deployment set.
- instance_
ids Sequence[str] - The IDs of the instances in the deployment set.
- strategy str
- The deployment strategy.
- create
Time String - The time when the deployment set was created.
- deployment
Set StringId - The ID of the Deployment Set.
- deployment
Set StringName - The name of the deployment set.
- description String
- The description of the deployment set.
- domain String
- The deployment domain.
- granularity String
- The deployment granularity.
- id String
- The ID of the Deployment Set.
- instance
Amount Number - The number of instances in the deployment set.
- instance
Ids List<String> - The IDs of the instances in the deployment set.
- strategy String
- The deployment strategy.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.