getPlatformImage

Use this data source to access information about a Platform Image.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.compute.ComputeFunctions;
import com.pulumi.azure.compute.inputs.GetPlatformImageArgs;
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 example = ComputeFunctions.getPlatformImage(GetPlatformImageArgs.builder()
.location("West Europe")
.publisher("Canonical")
.offer("0001-com-ubuntu-server-focal")
.sku("20_04-lts")
.build());
ctx.export("id", example.applyValue(getPlatformImageResult -> getPlatformImageResult.id()));
}
}

Return

A collection of values returned by getPlatformImage.

Parameters

argument

A collection of arguments for invoking getPlatformImage.


suspend fun getPlatformImage(location: String, offer: String, publisher: String, sku: String, version: String? = null): GetPlatformImageResult

Return

A collection of values returned by getPlatformImage.

See also

Parameters

location

Specifies the Location to pull information about this Platform Image from.

offer

Specifies the Offer associated with the Platform Image.

publisher

Specifies the Publisher associated with the Platform Image.

sku

Specifies the SKU of the Platform Image.

version

The version of the Platform Image.


Return

A collection of values returned by getPlatformImage.

See also

Parameters

argument

Builder for com.pulumi.azure.compute.kotlin.inputs.GetPlatformImagePlainArgs.