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 Storage Container.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Storage.GetStorageContainer.InvokeAsync(new Azure.Storage.GetStorageContainerArgs
{
Name = "example-container-name",
StorageAccountName = "example-storage-account-name",
}));
}
}
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 {
_, err := storage.GetStorageContainer(ctx, &storage.GetStorageContainerArgs{
Name: "example-container-name",
StorageAccountName: "example-storage-account-name",
}, nil)
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = pulumi.output(azure.storage.getStorageContainer({
name: "example-container-name",
storageAccountName: "example-storage-account-name",
}));
import pulumi
import pulumi_azure as azure
example = azure.storage.get_storage_container(name="example-container-name",
storage_account_name="example-storage-account-name")
Example coming soon!
Using getStorageContainer
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 getStorageContainer(args: GetStorageContainerArgs, opts?: InvokeOptions): Promise<GetStorageContainerResult>
function getStorageContainerOutput(args: GetStorageContainerOutputArgs, opts?: InvokeOptions): Output<GetStorageContainerResult>def get_storage_container(metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
storage_account_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetStorageContainerResult
def get_storage_container_output(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[GetStorageContainerResult]func GetStorageContainer(ctx *Context, args *GetStorageContainerArgs, opts ...InvokeOption) (*GetStorageContainerResult, error)
func GetStorageContainerOutput(ctx *Context, args *GetStorageContainerOutputArgs, opts ...InvokeOption) GetStorageContainerResultOutput> Note: This function is named GetStorageContainer in the Go SDK.
public static class GetStorageContainer
{
public static Task<GetStorageContainerResult> InvokeAsync(GetStorageContainerArgs args, InvokeOptions? opts = null)
public static Output<GetStorageContainerResult> Invoke(GetStorageContainerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetStorageContainerResult> getStorageContainer(GetStorageContainerArgs args, InvokeOptions options)
public static Output<GetStorageContainerResult> getStorageContainer(GetStorageContainerArgs args, InvokeOptions options)
fn::invoke:
function: azure:storage/getStorageContainer:getStorageContainer
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Container.
- Storage
Account stringName - The name of the Storage Account where the Container exists.
- Metadata Dictionary<string, string>
- A mapping of MetaData for this Container.
- Name string
- The name of the Container.
- Storage
Account stringName - The name of the Storage Account where the Container exists.
- Metadata map[string]string
- A mapping of MetaData for this Container.
- name String
- The name of the Container.
- storage
Account StringName - The name of the Storage Account where the Container exists.
- metadata Map<String,String>
- A mapping of MetaData for this Container.
- name string
- The name of the Container.
- storage
Account stringName - The name of the Storage Account where the Container exists.
- metadata {[key: string]: string}
- A mapping of MetaData for this Container.
- name str
- The name of the Container.
- storage_
account_ strname - The name of the Storage Account where the Container exists.
- metadata Mapping[str, str]
- A mapping of MetaData for this Container.
- name String
- The name of the Container.
- storage
Account StringName - The name of the Storage Account where the Container exists.
- metadata Map<String>
- A mapping of MetaData for this Container.
getStorageContainer Result
The following output properties are available:
- Container
Access stringType - The Access Level configured for this Container.
- Has
Immutability boolPolicy - Is there an Immutability Policy configured on this Storage Container?
- Has
Legal boolHold - Is there a Legal Hold configured on this Storage Container?
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- A mapping of MetaData for this Container.
- Name string
- Resource
Manager stringId - The Resource Manager ID of this Storage Container.
- Storage
Account stringName
- Container
Access stringType - The Access Level configured for this Container.
- Has
Immutability boolPolicy - Is there an Immutability Policy configured on this Storage Container?
- Has
Legal boolHold - Is there a Legal Hold configured on this Storage Container?
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- A mapping of MetaData for this Container.
- Name string
- Resource
Manager stringId - The Resource Manager ID of this Storage Container.
- Storage
Account stringName
- container
Access StringType - The Access Level configured for this Container.
- has
Immutability BooleanPolicy - Is there an Immutability Policy configured on this Storage Container?
- has
Legal BooleanHold - Is there a Legal Hold configured on this Storage Container?
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- A mapping of MetaData for this Container.
- name String
- resource
Manager StringId - The Resource Manager ID of this Storage Container.
- storage
Account StringName
- container
Access stringType - The Access Level configured for this Container.
- has
Immutability booleanPolicy - Is there an Immutability Policy configured on this Storage Container?
- has
Legal booleanHold - Is there a Legal Hold configured on this Storage Container?
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- A mapping of MetaData for this Container.
- name string
- resource
Manager stringId - The Resource Manager ID of this Storage Container.
- storage
Account stringName
- container_
access_ strtype - The Access Level configured for this Container.
- has_
immutability_ boolpolicy - Is there an Immutability Policy configured on this Storage Container?
- has_
legal_ boolhold - Is there a Legal Hold configured on this Storage Container?
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- A mapping of MetaData for this Container.
- name str
- resource_
manager_ strid - The Resource Manager ID of this Storage Container.
- storage_
account_ strname
- container
Access StringType - The Access Level configured for this Container.
- has
Immutability BooleanPolicy - Is there an Immutability Policy configured on this Storage Container?
- has
Legal BooleanHold - Is there a Legal Hold configured on this Storage Container?
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- A mapping of MetaData for this Container.
- name String
- resource
Manager StringId - The Resource Manager ID of this Storage Container.
- storage
Account StringName
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
