1. Packages
  2. Opennebula Provider
  3. API Docs
  4. getImage
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.getImage

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Use this data source to retrieve the image information for a given name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = opennebula.getImage({
        name: "My_Image",
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.get_image(name="My_Image")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.LookupImage(ctx, &opennebula.LookupImageArgs{
    			Name: pulumi.StringRef("My_Image"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Opennebula.GetImage.Invoke(new()
        {
            Name = "My_Image",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.OpennebulaFunctions;
    import com.pulumi.opennebula.inputs.GetImageArgs;
    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 example = OpennebulaFunctions.getImage(GetImageArgs.builder()
                .name("My_Image")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: opennebula:getImage
          arguments:
            name: My_Image
    

    Using getImage

    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 getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>
    function getImageOutput(args: GetImageOutputArgs, opts?: InvokeOptions): Output<GetImageResult>
    def get_image(id: Optional[float] = None,
                  name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetImageResult
    def get_image_output(id: Optional[pulumi.Input[float]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]
    func LookupImage(ctx *Context, args *LookupImageArgs, opts ...InvokeOption) (*LookupImageResult, error)
    func LookupImageOutput(ctx *Context, args *LookupImageOutputArgs, opts ...InvokeOption) LookupImageResultOutput

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

    public static class GetImage 
    {
        public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
        public static Output<GetImageResult> Invoke(GetImageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
    public static Output<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
    
    fn::invoke:
      function: opennebula:index/getImage:getImage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id double
    ID of the image.
    Name string
    The OpenNebula image to retrieve information for.
    Tags Dictionary<string, string>
    Tags associated to the image.
    Id float64
    ID of the image.
    Name string
    The OpenNebula image to retrieve information for.
    Tags map[string]string
    Tags associated to the image.
    id Double
    ID of the image.
    name String
    The OpenNebula image to retrieve information for.
    tags Map<String,String>
    Tags associated to the image.
    id number
    ID of the image.
    name string
    The OpenNebula image to retrieve information for.
    tags {[key: string]: string}
    Tags associated to the image.
    id float
    ID of the image.
    name str
    The OpenNebula image to retrieve information for.
    tags Mapping[str, str]
    Tags associated to the image.
    id Number
    ID of the image.
    name String
    The OpenNebula image to retrieve information for.
    tags Map<String>
    Tags associated to the image.

    getImage Result

    The following output properties are available:

    Id double
    ID of the image.
    Name string
    Name of the image.
    Tags Dictionary<string, string>
    Tags of the image (Key = Value).
    Id float64
    ID of the image.
    Name string
    Name of the image.
    Tags map[string]string
    Tags of the image (Key = Value).
    id Double
    ID of the image.
    name String
    Name of the image.
    tags Map<String,String>
    Tags of the image (Key = Value).
    id number
    ID of the image.
    name string
    Name of the image.
    tags {[key: string]: string}
    Tags of the image (Key = Value).
    id float
    ID of the image.
    name str
    Name of the image.
    tags Mapping[str, str]
    Tags of the image (Key = Value).
    id Number
    ID of the image.
    name String
    Name of the image.
    tags Map<String>
    Tags of the image (Key = Value).

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula