FileShare

class FileShare : KotlinCustomResource

Properties of the file share, including Id, resource name, resource type, Etag. API Version: 2021-02-01.

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 = "NFS",
ResourceGroupName = "res346",
ShareName = "share1235",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage"
"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("NFS"),
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"
"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 = "Hot",
AccountName = "sto666",
ResourceGroupName = "res346",
ShareName = "share1235",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage"
"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("Hot"),
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());
}
}

Import

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

$ pulumi import azure-native:storage:FileShare share1235 /subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235

Properties

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

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

Link copied to clipboard

Indicates the last modification time for share access tier.

Link copied to clipboard

Indicates if there is a pending transition for access tier.

Link copied to clipboard
val deleted: Output<Boolean>

Indicates whether the share was deleted.

Link copied to clipboard
val deletedTime: Output<String>

The deleted time if the share was deleted.

Link copied to clipboard
val enabledProtocols: Output<String>?

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

Link copied to clipboard
val etag: Output<String>

Resource Etag.

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

Returns the date and time the share was last modified.

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

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

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Remaining retention days for share that was soft deleted.

Link copied to clipboard
val rootSquash: Output<String>?

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

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

The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.

Link copied to clipboard
val shareUsageBytes: Output<Double>

The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.

Link copied to clipboard
val snapshotTime: Output<String>

Creation time of share snapshot returned in the response of list shares with expand param "snapshots".

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

The version of the share.