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:
- Most
Recent bool If more than one result are returned, select the most recent one.
- Name
Regex string A regex string to filter resulting images by name.
- Output
File 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 string A regex string to filter resulting images by name.
- Output
File string - Owners string
Filter results by a specific image owner. Valid items are
system,self,others,marketplace.
- most
Recent boolean If more than one result are returned, select the most recent one.
- name
Regex string A regex string to filter resulting images by name.
- output
File 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.
Ali Cloud. Ecs. Outputs. Get Images Image> A list of images. Each element contains the following attributes:
- Most
Recent bool - Name
Regex string - Output
File string - Owners string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of image IDs.
- Images
[]Get
Images Image A list of images. Each element contains the following attributes:
- Most
Recent bool - Name
Regex string - Output
File string - Owners string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of image IDs.
- images
Get
Images Image[] A list of images. Each element contains the following attributes:
- most
Recent boolean - name
Regex string - output
File string - owners string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of image IDs.
- images
List[Get
Images Image] 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.
- Creation
Time string Time of creation.
- Description string
Description of the image.
- Disk
Device List<Pulumi.Mappings Ali Cloud. Ecs. Inputs. Get Images Image Disk Device Mapping Args> Description of the system with disks and snapshots under the image.
- Id string
ID of the image.
- Image
Id string - Image
Owner stringAlias Alias of the image owner.
- Image
Version string Version of the image.
- Is
Copied bool - string
- Is
Subscribed bool Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.
- Is
Support boolIo Optimized - Name string
- Os
Name string Display Chinese name of the OS.
- Os
Name stringEn Display English name of the OS.
- Os
Type string - Platform string
- Product
Code 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,CreatingandCreateFailed.- Usage string
- Dictionary<string, object>
- Architecture string
Platform type of the image system: i386 or x86_64.
- Creation
Time string Time of creation.
- Description string
Description of the image.
- Disk
Device []GetMappings Images Image Disk Device Mapping Description of the system with disks and snapshots under the image.
- Id string
ID of the image.
- Image
Id string - Image
Owner stringAlias Alias of the image owner.
- Image
Version string Version of the image.
- Is
Copied bool - string
- Is
Subscribed bool Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.
- Is
Support boolIo Optimized - Name string
- Os
Name string Display Chinese name of the OS.
- Os
Name stringEn Display English name of the OS.
- Os
Type string - Platform string
- Product
Code 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,CreatingandCreateFailed.- Usage string
- map[string]interface{}
- architecture string
Platform type of the image system: i386 or x86_64.
- creation
Time string Time of creation.
- description string
Description of the image.
- disk
Device GetMappings Images Image Disk Device Mapping[] Description of the system with disks and snapshots under the image.
- id string
ID of the image.
- image
Id string - image
Owner stringAlias Alias of the image owner.
- image
Version string Version of the image.
- is
Copied boolean - string
- is
Subscribed boolean Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.
- is
Support booleanIo Optimized - name string
- os
Name string Display Chinese name of the OS.
- os
Name stringEn Display English name of the OS.
- os
Type string - platform string
- product
Code 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,CreatingandCreateFailed.- usage string
- {[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_ List[Getmappings Images Image Disk Device Mapping] Description of the system with disks and snapshots under the image.
- id str
ID of the image.
- image
Version str Version of the image.
- image_
id str - image_
owner_ stralias Alias of the image owner.
- is
Copied bool - str
- is
Subscribed bool Whether the user has subscribed to the terms of service for the image product corresponding to the ProductCode.
- is
Support boolIo Optimized - name str
- os
Name str Display Chinese name of the OS.
- os
Name strEn 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,CreatingandCreateFailed.- usage str
- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.