import * as pulumi from "@pulumi/pulumi"; /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const test = new azure.core.ResourceGroup("test", { * name: "testrg", * location: "West Europe", * }); * const testManagedDisk = new azure.compute.ManagedDisk("test", { * name: "tst-disk-export", * location: test.location, * resourceGroupName: test.name, * storageAccountType: "Standard_LRS", * createOption: "Empty", * diskSizeGb: 1, * }); * const testManagedDiskSasToken = new azure.compute.ManagedDiskSasToken("test", { * managedDiskId: testManagedDisk.id, * durationInSeconds: 300, * accessLevel: "Read", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Compute` - 2023-04-02 * * ## Import * * Disk SAS Token can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:compute/managedDiskSasToken:ManagedDiskSasToken example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/disks/manageddisk1 * ``` */ export declare class ManagedDiskSasToken extends pulumi.CustomResource { /** * Get an existing ManagedDiskSasToken resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ManagedDiskSasTokenState, opts?: pulumi.CustomResourceOptions): ManagedDiskSasToken; /** * Returns true if the given object is an instance of ManagedDiskSasToken. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ManagedDiskSasToken; /** * 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](https://docs.microsoft.com/rest/api/compute/disks/grant-access) * for additional details on the fields above. */ readonly accessLevel: pulumi.Output; /** * The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created. */ readonly durationInSeconds: pulumi.Output; /** * The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created. */ readonly managedDiskId: pulumi.Output; /** * The computed Shared Access Signature (SAS) of the Managed Disk. */ readonly sasUrl: pulumi.Output; /** * Create a ManagedDiskSasToken resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ManagedDiskSasTokenArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ManagedDiskSasToken resources. */ export interface ManagedDiskSasTokenState { /** * 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](https://docs.microsoft.com/rest/api/compute/disks/grant-access) * for additional details on the fields above. */ accessLevel?: pulumi.Input; /** * The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created. */ durationInSeconds?: pulumi.Input; /** * The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created. */ managedDiskId?: pulumi.Input; /** * The computed Shared Access Signature (SAS) of the Managed Disk. */ sasUrl?: pulumi.Input; } /** * The set of arguments for constructing a ManagedDiskSasToken resource. */ export interface ManagedDiskSasTokenArgs { /** * 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](https://docs.microsoft.com/rest/api/compute/disks/grant-access) * for additional details on the fields above. */ accessLevel: pulumi.Input; /** * The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created. */ durationInSeconds: pulumi.Input; /** * The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created. */ managedDiskId: pulumi.Input; }