We recommend using Azure Native.
azure.storage.Share
Explore with Pulumi AI
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)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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- AccessTier string
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- Acls
List<ShareAcl> 
- One or more aclblocks as defined below.
- EnabledProtocol string
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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.
- StorageAccount stringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- StorageAccount stringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- Quota int
- The maximum size of the share, in gigabytes. - ~>NOTE: For Standard storage accounts, by default this must be - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- AccessTier string
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- Acls
[]ShareAcl Args 
- One or more aclblocks as defined below.
- EnabledProtocol string
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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.
- StorageAccount stringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- StorageAccount stringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- quota Integer
- The maximum size of the share, in gigabytes. - ~>NOTE: For Standard storage accounts, by default this must be - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- accessTier String
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls
List<ShareAcl> 
- One or more aclblocks as defined below.
- enabledProtocol String
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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.
- storageAccount StringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storageAccount StringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- quota number
- The maximum size of the share, in gigabytes. - ~>NOTE: For Standard storage accounts, by default this must be - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- accessTier string
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls
ShareAcl[] 
- One or more aclblocks as defined below.
- enabledProtocol string
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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.
- storageAccount stringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storageAccount stringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- quota int
- The maximum size of the share, in gigabytes. - ~>NOTE: For Standard storage accounts, by default this must be - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- access_tier str
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls
Sequence[ShareAcl Args] 
- One or more aclblocks as defined below.
- enabled_protocol str
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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_ strid 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storage_account_ strname 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- quota Number
- The maximum size of the share, in gigabytes. - ~>NOTE: For Standard storage accounts, by default this must be - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- accessTier String
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls List<Property Map>
- One or more aclblocks as defined below.
- enabledProtocol String
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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.
- storageAccount StringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storageAccount StringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
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.
- ResourceManager stringId 
- The Resource Manager ID of this File Share.
- Url string
- The URL of the File Share
- Id string
- The provider-assigned unique ID for this managed resource.
- ResourceManager stringId 
- The Resource Manager ID of this File Share.
- Url string
- The URL of the File Share
- id String
- The provider-assigned unique ID for this managed resource.
- resourceManager StringId 
- The Resource Manager ID of this File Share.
- url String
- The URL of the File Share
- id string
- The provider-assigned unique ID for this managed resource.
- resourceManager stringId 
- The Resource Manager ID of this File Share.
- url string
- The URL of the File Share
- id str
- The provider-assigned unique ID for this managed resource.
- resource_manager_ strid 
- The Resource Manager ID of this File Share.
- url str
- The URL of the File Share
- id String
- The provider-assigned unique ID for this managed resource.
- resourceManager StringId 
- The Resource Manager ID of this File Share.
- 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) -> Sharefunc 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)resources:  _:    type: azure:storage:Share    get:      id: ${id}- 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.
- AccessTier string
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- Acls
List<ShareAcl> 
- One or more aclblocks as defined below.
- EnabledProtocol string
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- ResourceManager stringId 
- The Resource Manager ID of this File Share.
- StorageAccount stringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- StorageAccount stringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- Url string
- The URL of the File Share
- AccessTier string
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- Acls
[]ShareAcl Args 
- One or more aclblocks as defined below.
- EnabledProtocol string
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- ResourceManager stringId 
- The Resource Manager ID of this File Share.
- StorageAccount stringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- StorageAccount stringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- Url string
- The URL of the File Share
- accessTier String
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls
List<ShareAcl> 
- One or more aclblocks as defined below.
- enabledProtocol String
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- resourceManager StringId 
- The Resource Manager ID of this File Share.
- storageAccount StringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storageAccount StringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- url String
- The URL of the File Share
- accessTier string
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls
ShareAcl[] 
- One or more aclblocks as defined below.
- enabledProtocol string
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- resourceManager stringId 
- The Resource Manager ID of this File Share.
- storageAccount stringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storageAccount stringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- url string
- The URL of the File Share
- access_tier str
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls
Sequence[ShareAcl Args] 
- One or more aclblocks as defined below.
- enabled_protocol str
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- resource_manager_ strid 
- The Resource Manager ID of this File Share.
- storage_account_ strid 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storage_account_ strname 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- url str
- The URL of the File Share
- accessTier String
- The access tier of the File Share. Possible values are - Hot,- Cooland- TransactionOptimized,- Premium.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountrequires- Premium- access_tier.
- acls List<Property Map>
- One or more aclblocks as defined below.
- enabledProtocol String
- The protocol used for the share. Possible values are - SMBand- NFS. The- SMBindicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The- NFSindicates the share can be accessed by NFSv4.1. Defaults to- SMB. Changing this forces a new resource to be created.- ~>NOTE: The - FileStorage- account_kindof the- azure.storage.Accountis required for the- NFSprotocol.
- 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 - 1GB (or higher) and at most- 5120GB (- 5TB). This can be set to a value larger than- 5120GB if- large_file_share_enabledis set to- truein the parent- azure.storage.Account.- ~>NOTE: For Premium FileStorage storage accounts, this must be greater than - 100GB and at most- 102400GB (- 100TB).
- resourceManager StringId 
- The Resource Manager ID of this File Share.
- storageAccount StringId 
- Specifies the storage account in which to create the share. Changing this forces a new resource to be created. - NOTE: One of - storage_account_nameor- storage_account_idmust be specified. When specifying- storage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.
- storageAccount StringName 
- 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.- Note: Migrating from the deprecated - storage_account_nameto- storage_account_idis supported without recreation. Any other change to either property will result in the resource being recreated.
- 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<ShareAcl Access Policy> 
- An access_policyblock as defined below.
- Id string
- The ID which should be used for this Shared Identifier.
- AccessPolicies []ShareAcl Access Policy 
- An access_policyblock as defined below.
- id String
- The ID which should be used for this Shared Identifier.
- accessPolicies List<ShareAcl Access Policy> 
- An access_policyblock as defined below.
- id string
- The ID which should be used for this Shared Identifier.
- accessPolicies ShareAcl Access Policy[] 
- An access_policyblock as defined below.
- id str
- The ID which should be used for this Shared Identifier.
- access_policies Sequence[ShareAcl Access Policy] 
- An access_policyblock as defined below.
- id String
- The ID which should be used for this Shared Identifier.
- accessPolicies List<Property Map>
- An access_policyblock 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_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, this uses the ISO8601 format.
- Start string
- The time at which this Access Policy should be valid from. When using storage_account_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, 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_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, this uses the ISO8601 format.
- Start string
- The time at which this Access Policy should be valid from. When using storage_account_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, 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_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, this uses the ISO8601 format.
- start String
- The time at which this Access Policy should be valid from. When using storage_account_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, 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_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, this uses the ISO8601 format.
- start string
- The time at which this Access Policy should be valid from. When using storage_account_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, 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_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, this uses the ISO8601 format.
- start str
- The time at which this Access Policy should be valid from. When using storage_account_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, 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_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, this uses the ISO8601 format.
- start String
- The time at which this Access Policy should be valid from. When using storage_account_idthis should be in RFC3339 format. If using the deprecatedstorage_account_nameproperty, 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 azurermTerraform Provider.