DiskArgs

data class DiskArgs(val diskBlobName: Output<String>? = null, val diskSizeGiB: Output<Int>? = null, val diskType: Output<Either<String, StorageType>>? = null, val diskUri: Output<String>? = null, val hostCaching: Output<String>? = null, val labName: Output<String>? = null, val leasedByLabVmId: Output<String>? = null, val location: Output<String>? = null, val managedDiskId: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val storageAccountId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val userName: Output<String>? = null) : ConvertibleToJava<DiskArgs>

A Disk. Uses Azure REST API version 2018-09-15. In version 1.x of the Azure Native provider, it used API version 2018-09-15.

Example Usage

Disks_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var disk = new AzureNative.DevTestLab.Disk("disk", new()
{
DiskSizeGiB = 1023,
DiskType = AzureNative.DevTestLab.StorageType.Standard,
LabName = "{labName}",
LeasedByLabVmId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName",
Name = "{diskName}",
ResourceGroupName = "resourceGroupName",
UserName = "{userId}",
});
});
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewDisk(ctx, "disk", &devtestlab.DiskArgs{
DiskSizeGiB: pulumi.Int(1023),
DiskType: pulumi.String(devtestlab.StorageTypeStandard),
LabName: pulumi.String("{labName}"),
LeasedByLabVmId: pulumi.String("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName"),
Name: pulumi.String("{diskName}"),
ResourceGroupName: pulumi.String("resourceGroupName"),
UserName: pulumi.String("{userId}"),
})
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.azurenative.devtestlab.Disk;
import com.pulumi.azurenative.devtestlab.DiskArgs;
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 disk = new Disk("disk", DiskArgs.builder()
.diskSizeGiB(1023)
.diskType("Standard")
.labName("{labName}")
.leasedByLabVmId("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName")
.name("{diskName}")
.resourceGroupName("resourceGroupName")
.userName("{userId}")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:devtestlab:Disk {diskName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}

Constructors

Link copied to clipboard
constructor(diskBlobName: Output<String>? = null, diskSizeGiB: Output<Int>? = null, diskType: Output<Either<String, StorageType>>? = null, diskUri: Output<String>? = null, hostCaching: Output<String>? = null, labName: Output<String>? = null, leasedByLabVmId: Output<String>? = null, location: Output<String>? = null, managedDiskId: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, storageAccountId: Output<String>? = null, tags: Output<Map<String, String>>? = null, userName: Output<String>? = null)

Properties

Link copied to clipboard
val diskBlobName: Output<String>? = null

When backed by a blob, the name of the VHD blob without extension.

Link copied to clipboard
val diskSizeGiB: Output<Int>? = null

The size of the disk in Gibibytes.

Link copied to clipboard
val diskType: Output<Either<String, StorageType>>? = null

The storage type for the disk (i.e. Standard, Premium).

Link copied to clipboard
val diskUri: Output<String>? = null

When backed by a blob, the URI of underlying blob.

Link copied to clipboard
val hostCaching: Output<String>? = null

The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite).

Link copied to clipboard
val labName: Output<String>? = null

The name of the lab.

Link copied to clipboard
val leasedByLabVmId: Output<String>? = null

The resource ID of the VM to which this disk is leased.

Link copied to clipboard
val location: Output<String>? = null

The location of the resource.

Link copied to clipboard
val managedDiskId: Output<String>? = null

When backed by managed disk, this is the ID of the compute disk resource.

Link copied to clipboard
val name: Output<String>? = null

The name of the disk.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val storageAccountId: Output<String>? = null

When backed by a blob, the storage account where the blob is.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

The tags of the resource.

Link copied to clipboard
val userName: Output<String>? = null

The name of the user profile.

Functions

Link copied to clipboard
open override fun toJava(): DiskArgs