Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine
volcengine.ecs.DeploymentSets
Explore with Pulumi AI
Use this data source to query detailed information of ecs deployment sets
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooDeploymentSet: volcengine.ecs.DeploymentSet[] = [];
for (const range = {value: 0}; range.value < 3; range.value++) {
    fooDeploymentSet.push(new volcengine.ecs.DeploymentSet(`fooDeploymentSet-${range.value}`, {
        deploymentSetName: `acc-test-ecs-ds-${range.value}`,
        description: "acc-test",
        granularity: "switch",
        strategy: "Availability",
    }));
}
const fooDeploymentSets = volcengine.ecs.DeploymentSetsOutput({
    granularity: "switch",
    ids: fooDeploymentSet.map(__item => __item.id),
});
import pulumi
import pulumi_volcengine as volcengine
foo_deployment_set = []
for range in [{"value": i} for i in range(0, 3)]:
    foo_deployment_set.append(volcengine.ecs.DeploymentSet(f"fooDeploymentSet-{range['value']}",
        deployment_set_name=f"acc-test-ecs-ds-{range['value']}",
        description="acc-test",
        granularity="switch",
        strategy="Availability"))
foo_deployment_sets = volcengine.ecs.deployment_sets_output(granularity="switch",
    ids=[__item.id for __item in foo_deployment_set])
package main
import (
	"fmt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
var fooDeploymentSet []*ecs.DeploymentSet
for index := 0; index < 3; index++ {
    key0 := index
    val0 := index
__res, err := ecs.NewDeploymentSet(ctx, fmt.Sprintf("fooDeploymentSet-%v", key0), &ecs.DeploymentSetArgs{
DeploymentSetName: pulumi.String(fmt.Sprintf("acc-test-ecs-ds-%v", val0)),
Description: pulumi.String("acc-test"),
Granularity: pulumi.String("switch"),
Strategy: pulumi.String("Availability"),
})
if err != nil {
return err
}
fooDeploymentSet = append(fooDeploymentSet, __res)
}
_ = ecs.DeploymentSetsOutput(ctx, ecs.DeploymentSetsOutputArgs{
Granularity: pulumi.String("switch"),
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:ecs-deploymentSets:DeploymentSets.pp:12,17-39),
}, nil);
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var fooDeploymentSet = new List<Volcengine.Ecs.DeploymentSet>();
    for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
    {
        var range = new { Value = rangeIndex };
        fooDeploymentSet.Add(new Volcengine.Ecs.DeploymentSet($"fooDeploymentSet-{range.Value}", new()
        {
            DeploymentSetName = $"acc-test-ecs-ds-{range.Value}",
            Description = "acc-test",
            Granularity = "switch",
            Strategy = "Availability",
        }));
    }
    var fooDeploymentSets = Volcengine.Ecs.DeploymentSets.Invoke(new()
    {
        Granularity = "switch",
        Ids = fooDeploymentSet.Select(__item => __item.Id).ToList(),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.DeploymentSet;
import com.pulumi.volcengine.ecs.DeploymentSetArgs;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.DeploymentSetsArgs;
import com.pulumi.codegen.internal.KeyedValue;
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) {
        for (var i = 0; i < 3; i++) {
            new DeploymentSet("fooDeploymentSet-" + i, DeploymentSetArgs.builder()            
                .deploymentSetName(String.format("acc-test-ecs-ds-%s", range.value()))
                .description("acc-test")
                .granularity("switch")
                .strategy("Availability")
                .build());
        
}
        final var fooDeploymentSets = EcsFunctions.DeploymentSets(DeploymentSetsArgs.builder()
            .granularity("switch")
            .ids(fooDeploymentSet.stream().map(element -> element.id()).collect(toList()))
            .build());
    }
}
Coming soon!
Using DeploymentSets
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 deploymentSets(args: DeploymentSetsArgs, opts?: InvokeOptions): Promise<DeploymentSetsResult>
function deploymentSetsOutput(args: DeploymentSetsOutputArgs, opts?: InvokeOptions): Output<DeploymentSetsResult>def deployment_sets(granularity: Optional[str] = None,
                    ids: Optional[Sequence[str]] = None,
                    name_regex: Optional[str] = None,
                    output_file: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> DeploymentSetsResult
def deployment_sets_output(granularity: 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,
                    opts: Optional[InvokeOptions] = None) -> Output[DeploymentSetsResult]func DeploymentSets(ctx *Context, args *DeploymentSetsArgs, opts ...InvokeOption) (*DeploymentSetsResult, error)
func DeploymentSetsOutput(ctx *Context, args *DeploymentSetsOutputArgs, opts ...InvokeOption) DeploymentSetsResultOutputpublic static class DeploymentSets 
{
    public static Task<DeploymentSetsResult> InvokeAsync(DeploymentSetsArgs args, InvokeOptions? opts = null)
    public static Output<DeploymentSetsResult> Invoke(DeploymentSetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<DeploymentSetsResult> deploymentSets(DeploymentSetsArgs args, InvokeOptions options)
public static Output<DeploymentSetsResult> deploymentSets(DeploymentSetsArgs args, InvokeOptions options)
fn::invoke:
  function: volcengine:ecs:DeploymentSets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Granularity string
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - Ids List<string>
 - A list of ECS DeploymentSet IDs.
 - Name
Regex string - A Name Regex of ECS DeploymentSet.
 - Output
File string - File name where to save data source results.
 
- Granularity string
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - Ids []string
 - A list of ECS DeploymentSet IDs.
 - Name
Regex string - A Name Regex of ECS DeploymentSet.
 - Output
File string - File name where to save data source results.
 
- granularity String
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - ids List<String>
 - A list of ECS DeploymentSet IDs.
 - name
Regex String - A Name Regex of ECS DeploymentSet.
 - output
File String - File name where to save data source results.
 
- granularity string
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - ids string[]
 - A list of ECS DeploymentSet IDs.
 - name
Regex string - A Name Regex of ECS DeploymentSet.
 - output
File string - File name where to save data source results.
 
- granularity str
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - ids Sequence[str]
 - A list of ECS DeploymentSet IDs.
 - name_
regex str - A Name Regex of ECS DeploymentSet.
 - output_
file str - File name where to save data source results.
 
- granularity String
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - ids List<String>
 - A list of ECS DeploymentSet IDs.
 - name
Regex String - A Name Regex of ECS DeploymentSet.
 - output
File String - File name where to save data source results.
 
DeploymentSets Result
The following output properties are available:
- Deployment
Sets List<DeploymentSets Deployment Set>  - The collection of ECS DeploymentSet query.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Total
Count int - The total count of ECS DeploymentSet query.
 - Granularity string
 - The granularity of ECS DeploymentSet.
 - Ids List<string>
 - Name
Regex string - Output
File string 
- Deployment
Sets []DeploymentSets Deployment Set  - The collection of ECS DeploymentSet query.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Total
Count int - The total count of ECS DeploymentSet query.
 - Granularity string
 - The granularity of ECS DeploymentSet.
 - Ids []string
 - Name
Regex string - Output
File string 
- deployment
Sets List<DeploymentSets Deployment Set>  - The collection of ECS DeploymentSet query.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - total
Count Integer - The total count of ECS DeploymentSet query.
 - granularity String
 - The granularity of ECS DeploymentSet.
 - ids List<String>
 - name
Regex String - output
File String 
- deployment
Sets DeploymentSets Deployment Set[]  - The collection of ECS DeploymentSet query.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - total
Count number - The total count of ECS DeploymentSet query.
 - granularity string
 - The granularity of ECS DeploymentSet.
 - ids string[]
 - name
Regex string - output
File string 
- deployment_
sets Sequence[DeploymentSets Deployment Set]  - The collection of ECS DeploymentSet query.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - total_
count int - The total count of ECS DeploymentSet query.
 - granularity str
 - The granularity of ECS DeploymentSet.
 - ids Sequence[str]
 - name_
regex str - output_
file str 
- deployment
Sets List<Property Map> - The collection of ECS DeploymentSet query.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - total
Count Number - The total count of ECS DeploymentSet query.
 - granularity String
 - The granularity of ECS DeploymentSet.
 - ids List<String>
 - name
Regex String - output
File String 
Supporting Types
DeploymentSetsDeploymentSet   
- Deployment
Set stringId  - The ID of ECS DeploymentSet.
 - Deployment
Set stringName  - The name of ECS DeploymentSet.
 - Description string
 - The description of ECS DeploymentSet.
 - Granularity string
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - Strategy string
 - The strategy of ECS DeploymentSet.
 
- Deployment
Set stringId  - The ID of ECS DeploymentSet.
 - Deployment
Set stringName  - The name of ECS DeploymentSet.
 - Description string
 - The description of ECS DeploymentSet.
 - Granularity string
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - Strategy string
 - The strategy of ECS DeploymentSet.
 
- deployment
Set StringId  - The ID of ECS DeploymentSet.
 - deployment
Set StringName  - The name of ECS DeploymentSet.
 - description String
 - The description of ECS DeploymentSet.
 - granularity String
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - strategy String
 - The strategy of ECS DeploymentSet.
 
- deployment
Set stringId  - The ID of ECS DeploymentSet.
 - deployment
Set stringName  - The name of ECS DeploymentSet.
 - description string
 - The description of ECS DeploymentSet.
 - granularity string
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - strategy string
 - The strategy of ECS DeploymentSet.
 
- deployment_
set_ strid  - The ID of ECS DeploymentSet.
 - deployment_
set_ strname  - The name of ECS DeploymentSet.
 - description str
 - The description of ECS DeploymentSet.
 - granularity str
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - strategy str
 - The strategy of ECS DeploymentSet.
 
- deployment
Set StringId  - The ID of ECS DeploymentSet.
 - deployment
Set StringName  - The name of ECS DeploymentSet.
 - description String
 - The description of ECS DeploymentSet.
 - granularity String
 - The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
 - strategy String
 - The strategy of ECS DeploymentSet.
 
Package Details
- Repository
 - volcengine volcengine/pulumi-volcengine
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
volcengineTerraform Provider.