1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. getEcsImagePipeline
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ecs.getEcsImagePipeline

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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.applyValue(getEcsImagePipelineResult -> getEcsImagePipelineResult.pipelines()[0].id()));
            final var nameRegex = EcsFunctions.getEcsImagePipeline(GetEcsImagePipelineArgs.builder()
                .nameRegex("^my-ImagePipeline")
                .build());
    
            ctx.export("ecsImagePipelineId2", nameRegex.applyValue(getEcsImagePipelineResult -> getEcsImagePipelineResult.pipelines()[0].id()));
        }
    }
    
    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}
    

    Using getEcsImagePipeline

    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 getEcsImagePipeline(args: GetEcsImagePipelineArgs, opts?: InvokeOptions): Promise<GetEcsImagePipelineResult>
    function getEcsImagePipelineOutput(args: GetEcsImagePipelineOutputArgs, opts?: InvokeOptions): Output<GetEcsImagePipelineResult>
    def get_ecs_image_pipeline(ids: Optional[Sequence[str]] = None,
                               name: Optional[str] = None,
                               name_regex: Optional[str] = None,
                               output_file: Optional[str] = None,
                               resource_group_id: Optional[str] = None,
                               tags: Optional[Mapping[str, str]] = None,
                               opts: Optional[InvokeOptions] = None) -> GetEcsImagePipelineResult
    def get_ecs_image_pipeline_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               name_regex: Optional[pulumi.Input[str]] = None,
                               output_file: Optional[pulumi.Input[str]] = None,
                               resource_group_id: Optional[pulumi.Input[str]] = None,
                               tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetEcsImagePipelineResult]
    func LookupEcsImagePipeline(ctx *Context, args *LookupEcsImagePipelineArgs, opts ...InvokeOption) (*LookupEcsImagePipelineResult, error)
    func LookupEcsImagePipelineOutput(ctx *Context, args *LookupEcsImagePipelineOutputArgs, opts ...InvokeOption) LookupEcsImagePipelineResultOutput

    > Note: This function is named LookupEcsImagePipeline in the Go SDK.

    public static class GetEcsImagePipeline 
    {
        public static Task<GetEcsImagePipelineResult> InvokeAsync(GetEcsImagePipelineArgs args, InvokeOptions? opts = null)
        public static Output<GetEcsImagePipelineResult> Invoke(GetEcsImagePipelineInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEcsImagePipelineResult> getEcsImagePipeline(GetEcsImagePipelineArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ecs/getEcsImagePipeline:getEcsImagePipeline
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Image Pipeline ids.
    Name string
    The name of the image template.
    NameRegex string
    A regex string to filter results by Image Pipeline name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The ID of the resource group to which the image template belongs.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Ids []string
    A list of Image Pipeline ids.
    Name string
    The name of the image template.
    NameRegex string
    A regex string to filter results by Image Pipeline name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The ID of the resource group to which the image template belongs.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ids List<String>
    A list of Image Pipeline ids.
    name String
    The name of the image template.
    nameRegex String
    A regex string to filter results by Image Pipeline name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The ID of the resource group to which the image template belongs.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    ids string[]
    A list of Image Pipeline ids.
    name string
    The name of the image template.
    nameRegex string
    A regex string to filter results by Image Pipeline name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    resourceGroupId string
    The ID of the resource group to which the image template belongs.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    ids Sequence[str]
    A list of Image Pipeline ids.
    name str
    The name of the image template.
    name_regex str
    A regex string to filter results by Image Pipeline name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    resource_group_id str
    The ID of the resource group to which the image template belongs.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    ids List<String>
    A list of Image Pipeline ids.
    name String
    The name of the image template.
    nameRegex String
    A regex string to filter results by Image Pipeline name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The ID of the resource group to which the image template belongs.
    tags Map<String>
    A mapping of tags to assign to the resource.

    getEcsImagePipeline Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Pipelines List<Pulumi.AliCloud.Ecs.Outputs.GetEcsImagePipelinePipeline>
    Name string
    NameRegex string
    OutputFile string
    ResourceGroupId string
    Tags Dictionary<string, string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Pipelines []GetEcsImagePipelinePipeline
    Name string
    NameRegex string
    OutputFile string
    ResourceGroupId string
    Tags map[string]string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    pipelines List<GetEcsImagePipelinePipeline>
    name String
    nameRegex String
    outputFile String
    resourceGroupId String
    tags Map<String,String>
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    pipelines GetEcsImagePipelinePipeline[]
    name string
    nameRegex string
    outputFile string
    resourceGroupId string
    tags {[key: string]: string}
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    pipelines Sequence[GetEcsImagePipelinePipeline]
    name str
    name_regex str
    output_file str
    resource_group_id str
    tags Mapping[str, str]
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    pipelines List<Property Map>
    name String
    nameRegex String
    outputFile String
    resourceGroupId String
    tags Map<String>

    Supporting Types

    GetEcsImagePipelinePipeline

    AddAccounts List<string>
    The IDs of Alibaba Cloud accounts to which the image was shared.
    BaseImage string
    The source image.
    BaseImageType string
    The type of the source image.
    BuildContent string
    The content of the image template.
    CreationTime string
    The time when the image template was created.
    DeleteInstanceOnFailure bool
    Indicates whether the intermediate instance was released when the image failed to be created.
    Description string
    The description of the image template.
    Id string
    The ID of the Image Pipeline.
    ImageName string
    The name prefix of the created image.
    ImagePipelineId string
    The ID of the image template.
    InstanceType string
    The instance type of the intermediate instance.
    InternetMaxBandwidthOut int
    The size of the outbound public bandwidth for the intermediate instance. Unit: Mbit/s.
    Name string
    The name of the image template.
    ResourceGroupId string
    The ID of the resource group to which the image template belongs.
    SystemDiskSize int
    The system disk size of the intermediate instance. Unit: GiB.
    ToRegionIds List<string>
    The IDs of regions to which to distribute the created image.
    VswitchId string
    The vswitch id.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    AddAccounts []string
    The IDs of Alibaba Cloud accounts to which the image was shared.
    BaseImage string
    The source image.
    BaseImageType string
    The type of the source image.
    BuildContent string
    The content of the image template.
    CreationTime string
    The time when the image template was created.
    DeleteInstanceOnFailure bool
    Indicates whether the intermediate instance was released when the image failed to be created.
    Description string
    The description of the image template.
    Id string
    The ID of the Image Pipeline.
    ImageName string
    The name prefix of the created image.
    ImagePipelineId string
    The ID of the image template.
    InstanceType string
    The instance type of the intermediate instance.
    InternetMaxBandwidthOut int
    The size of the outbound public bandwidth for the intermediate instance. Unit: Mbit/s.
    Name string
    The name of the image template.
    ResourceGroupId string
    The ID of the resource group to which the image template belongs.
    SystemDiskSize int
    The system disk size of the intermediate instance. Unit: GiB.
    ToRegionIds []string
    The IDs of regions to which to distribute the created image.
    VswitchId string
    The vswitch id.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    addAccounts List<String>
    The IDs of Alibaba Cloud accounts to which the image was shared.
    baseImage String
    The source image.
    baseImageType String
    The type of the source image.
    buildContent String
    The content of the image template.
    creationTime String
    The time when the image template was created.
    deleteInstanceOnFailure Boolean
    Indicates whether the intermediate instance was released when the image failed to be created.
    description String
    The description of the image template.
    id String
    The ID of the Image Pipeline.
    imageName String
    The name prefix of the created image.
    imagePipelineId String
    The ID of the image template.
    instanceType String
    The instance type of the intermediate instance.
    internetMaxBandwidthOut Integer
    The size of the outbound public bandwidth for the intermediate instance. Unit: Mbit/s.
    name String
    The name of the image template.
    resourceGroupId String
    The ID of the resource group to which the image template belongs.
    systemDiskSize Integer
    The system disk size of the intermediate instance. Unit: GiB.
    toRegionIds List<String>
    The IDs of regions to which to distribute the created image.
    vswitchId String
    The vswitch id.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    addAccounts string[]
    The IDs of Alibaba Cloud accounts to which the image was shared.
    baseImage string
    The source image.
    baseImageType string
    The type of the source image.
    buildContent string
    The content of the image template.
    creationTime string
    The time when the image template was created.
    deleteInstanceOnFailure boolean
    Indicates whether the intermediate instance was released when the image failed to be created.
    description string
    The description of the image template.
    id string
    The ID of the Image Pipeline.
    imageName string
    The name prefix of the created image.
    imagePipelineId string
    The ID of the image template.
    instanceType string
    The instance type of the intermediate instance.
    internetMaxBandwidthOut number
    The size of the outbound public bandwidth for the intermediate instance. Unit: Mbit/s.
    name string
    The name of the image template.
    resourceGroupId string
    The ID of the resource group to which the image template belongs.
    systemDiskSize number
    The system disk size of the intermediate instance. Unit: GiB.
    toRegionIds string[]
    The IDs of regions to which to distribute the created image.
    vswitchId string
    The vswitch id.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    add_accounts Sequence[str]
    The IDs of Alibaba Cloud accounts to which the image was shared.
    base_image str
    The source image.
    base_image_type str
    The type of the source image.
    build_content str
    The content of the image template.
    creation_time str
    The time when the image template was created.
    delete_instance_on_failure bool
    Indicates whether the intermediate instance was released when the image failed to be created.
    description str
    The description of the image template.
    id str
    The ID of the Image Pipeline.
    image_name str
    The name prefix of the created image.
    image_pipeline_id str
    The ID of the image template.
    instance_type str
    The instance type of the intermediate instance.
    internet_max_bandwidth_out int
    The size of the outbound public bandwidth for the intermediate instance. Unit: Mbit/s.
    name str
    The name of the image template.
    resource_group_id str
    The ID of the resource group to which the image template belongs.
    system_disk_size int
    The system disk size of the intermediate instance. Unit: GiB.
    to_region_ids Sequence[str]
    The IDs of regions to which to distribute the created image.
    vswitch_id str
    The vswitch id.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    addAccounts List<String>
    The IDs of Alibaba Cloud accounts to which the image was shared.
    baseImage String
    The source image.
    baseImageType String
    The type of the source image.
    buildContent String
    The content of the image template.
    creationTime String
    The time when the image template was created.
    deleteInstanceOnFailure Boolean
    Indicates whether the intermediate instance was released when the image failed to be created.
    description String
    The description of the image template.
    id String
    The ID of the Image Pipeline.
    imageName String
    The name prefix of the created image.
    imagePipelineId String
    The ID of the image template.
    instanceType String
    The instance type of the intermediate instance.
    internetMaxBandwidthOut Number
    The size of the outbound public bandwidth for the intermediate instance. Unit: Mbit/s.
    name String
    The name of the image template.
    resourceGroupId String
    The ID of the resource group to which the image template belongs.
    systemDiskSize Number
    The system disk size of the intermediate instance. Unit: GiB.
    toRegionIds List<String>
    The IDs of regions to which to distribute the created image.
    vswitchId String
    The vswitch id.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi