We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about an existing File Share.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Storage.GetShare.InvokeAsync(new Azure.Storage.GetShareArgs
{
Name = "existing",
StorageAccountName = "existing",
}));
this.Id = example.Apply(example => example.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := storage.LookupShare(ctx, &storage.LookupShareArgs{
Name: "existing",
StorageAccountName: "existing",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.storage.getShare({
name: "existing",
storageAccountName: "existing",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.storage.get_share(name="existing",
storage_account_name="existing")
pulumi.export("id", example.id)
Example coming soon!
Using getShare
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getShare(args: GetShareArgs, opts?: InvokeOptions): Promise<GetShareResult>
function getShareOutput(args: GetShareOutputArgs, opts?: InvokeOptions): Output<GetShareResult>def get_share(acls: Optional[Sequence[GetShareAcl]] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
storage_account_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetShareResult
def get_share_output(acls: Optional[pulumi.Input[Sequence[pulumi.Input[GetShareAclArgs]]]] = None,
metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
storage_account_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetShareResult]func LookupShare(ctx *Context, args *LookupShareArgs, opts ...InvokeOption) (*LookupShareResult, error)
func LookupShareOutput(ctx *Context, args *LookupShareOutputArgs, opts ...InvokeOption) LookupShareResultOutput> Note: This function is named LookupShare in the Go SDK.
public static class GetShare
{
public static Task<GetShareResult> InvokeAsync(GetShareArgs args, InvokeOptions? opts = null)
public static Output<GetShareResult> Invoke(GetShareInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
public static Output<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
fn::invoke:
function: azure:storage/getShare:getShare
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the share.
- Storage
Account stringName - The name of the storage account.
- Acls
List<Get
Share Acl> - One or more acl blocks as defined below.
- Metadata Dictionary<string, string>
- A map of custom file share metadata.
- Name string
- The name of the share.
- Storage
Account stringName - The name of the storage account.
- Acls
[]Get
Share Acl - One or more acl blocks as defined below.
- Metadata map[string]string
- A map of custom file share metadata.
- name String
- The name of the share.
- storage
Account StringName - The name of the storage account.
- acls
List<Get
Share Acl> - One or more acl blocks as defined below.
- metadata Map<String,String>
- A map of custom file share metadata.
- name string
- The name of the share.
- storage
Account stringName - The name of the storage account.
- acls
Get
Share Acl[] - One or more acl blocks as defined below.
- metadata {[key: string]: string}
- A map of custom file share metadata.
- name str
- The name of the share.
- storage_
account_ strname - The name of the storage account.
- acls
Sequence[Get
Share Acl] - One or more acl blocks as defined below.
- metadata Mapping[str, str]
- A map of custom file share metadata.
- name String
- The name of the share.
- storage
Account StringName - The name of the storage account.
- acls List<Property Map>
- One or more acl blocks as defined below.
- metadata Map<String>
- A map of custom file share metadata.
getShare Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- A map of custom file share metadata.
- Name string
- Quota int
- The quota of the File Share in GB.
- Resource
Manager stringId - Storage
Account stringName - Acls
List<Get
Share Acl> - One or more acl blocks as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- A map of custom file share metadata.
- Name string
- Quota int
- The quota of the File Share in GB.
- Resource
Manager stringId - Storage
Account stringName - Acls
[]Get
Share Acl - One or more acl blocks as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- A map of custom file share metadata.
- name String
- quota Integer
- The quota of the File Share in GB.
- resource
Manager StringId - storage
Account StringName - acls
List<Get
Share Acl> - One or more acl blocks as defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- A map of custom file share metadata.
- name string
- quota number
- The quota of the File Share in GB.
- resource
Manager stringId - storage
Account stringName - acls
Get
Share Acl[] - One or more acl blocks as defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- A map of custom file share metadata.
- name str
- quota int
- The quota of the File Share in GB.
- resource_
manager_ strid - storage_
account_ strname - acls
Sequence[Get
Share Acl] - One or more acl blocks as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- A map of custom file share metadata.
- name String
- quota Number
- The quota of the File Share in GB.
- resource
Manager StringId - storage
Account StringName - acls List<Property Map>
- One or more acl blocks as defined below.
Supporting Types
GetShareAcl
- Access
Policies List<GetShare Acl Access Policy> - An
access_policyblock as defined below. - Id string
- The ID which should be used for this Shared Identifier.
- Access
Policies []GetShare Acl Access Policy - An
access_policyblock as defined below. - Id string
- The ID which should be used for this Shared Identifier.
- access
Policies List<GetShare Acl Access Policy> - An
access_policyblock as defined below. - id String
- The ID which should be used for this Shared Identifier.
- access
Policies GetShare Acl Access Policy[] - An
access_policyblock as defined below. - id string
- The ID which should be used for this Shared Identifier.
- access_
policies Sequence[GetShare Acl Access Policy] - An
access_policyblock as defined below. - id str
- The ID which should be used for this Shared Identifier.
- access
Policies List<Property Map> - An
access_policyblock as defined below. - id String
- The ID which should be used for this Shared Identifier.
GetShareAclAccessPolicy
- Expiry string
- The time at which this Access Policy should be valid until, in 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), andl(list). - Start string
- The time at which this Access Policy should be valid from, in ISO8601 format.
- Expiry string
- The time at which this Access Policy should be valid until, in 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), andl(list). - Start string
- The time at which this Access Policy should be valid from, in ISO8601 format.
- expiry String
- The time at which this Access Policy should be valid until, in 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), andl(list). - start String
- The time at which this Access Policy should be valid from, in ISO8601 format.
- expiry string
- The time at which this Access Policy should be valid until, in 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), andl(list). - start string
- The time at which this Access Policy should be valid from, in ISO8601 format.
- expiry str
- The time at which this Access Policy should be valid until, in 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), andl(list). - start str
- The time at which this Access Policy should be valid from, in ISO8601 format.
- expiry String
- The time at which this Access Policy should be valid until, in 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), andl(list). - start String
- The time at which this Access Policy should be valid from, in ISO8601 format.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
