Blob Containers - List

Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers?api-version=2022-09-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers?api-version=2022-09-01&$maxpagesize={$maxpagesize}&$filter={$filter}&$include=deleted

URI Parameters

Name In Required Type Description
accountName
path True
  • string

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

resourceGroupName
path True
  • string

The name of the resource group within the user's subscription. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True
  • string

The ID of the target subscription.

api-version
query True
  • string

The API version to use for this operation.

$filter
query
  • string

Optional. When specified, only container names starting with the filter will be listed.

$include
query

Optional, used to include the properties for soft deleted blob containers.

$maxpagesize
query
  • string

Optional. Specified maximum number of containers that can be included in the list.

Responses

Name Type Description
200 OK

OK -- List Container operation completed successfully.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ListContainers
ListDeletedContainers

ListContainers

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers?api-version=2022-09-01&$include=deleted

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644",
      "name": "container1644",
      "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
      "etag": "\"0x8D589847D51C7DE\"",
      "properties": {
        "publicAccess": "Container",
        "leaseStatus": "Unlocked",
        "leaseState": "Available",
        "lastModifiedTime": "2018-03-14T08:20:47Z",
        "hasImmutabilityPolicy": false,
        "hasLegalHold": false
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052",
      "name": "container4052",
      "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "publicAccess": "None",
        "leaseStatus": "Unlocked",
        "leaseState": "Available",
        "lastModifiedTime": "2018-03-14T08:20:47Z",
        "hasImmutabilityPolicy": false,
        "hasLegalHold": false
      }
    }
  ],
  "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/container5103"
}

ListDeletedContainers

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers?api-version=2022-09-01&$include=deleted

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644",
      "name": "container1644",
      "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
      "etag": "\"0x8D589847D51C7DE\"",
      "properties": {
        "publicAccess": "Container",
        "leaseStatus": "Unlocked",
        "leaseState": "Available",
        "lastModifiedTime": "2018-03-14T08:20:47Z",
        "hasImmutabilityPolicy": false,
        "hasLegalHold": false
      }
    },
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052",
      "name": "container4052",
      "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
      "etag": "\"0x8D589847DAB5AF9\"",
      "properties": {
        "publicAccess": "None",
        "leaseStatus": "Unlocked",
        "leaseState": "Expired",
        "lastModifiedTime": "2018-03-14T08:20:47Z",
        "hasImmutabilityPolicy": false,
        "hasLegalHold": false,
        "version": "1234567890",
        "deleted": true,
        "deletedTime": "2019-12-14T08:20:47Z",
        "remainingRetentionDays": 30
      }
    }
  ]
}

Definitions

ImmutabilityPolicyProperties

The properties of an ImmutabilityPolicy of a blob container.

ImmutabilityPolicyState

The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.

ImmutabilityPolicyUpdateType

The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.

ImmutableStorageWithVersioning

Object level immutability properties of the container.

LeaseDuration

Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.

LeaseState

Lease state of the container.

LeaseStatus

The lease status of the container.

LegalHoldProperties

The LegalHold property of a blob container.

ListContainerItem

The blob container properties be listed out.

ListContainerItems

Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to next page of containers.

ListContainersInclude

Optional, used to include the properties for soft deleted blob containers.

MigrationState

This property denotes the container level immutability to object level immutability migration state.

ProtectedAppendWritesHistory

Protected append writes history setting for the blob container with Legal holds.

PublicAccess

Specifies whether data in the container may be accessed publicly and the level of access.

TagProperty

A tag of the LegalHold of a blob container.

UpdateHistoryProperty

An update history of the ImmutabilityPolicy of a blob container.

ImmutabilityPolicyProperties

The properties of an ImmutabilityPolicy of a blob container.

Name Type Description
etag
  • string

ImmutabilityPolicy Etag.

properties.allowProtectedAppendWrites
  • boolean

This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.

properties.allowProtectedAppendWritesAll
  • boolean

This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.

properties.immutabilityPeriodSinceCreationInDays
  • integer

The immutability period for the blobs in the container since the policy creation, in days.

properties.state

The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.

updateHistory

The ImmutabilityPolicy update history of the blob container.

ImmutabilityPolicyState

The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.

Name Type Description
Locked
  • string
Unlocked
  • string

ImmutabilityPolicyUpdateType

The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.

Name Type Description
extend
  • string
lock
  • string
put
  • string

ImmutableStorageWithVersioning

Object level immutability properties of the container.

Name Type Description
enabled
  • boolean

This is an immutable property, when set to true it enables object level immutability at the container level.

migrationState

This property denotes the container level immutability to object level immutability migration state.

timeStamp
  • string

Returns the date and time the object level immutability was enabled.

LeaseDuration

Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.

Name Type Description
Fixed
  • string
Infinite
  • string

LeaseState

Lease state of the container.

Name Type Description
Available
  • string
Breaking
  • string
Broken
  • string
Expired
  • string
Leased
  • string

LeaseStatus

The lease status of the container.

Name Type Description
Locked
  • string
Unlocked
  • string

LegalHoldProperties

The LegalHold property of a blob container.

Name Type Description
hasLegalHold
  • boolean

The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.

protectedAppendWritesHistory

Protected append blob writes history.

tags

The list of LegalHold tags of a blob container.

ListContainerItem

The blob container properties be listed out.

Name Type Description
etag
  • string

Resource Etag.

id
  • string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name
  • string

The name of the resource

properties.defaultEncryptionScope
  • string

Default the container to use specified encryption scope for all writes.

properties.deleted
  • boolean

Indicates whether the blob container was deleted.

properties.deletedTime
  • string

Blob container deletion time.

properties.denyEncryptionScopeOverride
  • boolean

Block override of encryption scope from the container default.

properties.enableNfsV3AllSquash
  • boolean

Enable NFSv3 all squash on blob container.

properties.enableNfsV3RootSquash
  • boolean

Enable NFSv3 root squash on blob container.

properties.hasImmutabilityPolicy
  • boolean

The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.

properties.hasLegalHold
  • boolean

The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.

properties.immutabilityPolicy

The ImmutabilityPolicy property of the container.

properties.immutableStorageWithVersioning

The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.

properties.lastModifiedTime
  • string

Returns the date and time the container was last modified.

properties.leaseDuration

Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.

properties.leaseState

Lease state of the container.

properties.leaseStatus

The lease status of the container.

properties.legalHold

The LegalHold property of the container.

properties.metadata
  • object

A name-value pair to associate with the container as metadata.

properties.publicAccess

Specifies whether data in the container may be accessed publicly and the level of access.

properties.remainingRetentionDays
  • integer

Remaining retention days for soft deleted blob container.

properties.version
  • string

The version of the deleted blob container.

type
  • string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ListContainerItems

Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to next page of containers.

Name Type Description
nextLink
  • string

Request URL that can be used to query next page of containers. Returned when total number of requested containers exceed maximum page size.

value

List of blobs containers returned.

ListContainersInclude

Optional, used to include the properties for soft deleted blob containers.

Name Type Description
deleted
  • string

MigrationState

This property denotes the container level immutability to object level immutability migration state.

Name Type Description
Completed
  • string
InProgress
  • string

ProtectedAppendWritesHistory

Protected append writes history setting for the blob container with Legal holds.

Name Type Description
allowProtectedAppendWritesAll
  • boolean

When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.

timestamp
  • string

Returns the date and time the tag was added.

PublicAccess

Specifies whether data in the container may be accessed publicly and the level of access.

Name Type Description
Blob
  • string
Container
  • string
None
  • string

TagProperty

A tag of the LegalHold of a blob container.

Name Type Description
objectIdentifier
  • string

Returns the Object ID of the user who added the tag.

tag
  • string

The tag value.

tenantId
  • string

Returns the Tenant ID that issued the token for the user who added the tag.

timestamp
  • string

Returns the date and time the tag was added.

upn
  • string

Returns the User Principal Name of the user who added the tag.

UpdateHistoryProperty

An update history of the ImmutabilityPolicy of a blob container.

Name Type Description
allowProtectedAppendWrites
  • boolean

This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.

allowProtectedAppendWritesAll
  • boolean

This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.

immutabilityPeriodSinceCreationInDays
  • integer

The immutability period for the blobs in the container since the policy creation, in days.

objectIdentifier
  • string

Returns the Object ID of the user who updated the ImmutabilityPolicy.

tenantId
  • string

Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.

timestamp
  • string

Returns the date and time the ImmutabilityPolicy was updated.

update

The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.

upn
  • string

Returns the User Principal Name of the user who updated the ImmutabilityPolicy.