Disk

class Disk : KotlinCustomResource

A Disk. 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

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/v3"
"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}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val createdDate: Output<String>

The creation date of the disk.

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

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

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

The size of the disk in Gibibytes.

Link copied to clipboard
val diskType: Output<String>?

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

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

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

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

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

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

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

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

The location of the resource.

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

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

Link copied to clipboard
val name: Output<String>

The name of the resource.

Link copied to clipboard

The provisioning status of the resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val storageAccountId: Output<String>?

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

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

The tags of the resource.

Link copied to clipboard
val type: Output<String>

The type of the resource.

Link copied to clipboard

The unique immutable identifier of a resource (Guid).

Link copied to clipboard
val urn: Output<String>