Blob Containers - Get

Gets properties of a specified container.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}?api-version=2023-01-01

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.

Regex pattern: ^[a-z0-9]+$

containerName
path True

string

The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

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.

Responses

Name Type Description
200 OK

BlobContainer

OK -- Get 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

GetBlobContainersGetWithAllowProtectedAppendWritesAll
GetContainers

GetBlobContainersGetWithAllowProtectedAppendWritesAll

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634?api-version=2023-01-01

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634",
  "name": "container1634",
  "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
  "etag": "\"0x8D592D74CC20EBA\"",
  "properties": {
    "publicAccess": "None",
    "leaseStatus": "Unlocked",
    "leaseState": "Available",
    "lastModifiedTime": "2018-03-26T05:06:14Z",
    "immutabilityPolicy": {
      "etag": "\"8d592d74cb3011a\"",
      "properties": {
        "immutabilityPeriodSinceCreationInDays": 100,
        "allowProtectedAppendWritesAll": true,
        "state": "Locked"
      },
      "updateHistory": [
        {
          "update": "put",
          "immutabilityPeriodSinceCreationInDays": 3,
          "allowProtectedAppendWritesAll": true,
          "timestamp": "2018-03-26T05:06:11.431403Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "update": "lock",
          "immutabilityPeriodSinceCreationInDays": 3,
          "allowProtectedAppendWritesAll": true,
          "timestamp": "2018-03-26T05:06:13.0907641Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "update": "extend",
          "immutabilityPeriodSinceCreationInDays": 100,
          "allowProtectedAppendWritesAll": true,
          "timestamp": "2018-03-26T05:06:14.7097716Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        }
      ]
    },
    "legalHold": {
      "hasLegalHold": true,
      "protectedAppendWritesHistory": {
        "allowProtectedAppendWritesAll": true,
        "timestamp": "2022-09-01T01:58:44.5044483Z"
      },
      "tags": [
        {
          "tag": "tag1",
          "timestamp": "2018-03-26T05:06:09.6964643Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "tag": "tag2",
          "timestamp": "2018-03-26T05:06:09.6964643Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "tag": "tag3",
          "timestamp": "2018-03-26T05:06:09.6964643Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        }
      ]
    },
    "hasImmutabilityPolicy": true,
    "hasLegalHold": true
  }
}

GetContainers

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634?api-version=2023-01-01

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634",
  "name": "container1634",
  "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
  "etag": "\"0x8D592D74CC20EBA\"",
  "properties": {
    "publicAccess": "None",
    "leaseStatus": "Unlocked",
    "leaseState": "Available",
    "lastModifiedTime": "2018-03-26T05:06:14Z",
    "immutabilityPolicy": {
      "etag": "\"8d592d74cb3011a\"",
      "properties": {
        "immutabilityPeriodSinceCreationInDays": 100,
        "state": "Locked"
      },
      "updateHistory": [
        {
          "update": "put",
          "immutabilityPeriodSinceCreationInDays": 3,
          "timestamp": "2018-03-26T05:06:11.431403Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "update": "lock",
          "immutabilityPeriodSinceCreationInDays": 3,
          "timestamp": "2018-03-26T05:06:13.0907641Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "update": "extend",
          "immutabilityPeriodSinceCreationInDays": 100,
          "timestamp": "2018-03-26T05:06:14.7097716Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        }
      ]
    },
    "legalHold": {
      "hasLegalHold": true,
      "tags": [
        {
          "tag": "tag1",
          "timestamp": "2018-03-26T05:06:09.6964643Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "tag": "tag2",
          "timestamp": "2018-03-26T05:06:09.6964643Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        },
        {
          "tag": "tag3",
          "timestamp": "2018-03-26T05:06:09.6964643Z",
          "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
          "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
        }
      ]
    },
    "hasImmutabilityPolicy": true,
    "hasLegalHold": true
  }
}

Definitions

Name Description
BlobContainer

Properties of the blob container, including Id, resource name, resource type, Etag.

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.

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.

BlobContainer

Properties of the blob container, including Id, resource name, resource type, Etag.

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

ImmutabilityPolicyProperties

The ImmutabilityPolicy property of the container.

properties.immutableStorageWithVersioning

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

LeaseDuration

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

properties.leaseState

LeaseState

Lease state of the container.

properties.leaseStatus

LeaseStatus

The lease status of the container.

properties.legalHold

LegalHoldProperties

The LegalHold property of the container.

properties.metadata

object

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

properties.publicAccess

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"

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

ImmutabilityPolicyState

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

updateHistory

UpdateHistoryProperty[]

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

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

ProtectedAppendWritesHistory

Protected append blob writes history.

tags

TagProperty[]

The list of LegalHold tags of a blob container.

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

ImmutabilityPolicyUpdateType

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.