OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud
ovh.CloudProject.getImage
Explore with Pulumi AI
Get information about an image in the given public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const image = ovh.CloudProject.getImage({
    imageId: "<image ID>",
    serviceName: "<public cloud project ID>",
});
import pulumi
import pulumi_ovh as ovh
image = ovh.CloudProject.get_image(image_id="<image ID>",
    service_name="<public cloud project ID>")
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudproject.GetImage(ctx, &cloudproject.GetImageArgs{
			ImageId:     "<image ID>",
			ServiceName: "<public cloud project ID>",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var image = Ovh.CloudProject.GetImage.Invoke(new()
    {
        ImageId = "<image ID>",
        ServiceName = "<public cloud project ID>",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.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 image = CloudProjectFunctions.getImage(GetImageArgs.builder()
            .imageId("<image ID>")
            .serviceName("<public cloud project ID>")
            .build());
    }
}
variables:
  image:
    fn::invoke:
      function: ovh:CloudProject:getImage
      arguments:
        imageId: <image ID>
        serviceName: <public cloud project ID>
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(image_id: Optional[str] = None,
              service_name: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetImageResult
def get_image_output(image_id: Optional[pulumi.Input[str]] = None,
              service_name: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]func GetImage(ctx *Context, args *GetImageArgs, opts ...InvokeOption) (*GetImageResult, error)
func GetImageOutput(ctx *Context, args *GetImageOutputArgs, opts ...InvokeOption) GetImageResultOutput> Note: This function is named GetImage 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: ovh:CloudProject/getImage:getImage
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Image
Id string - Image ID
 - Service
Name string - Public cloud project ID
 
- Image
Id string - Image ID
 - Service
Name string - Public cloud project ID
 
- image
Id String - Image ID
 - service
Name String - Public cloud project ID
 
- image
Id string - Image ID
 - service
Name string - Public cloud project ID
 
- image_
id str - Image ID
 - service_
name str - Public cloud project ID
 
- image
Id String - Image ID
 - service
Name String - Public cloud project ID
 
getImage Result
The following output properties are available:
- Creation
Date string - Image creation date
 - Flavor
Type string - Image usable only for this type of flavor if not null
 - Id string
 - Image ID
 - Image
Id string - Image ID
 - Min
Disk double - Minimum disks required to use image
 - Min
Ram double - Minimum RAM required to use image
 - Name string
 - Image name
 - Plan
Code string - Order plan code
 - Region string
 - Image region
 - Service
Name string - Public cloud project ID
 - Size double
 - Image size (in GiB)
 - Status string
 - Image status
 - List<string>
 - Tags about the image
 - Type string
 - Image type
 - User string
 - User to connect with
 - Visibility string
 - Image visibility
 
- Creation
Date string - Image creation date
 - Flavor
Type string - Image usable only for this type of flavor if not null
 - Id string
 - Image ID
 - Image
Id string - Image ID
 - Min
Disk float64 - Minimum disks required to use image
 - Min
Ram float64 - Minimum RAM required to use image
 - Name string
 - Image name
 - Plan
Code string - Order plan code
 - Region string
 - Image region
 - Service
Name string - Public cloud project ID
 - Size float64
 - Image size (in GiB)
 - Status string
 - Image status
 - []string
 - Tags about the image
 - Type string
 - Image type
 - User string
 - User to connect with
 - Visibility string
 - Image visibility
 
- creation
Date String - Image creation date
 - flavor
Type String - Image usable only for this type of flavor if not null
 - id String
 - Image ID
 - image
Id String - Image ID
 - min
Disk Double - Minimum disks required to use image
 - min
Ram Double - Minimum RAM required to use image
 - name String
 - Image name
 - plan
Code String - Order plan code
 - region String
 - Image region
 - service
Name String - Public cloud project ID
 - size Double
 - Image size (in GiB)
 - status String
 - Image status
 - List<String>
 - Tags about the image
 - type String
 - Image type
 - user String
 - User to connect with
 - visibility String
 - Image visibility
 
- creation
Date string - Image creation date
 - flavor
Type string - Image usable only for this type of flavor if not null
 - id string
 - Image ID
 - image
Id string - Image ID
 - min
Disk number - Minimum disks required to use image
 - min
Ram number - Minimum RAM required to use image
 - name string
 - Image name
 - plan
Code string - Order plan code
 - region string
 - Image region
 - service
Name string - Public cloud project ID
 - size number
 - Image size (in GiB)
 - status string
 - Image status
 - string[]
 - Tags about the image
 - type string
 - Image type
 - user string
 - User to connect with
 - visibility string
 - Image visibility
 
- creation_
date str - Image creation date
 - flavor_
type str - Image usable only for this type of flavor if not null
 - id str
 - Image ID
 - image_
id str - Image ID
 - min_
disk float - Minimum disks required to use image
 - min_
ram float - Minimum RAM required to use image
 - name str
 - Image name
 - plan_
code str - Order plan code
 - region str
 - Image region
 - service_
name str - Public cloud project ID
 - size float
 - Image size (in GiB)
 - status str
 - Image status
 - Sequence[str]
 - Tags about the image
 - type str
 - Image type
 - user str
 - User to connect with
 - visibility str
 - Image visibility
 
- creation
Date String - Image creation date
 - flavor
Type String - Image usable only for this type of flavor if not null
 - id String
 - Image ID
 - image
Id String - Image ID
 - min
Disk Number - Minimum disks required to use image
 - min
Ram Number - Minimum RAM required to use image
 - name String
 - Image name
 - plan
Code String - Order plan code
 - region String
 - Image region
 - service
Name String - Public cloud project ID
 - size Number
 - Image size (in GiB)
 - status String
 - Image status
 - List<String>
 - Tags about the image
 - type String
 - Image type
 - user String
 - User to connect with
 - visibility String
 - Image visibility
 
Package Details
- Repository
 - ovh ovh/pulumi-ovh
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ovhTerraform Provider.