Scaleway

v1.1.0 published on Saturday, Sep 17, 2022 by lbrlabs

getMarketplaceImage

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

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

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.GetMarketplaceImage(ctx, &GetMarketplaceImageArgs{
			Label: "ubuntu_focal",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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_focal")
            .build());

    }
}
import pulumi
import pulumi_scaleway as scaleway

my_image = scaleway.get_marketplace_image(label="ubuntu_focal")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

const myImage = pulumi.output(scaleway.getMarketplaceImage({
    label: "ubuntu_focal",
}));
variables:
  myImage:
    Fn::Invoke:
      Function: scaleway:getMarketplaceImage
      Arguments:
        label: ubuntu_focal

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

> 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)
}
public static CompletableFuture<GetMarketplaceImageResult> getMarketplaceImage(GetMarketplaceImageArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: scaleway:index/getMarketplaceImage:getMarketplaceImage
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Label string

Exact label of the desired image. You can use this endpoint to find the right label.

InstanceType string

The instance type the image is compatible with. You find all the available types on the pricing page.

Zone string

zone) The zone in which the image exists.

Label string

Exact label of the desired image. You can use this endpoint to find the right label.

InstanceType string

The instance type the image is compatible with. You find all the available types on the pricing page.

Zone string

zone) The zone in which the image exists.

label String

Exact label of the desired image. You can use this endpoint to find the right label.

instanceType String

The instance type the image is compatible with. You find all the available types on the pricing page.

zone String

zone) The zone in which the image exists.

label string

Exact label of the desired image. You can use this endpoint to find the right label.

instanceType string

The instance type the image is compatible with. You find all the available types on the pricing page.

zone string

zone) The zone in which the image exists.

label str

Exact label of the desired image. You can use this endpoint to find the right label.

instance_type str

The instance type the image is compatible with. You find all the available types on the pricing page.

zone str

zone) The zone in which the image exists.

label String

Exact label of the desired image. You can use this endpoint to find the right label.

instanceType String

The instance type the image is compatible with. You find all the available types on the pricing page.

zone 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
InstanceType string
Id string

The provider-assigned unique ID for this managed resource.

Label string
Zone string
InstanceType string
id String

The provider-assigned unique ID for this managed resource.

label String
zone String
instanceType String
id string

The provider-assigned unique ID for this managed resource.

label string
zone string
instanceType string
id str

The provider-assigned unique ID for this managed resource.

label str
zone str
instance_type str
id String

The provider-assigned unique ID for this managed resource.

label String
zone String
instanceType String

Package Details

Repository
https://github.com/lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.