Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.21.0 published on Tuesday, Jun 14, 2022 by Pulumi

getEcsImageComponents

This data source provides the Ecs Image Components of the current Alibaba Cloud user.

NOTE: Available in v1.159.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Ecs.GetEcsImageComponents.InvokeAsync(new AliCloud.Ecs.GetEcsImageComponentsArgs
        {
            Ids = 
            {
                "example_id",
            },
        }));
        this.EcsImageComponentId1 = ids.Apply(ids => ids.Components?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.Ecs.GetEcsImageComponents.InvokeAsync(new AliCloud.Ecs.GetEcsImageComponentsArgs
        {
            NameRegex = "^my-ImageComponent",
        }));
        this.EcsImageComponentId2 = nameRegex.Apply(nameRegex => nameRegex.Components?[0]?.Id);
    }

    [Output("ecsImageComponentId1")]
    public Output<string> EcsImageComponentId1 { get; set; }
    [Output("ecsImageComponentId2")]
    public Output<string> EcsImageComponentId2 { get; set; }
}
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.GetEcsImageComponents(ctx, &ecs.GetEcsImageComponentsArgs{
			Ids: []string{
				"example_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ecsImageComponentId1", ids.Components[0].Id)
		nameRegex, err := ecs.GetEcsImageComponents(ctx, &ecs.GetEcsImageComponentsArgs{
			NameRegex: pulumi.StringRef("^my-ImageComponent"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ecsImageComponentId2", nameRegex.Components[0].Id)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.ecs.get_ecs_image_components(ids=["example_id"])
pulumi.export("ecsImageComponentId1", ids.components[0].id)
name_regex = alicloud.ecs.get_ecs_image_components(name_regex="^my-ImageComponent")
pulumi.export("ecsImageComponentId2", name_regex.components[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.ecs.getEcsImageComponents({
    ids: ["example_id"],
});
export const ecsImageComponentId1 = ids.then(ids => ids.components?[0]?.id);
const nameRegex = alicloud.ecs.getEcsImageComponents({
    nameRegex: "^my-ImageComponent",
});
export const ecsImageComponentId2 = nameRegex.then(nameRegex => nameRegex.components?[0]?.id);

Coming soon!

Using getEcsImageComponents

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 getEcsImageComponents(args: GetEcsImageComponentsArgs, opts?: InvokeOptions): Promise<GetEcsImageComponentsResult>
function getEcsImageComponentsOutput(args: GetEcsImageComponentsOutputArgs, opts?: InvokeOptions): Output<GetEcsImageComponentsResult>
def get_ecs_image_components(ids: Optional[Sequence[str]] = None,
                             image_component_name: Optional[str] = None,
                             name_regex: Optional[str] = None,
                             output_file: Optional[str] = None,
                             owner: Optional[str] = None,
                             resource_group_id: Optional[str] = None,
                             tags: Optional[Mapping[str, Any]] = None,
                             opts: Optional[InvokeOptions] = None) -> GetEcsImageComponentsResult
def get_ecs_image_components_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             image_component_name: Optional[pulumi.Input[str]] = None,
                             name_regex: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             owner: Optional[pulumi.Input[str]] = None,
                             resource_group_id: Optional[pulumi.Input[str]] = None,
                             tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetEcsImageComponentsResult]
func GetEcsImageComponents(ctx *Context, args *GetEcsImageComponentsArgs, opts ...InvokeOption) (*GetEcsImageComponentsResult, error)
func GetEcsImageComponentsOutput(ctx *Context, args *GetEcsImageComponentsOutputArgs, opts ...InvokeOption) GetEcsImageComponentsResultOutput

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

public static class GetEcsImageComponents 
{
    public static Task<GetEcsImageComponentsResult> InvokeAsync(GetEcsImageComponentsArgs args, InvokeOptions? opts = null)
    public static Output<GetEcsImageComponentsResult> Invoke(GetEcsImageComponentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsImageComponentsResult> getEcsImageComponents(GetEcsImageComponentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:ecs/getEcsImageComponents:getEcsImageComponents
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Ids List<string>

A list of Image Component IDs.

ImageComponentName string

The name of the image component.

NameRegex string

A regex string to filter results by Image Component name.

OutputFile string
Owner string

The type of the image component.

ResourceGroupId string

The ID of the resource group.

Tags Dictionary<string, object>

List of label key-value pairs.

Ids []string

A list of Image Component IDs.

ImageComponentName string

The name of the image component.

NameRegex string

A regex string to filter results by Image Component name.

OutputFile string
Owner string

The type of the image component.

ResourceGroupId string

The ID of the resource group.

Tags map[string]interface{}

List of label key-value pairs.

ids List<String>

A list of Image Component IDs.

imageComponentName String

The name of the image component.

nameRegex String

A regex string to filter results by Image Component name.

outputFile String
owner String

The type of the image component.

resourceGroupId String

The ID of the resource group.

tags Map<String,Object>

List of label key-value pairs.

ids string[]

A list of Image Component IDs.

imageComponentName string

The name of the image component.

nameRegex string

A regex string to filter results by Image Component name.

outputFile string
owner string

The type of the image component.

resourceGroupId string

The ID of the resource group.

tags {[key: string]: any}

List of label key-value pairs.

ids Sequence[str]

A list of Image Component IDs.

image_component_name str

The name of the image component.

name_regex str

A regex string to filter results by Image Component name.

output_file str
owner str

The type of the image component.

resource_group_id str

The ID of the resource group.

tags Mapping[str, Any]

List of label key-value pairs.

ids List<String>

A list of Image Component IDs.

imageComponentName String

The name of the image component.

nameRegex String

A regex string to filter results by Image Component name.

outputFile String
owner String

The type of the image component.

resourceGroupId String

The ID of the resource group.

tags Map<Any>

List of label key-value pairs.

getEcsImageComponents Result

The following output properties are available:

Components List<Pulumi.AliCloud.Ecs.Outputs.GetEcsImageComponentsComponent>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
ImageComponentName string
NameRegex string
OutputFile string
Owner string
ResourceGroupId string
Tags Dictionary<string, object>
Components []GetEcsImageComponentsComponent
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
ImageComponentName string
NameRegex string
OutputFile string
Owner string
ResourceGroupId string
Tags map[string]interface{}
components List<GetEcsImageComponentsComponent>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
imageComponentName String
nameRegex String
outputFile String
owner String
resourceGroupId String
tags Map<String,Object>
components GetEcsImageComponentsComponent[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
imageComponentName string
nameRegex string
outputFile string
owner string
resourceGroupId string
tags {[key: string]: any}
components Sequence[GetEcsImageComponentsComponent]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
image_component_name str
name_regex str
output_file str
owner str
resource_group_id str
tags Mapping[str, Any]
components List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
imageComponentName String
nameRegex String
outputFile String
owner String
resourceGroupId String
tags Map<Any>

Supporting Types

GetEcsImageComponentsComponent

ComponentType string

The type of the image component.

Content string

The content of the image component.

CreateTime string

The time when the image component was created.

Description string

The description of the image component.

Id string

The ID of the Image Component.

ImageComponentId string

The ID of the image component.

ImageComponentName string

The name of the image component.

Owner string

The type of the image component.

ResourceGroupId string

The ID of the resource group.

SystemType string

The operating system type supported by the image component.

Tags Dictionary<string, object>

List of label key-value pairs.

ComponentType string

The type of the image component.

Content string

The content of the image component.

CreateTime string

The time when the image component was created.

Description string

The description of the image component.

Id string

The ID of the Image Component.

ImageComponentId string

The ID of the image component.

ImageComponentName string

The name of the image component.

Owner string

The type of the image component.

ResourceGroupId string

The ID of the resource group.

SystemType string

The operating system type supported by the image component.

Tags map[string]interface{}

List of label key-value pairs.

componentType String

The type of the image component.

content String

The content of the image component.

createTime String

The time when the image component was created.

description String

The description of the image component.

id String

The ID of the Image Component.

imageComponentId String

The ID of the image component.

imageComponentName String

The name of the image component.

owner String

The type of the image component.

resourceGroupId String

The ID of the resource group.

systemType String

The operating system type supported by the image component.

tags Map<String,Object>

List of label key-value pairs.

componentType string

The type of the image component.

content string

The content of the image component.

createTime string

The time when the image component was created.

description string

The description of the image component.

id string

The ID of the Image Component.

imageComponentId string

The ID of the image component.

imageComponentName string

The name of the image component.

owner string

The type of the image component.

resourceGroupId string

The ID of the resource group.

systemType string

The operating system type supported by the image component.

tags {[key: string]: any}

List of label key-value pairs.

component_type str

The type of the image component.

content str

The content of the image component.

create_time str

The time when the image component was created.

description str

The description of the image component.

id str

The ID of the Image Component.

image_component_id str

The ID of the image component.

image_component_name str

The name of the image component.

owner str

The type of the image component.

resource_group_id str

The ID of the resource group.

system_type str

The operating system type supported by the image component.

tags Mapping[str, Any]

List of label key-value pairs.

componentType String

The type of the image component.

content String

The content of the image component.

createTime String

The time when the image component was created.

description String

The description of the image component.

id String

The ID of the Image Component.

imageComponentId String

The ID of the image component.

imageComponentName String

The name of the image component.

owner String

The type of the image component.

resourceGroupId String

The ID of the resource group.

systemType String

The operating system type supported by the image component.

tags Map<Any>

List of label key-value pairs.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.