1. Packages
  2. Vkcs Provider
  3. API Docs
  4. getImagesImage
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.getImagesImage

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Use this data source to get the ID of an available VKCS image.

    Example Usage

    VKCS provided image

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const debian = vkcs.getImagesImage({
        "default": true,
        properties: {
            mcs_os_distro: "debian",
            mcs_os_version: "12",
        },
        visibility: "public",
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    debian = vkcs.get_images_image(default=True,
        properties={
            "mcs_os_distro": "debian",
            "mcs_os_version": "12",
        },
        visibility="public")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.LookupImagesImage(ctx, &vkcs.LookupImagesImageArgs{
    			Default: pulumi.BoolRef(true),
    			Properties: map[string]interface{}{
    				"mcs_os_distro":  "debian",
    				"mcs_os_version": "12",
    			},
    			Visibility: pulumi.StringRef("public"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var debian = Vkcs.GetImagesImage.Invoke(new()
        {
            Default = true,
            Properties = 
            {
                { "mcs_os_distro", "debian" },
                { "mcs_os_version", "12" },
            },
            Visibility = "public",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.VkcsFunctions;
    import com.pulumi.vkcs.inputs.GetImagesImageArgs;
    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 debian = VkcsFunctions.getImagesImage(GetImagesImageArgs.builder()
                .default_(true)
                .properties(Map.ofEntries(
                    Map.entry("mcs_os_distro", "debian"),
                    Map.entry("mcs_os_version", "12")
                ))
                .visibility("public")
                .build());
    
        }
    }
    
    variables:
      debian:
        fn::invoke:
          function: vkcs:getImagesImage
          arguments:
            default: true
            properties:
              mcs_os_distro: debian
              mcs_os_version: '12'
            visibility: public
    

    User image

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const eurolinux9 = vkcs.getImagesImage({
        tag: "tf-example",
        mostRecent: true,
        properties: {
            mcs_os_distro: "eurolinux",
            mcs_os_version: "9",
        },
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    eurolinux9 = vkcs.get_images_image(tag="tf-example",
        most_recent=True,
        properties={
            "mcs_os_distro": "eurolinux",
            "mcs_os_version": "9",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.LookupImagesImage(ctx, &vkcs.LookupImagesImageArgs{
    			Tag:        pulumi.StringRef("tf-example"),
    			MostRecent: pulumi.BoolRef(true),
    			Properties: map[string]interface{}{
    				"mcs_os_distro":  "eurolinux",
    				"mcs_os_version": "9",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var eurolinux9 = Vkcs.GetImagesImage.Invoke(new()
        {
            Tag = "tf-example",
            MostRecent = true,
            Properties = 
            {
                { "mcs_os_distro", "eurolinux" },
                { "mcs_os_version", "9" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.VkcsFunctions;
    import com.pulumi.vkcs.inputs.GetImagesImageArgs;
    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 eurolinux9 = VkcsFunctions.getImagesImage(GetImagesImageArgs.builder()
                .tag("tf-example")
                .mostRecent(true)
                .properties(Map.ofEntries(
                    Map.entry("mcs_os_distro", "eurolinux"),
                    Map.entry("mcs_os_version", "9")
                ))
                .build());
    
        }
    }
    
    variables:
      eurolinux9:
        fn::invoke:
          function: vkcs:getImagesImage
          arguments:
            tag: tf-example
            mostRecent: true
            properties:
              mcs_os_distro: eurolinux
              mcs_os_version: '9'
    

    Using getImagesImage

    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 getImagesImage(args: GetImagesImageArgs, opts?: InvokeOptions): Promise<GetImagesImageResult>
    function getImagesImageOutput(args: GetImagesImageOutputArgs, opts?: InvokeOptions): Output<GetImagesImageResult>
    def get_images_image(default: Optional[bool] = None,
                         member_status: Optional[str] = None,
                         most_recent: Optional[bool] = None,
                         name: Optional[str] = None,
                         owner: Optional[str] = None,
                         properties: Optional[Mapping[str, str]] = None,
                         region: Optional[str] = None,
                         size_max: Optional[float] = None,
                         size_min: Optional[float] = None,
                         tag: Optional[str] = None,
                         visibility: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetImagesImageResult
    def get_images_image_output(default: Optional[pulumi.Input[bool]] = None,
                         member_status: Optional[pulumi.Input[str]] = None,
                         most_recent: Optional[pulumi.Input[bool]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         owner: Optional[pulumi.Input[str]] = None,
                         properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                         region: Optional[pulumi.Input[str]] = None,
                         size_max: Optional[pulumi.Input[float]] = None,
                         size_min: Optional[pulumi.Input[float]] = None,
                         tag: Optional[pulumi.Input[str]] = None,
                         visibility: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetImagesImageResult]
    func LookupImagesImage(ctx *Context, args *LookupImagesImageArgs, opts ...InvokeOption) (*LookupImagesImageResult, error)
    func LookupImagesImageOutput(ctx *Context, args *LookupImagesImageOutputArgs, opts ...InvokeOption) LookupImagesImageResultOutput

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

    public static class GetImagesImage 
    {
        public static Task<GetImagesImageResult> InvokeAsync(GetImagesImageArgs args, InvokeOptions? opts = null)
        public static Output<GetImagesImageResult> Invoke(GetImagesImageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetImagesImageResult> getImagesImage(GetImagesImageArgs args, InvokeOptions options)
    public static Output<GetImagesImageResult> getImagesImage(GetImagesImageArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getImagesImage:getImagesImage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Default bool
    optional boolean → Search for an image that is available for virtual machine creation.New since v0.4.2.
    MemberStatus string
    optional string → Status for adding a new member (tenant) to an image member list.
    MostRecent bool
    optional boolean → If more than one result is returned, use the most recent image.
    Name string
    optional string → The name of the image.
    Owner string
    optional string → The owner (UUID) of the image.
    Properties Dictionary<string, string>
    optional map of string → A map of key/value pairs to match an image with. All specified properties must be matched. Unlike other options filtering by properties does by client on the result of search query. Filtering is applied if server response contains at least 2 images. In case there is only one image the properties ignores.
    Region string
    optional string → The region in which to obtain the Image client. An Image client is needed to create an Image that can be used with a compute instance. If omitted, the region argument of the provider is used.
    SizeMax double
    optional number → The maximum size (in bytes) of the image to return.
    SizeMin double
    optional number → The minimum size (in bytes) of the image to return.
    Tag string
    optional string → Search for images with a specific tag.
    Visibility string
    optional string → The visibility of the image. Must be one of "public", "private", "community", or "shared".
    Default bool
    optional boolean → Search for an image that is available for virtual machine creation.New since v0.4.2.
    MemberStatus string
    optional string → Status for adding a new member (tenant) to an image member list.
    MostRecent bool
    optional boolean → If more than one result is returned, use the most recent image.
    Name string
    optional string → The name of the image.
    Owner string
    optional string → The owner (UUID) of the image.
    Properties map[string]string
    optional map of string → A map of key/value pairs to match an image with. All specified properties must be matched. Unlike other options filtering by properties does by client on the result of search query. Filtering is applied if server response contains at least 2 images. In case there is only one image the properties ignores.
    Region string
    optional string → The region in which to obtain the Image client. An Image client is needed to create an Image that can be used with a compute instance. If omitted, the region argument of the provider is used.
    SizeMax float64
    optional number → The maximum size (in bytes) of the image to return.
    SizeMin float64
    optional number → The minimum size (in bytes) of the image to return.
    Tag string
    optional string → Search for images with a specific tag.
    Visibility string
    optional string → The visibility of the image. Must be one of "public", "private", "community", or "shared".
    default_ Boolean
    optional boolean → Search for an image that is available for virtual machine creation.New since v0.4.2.
    memberStatus String
    optional string → Status for adding a new member (tenant) to an image member list.
    mostRecent Boolean
    optional boolean → If more than one result is returned, use the most recent image.
    name String
    optional string → The name of the image.
    owner String
    optional string → The owner (UUID) of the image.
    properties Map<String,String>
    optional map of string → A map of key/value pairs to match an image with. All specified properties must be matched. Unlike other options filtering by properties does by client on the result of search query. Filtering is applied if server response contains at least 2 images. In case there is only one image the properties ignores.
    region String
    optional string → The region in which to obtain the Image client. An Image client is needed to create an Image that can be used with a compute instance. If omitted, the region argument of the provider is used.
    sizeMax Double
    optional number → The maximum size (in bytes) of the image to return.
    sizeMin Double
    optional number → The minimum size (in bytes) of the image to return.
    tag String
    optional string → Search for images with a specific tag.
    visibility String
    optional string → The visibility of the image. Must be one of "public", "private", "community", or "shared".
    default boolean
    optional boolean → Search for an image that is available for virtual machine creation.New since v0.4.2.
    memberStatus string
    optional string → Status for adding a new member (tenant) to an image member list.
    mostRecent boolean
    optional boolean → If more than one result is returned, use the most recent image.
    name string
    optional string → The name of the image.
    owner string
    optional string → The owner (UUID) of the image.
    properties {[key: string]: string}
    optional map of string → A map of key/value pairs to match an image with. All specified properties must be matched. Unlike other options filtering by properties does by client on the result of search query. Filtering is applied if server response contains at least 2 images. In case there is only one image the properties ignores.
    region string
    optional string → The region in which to obtain the Image client. An Image client is needed to create an Image that can be used with a compute instance. If omitted, the region argument of the provider is used.
    sizeMax number
    optional number → The maximum size (in bytes) of the image to return.
    sizeMin number
    optional number → The minimum size (in bytes) of the image to return.
    tag string
    optional string → Search for images with a specific tag.
    visibility string
    optional string → The visibility of the image. Must be one of "public", "private", "community", or "shared".
    default bool
    optional boolean → Search for an image that is available for virtual machine creation.New since v0.4.2.
    member_status str
    optional string → Status for adding a new member (tenant) to an image member list.
    most_recent bool
    optional boolean → If more than one result is returned, use the most recent image.
    name str
    optional string → The name of the image.
    owner str
    optional string → The owner (UUID) of the image.
    properties Mapping[str, str]
    optional map of string → A map of key/value pairs to match an image with. All specified properties must be matched. Unlike other options filtering by properties does by client on the result of search query. Filtering is applied if server response contains at least 2 images. In case there is only one image the properties ignores.
    region str
    optional string → The region in which to obtain the Image client. An Image client is needed to create an Image that can be used with a compute instance. If omitted, the region argument of the provider is used.
    size_max float
    optional number → The maximum size (in bytes) of the image to return.
    size_min float
    optional number → The minimum size (in bytes) of the image to return.
    tag str
    optional string → Search for images with a specific tag.
    visibility str
    optional string → The visibility of the image. Must be one of "public", "private", "community", or "shared".
    default Boolean
    optional boolean → Search for an image that is available for virtual machine creation.New since v0.4.2.
    memberStatus String
    optional string → Status for adding a new member (tenant) to an image member list.
    mostRecent Boolean
    optional boolean → If more than one result is returned, use the most recent image.
    name String
    optional string → The name of the image.
    owner String
    optional string → The owner (UUID) of the image.
    properties Map<String>
    optional map of string → A map of key/value pairs to match an image with. All specified properties must be matched. Unlike other options filtering by properties does by client on the result of search query. Filtering is applied if server response contains at least 2 images. In case there is only one image the properties ignores.
    region String
    optional string → The region in which to obtain the Image client. An Image client is needed to create an Image that can be used with a compute instance. If omitted, the region argument of the provider is used.
    sizeMax Number
    optional number → The maximum size (in bytes) of the image to return.
    sizeMin Number
    optional number → The minimum size (in bytes) of the image to return.
    tag String
    optional string → Search for images with a specific tag.
    visibility String
    optional string → The visibility of the image. Must be one of "public", "private", "community", or "shared".

    getImagesImage Result

    The following output properties are available:

    Checksum string
    string → The checksum of the data associated with the image.
    ContainerFormat string
    string → The format of the image's container.
    CreatedAt string
    string → The date the image was created.
    DiskFormat string
    string → The format of the image's disk.
    File string
    string → The trailing path after the endpoint that represent the location of the image or the path to retrieve it.
    Id string
    string → The UUID of the image.
    Metadata Dictionary<string, string>
    map of string → The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
    MinDiskGb double
    number → The minimum amount of disk space required to use the image.
    MinRamMb double
    number → The minimum amount of ram required to use the image.
    Protected bool
    boolean → Whether or not the image is protected.
    Region string
    Schema string
    string → The path to the JSON-schema that represent the image or image
    SizeBytes double
    number → The size of the image (in bytes).
    Tags List<string>
    set of string → The tags list of the image.
    UpdatedAt string
    string → The date the image was last updated.
    Default bool
    MemberStatus string
    MostRecent bool
    Name string
    Owner string
    Properties Dictionary<string, string>
    SizeMax double
    SizeMin double
    Tag string
    Visibility string
    Checksum string
    string → The checksum of the data associated with the image.
    ContainerFormat string
    string → The format of the image's container.
    CreatedAt string
    string → The date the image was created.
    DiskFormat string
    string → The format of the image's disk.
    File string
    string → The trailing path after the endpoint that represent the location of the image or the path to retrieve it.
    Id string
    string → The UUID of the image.
    Metadata map[string]string
    map of string → The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
    MinDiskGb float64
    number → The minimum amount of disk space required to use the image.
    MinRamMb float64
    number → The minimum amount of ram required to use the image.
    Protected bool
    boolean → Whether or not the image is protected.
    Region string
    Schema string
    string → The path to the JSON-schema that represent the image or image
    SizeBytes float64
    number → The size of the image (in bytes).
    Tags []string
    set of string → The tags list of the image.
    UpdatedAt string
    string → The date the image was last updated.
    Default bool
    MemberStatus string
    MostRecent bool
    Name string
    Owner string
    Properties map[string]string
    SizeMax float64
    SizeMin float64
    Tag string
    Visibility string
    checksum String
    string → The checksum of the data associated with the image.
    containerFormat String
    string → The format of the image's container.
    createdAt String
    string → The date the image was created.
    diskFormat String
    string → The format of the image's disk.
    file String
    string → The trailing path after the endpoint that represent the location of the image or the path to retrieve it.
    id String
    string → The UUID of the image.
    metadata Map<String,String>
    map of string → The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
    minDiskGb Double
    number → The minimum amount of disk space required to use the image.
    minRamMb Double
    number → The minimum amount of ram required to use the image.
    protected_ Boolean
    boolean → Whether or not the image is protected.
    region String
    schema String
    string → The path to the JSON-schema that represent the image or image
    sizeBytes Double
    number → The size of the image (in bytes).
    tags List<String>
    set of string → The tags list of the image.
    updatedAt String
    string → The date the image was last updated.
    default_ Boolean
    memberStatus String
    mostRecent Boolean
    name String
    owner String
    properties Map<String,String>
    sizeMax Double
    sizeMin Double
    tag String
    visibility String
    checksum string
    string → The checksum of the data associated with the image.
    containerFormat string
    string → The format of the image's container.
    createdAt string
    string → The date the image was created.
    diskFormat string
    string → The format of the image's disk.
    file string
    string → The trailing path after the endpoint that represent the location of the image or the path to retrieve it.
    id string
    string → The UUID of the image.
    metadata {[key: string]: string}
    map of string → The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
    minDiskGb number
    number → The minimum amount of disk space required to use the image.
    minRamMb number
    number → The minimum amount of ram required to use the image.
    protected boolean
    boolean → Whether or not the image is protected.
    region string
    schema string
    string → The path to the JSON-schema that represent the image or image
    sizeBytes number
    number → The size of the image (in bytes).
    tags string[]
    set of string → The tags list of the image.
    updatedAt string
    string → The date the image was last updated.
    default boolean
    memberStatus string
    mostRecent boolean
    name string
    owner string
    properties {[key: string]: string}
    sizeMax number
    sizeMin number
    tag string
    visibility string
    checksum str
    string → The checksum of the data associated with the image.
    container_format str
    string → The format of the image's container.
    created_at str
    string → The date the image was created.
    disk_format str
    string → The format of the image's disk.
    file str
    string → The trailing path after the endpoint that represent the location of the image or the path to retrieve it.
    id str
    string → The UUID of the image.
    metadata Mapping[str, str]
    map of string → The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
    min_disk_gb float
    number → The minimum amount of disk space required to use the image.
    min_ram_mb float
    number → The minimum amount of ram required to use the image.
    protected bool
    boolean → Whether or not the image is protected.
    region str
    schema str
    string → The path to the JSON-schema that represent the image or image
    size_bytes float
    number → The size of the image (in bytes).
    tags Sequence[str]
    set of string → The tags list of the image.
    updated_at str
    string → The date the image was last updated.
    default bool
    member_status str
    most_recent bool
    name str
    owner str
    properties Mapping[str, str]
    size_max float
    size_min float
    tag str
    visibility str
    checksum String
    string → The checksum of the data associated with the image.
    containerFormat String
    string → The format of the image's container.
    createdAt String
    string → The date the image was created.
    diskFormat String
    string → The format of the image's disk.
    file String
    string → The trailing path after the endpoint that represent the location of the image or the path to retrieve it.
    id String
    string → The UUID of the image.
    metadata Map<String>
    map of string → The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
    minDiskGb Number
    number → The minimum amount of disk space required to use the image.
    minRamMb Number
    number → The minimum amount of ram required to use the image.
    protected Boolean
    boolean → Whether or not the image is protected.
    region String
    schema String
    string → The path to the JSON-schema that represent the image or image
    sizeBytes Number
    number → The size of the image (in bytes).
    tags List<String>
    set of string → The tags list of the image.
    updatedAt String
    string → The date the image was last updated.
    default Boolean
    memberStatus String
    mostRecent Boolean
    name String
    owner String
    properties Map<String>
    sizeMax Number
    sizeMin Number
    tag String
    visibility String

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs