1. Packages
  2. Volcengine
  3. API Docs
  4. ecs
  5. DeploymentSets
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.ecs.DeploymentSets

Explore with Pulumi AI

Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

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),
});
Copy
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])
Copy
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
})
}
Copy
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(),
    });

});
Copy
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());

    }
}
Copy
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>
Copy
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]
Copy
func DeploymentSets(ctx *Context, args *DeploymentSetsArgs, opts ...InvokeOption) (*DeploymentSetsResult, error)
func DeploymentSetsOutput(ctx *Context, args *DeploymentSetsOutputArgs, opts ...InvokeOption) DeploymentSetsResultOutput
Copy
public static class DeploymentSets 
{
    public static Task<DeploymentSetsResult> InvokeAsync(DeploymentSetsArgs args, InvokeOptions? opts = null)
    public static Output<DeploymentSetsResult> Invoke(DeploymentSetsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<DeploymentSetsResult> deploymentSets(DeploymentSetsArgs args, InvokeOptions options)
public static Output<DeploymentSetsResult> deploymentSets(DeploymentSetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: volcengine:ecs:DeploymentSets
  arguments:
    # arguments dictionary
Copy

The 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.
NameRegex string
A Name Regex of ECS DeploymentSet.
OutputFile 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.
NameRegex string
A Name Regex of ECS DeploymentSet.
OutputFile 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.
nameRegex String
A Name Regex of ECS DeploymentSet.
outputFile 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.
nameRegex string
A Name Regex of ECS DeploymentSet.
outputFile 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.
nameRegex String
A Name Regex of ECS DeploymentSet.
outputFile String
File name where to save data source results.

DeploymentSets Result

The following output properties are available:

DeploymentSets List<DeploymentSetsDeploymentSet>
The collection of ECS DeploymentSet query.
Id string
The provider-assigned unique ID for this managed resource.
TotalCount int
The total count of ECS DeploymentSet query.
Granularity string
The granularity of ECS DeploymentSet.
Ids List<string>
NameRegex string
OutputFile string
DeploymentSets []DeploymentSetsDeploymentSet
The collection of ECS DeploymentSet query.
Id string
The provider-assigned unique ID for this managed resource.
TotalCount int
The total count of ECS DeploymentSet query.
Granularity string
The granularity of ECS DeploymentSet.
Ids []string
NameRegex string
OutputFile string
deploymentSets List<DeploymentSetsDeploymentSet>
The collection of ECS DeploymentSet query.
id String
The provider-assigned unique ID for this managed resource.
totalCount Integer
The total count of ECS DeploymentSet query.
granularity String
The granularity of ECS DeploymentSet.
ids List<String>
nameRegex String
outputFile String
deploymentSets DeploymentSetsDeploymentSet[]
The collection of ECS DeploymentSet query.
id string
The provider-assigned unique ID for this managed resource.
totalCount number
The total count of ECS DeploymentSet query.
granularity string
The granularity of ECS DeploymentSet.
ids string[]
nameRegex string
outputFile string
deployment_sets Sequence[DeploymentSetsDeploymentSet]
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
deploymentSets List<Property Map>
The collection of ECS DeploymentSet query.
id String
The provider-assigned unique ID for this managed resource.
totalCount Number
The total count of ECS DeploymentSet query.
granularity String
The granularity of ECS DeploymentSet.
ids List<String>
nameRegex String
outputFile String

Supporting Types

DeploymentSetsDeploymentSet

DeploymentSetId This property is required. string
The ID of ECS DeploymentSet.
DeploymentSetName This property is required. string
The name of ECS DeploymentSet.
Description This property is required. string
The description of ECS DeploymentSet.
Granularity This property is required. string
The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
Strategy This property is required. string
The strategy of ECS DeploymentSet.
DeploymentSetId This property is required. string
The ID of ECS DeploymentSet.
DeploymentSetName This property is required. string
The name of ECS DeploymentSet.
Description This property is required. string
The description of ECS DeploymentSet.
Granularity This property is required. string
The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
Strategy This property is required. string
The strategy of ECS DeploymentSet.
deploymentSetId This property is required. String
The ID of ECS DeploymentSet.
deploymentSetName This property is required. String
The name of ECS DeploymentSet.
description This property is required. String
The description of ECS DeploymentSet.
granularity This property is required. String
The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
strategy This property is required. String
The strategy of ECS DeploymentSet.
deploymentSetId This property is required. string
The ID of ECS DeploymentSet.
deploymentSetName This property is required. string
The name of ECS DeploymentSet.
description This property is required. string
The description of ECS DeploymentSet.
granularity This property is required. string
The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
strategy This property is required. string
The strategy of ECS DeploymentSet.
deployment_set_id This property is required. str
The ID of ECS DeploymentSet.
deployment_set_name This property is required. str
The name of ECS DeploymentSet.
description This property is required. str
The description of ECS DeploymentSet.
granularity This property is required. str
The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
strategy This property is required. str
The strategy of ECS DeploymentSet.
deploymentSetId This property is required. String
The ID of ECS DeploymentSet.
deploymentSetName This property is required. String
The name of ECS DeploymentSet.
description This property is required. String
The description of ECS DeploymentSet.
granularity This property is required. String
The granularity of ECS DeploymentSet.Valid values: switch, host, rack.
strategy This property is required. 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 volcengine Terraform Provider.
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine