1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getImage
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

edgecenter.getImage

Explore with Pulumi AI

edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

A cloud image is a pre-configured virtual machine template that you can use to create new instances.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";

const pr = edgecenter.getProject({
    name: "test",
});
const rg = edgecenter.getRegion({
    name: "ED-10 Preprod",
});
const ubuntu = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getImage({
    name: "ubuntu-20.04",
    regionId: rg.id,
    projectId: pr.id,
}));
export const view = ubuntu;
Copy
import pulumi
import pulumi_edgecenter as edgecenter

pr = edgecenter.get_project(name="test")
rg = edgecenter.get_region(name="ED-10 Preprod")
ubuntu = edgecenter.get_image(name="ubuntu-20.04",
    region_id=rg.id,
    project_id=pr.id)
pulumi.export("view", ubuntu)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
			Name: pulumi.StringRef("test"),
		}, nil)
		if err != nil {
			return err
		}
		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
			Name: "ED-10 Preprod",
		}, nil)
		if err != nil {
			return err
		}
		ubuntu, err := edgecenter.GetImage(ctx, &edgecenter.GetImageArgs{
			Name:      pulumi.StringRef("ubuntu-20.04"),
			RegionId:  pulumi.Float64Ref(rg.Id),
			ProjectId: pulumi.Float64Ref(pr.Id),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("view", ubuntu)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;

return await Deployment.RunAsync(() => 
{
    var pr = Edgecenter.GetProject.Invoke(new()
    {
        Name = "test",
    });

    var rg = Edgecenter.GetRegion.Invoke(new()
    {
        Name = "ED-10 Preprod",
    });

    var ubuntu = Edgecenter.GetImage.Invoke(new()
    {
        Name = "ubuntu-20.04",
        RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
        ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
    });

    return new Dictionary<string, object?>
    {
        ["view"] = ubuntu,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetProjectArgs;
import com.pulumi.edgecenter.inputs.GetRegionArgs;
import com.pulumi.edgecenter.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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
            .name("test")
            .build());

        final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
            .name("ED-10 Preprod")
            .build());

        final var ubuntu = EdgecenterFunctions.getImage(GetImageArgs.builder()
            .name("ubuntu-20.04")
            .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
            .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
            .build());

        ctx.export("view", ubuntu.applyValue(getImageResult -> getImageResult));
    }
}
Copy
variables:
  pr:
    fn::invoke:
      function: edgecenter:getProject
      arguments:
        name: test
  rg:
    fn::invoke:
      function: edgecenter:getRegion
      arguments:
        name: ED-10 Preprod
  ubuntu:
    fn::invoke:
      function: edgecenter:getImage
      arguments:
        name: ubuntu-20.04
        regionId: ${rg.id}
        projectId: ${pr.id}
outputs:
  view: ${ubuntu}
Copy

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>
Copy
def get_image(id: Optional[str] = None,
              is_baremetal: Optional[bool] = None,
              metadata_k: Optional[str] = None,
              metadata_kv: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None,
              project_id: Optional[float] = None,
              project_name: Optional[str] = None,
              region_id: Optional[float] = None,
              region_name: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetImageResult
def get_image_output(id: Optional[pulumi.Input[str]] = None,
              is_baremetal: Optional[pulumi.Input[bool]] = None,
              metadata_k: Optional[pulumi.Input[str]] = None,
              metadata_kv: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              name: Optional[pulumi.Input[str]] = None,
              project_id: Optional[pulumi.Input[float]] = None,
              project_name: Optional[pulumi.Input[str]] = None,
              region_id: Optional[pulumi.Input[float]] = None,
              region_name: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]
Copy
func GetImage(ctx *Context, args *GetImageArgs, opts ...InvokeOption) (*GetImageResult, error)
func GetImageOutput(ctx *Context, args *GetImageOutputArgs, opts ...InvokeOption) GetImageResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
public static Output<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: edgecenter:index/getImage:getImage
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
The ID of the image. Either 'id' or 'name' must be specified.
IsBaremetal bool
Set to true if need to get the baremetal image.
MetadataK string
Filtration query opts (only key).
MetadataKv Dictionary<string, string>
Filtration query opts, for example, {offset = "10", limit = "10"}.
Name string
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
Id string
The ID of the image. Either 'id' or 'name' must be specified.
IsBaremetal bool
Set to true if need to get the baremetal image.
MetadataK string
Filtration query opts (only key).
MetadataKv map[string]string
Filtration query opts, for example, {offset = "10", limit = "10"}.
Name string
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
id String
The ID of the image. Either 'id' or 'name' must be specified.
isBaremetal Boolean
Set to true if need to get the baremetal image.
metadataK String
Filtration query opts (only key).
metadataKv Map<String,String>
Filtration query opts, for example, {offset = "10", limit = "10"}.
name String
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
id string
The ID of the image. Either 'id' or 'name' must be specified.
isBaremetal boolean
Set to true if need to get the baremetal image.
metadataK string
Filtration query opts (only key).
metadataKv {[key: string]: string}
Filtration query opts, for example, {offset = "10", limit = "10"}.
name string
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
id str
The ID of the image. Either 'id' or 'name' must be specified.
is_baremetal bool
Set to true if need to get the baremetal image.
metadata_k str
Filtration query opts (only key).
metadata_kv Mapping[str, str]
Filtration query opts, for example, {offset = "10", limit = "10"}.
name str
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
id String
The ID of the image. Either 'id' or 'name' must be specified.
isBaremetal Boolean
Set to true if need to get the baremetal image.
metadataK String
Filtration query opts (only key).
metadataKv Map<String>
Filtration query opts, for example, {offset = "10", limit = "10"}.
name String
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.

getImage Result

The following output properties are available:

Description string
A detailed description of the image.
Id string
The ID of the image. Either 'id' or 'name' must be specified.
MetadataReadOnlies List<GetImageMetadataReadOnly>
A list of read-only metadata items, e.g. tags.
MinDisk double
Minimum disk space (in GB) required to launch an instance using this image.
MinRam double
Minimum VM RAM (in MB) required to launch an instance using this image.
Name string
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
OsDistro string
The distribution of the OS present in the image, e.g. Debian, CentOS, Ubuntu etc.
OsVersion string
The version of the OS present in the image. e.g. 19.04 (for Ubuntu) or 9.4 for Debian.
IsBaremetal bool
Set to true if need to get the baremetal image.
MetadataK string
Filtration query opts (only key).
MetadataKv Dictionary<string, string>
Filtration query opts, for example, {offset = "10", limit = "10"}.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
Description string
A detailed description of the image.
Id string
The ID of the image. Either 'id' or 'name' must be specified.
MetadataReadOnlies []GetImageMetadataReadOnly
A list of read-only metadata items, e.g. tags.
MinDisk float64
Minimum disk space (in GB) required to launch an instance using this image.
MinRam float64
Minimum VM RAM (in MB) required to launch an instance using this image.
Name string
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
OsDistro string
The distribution of the OS present in the image, e.g. Debian, CentOS, Ubuntu etc.
OsVersion string
The version of the OS present in the image. e.g. 19.04 (for Ubuntu) or 9.4 for Debian.
IsBaremetal bool
Set to true if need to get the baremetal image.
MetadataK string
Filtration query opts (only key).
MetadataKv map[string]string
Filtration query opts, for example, {offset = "10", limit = "10"}.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
description String
A detailed description of the image.
id String
The ID of the image. Either 'id' or 'name' must be specified.
metadataReadOnlies List<GetImageMetadataReadOnly>
A list of read-only metadata items, e.g. tags.
minDisk Double
Minimum disk space (in GB) required to launch an instance using this image.
minRam Double
Minimum VM RAM (in MB) required to launch an instance using this image.
name String
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
osDistro String
The distribution of the OS present in the image, e.g. Debian, CentOS, Ubuntu etc.
osVersion String
The version of the OS present in the image. e.g. 19.04 (for Ubuntu) or 9.4 for Debian.
isBaremetal Boolean
Set to true if need to get the baremetal image.
metadataK String
Filtration query opts (only key).
metadataKv Map<String,String>
Filtration query opts, for example, {offset = "10", limit = "10"}.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
description string
A detailed description of the image.
id string
The ID of the image. Either 'id' or 'name' must be specified.
metadataReadOnlies GetImageMetadataReadOnly[]
A list of read-only metadata items, e.g. tags.
minDisk number
Minimum disk space (in GB) required to launch an instance using this image.
minRam number
Minimum VM RAM (in MB) required to launch an instance using this image.
name string
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
osDistro string
The distribution of the OS present in the image, e.g. Debian, CentOS, Ubuntu etc.
osVersion string
The version of the OS present in the image. e.g. 19.04 (for Ubuntu) or 9.4 for Debian.
isBaremetal boolean
Set to true if need to get the baremetal image.
metadataK string
Filtration query opts (only key).
metadataKv {[key: string]: string}
Filtration query opts, for example, {offset = "10", limit = "10"}.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
description str
A detailed description of the image.
id str
The ID of the image. Either 'id' or 'name' must be specified.
metadata_read_onlies Sequence[GetImageMetadataReadOnly]
A list of read-only metadata items, e.g. tags.
min_disk float
Minimum disk space (in GB) required to launch an instance using this image.
min_ram float
Minimum VM RAM (in MB) required to launch an instance using this image.
name str
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
os_distro str
The distribution of the OS present in the image, e.g. Debian, CentOS, Ubuntu etc.
os_version str
The version of the OS present in the image. e.g. 19.04 (for Ubuntu) or 9.4 for Debian.
is_baremetal bool
Set to true if need to get the baremetal image.
metadata_k str
Filtration query opts (only key).
metadata_kv Mapping[str, str]
Filtration query opts, for example, {offset = "10", limit = "10"}.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
description String
A detailed description of the image.
id String
The ID of the image. Either 'id' or 'name' must be specified.
metadataReadOnlies List<Property Map>
A list of read-only metadata items, e.g. tags.
minDisk Number
Minimum disk space (in GB) required to launch an instance using this image.
minRam Number
Minimum VM RAM (in MB) required to launch an instance using this image.
name String
The name of the image. Use 'os-version', for example 'ubuntu-20.04'. Use only with uniq name. Either 'id' or 'name' must be specified.
osDistro String
The distribution of the OS present in the image, e.g. Debian, CentOS, Ubuntu etc.
osVersion String
The version of the OS present in the image. e.g. 19.04 (for Ubuntu) or 9.4 for Debian.
isBaremetal Boolean
Set to true if need to get the baremetal image.
metadataK String
Filtration query opts (only key).
metadataKv Map<String>
Filtration query opts, for example, {offset = "10", limit = "10"}.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.

Supporting Types

GetImageMetadataReadOnly

Key This property is required. string
ReadOnly This property is required. bool
Value This property is required. string
Key This property is required. string
ReadOnly This property is required. bool
Value This property is required. string
key This property is required. String
readOnly This property is required. Boolean
value This property is required. String
key This property is required. string
readOnly This property is required. boolean
value This property is required. string
key This property is required. str
read_only This property is required. bool
value This property is required. str
key This property is required. String
readOnly This property is required. Boolean
value This property is required. String

Package Details

Repository
edgecenter edge-center/terraform-provider-edgecenter
License
Notes
This Pulumi package is based on the edgecenter Terraform Provider.
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center