FileShare
Properties of the file share, including Id, resource name, resource type, Etag. Latest API Version: 2019-06-01.
Example Usage
Create NFS Shares
using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;
class MyStack : Stack
{
public MyStack()
{
var fileShare = new AzureNextGen.Storage.Latest.FileShare("fileShare", new AzureNextGen.Storage.Latest.FileShareArgs
{
AccountName = "sto666",
EnabledProtocols = "NFS",
ResourceGroupName = "res346",
ShareName = "share1235",
});
}
}
package main
import (
storage "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/storage/latest"
"github.com/pulumi/pulumi/sdk/v2/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
})
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen
file_share = azure_nextgen.storage.latest.FileShare("fileShare",
account_name="sto666",
enabled_protocols="NFS",
resource_group_name="res346",
share_name="share1235")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";
const fileShare = new azure_nextgen.storage.latest.FileShare("fileShare", {
accountName: "sto666",
enabledProtocols: "NFS",
resourceGroupName: "res346",
shareName: "share1235",
});
PutShares
using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;
class MyStack : Stack
{
public MyStack()
{
var fileShare = new AzureNextGen.Storage.Latest.FileShare("fileShare", new AzureNextGen.Storage.Latest.FileShareArgs
{
AccountName = "sto328",
ResourceGroupName = "res3376",
ShareName = "share6185",
});
}
}
package main
import (
storage "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/storage/latest"
"github.com/pulumi/pulumi/sdk/v2/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
})
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen
file_share = azure_nextgen.storage.latest.FileShare("fileShare",
account_name="sto328",
resource_group_name="res3376",
share_name="share6185")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";
const fileShare = new azure_nextgen.storage.latest.FileShare("fileShare", {
accountName: "sto328",
resourceGroupName: "res3376",
shareName: "share6185",
});
PutShares with Access Tier
using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;
class MyStack : Stack
{
public MyStack()
{
var fileShare = new AzureNextGen.Storage.Latest.FileShare("fileShare", new AzureNextGen.Storage.Latest.FileShareArgs
{
AccessTier = "Hot",
AccountName = "sto666",
ResourceGroupName = "res346",
ShareName = "share1235",
});
}
}
package main
import (
storage "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/storage/latest"
"github.com/pulumi/pulumi/sdk/v2/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
})
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen
file_share = azure_nextgen.storage.latest.FileShare("fileShare",
access_tier="Hot",
account_name="sto666",
resource_group_name="res346",
share_name="share1235")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";
const fileShare = new azure_nextgen.storage.latest.FileShare("fileShare", {
accessTier: "Hot",
accountName: "sto666",
resourceGroupName: "res346",
shareName: "share1235",
});
Create a FileShare Resource
new FileShare(name: string, args: FileShareArgs, opts?: CustomResourceOptions);
def FileShare(resource_name: str, opts: Optional[ResourceOptions] = None, access_tier: Optional[Union[str, ShareAccessTier]] = None, account_name: Optional[str] = None, enabled_protocols: Optional[Union[str, EnabledProtocols]] = None, metadata: Optional[Mapping[str, str]] = None, resource_group_name: Optional[str] = None, root_squash: Optional[Union[str, RootSquashType]] = None, share_name: Optional[str] = None, share_quota: Optional[int] = None)
func NewFileShare(ctx *Context, name string, args FileShareArgs, opts ...ResourceOption) (*FileShare, error)
public FileShare(string name, FileShareArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args FileShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FileShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FileShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
FileShare Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The FileShare resource accepts the following input properties:
- Account
Name string - 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.
- Resource
Group stringName - The name of the resource group within the user’s subscription. The name is case insensitive.
- string
- 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.
- Access
Tier string | Pulumi.Azure Next Gen. Storage. Share Access Tier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
- Enabled
Protocols string | Pulumi.Azure Next Gen. Storage. Enabled Protocols - The authentication protocol that is used for the file share. Can only be specified when creating a share.
- Metadata Dictionary<string, string>
- A name-value pair to associate with the share as metadata.
- Root
Squash string | Pulumi.Azure Next Gen. Storage. Root Squash Type - The property is for NFS share only. The default is NoRootSquash.
- 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.
- Account
Name string - 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.
- Resource
Group stringName - The name of the resource group within the user’s subscription. The name is case insensitive.
- string
- 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.
- Access
Tier string | ShareAccess Tier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
- Enabled
Protocols string | EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share.
- Metadata map[string]string
- A name-value pair to associate with the share as metadata.
- Root
Squash string | RootSquash Type - The property is for NFS share only. The default is NoRootSquash.
- 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.
- account
Name string - 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.
- resource
Group stringName - The name of the resource group within the user’s subscription. The name is case insensitive.
- string
- 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.
- access
Tier string | ShareAccess Tier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
- enabled
Protocols string | EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share.
- metadata {[key: string]: string}
- A name-value pair to associate with the share as metadata.
- root
Squash string | RootSquash Type - The property is for NFS share only. The default is NoRootSquash.
- number
- 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.
- account_
name str - 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.
- resource_
group_ strname - The name of the resource group within the user’s subscription. The name is case insensitive.
- str
- 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.
- access_
tier str | ShareAccess Tier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
- enabled_
protocols str | EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share.
- metadata Mapping[str, str]
- A name-value pair to associate with the share as metadata.
- root_
squash str | RootSquash Type - The property is for NFS share only. The default is NoRootSquash.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the FileShare resource produces the following output properties:
- Access
Tier stringChange Time - Indicates the last modification time for share access tier.
- Access
Tier stringStatus - Indicates if there is a pending transition for access tier.
- Deleted bool
- Indicates whether the share was deleted.
- Deleted
Time string - The deleted time if the share was deleted.
- Etag string
- Resource Etag.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - Returns the date and time the share was last modified.
- Name string
- The name of the resource
- Remaining
Retention intDays - Remaining retention days for share that was soft deleted.
- 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.
- Type string
- The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
- Version string
- The version of the share.
- Access
Tier stringChange Time - Indicates the last modification time for share access tier.
- Access
Tier stringStatus - Indicates if there is a pending transition for access tier.
- Deleted bool
- Indicates whether the share was deleted.
- Deleted
Time string - The deleted time if the share was deleted.
- Etag string
- Resource Etag.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - Returns the date and time the share was last modified.
- Name string
- The name of the resource
- Remaining
Retention intDays - Remaining retention days for share that was soft deleted.
- float64
- The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
- Type string
- The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
- Version string
- The version of the share.
- access
Tier stringChange Time - Indicates the last modification time for share access tier.
- access
Tier stringStatus - Indicates if there is a pending transition for access tier.
- deleted boolean
- Indicates whether the share was deleted.
- deleted
Time string - The deleted time if the share was deleted.
- etag string
- Resource Etag.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified stringTime - Returns the date and time the share was last modified.
- name string
- The name of the resource
- remaining
Retention numberDays - Remaining retention days for share that was soft deleted.
- number
- The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
- type string
- The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
- version string
- The version of the share.
- access_
tier_ strchange_ time - Indicates the last modification time for share access tier.
- access_
tier_ strstatus - Indicates if there is a pending transition for access tier.
- deleted bool
- Indicates whether the share was deleted.
- deleted_
time str - The deleted time if the share was deleted.
- etag str
- Resource Etag.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ strtime - Returns the date and time the share was last modified.
- name str
- The name of the resource
- remaining_
retention_ intdays - Remaining retention days for share that was soft deleted.
- float
- The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
- type str
- The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
- version str
- The version of the share.
Supporting Types
EnabledProtocols
- SMB
- SMB
- NFS
- NFS
- Enabled
Protocols SMB - SMB
- Enabled
Protocols NFS - NFS
- SMB
- SMB
- NFS
- NFS
- SMB
- SMB
- NFS
- NFS
RootSquashType
- No
Root Squash - NoRootSquash
- Root
Squash - RootSquash
- All
Squash - AllSquash
- Root
Squash Type No Root Squash - NoRootSquash
- Root
Squash Type Root Squash - RootSquash
- Root
Squash Type All Squash - AllSquash
- No
Root Squash - NoRootSquash
- Root
Squash - RootSquash
- All
Squash - AllSquash
- NO_ROOT_SQUASH
- NoRootSquash
- ROOT_SQUASH
- RootSquash
- ALL_SQUASH
- AllSquash
ShareAccessTier
- Transaction
Optimized - TransactionOptimized
- Hot
- Hot
- Cool
- Cool
- Premium
- Premium
- Share
Access Tier Transaction Optimized - TransactionOptimized
- Share
Access Tier Hot - Hot
- Share
Access Tier Cool - Cool
- Share
Access Tier Premium - Premium
- Transaction
Optimized - TransactionOptimized
- Hot
- Hot
- Cool
- Cool
- Premium
- Premium
- TRANSACTION_OPTIMIZED
- TransactionOptimized
- HOT
- Hot
- COOL
- Cool
- PREMIUM
- Premium
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-nextgen:storage/latest:FileShare share1235 /subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure-nextgen
- License
- Apache-2.0