1. Packages
  2. Scaleway
  3. API Docs
  4. getMarketplaceImage
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.getMarketplaceImage

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

Gets local image ID of an image from its label name.

Example Usage

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

const myImage = scaleway.getMarketplaceImage({
    label: "ubuntu_jammy",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

my_image = scaleway.get_marketplace_image(label="ubuntu_jammy")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.GetMarketplaceImage(ctx, &scaleway.GetMarketplaceImageArgs{
			Label: "ubuntu_jammy",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    var myImage = Scaleway.GetMarketplaceImage.Invoke(new()
    {
        Label = "ubuntu_jammy",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetMarketplaceImageArgs;
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 myImage = ScalewayFunctions.getMarketplaceImage(GetMarketplaceImageArgs.builder()
            .label("ubuntu_jammy")
            .build());

    }
}
Copy
variables:
  myImage:
    fn::invoke:
      function: scaleway:getMarketplaceImage
      arguments:
        label: ubuntu_jammy
Copy

Using getMarketplaceImage

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 getMarketplaceImage(args: GetMarketplaceImageArgs, opts?: InvokeOptions): Promise<GetMarketplaceImageResult>
function getMarketplaceImageOutput(args: GetMarketplaceImageOutputArgs, opts?: InvokeOptions): Output<GetMarketplaceImageResult>
Copy
def get_marketplace_image(image_type: Optional[str] = None,
                          instance_type: Optional[str] = None,
                          label: Optional[str] = None,
                          zone: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetMarketplaceImageResult
def get_marketplace_image_output(image_type: Optional[pulumi.Input[str]] = None,
                          instance_type: Optional[pulumi.Input[str]] = None,
                          label: Optional[pulumi.Input[str]] = None,
                          zone: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetMarketplaceImageResult]
Copy
func GetMarketplaceImage(ctx *Context, args *GetMarketplaceImageArgs, opts ...InvokeOption) (*GetMarketplaceImageResult, error)
func GetMarketplaceImageOutput(ctx *Context, args *GetMarketplaceImageOutputArgs, opts ...InvokeOption) GetMarketplaceImageResultOutput
Copy

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

public static class GetMarketplaceImage 
{
    public static Task<GetMarketplaceImageResult> InvokeAsync(GetMarketplaceImageArgs args, InvokeOptions? opts = null)
    public static Output<GetMarketplaceImageResult> Invoke(GetMarketplaceImageInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMarketplaceImageResult> getMarketplaceImage(GetMarketplaceImageArgs args, InvokeOptions options)
public static Output<GetMarketplaceImageResult> getMarketplaceImage(GetMarketplaceImageArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getMarketplaceImage:getMarketplaceImage
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Label This property is required. string
Exact label of the desired image. You can use this endpoint to find the right label.
ImageType string
The local image type, instance_local or instance_sbs.
InstanceType string
The instance type the image is compatible with. You find all the available types on the pricing page.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the image exists.
Label This property is required. string
Exact label of the desired image. You can use this endpoint to find the right label.
ImageType string
The local image type, instance_local or instance_sbs.
InstanceType string
The instance type the image is compatible with. You find all the available types on the pricing page.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the image exists.
label This property is required. String
Exact label of the desired image. You can use this endpoint to find the right label.
imageType String
The local image type, instance_local or instance_sbs.
instanceType String
The instance type the image is compatible with. You find all the available types on the pricing page.
zone Changes to this property will trigger replacement. String
zone) The zone in which the image exists.
label This property is required. string
Exact label of the desired image. You can use this endpoint to find the right label.
imageType string
The local image type, instance_local or instance_sbs.
instanceType string
The instance type the image is compatible with. You find all the available types on the pricing page.
zone Changes to this property will trigger replacement. string
zone) The zone in which the image exists.
label This property is required. str
Exact label of the desired image. You can use this endpoint to find the right label.
image_type str
The local image type, instance_local or instance_sbs.
instance_type str
The instance type the image is compatible with. You find all the available types on the pricing page.
zone Changes to this property will trigger replacement. str
zone) The zone in which the image exists.
label This property is required. String
Exact label of the desired image. You can use this endpoint to find the right label.
imageType String
The local image type, instance_local or instance_sbs.
instanceType String
The instance type the image is compatible with. You find all the available types on the pricing page.
zone Changes to this property will trigger replacement. String
zone) The zone in which the image exists.

getMarketplaceImage Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Label string
Zone string
ImageType string
InstanceType string
Id string
The provider-assigned unique ID for this managed resource.
Label string
Zone string
ImageType string
InstanceType string
id String
The provider-assigned unique ID for this managed resource.
label String
zone String
imageType String
instanceType String
id string
The provider-assigned unique ID for this managed resource.
label string
zone string
imageType string
instanceType string
id str
The provider-assigned unique ID for this managed resource.
label str
zone str
image_type str
instance_type str
id String
The provider-assigned unique ID for this managed resource.
label String
zone String
imageType String
instanceType String

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse