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

ovh.CloudProject.getImages

Explore with Pulumi AI

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

    Get available images in the given public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const images = ovh.CloudProject.getImages({
        osType: "linux",
        region: "WAW1",
        serviceName: "<public cloud project ID>",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    images = ovh.CloudProject.get_images(os_type="linux",
        region="WAW1",
        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.GetImages(ctx, &cloudproject.GetImagesArgs{
    			OsType:      pulumi.StringRef("linux"),
    			Region:      pulumi.StringRef("WAW1"),
    			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 images = Ovh.CloudProject.GetImages.Invoke(new()
        {
            OsType = "linux",
            Region = "WAW1",
            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.GetImagesArgs;
    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 images = CloudProjectFunctions.getImages(GetImagesArgs.builder()
                .osType("linux")
                .region("WAW1")
                .serviceName("<public cloud project ID>")
                .build());
    
        }
    }
    
    variables:
      images:
        fn::invoke:
          function: ovh:CloudProject:getImages
          arguments:
            osType: linux
            region: WAW1
            serviceName: <public cloud project ID>
    

    Using getImages

    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 getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
    function getImagesOutput(args: GetImagesOutputArgs, opts?: InvokeOptions): Output<GetImagesResult>
    def get_images(flavor_type: Optional[str] = None,
                   os_type: Optional[str] = None,
                   region: Optional[str] = None,
                   service_name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetImagesResult
    def get_images_output(flavor_type: Optional[pulumi.Input[str]] = None,
                   os_type: Optional[pulumi.Input[str]] = None,
                   region: Optional[pulumi.Input[str]] = None,
                   service_name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetImagesResult]
    func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
    func GetImagesOutput(ctx *Context, args *GetImagesOutputArgs, opts ...InvokeOption) GetImagesResultOutput

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

    public static class GetImages 
    {
        public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
        public static Output<GetImagesResult> Invoke(GetImagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
    public static Output<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:CloudProject/getImages:getImages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceName string
    Public cloud project ID
    FlavorType string
    Get compatible images with flavor type
    OsType string
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    Region string
    Image region
    ServiceName string
    Public cloud project ID
    FlavorType string
    Get compatible images with flavor type
    OsType string
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    Region string
    Image region
    serviceName String
    Public cloud project ID
    flavorType String
    Get compatible images with flavor type
    osType String
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region String
    Image region
    serviceName string
    Public cloud project ID
    flavorType string
    Get compatible images with flavor type
    osType string
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region string
    Image region
    service_name str
    Public cloud project ID
    flavor_type str
    Get compatible images with flavor type
    os_type str
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region str
    Image region
    serviceName String
    Public cloud project ID
    flavorType String
    Get compatible images with flavor type
    osType String
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region String
    Image region

    getImages Result

    The following output properties are available:

    FlavorType string
    Get compatible images with flavor type
    Id string
    The provider-assigned unique ID for this managed resource.
    Images List<GetImagesImage>
    OsType string
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    Region string
    Image region
    ServiceName string
    Public cloud project ID
    FlavorType string
    Get compatible images with flavor type
    Id string
    The provider-assigned unique ID for this managed resource.
    Images []GetImagesImage
    OsType string
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    Region string
    Image region
    ServiceName string
    Public cloud project ID
    flavorType String
    Get compatible images with flavor type
    id String
    The provider-assigned unique ID for this managed resource.
    images List<GetImagesImage>
    osType String
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region String
    Image region
    serviceName String
    Public cloud project ID
    flavorType string
    Get compatible images with flavor type
    id string
    The provider-assigned unique ID for this managed resource.
    images GetImagesImage[]
    osType string
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region string
    Image region
    serviceName string
    Public cloud project ID
    flavor_type str
    Get compatible images with flavor type
    id str
    The provider-assigned unique ID for this managed resource.
    images Sequence[cloudproject.GetImagesImage]
    os_type str
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region str
    Image region
    service_name str
    Public cloud project ID
    flavorType String
    Get compatible images with flavor type
    id String
    The provider-assigned unique ID for this managed resource.
    images List<Property Map>
    osType String
    Image OS (Allowed values: baremetal-linux ┃ bsd ┃ linux ┃ windows)
    region String
    Image region
    serviceName String
    Public cloud project ID

    Supporting Types

    GetImagesImage

    CreationDate string
    Image creation date
    FlavorType string
    Image usable only for this type of flavor if not null
    Id 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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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