Custom Image Args
data class CustomImageArgs(val author: Output<String>? = null, val customImagePlan: Output<CustomImagePropertiesFromPlanArgs>? = null, val dataDiskStorageInfo: Output<List<DataDiskStorageTypeInfoArgs>>? = null, val description: Output<String>? = null, val isPlanAuthorized: Output<Boolean>? = null, val labName: Output<String>? = null, val location: Output<String>? = null, val managedImageId: Output<String>? = null, val managedSnapshotId: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vhd: Output<CustomImagePropertiesCustomArgs>? = null, val vm: Output<CustomImagePropertiesFromVmArgs>? = null) : ConvertibleToJava<CustomImageArgs>
A custom image. Uses Azure REST API version 2018-09-15. In version 2.x of the Azure Native provider, it used API version 2018-09-15.
Example Usage
CustomImages_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var customImage = new AzureNative.DevTestLab.CustomImage("customImage", new()
{
Description = "My Custom Image",
LabName = "{labName}",
Name = "{customImageName}",
ResourceGroupName = "resourceGroupName",
Tags =
{
{ "tagName1", "tagValue1" },
},
Vm = new AzureNative.DevTestLab.Inputs.CustomImagePropertiesFromVmArgs
{
LinuxOsInfo = new AzureNative.DevTestLab.Inputs.LinuxOsInfoArgs
{
LinuxOsState = AzureNative.DevTestLab.LinuxOsState.NonDeprovisioned,
},
SourceVmId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}",
},
});
});
Content copied to clipboard
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewCustomImage(ctx, "customImage", &devtestlab.CustomImageArgs{
Description: pulumi.String("My Custom Image"),
LabName: pulumi.String("{labName}"),
Name: pulumi.String("{customImageName}"),
ResourceGroupName: pulumi.String("resourceGroupName"),
Tags: pulumi.StringMap{
"tagName1": pulumi.String("tagValue1"),
},
Vm: &devtestlab.CustomImagePropertiesFromVmArgs{
LinuxOsInfo: &devtestlab.LinuxOsInfoArgs{
LinuxOsState: pulumi.String(devtestlab.LinuxOsStateNonDeprovisioned),
},
SourceVmId: pulumi.String("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.devtestlab.CustomImage;
import com.pulumi.azurenative.devtestlab.CustomImageArgs;
import com.pulumi.azurenative.devtestlab.inputs.CustomImagePropertiesFromVmArgs;
import com.pulumi.azurenative.devtestlab.inputs.LinuxOsInfoArgs;
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) {
var customImage = new CustomImage("customImage", CustomImageArgs.builder()
.description("My Custom Image")
.labName("{labName}")
.name("{customImageName}")
.resourceGroupName("resourceGroupName")
.tags(Map.of("tagName1", "tagValue1"))
.vm(CustomImagePropertiesFromVmArgs.builder()
.linuxOsInfo(LinuxOsInfoArgs.builder()
.linuxOsState("NonDeprovisioned")
.build())
.sourceVmId("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}")
.build())
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:devtestlab:CustomImage {customImageName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(author: Output<String>? = null, customImagePlan: Output<CustomImagePropertiesFromPlanArgs>? = null, dataDiskStorageInfo: Output<List<DataDiskStorageTypeInfoArgs>>? = null, description: Output<String>? = null, isPlanAuthorized: Output<Boolean>? = null, labName: Output<String>? = null, location: Output<String>? = null, managedImageId: Output<String>? = null, managedSnapshotId: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, vhd: Output<CustomImagePropertiesCustomArgs>? = null, vm: Output<CustomImagePropertiesFromVmArgs>? = null)
Properties
Link copied to clipboard
Storage information about the plan related to this custom image
Link copied to clipboard
Storage information about the data disks present in the custom image
Link copied to clipboard
The description of the custom image.
Link copied to clipboard
Whether or not the custom images underlying offer/plan has been enabled for programmatic deployment
Link copied to clipboard
The Managed Image Id backing the custom image.
Link copied to clipboard
The Managed Snapshot Id backing the custom image.
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
The VHD from which the image is to be created.
Link copied to clipboard
The virtual machine from which the image is to be created.