Managed Disk Sas Token Args
data class ManagedDiskSasTokenArgs(val accessLevel: Output<String>? = null, val durationInSeconds: Output<Int>? = null, val managedDiskId: Output<String>? = null) : ConvertibleToJava<ManagedDiskSasTokenArgs>
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Constructors
Link copied to clipboard
fun ManagedDiskSasTokenArgs(accessLevel: Output<String>? = null, durationInSeconds: Output<Int>? = null, managedDiskId: Output<String>? = null)
Functions
Properties
Link copied to clipboard
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.