get Ecs Image Pipeline
This data source provides the Ecs Image Pipelines of the current Alibaba Cloud user.
NOTE: Available in v1.163.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ecs.getEcsImagePipeline({
ids: ["example_value"],
});
export const ecsImagePipelineId1 = ids.then(ids => ids.pipelines?.[0]?.id);
const nameRegex = alicloud.ecs.getEcsImagePipeline({
nameRegex: "^my-ImagePipeline",
});
export const ecsImagePipelineId2 = nameRegex.then(nameRegex => nameRegex.pipelines?.[0]?.id);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ecs.get_ecs_image_pipeline(ids=["example_value"])
pulumi.export("ecsImagePipelineId1", ids.pipelines[0].id)
name_regex = alicloud.ecs.get_ecs_image_pipeline(name_regex="^my-ImagePipeline")
pulumi.export("ecsImagePipelineId2", name_regex.pipelines[0].id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Ecs.GetEcsImagePipeline.Invoke(new()
{
Ids = new[]
{
"example_value",
},
});
var nameRegex = AliCloud.Ecs.GetEcsImagePipeline.Invoke(new()
{
NameRegex = "^my-ImagePipeline",
});
return new Dictionary<string, object?>
{
["ecsImagePipelineId1"] = ids.Apply(getEcsImagePipelineResult => getEcsImagePipelineResult.Pipelines[0]?.Id),
["ecsImagePipelineId2"] = nameRegex.Apply(getEcsImagePipelineResult => getEcsImagePipelineResult.Pipelines[0]?.Id),
};
});
Content copied to clipboard
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.LookupEcsImagePipeline(ctx, &ecs.LookupEcsImagePipelineArgs{
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ecsImagePipelineId1", ids.Pipelines[0].Id)
nameRegex, err := ecs.LookupEcsImagePipeline(ctx, &ecs.LookupEcsImagePipelineArgs{
NameRegex: pulumi.StringRef("^my-ImagePipeline"),
}, nil)
if err != nil {
return err
}
ctx.Export("ecsImagePipelineId2", nameRegex.Pipelines[0].Id)
return nil
})
}
Content copied to clipboard
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.GetEcsImagePipelineArgs;
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.getEcsImagePipeline(GetEcsImagePipelineArgs.builder()
.ids("example_value")
.build());
ctx.export("ecsImagePipelineId1", ids.pipelines()[0].id());
final var nameRegex = EcsFunctions.getEcsImagePipeline(GetEcsImagePipelineArgs.builder()
.nameRegex("^my-ImagePipeline")
.build());
ctx.export("ecsImagePipelineId2", nameRegex.pipelines()[0].id());
}
}
Content copied to clipboard
variables:
ids:
fn::invoke:
function: alicloud:ecs:getEcsImagePipeline
arguments:
ids:
- example_value
nameRegex:
fn::invoke:
function: alicloud:ecs:getEcsImagePipeline
arguments:
nameRegex: ^my-ImagePipeline
outputs:
ecsImagePipelineId1: ${ids.pipelines[0].id}
ecsImagePipelineId2: ${nameRegex.pipelines[0].id}
Content copied to clipboard
Return
A collection of values returned by getEcsImagePipeline.
Parameters
argument
A collection of arguments for invoking getEcsImagePipeline.
suspend fun getEcsImagePipeline(ids: List<String>? = null, name: String? = null, nameRegex: String? = null, outputFile: String? = null, resourceGroupId: String? = null, tags: Map<String, String>? = null): GetEcsImagePipelineResult
Return
A collection of values returned by getEcsImagePipeline.
Parameters
ids
A list of Image Pipeline ids.
name
The name of the image template.
name Regex
A regex string to filter results by Image Pipeline name.
output File
File name where to save data source results (after running pulumi preview
).
resource Group Id
The ID of the resource group to which the image template belongs.
tags
A mapping of tags to assign to the resource.
See also
suspend fun getEcsImagePipeline(argument: suspend GetEcsImagePipelinePlainArgsBuilder.() -> Unit): GetEcsImagePipelineResult
Return
A collection of values returned by getEcsImagePipeline.
Parameters
argument
Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetEcsImagePipelinePlainArgs.