1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getImage
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.getImage

Explore with Pulumi AI

ovh logo
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

    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 dictionary

    The following arguments are supported:

    ImageId string
    Image ID
    ServiceName string
    Public cloud project ID
    ImageId string
    Image ID
    ServiceName string
    Public cloud project ID
    imageId String
    Image ID
    serviceName String
    Public cloud project ID
    imageId string
    Image ID
    serviceName string
    Public cloud project ID
    image_id str
    Image ID
    service_name str
    Public cloud project ID
    imageId String
    Image ID
    serviceName String
    Public cloud project ID

    getImage Result

    The following output properties are available:

    CreationDate string
    Image creation date
    FlavorType string
    Image usable only for this type of flavor if not null
    Id string
    Image ID
    ImageId string
    Image ID
    MinDisk double
    Minimum disks required to use image
    MinRam double
    Minimum RAM required to use image
    Name string
    Image name
    PlanCode string
    Order plan code
    Region string
    Image region
    ServiceName string
    Public cloud project ID
    Size double
    Image size (in GiB)
    Status string
    Image status
    Tags List<string>
    Tags about the image
    Type string
    Image type
    User string
    User to connect with
    Visibility string
    Image visibility
    CreationDate string
    Image creation date
    FlavorType string
    Image usable only for this type of flavor if not null
    Id string
    Image ID
    ImageId string
    Image ID
    MinDisk float64
    Minimum disks required to use image
    MinRam float64
    Minimum RAM required to use image
    Name string
    Image name
    PlanCode string
    Order plan code
    Region string
    Image region
    ServiceName string
    Public cloud project ID
    Size float64
    Image size (in GiB)
    Status string
    Image status
    Tags []string
    Tags about the image
    Type string
    Image type
    User string
    User to connect with
    Visibility string
    Image visibility
    creationDate String
    Image creation date
    flavorType String
    Image usable only for this type of flavor if not null
    id String
    Image ID
    imageId String
    Image ID
    minDisk Double
    Minimum disks required to use image
    minRam Double
    Minimum RAM required to use image
    name String
    Image name
    planCode String
    Order plan code
    region String
    Image region
    serviceName String
    Public cloud project ID
    size Double
    Image size (in GiB)
    status String
    Image status
    tags List<String>
    Tags about the image
    type String
    Image type
    user String
    User to connect with
    visibility String
    Image visibility
    creationDate string
    Image creation date
    flavorType string
    Image usable only for this type of flavor if not null
    id string
    Image ID
    imageId string
    Image ID
    minDisk number
    Minimum disks required to use image
    minRam number
    Minimum RAM required to use image
    name string
    Image name
    planCode string
    Order plan code
    region string
    Image region
    serviceName string
    Public cloud project ID
    size number
    Image size (in GiB)
    status string
    Image status
    tags 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
    tags Sequence[str]
    Tags about the image
    type str
    Image type
    user str
    User to connect with
    visibility str
    Image visibility
    creationDate String
    Image creation date
    flavorType String
    Image usable only for this type of flavor if not null
    id String
    Image ID
    imageId String
    Image ID
    minDisk Number
    Minimum disks required to use image
    minRam Number
    Minimum RAM required to use image
    name String
    Image name
    planCode String
    Order plan code
    region String
    Image region
    serviceName String
    Public cloud project ID
    size Number
    Image size (in GiB)
    status String
    Image status
    tags 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 ovh Terraform Provider.
    ovh logo
    OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud