GetImages

This data source provides available image resources. It contains user’s private images, system images provided by Alibaba Cloud, other public images and the ones available on the image market.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var imagesDs = Output.Create(AliCloud.Ecs.GetImages.InvokeAsync(new AliCloud.Ecs.GetImagesArgs
        {
            NameRegex = "^centos_6",
            Owners = "system",
        }));
        this.FirstImageId = imagesDs.Apply(imagesDs => imagesDs.Images[0].Id);
    }

    [Output("firstImageId")]
    public Output<string> FirstImageId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

images_ds = alicloud.ecs.get_images(name_regex="^centos_6",
    owners="system")
pulumi.export("firstImageId", images_ds.images[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const imagesDs = pulumi.output(alicloud.ecs.getImages({
    nameRegex: "^centos_6",
    owners: "system",
}, { async: true }));

export const firstImageId = imagesDs.images[0].id;

Using GetImages

function getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
function  get_images(most_recent=None, name_regex=None, output_file=None, owners=None, opts=None)
func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
public static class GetImages {
    public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

MostRecent bool

If more than one result are returned, select the most recent one.

NameRegex string

A regex string to filter resulting images by name.

OutputFile string
Owners string

Filter results by a specific image owner. Valid items are system, self, others, marketplace.

MostRecent bool

If more than one result are returned, select the most recent one.

NameRegex string

A regex string to filter resulting images by name.

OutputFile string
Owners string

Filter results by a specific image owner. Valid items are system, self, others, marketplace.

mostRecent boolean

If more than one result are returned, select the most recent one.

nameRegex string

A regex string to filter resulting images by name.

outputFile string
owners string

Filter results by a specific image owner. Valid items are system, self, others, marketplace.

most_recent bool

If more than one result are returned, select the most recent one.

name_regex str

A regex string to filter resulting images by name.

output_file str
owners str

Filter results by a specific image owner. Valid items are system, self, others, marketplace.

GetImages Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of image IDs.

Images List<Pulumi.AliCloud.Ecs.Outputs.GetImagesImage>

A list of images. Each element contains the following attributes:

MostRecent bool
NameRegex string
OutputFile string
Owners string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of image IDs.

Images []GetImagesImage

A list of images. Each element contains the following attributes:

MostRecent bool
NameRegex string
OutputFile string
Owners string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of image IDs.

images GetImagesImage[]

A list of images. Each element contains the following attributes:

mostRecent boolean
nameRegex string
outputFile string
owners string
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of image IDs.

images List[GetImagesImage]

A list of images. Each element contains the following attributes:

most_recent bool
name_regex str
output_file str
owners str

Supporting Types

GetImagesImage

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Architecture string

Platform type of the image system: i386 or x86_64.

CreationTime string

Time of creation.

Description string

Description of the image.

DiskDeviceMappings List<Pulumi.AliCloud.Ecs.Inputs.GetImagesImageDiskDeviceMappingArgs>

Description of the system with disks and snapshots under the image.

Id string

ID of the image.

ImageId string
ImageOwnerAlias string

Alias of the image owner.

ImageVersion string

Version of the image.

IsCopied bool
IsSelfShared string
IsSubscribed bool

Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.

IsSupportIoOptimized bool
Name string
OsName string

Display Chinese name of the OS.

OsNameEn string

Display English name of the OS.

OsType string
Platform string
ProductCode string

Product code of the image on the image market.

Progress string

Progress of image creation, presented in percentages.

Size int

Size of the created disk.

State string
Status string

Status of the image. Possible values: UnAvailable, Available, Creating and CreateFailed.

Usage string
Tags Dictionary<string, object>
Architecture string

Platform type of the image system: i386 or x86_64.

CreationTime string

Time of creation.

Description string

Description of the image.

DiskDeviceMappings []GetImagesImageDiskDeviceMapping

Description of the system with disks and snapshots under the image.

Id string

ID of the image.

ImageId string
ImageOwnerAlias string

Alias of the image owner.

ImageVersion string

Version of the image.

IsCopied bool
IsSelfShared string
IsSubscribed bool

Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.

IsSupportIoOptimized bool
Name string
OsName string

Display Chinese name of the OS.

OsNameEn string

Display English name of the OS.

OsType string
Platform string
ProductCode string

Product code of the image on the image market.

Progress string

Progress of image creation, presented in percentages.

Size int

Size of the created disk.

State string
Status string

Status of the image. Possible values: UnAvailable, Available, Creating and CreateFailed.

Usage string
Tags map[string]interface{}
architecture string

Platform type of the image system: i386 or x86_64.

creationTime string

Time of creation.

description string

Description of the image.

diskDeviceMappings GetImagesImageDiskDeviceMapping[]

Description of the system with disks and snapshots under the image.

id string

ID of the image.

imageId string
imageOwnerAlias string

Alias of the image owner.

imageVersion string

Version of the image.

isCopied boolean
isSelfShared string
isSubscribed boolean

Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.

isSupportIoOptimized boolean
name string
osName string

Display Chinese name of the OS.

osNameEn string

Display English name of the OS.

osType string
platform string
productCode string

Product code of the image on the image market.

progress string

Progress of image creation, presented in percentages.

size number

Size of the created disk.

state string
status string

Status of the image. Possible values: UnAvailable, Available, Creating and CreateFailed.

usage string
tags {[key: string]: any}
architecture str

Platform type of the image system: i386 or x86_64.

creation_time str

Time of creation.

description str

Description of the image.

disk_device_mappings List[GetImagesImageDiskDeviceMapping]

Description of the system with disks and snapshots under the image.

id str

ID of the image.

imageVersion str

Version of the image.

image_id str
image_owner_alias str

Alias of the image owner.

isCopied bool
isSelfShared str
isSubscribed bool

Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.

isSupportIoOptimized bool
name str
osName str

Display Chinese name of the OS.

osNameEn str

Display English name of the OS.

os_type str
platform str
product_code str

Product code of the image on the image market.

progress str

Progress of image creation, presented in percentages.

size float

Size of the created disk.

state str
status str

Status of the image. Possible values: UnAvailable, Available, Creating and CreateFailed.

usage str
tags Dict[str, Any]

GetImagesImageDiskDeviceMapping

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Device string

Device information of the created disk: such as /dev/xvdb.

Size string

Size of the created disk.

SnapshotId string

Snapshot ID.

Device string

Device information of the created disk: such as /dev/xvdb.

Size string

Size of the created disk.

SnapshotId string

Snapshot ID.

device string

Device information of the created disk: such as /dev/xvdb.

size string

Size of the created disk.

snapshotId string

Snapshot ID.

device str

Device information of the created disk: such as /dev/xvdb.

size str

Size of the created disk.

snapshot_id str

Snapshot ID.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.