FileShareArgs

data class FileShareArgs(val accessTier: Output<Either<String, ShareAccessTier>>? = null, val accountName: Output<String>? = null, val enabledProtocols: Output<Either<String, EnabledProtocols>>? = null, val expand: Output<String>? = null, val fileSharePaidBursting: Output<FileSharePropertiesFileSharePaidBurstingArgs>? = null, val metadata: Output<Map<String, String>>? = null, val provisionedBandwidthMibps: Output<Int>? = null, val provisionedIops: Output<Int>? = null, val resourceGroupName: Output<String>? = null, val rootSquash: Output<Either<String, RootSquashType>>? = null, val shareName: Output<String>? = null, val shareQuota: Output<Int>? = null, val signedIdentifiers: Output<List<SignedIdentifierArgs>>? = null) : ConvertibleToJava<FileShareArgs>

Properties of the file share, including Id, resource name, resource type, Etag. Uses Azure REST API version 2024-01-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01. Other available API versions: 2022-09-01, 2023-01-01, 2023-04-01, 2023-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native storage [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create NFS Shares

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var fileShare = new AzureNative.Storage.FileShare("fileShare", new()
{
AccountName = "sto666",
EnabledProtocols = AzureNative.Storage.EnabledProtocols.NFS,
ResourceGroupName = "res346",
ShareName = "share1235",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewFileShare(ctx, "fileShare", &storage.FileShareArgs{
AccountName: pulumi.String("sto666"),
EnabledProtocols: pulumi.String(storage.EnabledProtocolsNFS),
ResourceGroupName: pulumi.String("res346"),
ShareName: pulumi.String("share1235"),
})
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.storage.FileShare;
import com.pulumi.azurenative.storage.FileShareArgs;
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 fileShare = new FileShare("fileShare", FileShareArgs.builder()
.accountName("sto666")
.enabledProtocols("NFS")
.resourceGroupName("res346")
.shareName("share1235")
.build());
}
}

PutShares

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var fileShare = new AzureNative.Storage.FileShare("fileShare", new()
{
AccountName = "sto328",
ResourceGroupName = "res3376",
ShareName = "share6185",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewFileShare(ctx, "fileShare", &storage.FileShareArgs{
AccountName: pulumi.String("sto328"),
ResourceGroupName: pulumi.String("res3376"),
ShareName: pulumi.String("share6185"),
})
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.storage.FileShare;
import com.pulumi.azurenative.storage.FileShareArgs;
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 fileShare = new FileShare("fileShare", FileShareArgs.builder()
.accountName("sto328")
.resourceGroupName("res3376")
.shareName("share6185")
.build());
}
}

PutShares with Access Tier

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var fileShare = new AzureNative.Storage.FileShare("fileShare", new()
{
AccessTier = AzureNative.Storage.ShareAccessTier.Hot,
AccountName = "sto666",
ResourceGroupName = "res346",
ShareName = "share1235",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewFileShare(ctx, "fileShare", &storage.FileShareArgs{
AccessTier: pulumi.String(storage.ShareAccessTierHot),
AccountName: pulumi.String("sto666"),
ResourceGroupName: pulumi.String("res346"),
ShareName: pulumi.String("share1235"),
})
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.storage.FileShare;
import com.pulumi.azurenative.storage.FileShareArgs;
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 fileShare = new FileShare("fileShare", FileShareArgs.builder()
.accessTier("Hot")
.accountName("sto666")
.resourceGroupName("res346")
.shareName("share1235")
.build());
}
}

PutShares with Paid Bursting

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var fileShare = new AzureNative.Storage.FileShare("fileShare", new()
{
AccountName = "sto666",
FileSharePaidBursting = new AzureNative.Storage.Inputs.FileSharePropertiesFileSharePaidBurstingArgs
{
PaidBurstingEnabled = true,
PaidBurstingMaxBandwidthMibps = 10340,
PaidBurstingMaxIops = 102400,
},
ResourceGroupName = "res346",
ShareName = "share1235",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewFileShare(ctx, "fileShare", &storage.FileShareArgs{
AccountName: pulumi.String("sto666"),
FileSharePaidBursting: &storage.FileSharePropertiesFileSharePaidBurstingArgs{
PaidBurstingEnabled: pulumi.Bool(true),
PaidBurstingMaxBandwidthMibps: pulumi.Int(10340),
PaidBurstingMaxIops: pulumi.Int(102400),
},
ResourceGroupName: pulumi.String("res346"),
ShareName: pulumi.String("share1235"),
})
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.storage.FileShare;
import com.pulumi.azurenative.storage.FileShareArgs;
import com.pulumi.azurenative.storage.inputs.FileSharePropertiesFileSharePaidBurstingArgs;
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 fileShare = new FileShare("fileShare", FileShareArgs.builder()
.accountName("sto666")
.fileSharePaidBursting(FileSharePropertiesFileSharePaidBurstingArgs.builder()
.paidBurstingEnabled(true)
.paidBurstingMaxBandwidthMibps(10340)
.paidBurstingMaxIops(102400)
.build())
.resourceGroupName("res346")
.shareName("share1235")
.build());
}
}

PutSharesProvisionedV2

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var fileShare = new AzureNative.Storage.FileShare("fileShare", new()
{
AccountName = "sto666",
ProvisionedBandwidthMibps = 200,
ProvisionedIops = 5000,
ResourceGroupName = "res346",
ShareName = "share1235",
ShareQuota = 100,
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewFileShare(ctx, "fileShare", &storage.FileShareArgs{
AccountName: pulumi.String("sto666"),
ProvisionedBandwidthMibps: pulumi.Int(200),
ProvisionedIops: pulumi.Int(5000),
ResourceGroupName: pulumi.String("res346"),
ShareName: pulumi.String("share1235"),
ShareQuota: pulumi.Int(100),
})
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.storage.FileShare;
import com.pulumi.azurenative.storage.FileShareArgs;
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 fileShare = new FileShare("fileShare", FileShareArgs.builder()
.accountName("sto666")
.provisionedBandwidthMibps(200)
.provisionedIops(5000)
.resourceGroupName("res346")
.shareName("share1235")
.shareQuota(100)
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:storage:FileShare share1235 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}

Constructors

Link copied to clipboard
constructor(accessTier: Output<Either<String, ShareAccessTier>>? = null, accountName: Output<String>? = null, enabledProtocols: Output<Either<String, EnabledProtocols>>? = null, expand: Output<String>? = null, fileSharePaidBursting: Output<FileSharePropertiesFileSharePaidBurstingArgs>? = null, metadata: Output<Map<String, String>>? = null, provisionedBandwidthMibps: Output<Int>? = null, provisionedIops: Output<Int>? = null, resourceGroupName: Output<String>? = null, rootSquash: Output<Either<String, RootSquashType>>? = null, shareName: Output<String>? = null, shareQuota: Output<Int>? = null, signedIdentifiers: Output<List<SignedIdentifierArgs>>? = null)

Properties

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

Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.

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

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

Link copied to clipboard
val enabledProtocols: Output<Either<String, EnabledProtocols>>? = null

The authentication protocol that is used for the file share. Can only be specified when creating a share.

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

Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string with delimiter ','

Link copied to clipboard

File Share Paid Bursting properties.

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

A name-value pair to associate with the share as metadata.

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

The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth.

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

The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS.

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

The name of the resource group within the user's subscription. The name is case insensitive.

Link copied to clipboard
val rootSquash: Output<Either<String, RootSquashType>>? = null

The property is for NFS share only. The default is NoRootSquash.

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

The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

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

The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size.

Link copied to clipboard

List of stored access policies specified on the share.

Functions

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