ShareArgs

data class ShareArgs(val accessTier: Output<String>? = null, val acls: Output<List<ShareAclArgs>>? = null, val enabledProtocol: Output<String>? = null, val metadata: Output<Map<String, String>>? = null, val name: Output<String>? = null, val quota: Output<Int>? = null, val storageAccountName: Output<String>? = null) : ConvertibleToJava<ShareArgs>

Manages a File Share within Azure Storage.

Note: The storage share supports two storage tiers: premium and standard. Standard file shares are created in general purpose (GPv1 or GPv2) storage accounts and premium file shares are created in FileStorage storage accounts. For further information, refer to the section "What storage tiers are supported in Azure Files?" of documentation.

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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Share;
import com.pulumi.azure.storage.ShareArgs;
import com.pulumi.azure.storage.inputs.ShareAclArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.storageAccountName(exampleAccount.name())
.quota(50)
.acls(ShareAclArgs.builder()
.id("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI")
.accessPolicies(ShareAclAccessPolicyArgs.builder()
.permissions("rwdl")
.start("2019-07-02T09:38:21.0000000Z")
.expiry("2019-07-02T10:38:21.0000000Z")
.build())
.build())
.build());
}
}

Import

Storage Shares can be imported using the resource id, e.g.

$ pulumi import azure:storage/share:Share exampleShare https://account1.file.core.windows.net/share1

Constructors

Link copied to clipboard
fun ShareArgs(accessTier: Output<String>? = null, acls: Output<List<ShareAclArgs>>? = null, enabledProtocol: Output<String>? = null, metadata: Output<Map<String, String>>? = null, name: Output<String>? = null, quota: Output<Int>? = null, storageAccountName: Output<String>? = null)

Functions

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

Properties

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

The access tier of the File Share. Possible values are Hot, Cool and TransactionOptimized, Premium. ~>NOTE: The FileStorage account_kind of the azure.storage.Account requires Premium access_tier.

Link copied to clipboard
val acls: Output<List<ShareAclArgs>>? = null

One or more acl blocks as defined below.

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

The protocol used for the share. Possible values are SMB and NFS. The SMB indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The NFS indicates the share can be accessed by NFSv4.1. Defaults to SMB. Changing this forces a new resource to be created. ~>NOTE: The Premium SKU of the azure.storage.Account is required for the NFS protocol.

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

A mapping of MetaData for this File Share.

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

The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.

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

The maximum size of the share, in gigabytes. ~>NOTE: For Standard storage accounts, by default this must be 1 GB (or higher) and at most 5120 GB (5 TB). This can be set to a value larger than 5120 GB if large_file_share_enabled is set to true in the parent azure.storage.Account. ~>NOTE: For Premium FileStorage storage accounts, this must be greater than 100 GB and at most 102400 GB (100 TB).

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

Specifies the storage account in which to create the share. Changing this forces a new resource to be created.