ManagedDiskSasToken

class ManagedDiskSasToken : KotlinCustomResource

Manages a Disk SAS Token. Use this resource to obtain a Shared Access Signature (SAS Token) for an existing Managed Disk. Shared access signatures allow fine-grained, ephemeral access control to various aspects of Managed Disk similar to blob/storage account container. With the help of this resource, data from the disk can be copied from managed disk to a storage blob or to some other system without the need of azcopy.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.compute.ManagedDisk;
import com.pulumi.azure.compute.ManagedDiskArgs;
import com.pulumi.azure.compute.ManagedDiskSasToken;
import com.pulumi.azure.compute.ManagedDiskSasTokenArgs;
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 testResourceGroup = new ResourceGroup("testResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var testManagedDisk = new ManagedDisk("testManagedDisk", ManagedDiskArgs.builder()
.location(testResourceGroup.location())
.resourceGroupName(testResourceGroup.name())
.storageAccountType("Standard_LRS")
.createOption("Empty")
.diskSizeGb("1")
.build());
var testManagedDiskSasToken = new ManagedDiskSasToken("testManagedDiskSasToken", ManagedDiskSasTokenArgs.builder()
.managedDiskId(testManagedDisk.id())
.durationInSeconds(300)
.accessLevel("Read")
.build());
}
}

Import

Disk SAS Token can be imported using the resource id, e.g.

$ pulumi import azure:compute/managedDiskSasToken:ManagedDiskSasToken example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/disks/manageddisk1

Properties

Link copied to clipboard
val accessLevel: Output<String>

The level of access required on the disk. Supported are Read, Write. Changing this forces a new resource to be created. Refer to the SAS creation reference from Azure for additional details on the fields above.

Link copied to clipboard
val durationInSeconds: Output<Int>

The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created.

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

The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created.

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

The computed Shared Access Signature (SAS) of the Managed Disk.

Link copied to clipboard
val urn: Output<String>