1. Packages
  2. Azure Classic
  3. API Docs
  4. storage
  5. Share

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.storage.Share

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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.

    Note on Authentication Shared Key authentication will always be used for this resource, as AzureAD authentication is not supported by the Storage API for files.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "azuretest",
        location: "West Europe",
    });
    const exampleAccount = new azure.storage.Account("example", {
        name: "azureteststorage",
        resourceGroupName: example.name,
        location: example.location,
        accountTier: "Standard",
        accountReplicationType: "LRS",
    });
    const exampleShare = new azure.storage.Share("example", {
        name: "sharename",
        storageAccountId: exampleAccount.id,
        quota: 50,
        acls: [{
            id: "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
            accessPolicies: [{
                permissions: "rwdl",
                start: "2019-07-02T09:38:21Z",
                expiry: "2019-07-02T10:38:21Z",
            }],
        }],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="azuretest",
        location="West Europe")
    example_account = azure.storage.Account("example",
        name="azureteststorage",
        resource_group_name=example.name,
        location=example.location,
        account_tier="Standard",
        account_replication_type="LRS")
    example_share = azure.storage.Share("example",
        name="sharename",
        storage_account_id=example_account.id,
        quota=50,
        acls=[{
            "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
            "access_policies": [{
                "permissions": "rwdl",
                "start": "2019-07-02T09:38:21Z",
                "expiry": "2019-07-02T10:38:21Z",
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("azuretest"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
    			Name:                   pulumi.String("azureteststorage"),
    			ResourceGroupName:      example.Name,
    			Location:               example.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("LRS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = storage.NewShare(ctx, "example", &storage.ShareArgs{
    			Name:             pulumi.String("sharename"),
    			StorageAccountId: exampleAccount.ID(),
    			Quota:            pulumi.Int(50),
    			Acls: storage.ShareAclArray{
    				&storage.ShareAclArgs{
    					Id: pulumi.String("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"),
    					AccessPolicies: storage.ShareAclAccessPolicyArray{
    						&storage.ShareAclAccessPolicyArgs{
    							Permissions: pulumi.String("rwdl"),
    							Start:       pulumi.String("2019-07-02T09:38:21Z"),
    							Expiry:      pulumi.String("2019-07-02T10:38:21Z"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "azuretest",
            Location = "West Europe",
        });
    
        var exampleAccount = new Azure.Storage.Account("example", new()
        {
            Name = "azureteststorage",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AccountTier = "Standard",
            AccountReplicationType = "LRS",
        });
    
        var exampleShare = new Azure.Storage.Share("example", new()
        {
            Name = "sharename",
            StorageAccountId = exampleAccount.Id,
            Quota = 50,
            Acls = new[]
            {
                new Azure.Storage.Inputs.ShareAclArgs
                {
                    Id = "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
                    AccessPolicies = new[]
                    {
                        new Azure.Storage.Inputs.ShareAclAccessPolicyArgs
                        {
                            Permissions = "rwdl",
                            Start = "2019-07-02T09:38:21Z",
                            Expiry = "2019-07-02T10:38:21Z",
                        },
                    },
                },
            },
        });
    
    });
    
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("azuretest")
                .location("West Europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("azureteststorage")
                .resourceGroupName(example.name())
                .location(example.location())
                .accountTier("Standard")
                .accountReplicationType("LRS")
                .build());
    
            var exampleShare = new Share("exampleShare", ShareArgs.builder()
                .name("sharename")
                .storageAccountId(exampleAccount.id())
                .quota(50)
                .acls(ShareAclArgs.builder()
                    .id("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI")
                    .accessPolicies(ShareAclAccessPolicyArgs.builder()
                        .permissions("rwdl")
                        .start("2019-07-02T09:38:21Z")
                        .expiry("2019-07-02T10:38:21Z")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: azuretest
          location: West Europe
      exampleAccount:
        type: azure:storage:Account
        name: example
        properties:
          name: azureteststorage
          resourceGroupName: ${example.name}
          location: ${example.location}
          accountTier: Standard
          accountReplicationType: LRS
      exampleShare:
        type: azure:storage:Share
        name: example
        properties:
          name: sharename
          storageAccountId: ${exampleAccount.id}
          quota: 50
          acls:
            - id: MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI
              accessPolicies:
                - permissions: rwdl
                  start: 2019-07-02T09:38:21Z
                  expiry: 2019-07-02T10:38:21Z
    

    Create Share Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Share(name: string, args: ShareArgs, opts?: CustomResourceOptions);
    @overload
    def Share(resource_name: str,
              args: ShareArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Share(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              quota: Optional[int] = None,
              access_tier: Optional[str] = None,
              acls: Optional[Sequence[ShareAclArgs]] = None,
              enabled_protocol: Optional[str] = None,
              metadata: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None,
              storage_account_id: Optional[str] = None,
              storage_account_name: Optional[str] = None)
    func NewShare(ctx *Context, name string, args ShareArgs, opts ...ResourceOption) (*Share, error)
    public Share(string name, ShareArgs args, CustomResourceOptions? opts = null)
    public Share(String name, ShareArgs args)
    public Share(String name, ShareArgs args, CustomResourceOptions options)
    
    type: azure:storage:Share
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ShareArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ShareArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ShareArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ShareArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ShareArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var azureShareResource = new Azure.Storage.Share("azureShareResource", new()
    {
        Quota = 0,
        AccessTier = "string",
        Acls = new[]
        {
            new Azure.Storage.Inputs.ShareAclArgs
            {
                Id = "string",
                AccessPolicies = new[]
                {
                    new Azure.Storage.Inputs.ShareAclAccessPolicyArgs
                    {
                        Permissions = "string",
                        Expiry = "string",
                        Start = "string",
                    },
                },
            },
        },
        EnabledProtocol = "string",
        Metadata = 
        {
            { "string", "string" },
        },
        Name = "string",
        StorageAccountId = "string",
    });
    
    example, err := storage.NewShare(ctx, "azureShareResource", &storage.ShareArgs{
    	Quota:      pulumi.Int(0),
    	AccessTier: pulumi.String("string"),
    	Acls: storage.ShareAclArray{
    		&storage.ShareAclArgs{
    			Id: pulumi.String("string"),
    			AccessPolicies: storage.ShareAclAccessPolicyArray{
    				&storage.ShareAclAccessPolicyArgs{
    					Permissions: pulumi.String("string"),
    					Expiry:      pulumi.String("string"),
    					Start:       pulumi.String("string"),
    				},
    			},
    		},
    	},
    	EnabledProtocol: pulumi.String("string"),
    	Metadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:             pulumi.String("string"),
    	StorageAccountId: pulumi.String("string"),
    })
    
    var azureShareResource = new Share("azureShareResource", ShareArgs.builder()
        .quota(0)
        .accessTier("string")
        .acls(ShareAclArgs.builder()
            .id("string")
            .accessPolicies(ShareAclAccessPolicyArgs.builder()
                .permissions("string")
                .expiry("string")
                .start("string")
                .build())
            .build())
        .enabledProtocol("string")
        .metadata(Map.of("string", "string"))
        .name("string")
        .storageAccountId("string")
        .build());
    
    azure_share_resource = azure.storage.Share("azureShareResource",
        quota=0,
        access_tier="string",
        acls=[{
            "id": "string",
            "access_policies": [{
                "permissions": "string",
                "expiry": "string",
                "start": "string",
            }],
        }],
        enabled_protocol="string",
        metadata={
            "string": "string",
        },
        name="string",
        storage_account_id="string")
    
    const azureShareResource = new azure.storage.Share("azureShareResource", {
        quota: 0,
        accessTier: "string",
        acls: [{
            id: "string",
            accessPolicies: [{
                permissions: "string",
                expiry: "string",
                start: "string",
            }],
        }],
        enabledProtocol: "string",
        metadata: {
            string: "string",
        },
        name: "string",
        storageAccountId: "string",
    });
    
    type: azure:storage:Share
    properties:
        accessTier: string
        acls:
            - accessPolicies:
                - expiry: string
                  permissions: string
                  start: string
              id: string
        enabledProtocol: string
        metadata:
            string: string
        name: string
        quota: 0
        storageAccountId: string
    

    Share Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Share resource accepts the following input properties:

    Quota int

    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).

    AccessTier string

    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.

    Acls List<ShareAcl>
    One or more acl blocks as defined below.
    EnabledProtocol string

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    Metadata Dictionary<string, string>
    A mapping of MetaData for this File Share.
    Name string
    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.
    StorageAccountId string

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    StorageAccountName string
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    Quota int

    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).

    AccessTier string

    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.

    Acls []ShareAclArgs
    One or more acl blocks as defined below.
    EnabledProtocol string

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    Metadata map[string]string
    A mapping of MetaData for this File Share.
    Name string
    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.
    StorageAccountId string

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    StorageAccountName string
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    quota Integer

    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).

    accessTier String

    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.

    acls List<ShareAcl>
    One or more acl blocks as defined below.
    enabledProtocol String

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata Map<String,String>
    A mapping of MetaData for this File Share.
    name String
    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.
    storageAccountId String

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storageAccountName String
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    quota number

    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).

    accessTier string

    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.

    acls ShareAcl[]
    One or more acl blocks as defined below.
    enabledProtocol string

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata {[key: string]: string}
    A mapping of MetaData for this File Share.
    name string
    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.
    storageAccountId string

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storageAccountName string
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    quota int

    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).

    access_tier str

    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.

    acls Sequence[ShareAclArgs]
    One or more acl blocks as defined below.
    enabled_protocol str

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata Mapping[str, str]
    A mapping of MetaData for this File Share.
    name str
    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.
    storage_account_id str

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storage_account_name str
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    quota Number

    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).

    accessTier String

    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.

    acls List<Property Map>
    One or more acl blocks as defined below.
    enabledProtocol String

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata Map<String>
    A mapping of MetaData for this File Share.
    name String
    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.
    storageAccountId String

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storageAccountName String
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Share resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceManagerId string
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    Url string
    The URL of the File Share
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceManagerId string
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    Url string
    The URL of the File Share
    id String
    The provider-assigned unique ID for this managed resource.
    resourceManagerId String
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    url String
    The URL of the File Share
    id string
    The provider-assigned unique ID for this managed resource.
    resourceManagerId string
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    url string
    The URL of the File Share
    id str
    The provider-assigned unique ID for this managed resource.
    resource_manager_id str
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    url str
    The URL of the File Share
    id String
    The provider-assigned unique ID for this managed resource.
    resourceManagerId String
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    url String
    The URL of the File Share

    Look up Existing Share Resource

    Get an existing Share resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ShareState, opts?: CustomResourceOptions): Share
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_tier: Optional[str] = None,
            acls: Optional[Sequence[ShareAclArgs]] = None,
            enabled_protocol: Optional[str] = None,
            metadata: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            quota: Optional[int] = None,
            resource_manager_id: Optional[str] = None,
            storage_account_id: Optional[str] = None,
            storage_account_name: Optional[str] = None,
            url: Optional[str] = None) -> Share
    func GetShare(ctx *Context, name string, id IDInput, state *ShareState, opts ...ResourceOption) (*Share, error)
    public static Share Get(string name, Input<string> id, ShareState? state, CustomResourceOptions? opts = null)
    public static Share get(String name, Output<String> id, ShareState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccessTier string

    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.

    Acls List<ShareAcl>
    One or more acl blocks as defined below.
    EnabledProtocol string

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    Metadata Dictionary<string, string>
    A mapping of MetaData for this File Share.
    Name string
    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.
    Quota int

    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).

    ResourceManagerId string
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    StorageAccountId string

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    StorageAccountName string
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    Url string
    The URL of the File Share
    AccessTier string

    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.

    Acls []ShareAclArgs
    One or more acl blocks as defined below.
    EnabledProtocol string

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    Metadata map[string]string
    A mapping of MetaData for this File Share.
    Name string
    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.
    Quota int

    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).

    ResourceManagerId string
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    StorageAccountId string

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    StorageAccountName string
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    Url string
    The URL of the File Share
    accessTier String

    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.

    acls List<ShareAcl>
    One or more acl blocks as defined below.
    enabledProtocol String

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata Map<String,String>
    A mapping of MetaData for this File Share.
    name String
    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.
    quota Integer

    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).

    resourceManagerId String
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    storageAccountId String

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storageAccountName String
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    url String
    The URL of the File Share
    accessTier string

    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.

    acls ShareAcl[]
    One or more acl blocks as defined below.
    enabledProtocol string

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata {[key: string]: string}
    A mapping of MetaData for this File Share.
    name string
    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.
    quota number

    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).

    resourceManagerId string
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    storageAccountId string

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storageAccountName string
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    url string
    The URL of the File Share
    access_tier str

    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.

    acls Sequence[ShareAclArgs]
    One or more acl blocks as defined below.
    enabled_protocol str

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata Mapping[str, str]
    A mapping of MetaData for this File Share.
    name str
    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.
    quota int

    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).

    resource_manager_id str
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    storage_account_id str

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storage_account_name str
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    url str
    The URL of the File Share
    accessTier String

    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.

    acls List<Property Map>
    One or more acl blocks as defined below.
    enabledProtocol String

    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 FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.

    metadata Map<String>
    A mapping of MetaData for this File Share.
    name String
    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.
    quota Number

    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).

    resourceManagerId String
    The Resource Manager ID of this File Share.

    Deprecated: this property is deprecated and will be removed 5.0 and replaced by the id property.

    storageAccountId String

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

    NOTE: One of storage_account_name or storage_account_id must be specified. When specifying storage_account_id the resource will use the Resource Manager API, rather than the Data Plane API.

    storageAccountName String
    Specifies the storage account in which to create the share. Changing this forces a new resource to be created. This property is deprecated in favour of storage_account_id.

    Deprecated: This property has been deprecated and will be replaced by storage_account_id in version 5.0 of the provider.

    url String
    The URL of the File Share

    Supporting Types

    ShareAcl, ShareAclArgs

    Id string
    The ID which should be used for this Shared Identifier.
    AccessPolicies List<ShareAclAccessPolicy>
    An access_policy block as defined below.
    Id string
    The ID which should be used for this Shared Identifier.
    AccessPolicies []ShareAclAccessPolicy
    An access_policy block as defined below.
    id String
    The ID which should be used for this Shared Identifier.
    accessPolicies List<ShareAclAccessPolicy>
    An access_policy block as defined below.
    id string
    The ID which should be used for this Shared Identifier.
    accessPolicies ShareAclAccessPolicy[]
    An access_policy block as defined below.
    id str
    The ID which should be used for this Shared Identifier.
    access_policies Sequence[ShareAclAccessPolicy]
    An access_policy block as defined below.
    id String
    The ID which should be used for this Shared Identifier.
    accessPolicies List<Property Map>
    An access_policy block as defined below.

    ShareAclAccessPolicy, ShareAclAccessPolicyArgs

    Permissions string

    The permissions which should be associated with this Shared Identifier. Possible value is combination of r (read), w (write), d (delete), and l (list).

    Note: Permission order is strict at the service side, and permissions need to be listed in the order above.

    Expiry string
    The time at which this Access Policy should be valid untilWhen using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    Start string
    The time at which this Access Policy should be valid from. When using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    Permissions string

    The permissions which should be associated with this Shared Identifier. Possible value is combination of r (read), w (write), d (delete), and l (list).

    Note: Permission order is strict at the service side, and permissions need to be listed in the order above.

    Expiry string
    The time at which this Access Policy should be valid untilWhen using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    Start string
    The time at which this Access Policy should be valid from. When using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    permissions String

    The permissions which should be associated with this Shared Identifier. Possible value is combination of r (read), w (write), d (delete), and l (list).

    Note: Permission order is strict at the service side, and permissions need to be listed in the order above.

    expiry String
    The time at which this Access Policy should be valid untilWhen using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    start String
    The time at which this Access Policy should be valid from. When using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    permissions string

    The permissions which should be associated with this Shared Identifier. Possible value is combination of r (read), w (write), d (delete), and l (list).

    Note: Permission order is strict at the service side, and permissions need to be listed in the order above.

    expiry string
    The time at which this Access Policy should be valid untilWhen using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    start string
    The time at which this Access Policy should be valid from. When using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    permissions str

    The permissions which should be associated with this Shared Identifier. Possible value is combination of r (read), w (write), d (delete), and l (list).

    Note: Permission order is strict at the service side, and permissions need to be listed in the order above.

    expiry str
    The time at which this Access Policy should be valid untilWhen using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    start str
    The time at which this Access Policy should be valid from. When using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    permissions String

    The permissions which should be associated with this Shared Identifier. Possible value is combination of r (read), w (write), d (delete), and l (list).

    Note: Permission order is strict at the service side, and permissions need to be listed in the order above.

    expiry String
    The time at which this Access Policy should be valid untilWhen using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.
    start String
    The time at which this Access Policy should be valid from. When using storage_account_id this should be in RFC3339 format. If using the deprecated storage_account_name property, this uses the ISO8601 format.

    Import

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

    $ pulumi import azure:storage/share:Share exampleShare /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Storage/storageAccounts/myAccount/fileServices/default/shares/exampleShare
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi