diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py
index 3a486093cb96..5c546a65b537 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py
@@ -24,7 +24,8 @@
UserDelegationKey
)
from ._generated.models import (
- RehydratePriority
+ RehydratePriority,
+ BlobImmutabilityPolicyMode
)
from ._models import (
BlobType,
@@ -58,7 +59,8 @@
ArrowDialect,
ArrowType,
ObjectReplicationPolicy,
- ObjectReplicationRule
+ ObjectReplicationRule,
+ ImmutabilityPolicy
)
from ._list_blobs_helper import BlobPrefix
@@ -195,6 +197,8 @@ def download_blob_from_url(
'StandardBlobTier',
'PremiumPageBlobTier',
'SequenceNumberAction',
+ 'BlobImmutabilityPolicyMode',
+ 'ImmutabilityPolicy',
'PublicAccess',
'BlobAnalyticsLogging',
'Metrics',
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py
index 6dd57e7f6a38..ad4e34c13f45 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py
@@ -408,6 +408,7 @@ def _upload_blob_options( # pylint:disable=too-many-statements
kwargs['blob_settings'] = self._config
kwargs['max_concurrency'] = max_concurrency
kwargs['encryption_options'] = encryption_options
+
if blob_type == BlobType.BlockBlob:
kwargs['client'] = self._client.block_blob
kwargs['data'] = data
@@ -644,6 +645,20 @@ def upload_blob( # pylint: disable=too-many-locals
:keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
A standard blob tier value to set the blob to. For this version of the library,
this is only applicable to block blobs on standard storage accounts.
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+ Currently this parameter of upload_blob() API is for BlockBlob only.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+ Currently this parameter of upload_blob() API is for BlockBlob only.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword int maxsize_condition:
Optional conditional header. The max length in bytes permitted for
the append blob. If the Append Block operation would cause the blob
@@ -1384,6 +1399,64 @@ def set_blob_metadata(self, metadata=None, **kwargs):
except HttpResponseError as error:
process_storage_error(error)
+ @distributed_trace
+ def set_immutability_policy(self, immutability_policy, **kwargs):
+ # type: (**Any) -> Dict[str, str]
+ """The Set Immutability Policy operation sets the immutability policy on the blob.
+
+ .. versionadded:: 12.10.0
+ This operation was introduced in API version '2020-10-02'.
+
+ :param ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword int timeout:
+ The timeout parameter is expressed in seconds.
+ :returns: Key value pairs of blob tags.
+ :rtype: Dict[str, str]
+ """
+
+ kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
+ kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
+ return self._client.blob.set_immutability_policy(cls=return_response_headers, **kwargs)
+
+ @distributed_trace
+ def delete_immutability_policy(self, **kwargs):
+ # type: (**Any) -> None
+ """The Delete Immutability Policy operation deletes the immutability policy on the blob.
+
+ .. versionadded:: 12.10.0
+ This operation was introduced in API version '2020-10-02'.
+
+ :keyword int timeout:
+ The timeout parameter is expressed in seconds.
+ :returns: Key value pairs of blob tags.
+ :rtype: Dict[str, str]
+ """
+
+ self._client.blob.delete_immutability_policy(**kwargs)
+
+ @distributed_trace
+ def set_legal_hold(self, legal_hold, **kwargs):
+ # type: (**Any) -> Dict[str, Union[str, datetime, bool]]
+ """The Set Legal Hold operation sets a legal hold on the blob.
+
+ .. versionadded:: 12.10.0
+ This operation was introduced in API version '2020-10-02'.
+
+ :param bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+ :keyword int timeout:
+ The timeout parameter is expressed in seconds.
+ :returns: Key value pairs of blob tags.
+ :rtype: Dict[str, str]
+ """
+
+ return self._client.blob.set_legal_hold(legal_hold, cls=return_response_headers, **kwargs)
+
def _create_page_blob_options( # type: ignore
self, size, # type: int
content_settings=None, # type: Optional[ContentSettings]
@@ -1419,6 +1492,11 @@ def _create_page_blob_options( # type: ignore
cpk_info = CpkInfo(encryption_key=cpk.key_value, encryption_key_sha256=cpk.key_hash,
encryption_algorithm=cpk.algorithm)
+ immutability_policy = kwargs.pop('immutability_policy', None)
+ if immutability_policy:
+ kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
+ kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
+
if premium_page_blob_tier:
try:
headers['x-ms-access-tier'] = premium_page_blob_tier.value # type: ignore
@@ -1485,6 +1563,18 @@ def create_page_blob( # type: ignore
Required if the blob has an active lease. Value can be a BlobLeaseClient object
or the lease ID as a string.
:paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword ~datetime.datetime if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
@@ -1558,6 +1648,12 @@ def _create_append_blob_options(self, content_settings=None, metadata=None, **kw
raise ValueError("Customer provided encryption key must be used over HTTPS.")
cpk_info = CpkInfo(encryption_key=cpk.key_value, encryption_key_sha256=cpk.key_hash,
encryption_algorithm=cpk.algorithm)
+
+ immutability_policy = kwargs.pop('immutability_policy', None)
+ if immutability_policy:
+ kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
+ kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
+
blob_tags_string = serialize_blob_tags_header(kwargs.pop('tags', None))
options = {
@@ -1599,6 +1695,18 @@ def create_append_blob(self, content_settings=None, metadata=None, **kwargs):
Required if the blob has an active lease. Value can be a BlobLeaseClient object
or the lease ID as a string.
:paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword ~datetime.datetime if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
@@ -1764,6 +1872,11 @@ def _start_copy_from_url_options(self, source_url, metadata=None, incremental_co
dest_mod_conditions = get_modify_conditions(kwargs)
blob_tags_string = serialize_blob_tags_header(kwargs.pop('tags', None))
+ immutability_policy = kwargs.pop('immutability_policy', None)
+ if immutability_policy:
+ kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
+ kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
+
options = {
'copy_source': source_url,
'seal_blob': kwargs.pop('seal_destination_blob', None),
@@ -1851,6 +1964,18 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False,
.. versionadded:: 12.4.0
:paramtype tags: dict(str, str)
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword ~datetime.datetime source_if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
@@ -1917,7 +2042,7 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False,
:keyword bool requires_sync:
Enforces that the service will not return a response until the copy is complete.
:returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
- :rtype: dict[str, str or ~datetime.datetime]
+ :rtype: dict[str, Union[str, ~datetime.datetime]]
.. admonition:: Example:
@@ -2394,6 +2519,11 @@ def _commit_block_list_options( # type: ignore
cpk_info = CpkInfo(encryption_key=cpk.key_value, encryption_key_sha256=cpk.key_hash,
encryption_algorithm=cpk.algorithm)
+ immutability_policy = kwargs.pop('immutability_policy', None)
+ if immutability_policy:
+ kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
+ kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
+
tier = kwargs.pop('standard_blob_tier', None)
blob_tags_string = serialize_blob_tags_header(kwargs.pop('tags', None))
@@ -2447,6 +2577,18 @@ def commit_block_list( # type: ignore
Required if the blob has an active lease. Value can be a BlobLeaseClient object
or the lease ID as a string.
:paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword bool validate_content:
If true, calculates an MD5 hash of the page content. The storage
service checks the hash of the content that has arrived
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py
index 6b8d537e91e7..82bfe1b04110 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py
@@ -744,7 +744,7 @@ def list_blobs(self, name_starts_with=None, include=None, **kwargs):
:param list[str] or str include:
Specifies one or more additional datasets to include in the response.
Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted', 'deletedwithversions',
- 'tags', 'versions'.
+ 'tags', 'versions', 'immutabilitypolicy', 'legalhold'.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:returns: An iterable (auto-paging) response of BlobProperties.
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py
index e54cccc57bcc..c724753efffa 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py
@@ -9,7 +9,7 @@
TYPE_CHECKING
)
-from ._models import BlobType, CopyProperties, ContentSettings, LeaseProperties, BlobProperties
+from ._models import BlobType, CopyProperties, ContentSettings, LeaseProperties, BlobProperties, ImmutabilityPolicy
from ._shared.models import get_enum_value
from ._shared.response_handlers import deserialize_metadata
@@ -153,6 +153,8 @@ def get_blob_properties_from_generated_code(generated):
blob.tags = parse_tags(generated.blob_tags) # pylint: disable=protected-access
blob.object_replication_source_properties = deserialize_ors_policies(generated.object_replication_metadata)
blob.last_accessed_on = generated.properties.last_accessed_on
+ blob.immutability_policy = ImmutabilityPolicy._from_generated(generated) # pylint: disable=protected-access
+ blob.has_legal_hold = generated.properties.legal_hold
blob.has_versions_only = generated.has_versions_only
return blob
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py
index 44be511ef482..eccd176af04d 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py
@@ -321,6 +321,12 @@ class ContainerProperties(DictMixin):
Represents whether the container has an immutability policy.
:ivar bool has_legal_hold:
Represents whether the container has a legal hold.
+ :ivar bool is_immutable_storage_with_versioning_enabled:
+ Represents whether immutable storage with versioning enabled on the container.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:ivar dict metadata: A dict with name-value pairs to associate with the
container as metadata.
:ivar ~azure.storage.blob.ContainerEncryptionScope encryption_scope:
@@ -343,6 +349,7 @@ def __init__(self, **kwargs):
self.has_legal_hold = kwargs.get('x-ms-has-legal-hold')
self.metadata = kwargs.get('metadata')
self.encryption_scope = None
+ self.is_immutable_storage_with_versioning_enabled = kwargs.get('x-ms-immutable-storage-with-versioning-enabled')
default_encryption_scope = kwargs.get('x-ms-default-encryption-scope')
if default_encryption_scope:
self.encryption_scope = ContainerEncryptionScope(
@@ -359,6 +366,8 @@ def _from_generated(cls, generated):
props.lease = LeaseProperties._from_generated(generated) # pylint: disable=protected-access
props.public_access = generated.properties.public_access
props.has_immutability_policy = generated.properties.has_immutability_policy
+ props.is_immutable_storage_with_versioning_enabled = \
+ generated.properties.is_immutable_storage_with_versioning_enabled
props.deleted = generated.deleted
props.version = generated.version
props.has_legal_hold = generated.properties.has_legal_hold
@@ -426,6 +435,32 @@ def _build_item(item):
return ContainerProperties._from_generated(item) # pylint: disable=protected-access
+class ImmutabilityPolicy(DictMixin):
+ """Optional parameters for setting the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :param ~datetime.datetime expiry_time:
+ Specifies the date time when the blobs immutability policy is set to expire.
+ :param str or ~azure.storage.blob.BlobImmutabilityPolicyMode policy_mode:
+ Specifies the immutability policy mode to set on the blob.
+ Possible values to set include: "Locked", "Unlocked".
+ "Mutable" can only be returned by service, don't set to "Mutable".
+ """
+
+ def __init__(self, expiry_time=None, policy_mode=None):
+ self.expiry_time = expiry_time
+ self.policy_mode = policy_mode
+
+ @classmethod
+ def _from_generated(cls, generated):
+ immutability_policy = cls()
+ immutability_policy.expiry_time = generated.properties.immutability_policy_expires_on
+ immutability_policy.policy_mode = generated.properties.immutability_policy_mode
+ return immutability_policy
+
+
class BlobProperties(DictMixin):
"""
Blob Properties.
@@ -532,6 +567,19 @@ class BlobProperties(DictMixin):
.. versionadded:: 12.10.0
+ :ivar ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :ivar bool has_legal_hold:
+ Specified if a legal hold should be set on the blob.
+ Currently this parameter of upload_blob() API is for BlockBlob only.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
"""
def __init__(self, **kwargs):
@@ -571,6 +619,9 @@ def __init__(self, **kwargs):
self.last_accessed_on = kwargs.get('x-ms-last-access-time')
self.tag_count = kwargs.get('x-ms-tag-count')
self.tags = None
+ self.immutability_policy = ImmutabilityPolicy(expiry_time=kwargs.get('x-ms-immutability-policy-until-date'),
+ policy_mode=kwargs.get('x-ms-immutability-policy-mode'))
+ self.has_legal_hold = kwargs.get('x-ms-legal-hold')
self.has_versions_only = None
@@ -853,20 +904,26 @@ class ContainerSasPermissions(object):
List blobs in the container.
:param bool tag:
Set or get tags on the blobs in the container.
+ :keyword bool set_immutability_policy:
+ To enable operations related to set/delete immutability policy.
+ To get immutability policy, you just need read permission.
"""
- def __init__(self, read=False, write=False, delete=False, list=False, delete_previous_version=False, tag=False): # pylint: disable=redefined-builtin
+ def __init__(self, read=False, write=False, delete=False,
+ list=False, delete_previous_version=False, tag=False, **kwargs): # pylint: disable=redefined-builtin
self.read = read
self.write = write
self.delete = delete
self.list = list
self.delete_previous_version = delete_previous_version
self.tag = tag
+ self.set_immutability_policy = kwargs.pop('set_immutability_policy', False)
self._str = (('r' if self.read else '') +
('w' if self.write else '') +
('d' if self.delete else '') +
('x' if self.delete_previous_version else '') +
('l' if self.list else '') +
- ('t' if self.tag else ''))
+ ('t' if self.tag else '') +
+ ('i' if self.set_immutability_policy else ''))
def __str__(self):
return self._str
@@ -890,8 +947,10 @@ def from_string(cls, permission):
p_list = 'l' in permission
p_delete_previous_version = 'x' in permission
p_tag = 't' in permission
+ p_set_immutability_policy = 'i' in permission
parsed = cls(read=p_read, write=p_write, delete=p_delete, list=p_list,
- delete_previous_version=p_delete_previous_version, tag=p_tag)
+ delete_previous_version=p_delete_previous_version, tag=p_tag,
+ set_immutability_policy=p_set_immutability_policy)
return parsed
@@ -917,9 +976,12 @@ class BlobSasPermissions(object):
Delete the previous blob version for the versioning enabled storage account.
:param bool tag:
Set or get tags on the blob.
+ :keyword bool set_immutability_policy:
+ To enable operations related to set/delete immutability policy.
+ To get immutability policy, you just need read permission.
"""
def __init__(self, read=False, add=False, create=False, write=False,
- delete=False, delete_previous_version=False, tag=True):
+ delete=False, delete_previous_version=False, tag=True, **kwargs):
self.read = read
self.add = add
self.create = create
@@ -927,13 +989,15 @@ def __init__(self, read=False, add=False, create=False, write=False,
self.delete = delete
self.delete_previous_version = delete_previous_version
self.tag = tag
+ self.set_immutability_policy = kwargs.pop('set_immutability_policy', False)
self._str = (('r' if self.read else '') +
('a' if self.add else '') +
('c' if self.create else '') +
('w' if self.write else '') +
('d' if self.delete else '') +
('x' if self.delete_previous_version else '') +
- ('t' if self.tag else ''))
+ ('t' if self.tag else '') +
+ ('i' if self.set_immutability_policy else ''))
def __str__(self):
return self._str
@@ -958,9 +1022,11 @@ def from_string(cls, permission):
p_delete = 'd' in permission
p_delete_previous_version = 'x' in permission
p_tag = 't' in permission
+ p_set_immutability_policy = 'i' in permission
parsed = cls(read=p_read, add=p_add, create=p_create, write=p_write, delete=p_delete,
- delete_previous_version=p_delete_previous_version, tag=p_tag)
+ delete_previous_version=p_delete_previous_version, tag=p_tag,
+ set_immutability_policy=p_set_immutability_policy)
return parsed
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py
index c51356bd885f..6f6052a642f3 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py
@@ -328,6 +328,9 @@ class AccountSasPermissions(object):
To enable set or get tags on the blobs in the container.
:keyword bool filter_by_tags:
To enable get blobs by tags, this should be used together with list permission.
+ :keyword bool set_immutability_policy:
+ To enable operations related to set/delete immutability policy.
+ To get immutability policy, you just need read permission.
"""
def __init__(self, read=False, write=False, delete=False,
list=False, # pylint: disable=redefined-builtin
@@ -343,6 +346,7 @@ def __init__(self, read=False, write=False, delete=False,
self.process = process
self.tag = kwargs.pop('tag', False)
self.filter_by_tags = kwargs.pop('filter_by_tags', False)
+ self.set_immutability_policy = kwargs.pop('set_immutability_policy', False)
self._str = (('r' if self.read else '') +
('w' if self.write else '') +
('d' if self.delete else '') +
@@ -353,7 +357,8 @@ def __init__(self, read=False, write=False, delete=False,
('u' if self.update else '') +
('p' if self.process else '') +
('f' if self.filter_by_tags else '') +
- ('t' if self.tag else '')
+ ('t' if self.tag else '') +
+ ('i' if self.set_immutability_policy else '')
)
def __str__(self):
@@ -383,12 +388,14 @@ def from_string(cls, permission):
p_process = 'p' in permission
p_tag = 't' in permission
p_filter_by_tags = 'f' in permission
+ p_set_immutability_policy = 'i' in permission
parsed = cls(read=p_read, write=p_write, delete=p_delete, delete_previous_version=p_delete_previous_version,
list=p_list, add=p_add, create=p_create, update=p_update, process=p_process, tag=p_tag,
- filter_by_tags=p_filter_by_tags)
+ filter_by_tags=p_filter_by_tags, set_immutability_policy=p_set_immutability_policy)
return parsed
+
class Services(object):
"""Specifies the services accessible with the account SAS.
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_upload_helpers.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_upload_helpers.py
index 94313f635e43..30d5bfae9265 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/_upload_helpers.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_upload_helpers.py
@@ -80,6 +80,11 @@ def upload_block_blob( # pylint: disable=too-many-locals
tier = kwargs.pop('standard_blob_tier', None)
blob_tags_string = kwargs.pop('blob_tags_string', None)
+ immutability_policy = kwargs.pop('immutability_policy', None)
+ immutability_policy_expiry = None if immutability_policy is None else immutability_policy.expiry_time
+ immutability_policy_mode = None if immutability_policy is None else immutability_policy.policy_mode
+ legal_hold = kwargs.pop('legal_hold', None)
+
# Do single put if the size is smaller than or equal config.max_single_put_size
if adjusted_count is not None and (adjusted_count <= blob_settings.max_single_put_size):
try:
@@ -102,6 +107,9 @@ def upload_block_blob( # pylint: disable=too-many-locals
upload_stream_current=0,
tier=tier.value if tier else None,
blob_tags_string=blob_tags_string,
+ immutability_policy_expiry=immutability_policy_expiry,
+ immutability_policy_mode=immutability_policy_mode,
+ legal_hold=legal_hold,
**kwargs)
use_original_upload_path = blob_settings.use_byte_buffer or \
@@ -151,6 +159,9 @@ def upload_block_blob( # pylint: disable=too-many-locals
headers=headers,
tier=tier.value if tier else None,
blob_tags_string=blob_tags_string,
+ immutability_policy_expiry=immutability_policy_expiry,
+ immutability_policy_mode=immutability_policy_mode,
+ legal_hold=legal_hold,
**kwargs)
except HttpResponseError as error:
try:
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py
index d13de28f8711..6c4d9fa20d81 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py
@@ -318,6 +318,20 @@ async def upload_blob(
A page blob tier value to set the blob to. The tier correlates to the size of the
blob and number of allowed IOPS. This is only applicable to page blobs on
premium storage accounts.
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+ Currently this parameter of upload_blob() API is for BlockBlob only.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+ Currently this parameter of upload_blob() API is for BlockBlob only.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
A standard blob tier value to set the blob to. For this version of the library,
this is only applicable to block blobs on standard storage accounts.
@@ -788,6 +802,64 @@ async def set_blob_metadata(self, metadata=None, **kwargs):
except HttpResponseError as error:
process_storage_error(error)
+ @distributed_trace_async
+ async def set_immutability_policy(self, immutability_policy, **kwargs):
+ # type: (**Any) -> Dict[str, str]
+ """The Set Immutability Policy operation sets the immutability policy on the blob.
+
+ .. versionadded:: 12.10.0
+ This operation was introduced in API version '2020-10-02'.
+
+ :param ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword int timeout:
+ The timeout parameter is expressed in seconds.
+ :returns: Key value pairs of blob tags.
+ :rtype: Dict[str, str]
+ """
+
+ kwargs['immutability_policy_expiry'] = immutability_policy.expiry_time
+ kwargs['immutability_policy_mode'] = immutability_policy.policy_mode
+ return await self._client.blob.set_immutability_policy(cls=return_response_headers, **kwargs)
+
+ @distributed_trace_async()
+ async def delete_immutability_policy(self, **kwargs):
+ # type: (**Any) -> None
+ """The Delete Immutability Policy operation deletes the immutability policy on the blob.
+
+ .. versionadded:: 12.10.0
+ This operation was introduced in API version '2020-10-02'.
+
+ :keyword int timeout:
+ The timeout parameter is expressed in seconds.
+ :returns: Key value pairs of blob tags.
+ :rtype: Dict[str, str]
+ """
+
+ await self._client.blob.delete_immutability_policy(**kwargs)
+
+ @distributed_trace_async
+ async def set_legal_hold(self, legal_hold, **kwargs):
+ # type: (**Any) -> Dict[str, Union[str, datetime, bool]]
+ """The Set Legal Hold operation sets a legal hold on the blob.
+
+ .. versionadded:: 12.10.0
+ This operation was introduced in API version '2020-10-02'.
+
+ :param bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+ :keyword int timeout:
+ The timeout parameter is expressed in seconds.
+ :returns: Key value pairs of blob tags.
+ :rtype: Dict[str, str]
+ """
+
+ return await self._client.blob.set_legal_hold(legal_hold, cls=return_response_headers, **kwargs)
+
@distributed_trace_async
async def create_page_blob( # type: ignore
self, size, # type: int
@@ -830,6 +902,18 @@ async def create_page_blob( # type: ignore
Required if the blob has an active lease. Value can be a BlobLeaseClient object
or the lease ID as a string.
:paramtype lease: ~azure.storage.blob.aio.BlobLeaseClient or str
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword ~datetime.datetime if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
@@ -897,6 +981,18 @@ async def create_append_blob(self, content_settings=None, metadata=None, **kwarg
.. versionadded:: 12.4.0
:paramtype tags: dict(str, str)
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword lease:
Required if the blob has an active lease. Value can be a BlobLeaseClient object
or the lease ID as a string.
@@ -1090,6 +1186,18 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy=
.. versionadded:: 12.4.0
:paramtype tags: dict(str, str)
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword ~datetime.datetime source_if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
@@ -1162,7 +1270,7 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy=
:keyword bool requires_sync:
Enforces that the service will not return a response until the copy is complete.
:returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
- :rtype: dict[str, str or ~datetime.datetime]
+ :rtype: dict[str, Union[str, ~datetime.datetime]]
.. admonition:: Example:
@@ -1504,6 +1612,18 @@ async def commit_block_list( # type: ignore
Required if the blob has an active lease. Value can be a BlobLeaseClient object
or the lease ID as a string.
:paramtype lease: ~azure.storage.blob.aio.BlobLeaseClient or str
+ :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
+ Specifies the immutability policy of a blob, blob snapshot or blob version.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
+ :keyword bool legal_hold:
+ Specified if a legal hold should be set on the blob.
+
+ .. versionadded:: 12.10.0
+ This was introduced in API version '2020-10-02'.
+
:keyword bool validate_content:
If true, calculates an MD5 hash of the page content. The storage
service checks the hash of the content that has arrived
diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_upload_helpers.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_upload_helpers.py
index 36d1e4498e5e..985e731b5766 100644
--- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_upload_helpers.py
+++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_upload_helpers.py
@@ -55,6 +55,11 @@ async def upload_block_blob( # pylint: disable=too-many-locals
tier = kwargs.pop('standard_blob_tier', None)
blob_tags_string = kwargs.pop('blob_tags_string', None)
+ immutability_policy = kwargs.pop('immutability_policy', None)
+ immutability_policy_expiry = None if immutability_policy is None else immutability_policy.expiry_time
+ immutability_policy_mode = None if immutability_policy is None else immutability_policy.policy_mode
+ legal_hold = kwargs.pop('legal_hold', None)
+
# Do single put if the size is smaller than config.max_single_put_size
if adjusted_count is not None and (adjusted_count <= blob_settings.max_single_put_size):
try:
@@ -77,6 +82,9 @@ async def upload_block_blob( # pylint: disable=too-many-locals
upload_stream_current=0,
tier=tier.value if tier else None,
blob_tags_string=blob_tags_string,
+ immutability_policy_expiry=immutability_policy_expiry,
+ immutability_policy_mode=immutability_policy_mode,
+ legal_hold=legal_hold,
**kwargs)
use_original_upload_path = blob_settings.use_byte_buffer or \
@@ -126,6 +134,9 @@ async def upload_block_blob( # pylint: disable=too-many-locals
headers=headers,
tier=tier.value if tier else None,
blob_tags_string=blob_tags_string,
+ immutability_policy_expiry=immutability_policy_expiry,
+ immutability_policy_mode=immutability_policy_mode,
+ legal_hold=legal_hold,
**kwargs)
except HttpResponseError as error:
try:
diff --git a/sdk/storage/azure-storage-blob/dev_requirements.txt b/sdk/storage/azure-storage-blob/dev_requirements.txt
index 9938821516f1..bd84436b2565 100644
--- a/sdk/storage/azure-storage-blob/dev_requirements.txt
+++ b/sdk/storage/azure-storage-blob/dev_requirements.txt
@@ -2,4 +2,5 @@
-e ../../../tools/azure-sdk-tools
../../core/azure-core
-e ../../identity/azure-identity
+-e ../../storage/azure-mgmt-storage
aiohttp>=3.0; python_version >= '3.5'
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob.test_create_append_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob.test_create_append_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..2f6fb9925274
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob.test_create_append_blob_with_immutability_policy.yaml
@@ -0,0 +1,319 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:20 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer698c1aaf?restype=container
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 00:24:20 GMT
+ etag:
+ - '"0x8D926EF19218D5F"'
+ last-modified:
+ - Fri, 04 Jun 2021 00:24:21 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:21 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainersource698c1aaf?restype=container
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 00:24:20 GMT
+ etag:
+ - '"0x8D926EF1932594F"'
+ last-modified:
+ - Fri, 04 Jun 2021 00:24:21 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer698c1aaf?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer698c1aaf","name":"vlwcontainer698c1aaf","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Fri, 04 Jun 2021 00:24:22 GMT
+ etag:
+ - '"0x8D926EF1A89B505"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - AppendBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 00:24:28 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer698c1aaf/vlwblob698c1aaf
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ etag:
+ - '"0x8D926EF1AAFAEDA"'
+ last-modified:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T00:24:23.6396250Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer698c1aaf/vlwblob698c1aaf
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '0'
+ content-type:
+ - application/octet-stream
+ date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ etag:
+ - '"0x8D926EF1AAFAEDA"'
+ last-modified:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-committed-block-count:
+ - '0'
+ x-ms-blob-type:
+ - AppendBlob
+ x-ms-creation-time:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 00:24:28 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T00:24:23.6396250Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainer698c1aaf/vlwblob698c1aaf
+ response:
+ body:
+ string: "\uFEFFBlobImmutableDueToLegalHoldThis
+ operation is not permitted as the blob is immutable due to one or more legal
+ holds.\nRequestId:cd95533e-901e-008f-19d7-5853a8000000\nTime:2021-06-04T00:24:23.9094959Z"
+ headers:
+ content-length:
+ - '284'
+ content-type:
+ - application/xml
+ date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - BlobImmutableDueToLegalHold
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: This operation is not permitted as the blob is immutable due to one
+ or more legal holds.
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer698c1aaf?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Fri, 04 Jun 2021 00:24:23 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob.test_download_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob.test_download_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..5d1b4d273fdf
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob.test_download_blob_with_immutability_policy.yaml
@@ -0,0 +1,130 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 00:28:11 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainerecd618bc?restype=container
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:9e04072a-101e-0004-590f-5805ac000000\nTime:2021-06-03T00:28:12.0315118Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Thu, 03 Jun 2021 00:28:11 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 00:28:12 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainersourceecd618bc?restype=container
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:9e04072f-101e-0004-5c0f-5805ac000000\nTime:2021-06-03T00:28:12.2204032Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Thu, 03 Jun 2021 00:28:11 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerecd618bc?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerecd618bc","name":"vlwcontainerecd618bc","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Thu, 03 Jun 2021 00:28:14 GMT
+ etag:
+ - '"0x8D9262679DD5898"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob_async.test_create_append_blob_with_immutability_policy_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob_async.test_create_append_blob_with_immutability_policy_async.yaml
new file mode 100644
index 000000000000..69fcb43a4f5e
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_append_blob_async.test_create_append_blob_with_immutability_policy_async.yaml
@@ -0,0 +1,224 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:41 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainercb3e1fa9?restype=container
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:24:41 GMT
+ etag: '"0x8D926EF2598A00C"'
+ last-modified: Fri, 04 Jun 2021 00:24:41 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/utcontainercb3e1fa9?restype=container
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:42 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainersourcecb3e1fa9?restype=container
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:24:41 GMT
+ etag: '"0x8D926EF25A23EC1"'
+ last-modified: Fri, 04 Jun 2021 00:24:42 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/utcontainersourcecb3e1fa9?restype=container
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerasynccb3e1fa9?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerasynccb3e1fa9","name":"vlwcontainerasynccb3e1fa9","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control: no-cache
+ content-length: '461'
+ content-type: application/json
+ date: Fri, 04 Jun 2021 00:24:42 GMT
+ etag: '"0x8D926EF266A0B9B"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 201
+ message: Created
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanmcccanary3/blobServices/default/containers/vlwcontainerasynccb3e1fa9?api-version=2021-04-01
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - AppendBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:43 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 00:24:48 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerasynccb3e1fa9/vlwblobcb3e1fa9
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:24:42 GMT
+ etag: '"0x8D926EF2688D849"'
+ last-modified: Fri, 04 Jun 2021 00:24:43 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T00:24:43.5177545Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainerasynccb3e1fa9/vlwblobcb3e1fa9
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:43 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainerasynccb3e1fa9/vlwblobcb3e1fa9
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges: bytes
+ content-length: '0'
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 00:24:42 GMT
+ etag: '"0x8D926EF2688D849"'
+ last-modified: Fri, 04 Jun 2021 00:24:43 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-committed-block-count: '0'
+ x-ms-blob-type: AppendBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 00:24:43 GMT
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 00:24:48 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'true'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T00:24:43.5177545Z'
+ status:
+ code: 200
+ message: OK
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainerasynccb3e1fa9/vlwblobcb3e1fa9
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:24:43 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainerasynccb3e1fa9/vlwblobcb3e1fa9
+ response:
+ body:
+ string: "\uFEFFBlobImmutableDueToLegalHoldThis
+ operation is not permitted as the blob is immutable due to one or more legal
+ holds.\nRequestId:3b95fb65-701e-0001-77d8-58851e000000\nTime:2021-06-04T00:24:43.6817010Z"
+ headers:
+ content-length: '284'
+ content-type: application/xml
+ date: Fri, 04 Jun 2021 00:24:43 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code: BlobImmutableDueToLegalHold
+ x-ms-version: '2020-10-02'
+ status:
+ code: 409
+ message: This operation is not permitted as the blob is immutable due to one
+ or more legal holds.
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainerasynccb3e1fa9/vlwblobcb3e1fa9
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainercb3e1fa9?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 00:24:43 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanmcccanary3/blobServices/default/containers/utcontainercb3e1fa9?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_put_block_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_put_block_with_immutability_policy.yaml
new file mode 100644
index 000000000000..236744bbce42
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_put_block_with_immutability_policy.yaml
@@ -0,0 +1,371 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:22:06 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer775416bc?restype=container
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:b239bfe9-601e-0013-0716-584833000000\nTime:2021-06-03T01:22:06.7223418Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Thu, 03 Jun 2021 01:22:05 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer775416bc?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer775416bc","name":"vlwcontainer775416bc","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Thu, 03 Jun 2021 01:22:09 GMT
+ etag:
+ - '"0x8D9262E020D3535"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: AAA
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:22:09 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer775416bc/blob775416bc?comp=block&blockid=MQ%3D%3D
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 01:22:09 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - Cc/2Kr4DuKg=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: BBB
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:22:09 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer775416bc/blob775416bc?comp=block&blockid=Mg%3D%3D
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 01:22:09 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - +3yuPEA7IqE=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: CCC
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:22:10 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer775416bc/blob775416bc?comp=block&blockid=Mw%3D%3D
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 01:22:09 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - VRJmMeosVKY=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: '
+
+ MQ==Mg==Mw=='
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '125'
+ Content-Type:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:22:10 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 01:22:15 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer775416bc/blob775416bc?comp=blocklist
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 01:22:10 GMT
+ etag:
+ - '"0x8D9262E029B0D55"'
+ last-modified:
+ - Thu, 03 Jun 2021 01:22:10 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - dAoQ5rLgKr0=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T01:22:10.3702869Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:22:13 GMT
+ x-ms-range:
+ - bytes=0-33554431
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer775416bc/blob775416bc
+ response:
+ body:
+ string: AAABBBCCC
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '9'
+ content-range:
+ - bytes 0-8/9
+ content-type:
+ - application/octet-stream
+ date:
+ - Thu, 03 Jun 2021 01:22:13 GMT
+ etag:
+ - '"0x8D9262E029B0D55"'
+ last-modified:
+ - Thu, 03 Jun 2021 01:22:10 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Thu, 03 Jun 2021 01:22:10 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 01:22:15 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T01:22:10.3702869Z'
+ status:
+ code: 206
+ message: Partial Content
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer775416bc?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Thu, 03 Jun 2021 01:22:14 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_with_immutability_policy.yaml
new file mode 100644
index 000000000000..86bc6af1d412
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_with_immutability_policy.yaml
@@ -0,0 +1,266 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:49:25 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer8761939?restype=container
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:49:26 GMT
+ etag: '"0x8D926F29A3CB6D9"'
+ last-modified: Fri, 04 Jun 2021 00:49:26 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/utcontainer8761939?restype=container
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer8761939?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer8761939","name":"vlwcontainer8761939","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control: no-cache
+ content-length: '449'
+ content-type: application/json
+ date: Fri, 04 Jun 2021 00:49:27 GMT
+ etag: '"0x8D926F29B3623A4"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 201
+ message: Created
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanmcccanary3/blobServices/default/containers/vlwcontainer8761939?api-version=2021-04-01
+- request:
+ body: AAA
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:49:27 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=block&blockid=MQ%3D%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:49:27 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-content-crc64: Cc/2Kr4DuKg=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=block&blockid=MQ%3D%3D
+- request:
+ body: BBB
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:49:28 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=block&blockid=Mg%3D%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:49:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-content-crc64: +3yuPEA7IqE=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=block&blockid=Mg%3D%3D
+- request:
+ body: CCC
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:49:28 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=block&blockid=Mw%3D%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:49:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-content-crc64: VRJmMeosVKY=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=block&blockid=Mw%3D%3D
+- request:
+ body: '
+
+ MQ==Mg==Mw=='
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '125'
+ Content-Type:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:49:28 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 00:49:33 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=blocklist
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:49:28 GMT
+ etag: '"0x8D926F29B74DA2C"'
+ last-modified: Fri, 04 Jun 2021 00:49:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-content-crc64: dAoQ5rLgKr0=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T00:49:28.1703468Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer8761939/blob8761939?comp=blocklist
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:49:28 GMT
+ x-ms-range:
+ - bytes=0-33554431
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8761939/blob8761939
+ response:
+ body:
+ string: AAABBBCCC
+ headers:
+ accept-ranges: bytes
+ content-length: '9'
+ content-range: bytes 0-8/9
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 00:49:28 GMT
+ etag: '"0x8D926F29B74DA2C"'
+ last-modified: Fri, 04 Jun 2021 00:49:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-type: BlockBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 00:49:28 GMT
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 00:49:33 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-last-access-time: Fri, 04 Jun 2021 00:49:28 GMT
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'true'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T00:49:28.1703468Z'
+ status:
+ code: 206
+ message: Partial Content
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer8761939/blob8761939
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer8761939?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 00:49:28 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanmcccanary3/blobServices/default/containers/utcontainer8761939?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_blob_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_blob_immutability_policy.yaml
new file mode 100644
index 000000000000..02bdbbc0f62c
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_blob_immutability_policy.yaml
@@ -0,0 +1,378 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:22:16 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainerbba812fb?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Wed, 02 Jun 2021 21:22:16 GMT
+ etag:
+ - '"0x8D9260C7FC8A085"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:22:17 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerbba812fb?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerbba812fb","name":"vlwcontainerbba812fb","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ etag:
+ - '"0x8D9260C81015A75"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbba812fb/vlwblobbba812fb
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ etag:
+ - '"0x8D9260C812FF2CD"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - 6/rBP7vK5QU=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T21:22:19.8502093Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Wed, 02 Jun 2021 21:22:24 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbba812fb/vlwblobbba812fb?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Wed, 02 Jun 2021 21:22:24 GMT
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:22:20 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbba812fb/vlwblobbba812fb
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ etag:
+ - '"0x8D9260C812FF2CD"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier:
+ - Hot
+ x-ms-access-tier-inferred:
+ - 'true'
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Wed, 02 Jun 2021 21:22:24 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T21:22:19.8502093Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:22:20 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbba812fb/vlwblobbba812fb?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:22:20 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbba812fb/vlwblobbba812fb
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ etag:
+ - '"0x8D9260C812FF2CD"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier:
+ - Hot
+ x-ms-access-tier-inferred:
+ - 'true'
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Wed, 02 Jun 2021 21:22:19 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T21:22:19.8502093Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainerbba812fb?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Wed, 02 Jun 2021 21:22:20 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_blob_legal_hold.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_blob_legal_hold.yaml
new file mode 100644
index 000000000000..8b5297f97629
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_blob_legal_hold.yaml
@@ -0,0 +1,424 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:23 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer1f2c0efd?restype=container&timeout=5
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:e40f48f6-f01e-001e-3dfa-57dc6b000000\nTime:2021-06-02T22:00:24.3863053Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Wed, 02 Jun 2021 22:00:24 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer1f2c0efd?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer1f2c0efd","name":"vlwcontainer1f2c0efd","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Wed, 02 Jun 2021 22:00:26 GMT
+ etag:
+ - '"0x8D92611D4514FB0"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1f2c0efd/vlwblob1f2c0efd
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ date:
+ - Wed, 02 Jun 2021 22:00:26 GMT
+ etag:
+ - '"0x8D92611D487F0F7"'
+ last-modified:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - 6/rBP7vK5QU=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T22:00:27.1624199Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1f2c0efd/vlwblob1f2c0efd?comp=legalhold
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1f2c0efd/vlwblob1f2c0efd
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ etag:
+ - '"0x8D92611D487F0F7"'
+ last-modified:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier:
+ - Hot
+ x-ms-access-tier-inferred:
+ - 'true'
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T22:00:27.1624199Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1f2c0efd/vlwblob1f2c0efd
+ response:
+ body:
+ string: "\uFEFFBlobImmutableDueToLegalHoldThis
+ operation is not permitted as the blob is immutable due to one or more legal
+ holds.\nRequestId:e40f4907-f01e-001e-48fa-57dc6b000000\nTime:2021-06-02T22:00:27.6464434Z"
+ headers:
+ content-length:
+ - '284'
+ content-type:
+ - application/xml
+ date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - BlobImmutableDueToLegalHold
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: This operation is not permitted as the blob is immutable due to one
+ or more legal holds.
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1f2c0efd/vlwblob1f2c0efd?comp=legalhold
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1f2c0efd/vlwblob1f2c0efd
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ etag:
+ - '"0x8D92611D487F0F7"'
+ last-modified:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier:
+ - Hot
+ x-ms-access-tier-inferred:
+ - 'true'
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T22:00:27.1624199Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer1f2c0efd?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Wed, 02 Jun 2021 22:00:27 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_copy_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_copy_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..ba53372488b2
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_copy_blob_with_immutability_policy.yaml
@@ -0,0 +1,308 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 02:46:49 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer90f61730?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 02:46:50 GMT
+ etag:
+ - '"0x8D92639D6B7BB88"'
+ last-modified:
+ - Thu, 03 Jun 2021 02:46:50 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer90f61730?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer90f61730","name":"vlwcontainer90f61730","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ etag:
+ - '"0x8D92639D846A8CD"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '1024'
+ Content-Type:
+ - application/octet-stream
+ If-None-Match:
+ - '*'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer90f61730/blob90f61730
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - yaNM/IXZgmmMasifdgcavQ==
+ date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ etag:
+ - '"0x8D92639D87DDB86"'
+ last-modified:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - ov8U1LLnyKc=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T02:46:53.6754054Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-copy-source:
+ - https://seanoauthstage.blob.core.windows.net/utcontainer90f61730/blob90f61730
+ x-ms-date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 02:46:58 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer90f61730/blob1copy
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ etag:
+ - '"0x8D92639D89B9836"'
+ last-modified:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-copy-id:
+ - 2baeb5bc-5faf-42b2-b182-1b96459c0530
+ x-ms-copy-status:
+ - success
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T02:46:53.8702902Z'
+ status:
+ code: 202
+ message: Accepted
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ x-ms-range:
+ - bytes=0-33554431
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer90f61730/blob1copy
+ response:
+ body:
+ string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '1024'
+ content-range:
+ - bytes 0-1023/1024
+ content-type:
+ - application/octet-stream
+ date:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ etag:
+ - '"0x8D92639D89B9836"'
+ last-modified:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-content-md5:
+ - yaNM/IXZgmmMasifdgcavQ==
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-copy-completion-time:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ x-ms-copy-id:
+ - 2baeb5bc-5faf-42b2-b182-1b96459c0530
+ x-ms-copy-progress:
+ - 1024/1024
+ x-ms-copy-source:
+ - https://seanoauthstage.blob.core.windows.net/utcontainer90f61730/blob90f61730
+ x-ms-copy-status:
+ - success
+ x-ms-creation-time:
+ - Thu, 03 Jun 2021 02:46:53 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 02:46:58 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T02:46:53.8702902Z'
+ status:
+ code: 206
+ message: Partial Content
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer90f61730?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Thu, 03 Jun 2021 02:46:58 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_download_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_download_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..7c24061d0486
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_download_blob_with_immutability_policy.yaml
@@ -0,0 +1,367 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:21:30 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainerf03618cd?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 01:21:30 GMT
+ etag:
+ - '"0x8D9262DEAF03895"'
+ last-modified:
+ - Thu, 03 Jun 2021 01:21:30 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerf03618cd?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerf03618cd","name":"vlwcontainerf03618cd","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Thu, 03 Jun 2021 01:21:32 GMT
+ etag:
+ - '"0x8D9262DEC0FF64B"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: abcedfg
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '7'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:21:32 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 01:21:37 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerf03618cd/vlwblobf03618cd
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - 3eUGUzgtctuRaJEq8fjAHg==
+ date:
+ - Thu, 03 Jun 2021 01:21:32 GMT
+ etag:
+ - '"0x8D9262DEC430203"'
+ last-modified:
+ - Thu, 03 Jun 2021 01:21:32 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - mI9QQJ+DEzc=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T01:21:32.8844051Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ x-ms-range:
+ - bytes=0-33554431
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainerf03618cd/vlwblobf03618cd
+ response:
+ body:
+ string: abcedfg
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '7'
+ content-range:
+ - bytes 0-6/7
+ content-type:
+ - application/octet-stream
+ date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ etag:
+ - '"0x8D9262DEC430203"'
+ last-modified:
+ - Thu, 03 Jun 2021 01:21:32 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-content-md5:
+ - 3eUGUzgtctuRaJEq8fjAHg==
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Thu, 03 Jun 2021 01:21:32 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 01:21:37 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T01:21:32.8844051Z'
+ status:
+ code: 206
+ message: Partial Content
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainerf03618cd/vlwblobf03618cd
+ response:
+ body:
+ string: "\uFEFFBlobImmutableDueToLegalHoldThis
+ operation is not permitted as the blob is immutable due to one or more legal
+ holds.\nRequestId:1702de51-201e-002a-1716-586ee4000000\nTime:2021-06-03T01:21:35.8691730Z"
+ headers:
+ content-length:
+ - '284'
+ content-type:
+ - application/xml
+ date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - BlobImmutableDueToLegalHold
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: This operation is not permitted as the blob is immutable due to one
+ or more legal holds.
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerf03618cd/vlwblobf03618cd?comp=legalhold
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 01:21:36 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainerf03618cd/vlwblobf03618cd?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Thu, 03 Jun 2021 01:21:35 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainerf03618cd?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Thu, 03 Jun 2021 01:21:36 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_list_blobs_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_list_blobs_with_immutability_policy.yaml
new file mode 100644
index 000000000000..261c2b499944
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_list_blobs_with_immutability_policy.yaml
@@ -0,0 +1,229 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:15:04 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainera98317a4?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Fri, 04 Jun 2021 03:15:04 GMT
+ etag:
+ - '"0x8D92706F34CF886"'
+ last-modified:
+ - Fri, 04 Jun 2021 03:15:05 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainera98317a4?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainera98317a4","name":"vlwcontainera98317a4","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Fri, 04 Jun 2021 03:15:07 GMT
+ etag:
+ - '"0x8D92706F456B189"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: abcedfg
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '7'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:15:07 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:15:12 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainera98317a4/vlwbloba98317a4
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - 3eUGUzgtctuRaJEq8fjAHg==
+ date:
+ - Fri, 04 Jun 2021 03:15:07 GMT
+ etag:
+ - '"0x8D92706F4861F39"'
+ last-modified:
+ - Fri, 04 Jun 2021 03:15:07 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - mI9QQJ+DEzc=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T03:15:07.5363401Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:15:07 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainera98317a4?restype=container&comp=list&include=immutabilitypolicy,legalhold
+ response:
+ body:
+ string: "\uFEFFvlwbloba98317a42021-06-04T03:15:07.5363401ZtrueFri,
+ 04 Jun 2021 03:15:07 GMTFri, 04 Jun 2021 03:15:07
+ GMT0x8D92706F4861F397application/octet-stream3eUGUzgtctuRaJEq8fjAHg==BlockBlobHottrueunlockedavailabletrueFri,
+ 04 Jun 2021 03:15:12 GMTunlockedtrue"
+ headers:
+ content-type:
+ - application/xml
+ date:
+ - Fri, 04 Jun 2021 03:15:07 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainera98317a4?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Fri, 04 Jun 2021 03:15:08 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_blob_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_blob_immutability_policy.yaml
new file mode 100644
index 000000000000..7d111fbe68bd
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_blob_immutability_policy.yaml
@@ -0,0 +1,383 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:20:54 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainerbd114a6?restype=container&timeout=5
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:2b69983b-701e-000f-20f5-57d0c5000000\nTime:2021-06-02T21:20:54.9331260Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Wed, 02 Jun 2021 21:20:54 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerbd114a6?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainerbd114a6","name":"vlwcontainerbd114a6","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '449'
+ content-type:
+ - application/json
+ date:
+ - Wed, 02 Jun 2021 21:20:57 GMT
+ etag:
+ - '"0x8D9260C5034AD4B"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:20:57 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbd114a6/vlwblobbd114a6
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ date:
+ - Wed, 02 Jun 2021 21:20:58 GMT
+ etag:
+ - '"0x8D9260C50723E08"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:20:58 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - 6/rBP7vK5QU=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T21:20:58.0773144Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:21:00 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Wed, 02 Jun 2021 21:21:05 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbd114a6/vlwblobbd114a6?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Wed, 02 Jun 2021 21:21:00 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Wed, 02 Jun 2021 21:21:05 GMT
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:21:01 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbd114a6/vlwblobbd114a6
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Wed, 02 Jun 2021 21:21:01 GMT
+ etag:
+ - '"0x8D9260C50723E08"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:20:58 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier:
+ - Hot
+ x-ms-access-tier-inferred:
+ - 'true'
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Wed, 02 Jun 2021 21:20:58 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Wed, 02 Jun 2021 21:21:05 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T21:20:58.0773144Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:21:02 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbd114a6/vlwblobbd114a6?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Wed, 02 Jun 2021 21:21:02 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Wed, 02 Jun 2021 21:21:02 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainerbd114a6/vlwblobbd114a6
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Wed, 02 Jun 2021 21:21:02 GMT
+ etag:
+ - '"0x8D9260C50723E08"'
+ last-modified:
+ - Wed, 02 Jun 2021 21:20:58 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier:
+ - Hot
+ x-ms-access-tier-inferred:
+ - 'true'
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Wed, 02 Jun 2021 21:20:58 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-02T21:20:58.0773144Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainerbd114a6?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Wed, 02 Jun 2021 21:21:04 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy.yaml
new file mode 100644
index 000000000000..997b81712bdf
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy.yaml
@@ -0,0 +1,131 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Tue, 01 Jun 2021 23:07:38 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontaineraac312a8?restype=container&timeout=5
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:1e10f50d-001e-0018-1b3a-579d5a000000\nTime:2021-06-01T23:07:38.8357199Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Tue, 01 Jun 2021 23:07:38 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ If-Match:
+ - '*'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontaineraac312a8/immutabilityPolicies/default?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontaineraac312a8/immutabilityPolicies/default","name":"default","type":"Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies","etag":"\"8d9254ab66c2c6c\"","properties":{"immutabilityPeriodSinceCreationInDays":1,"state":"Unlocked"}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '433'
+ content-type:
+ - application/json
+ date:
+ - Tue, 01 Jun 2021 23:07:42 GMT
+ etag:
+ - '"8d9254ab66c2c6c"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontaineraac312a8?api-version=2021-04-01
+ response:
+ body:
+ string: '{"error":{"code":"ContainerProtectedFromDeletion","message":"The storage
+ account storagename container utcontaineraac312a8 is protected from deletion
+ due to ImmutabilityPolicy."}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '182'
+ content-type:
+ - application/json
+ date:
+ - Tue, 01 Jun 2021 23:07:43 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 409
+ message: Conflict
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy_using_account_sas.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy_using_account_sas.yaml
new file mode 100644
index 000000000000..c6705e348800
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy_using_account_sas.yaml
@@ -0,0 +1,241 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:07:08 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer413f1a1f?restype=container&timeout=5
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:a0de277d-f01e-0052-30ee-58a62a000000\nTime:2021-06-04T03:07:09.0965940Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Fri, 04 Jun 2021 03:07:08 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer413f1a1f?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer413f1a1f","name":"vlwcontainer413f1a1f","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Fri, 04 Jun 2021 03:07:10 GMT
+ etag:
+ - '"0x8D92705D8591BDD"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:07:10 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer413f1a1f/vlwblob413f1a1f
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ date:
+ - Fri, 04 Jun 2021 03:07:10 GMT
+ etag:
+ - '"0x8D92705D88C091C"'
+ last-modified:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-content-crc64:
+ - 6/rBP7vK5QU=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T03:07:11.1021612Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:07:16 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer413f1a1f/vlwblob413f1a1f?comp=immutabilityPolicies&se=2021-06-04T04%3A07%3A11Z&sp=ri&sv=2020-10-02&ss=b&srt=co&sig=LiGLEW4kb4GX/bBmM4RHYbLxEhYnIUYvqjc8me3G0lc%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:07:16 GMT
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - python-requests/2.24.0
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer413f1a1f/vlwblob413f1a1f?se=2021-06-04T04%3A07%3A11Z&sp=ri&sv=2020-10-02&ss=b&srt=co&sig=LiGLEW4kb4GX/bBmM4RHYbLxEhYnIUYvqjc8me3G0lc%3D
+ response:
+ body:
+ string: abc
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ etag:
+ - '"0x8D92705D88C091C"'
+ last-modified:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:07:16 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-last-access-time:
+ - Fri, 04 Jun 2021 03:07:11 GMT
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T03:07:11.1021612Z'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy_using_sas.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy_using_sas.yaml
new file mode 100644
index 000000000000..a87452caae22
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob.test_set_immutability_policy_using_sas.yaml
@@ -0,0 +1,323 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:30:07 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer7c4d16d3?restype=container&timeout=5
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:64db2846-301e-0029-6df1-58b647000000\nTime:2021-06-04T03:30:08.0362489Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Fri, 04 Jun 2021 03:30:07 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer7c4d16d3?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer7c4d16d3","name":"vlwcontainer7c4d16d3","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Fri, 04 Jun 2021 03:30:09 GMT
+ etag:
+ - '"0x8D927090ECED923"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer7c4d16d3/vlwblob7c4d16d3
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ date:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ etag:
+ - '"0x8D927090EF9125A"'
+ last-modified:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-content-crc64:
+ - 6/rBP7vK5QU=
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T03:30:10.9038954Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:15 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer7c4d16d3/vlwblob7c4d16d3?comp=immutabilityPolicies&se=2021-06-04T04%3A30%3A10Z&sp=ri&sv=2020-10-02&ss=b&srt=co&sig=JeSZVEcG0xoikV14a2xJobNVgs8UCKM/sM/2GWKxfjM%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:15 GMT
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - python-requests/2.24.0
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer7c4d16d3/vlwblob7c4d16d3?se=2021-06-04T04%3A30%3A10Z&sp=ri&sv=2020-10-02&ss=b&srt=co&sig=JeSZVEcG0xoikV14a2xJobNVgs8UCKM/sM/2GWKxfjM%3D
+ response:
+ body:
+ string: abc
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '3'
+ content-md5:
+ - kAFQmDzST7DWlj99KOF/cg==
+ content-type:
+ - application/octet-stream
+ date:
+ - Fri, 04 Jun 2021 03:30:11 GMT
+ etag:
+ - '"0x8D927090EF9125A"'
+ last-modified:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-creation-time:
+ - Fri, 04 Jun 2021 03:30:10 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:15 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-04T03:30:10.9038954Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:30:11 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:16 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer7c4d16d3/vlwblob7c4d16d3?comp=immutabilityPolicies&se=2021-06-04T04%3A30%3A11Z&sp=ri&sv=2020-10-02&sr=c&sig=Yx49o9nuCzbv6BlcDlvnEL8oMjvHDqLKFWJYIM%2BU0c0%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 03:30:11 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:16 GMT
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:30:12 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:17 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer7c4d16d3/vlwblob7c4d16d3?comp=immutabilityPolicies&se=2021-06-04T04%3A30%3A12Z&sp=rti&sv=2020-10-02&sr=b&sig=QDN1tgMDgi3XwgdgSyI4RLFZr%2BRMdh95W8gThmLkmnk%3D
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Fri, 04 Jun 2021 03:30:12 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:30:17 GMT
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_blob_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_blob_immutability_policy.yaml
new file mode 100644
index 000000000000..dd8195b77b5d
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_blob_immutability_policy.yaml
@@ -0,0 +1,261 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:34:53 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer36dc1578?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date: Fri, 04 Jun 2021 03:34:52 GMT
+ etag: '"0x8D92709B7A33966"'
+ last-modified: Fri, 04 Jun 2021 03:34:53 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/utcontainer36dc1578?restype=container&timeout=5
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer36dc1578?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer36dc1578","name":"vlwcontainer36dc1578","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control: no-cache
+ content-length: '451'
+ content-type: application/json
+ date: Fri, 04 Jun 2021 03:34:55 GMT
+ etag: '"0x8D92709B8C66F66"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 201
+ message: Created
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/vlwcontainer36dc1578?api-version=2021-04-01
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:34:55 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5: kAFQmDzST7DWlj99KOF/cg==
+ date: Fri, 04 Jun 2021 03:34:55 GMT
+ etag: '"0x8D92709B8E5204A"'
+ last-modified: Fri, 04 Jun 2021 03:34:55 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-content-crc64: 6/rBP7vK5QU=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:34:55.9848522Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:34:56 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:35:01 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 03:34:55 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 03:35:01 GMT
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578?comp=immutabilityPolicies
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:34:56 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges: bytes
+ content-length: '3'
+ content-md5: kAFQmDzST7DWlj99KOF/cg==
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 03:34:55 GMT
+ etag: '"0x8D92709B8E5204A"'
+ last-modified: Fri, 04 Jun 2021 03:34:55 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier: Hot
+ x-ms-access-tier-inferred: 'true'
+ x-ms-blob-type: BlockBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 03:34:55 GMT
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 03:35:01 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:34:55.9848522Z'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:34:56 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 03:34:56 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578?comp=immutabilityPolicies
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:34:56 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges: bytes
+ content-length: '3'
+ content-md5: kAFQmDzST7DWlj99KOF/cg==
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 03:34:56 GMT
+ etag: '"0x8D92709B8E5204A"'
+ last-modified: Fri, 04 Jun 2021 03:34:55 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier: Hot
+ x-ms-access-tier-inferred: 'true'
+ x-ms-blob-type: BlockBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 03:34:55 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:34:55.9848522Z'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer36dc1578/vlwblob36dc1578
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer36dc1578?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 03:34:56 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/utcontainer36dc1578?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_blob_legal_hold.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_blob_legal_hold.yaml
new file mode 100644
index 000000000000..325e03555fda
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_blob_legal_hold.yaml
@@ -0,0 +1,291 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:28 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer83ec117a?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date: Fri, 04 Jun 2021 03:35:27 GMT
+ etag: '"0x8D92709CC56B5FD"'
+ last-modified: Fri, 04 Jun 2021 03:35:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/utcontainer83ec117a?restype=container&timeout=5
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer83ec117a?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer83ec117a","name":"vlwcontainer83ec117a","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control: no-cache
+ content-length: '451'
+ content-type: application/json
+ date: Fri, 04 Jun 2021 03:35:30 GMT
+ etag: '"0x8D92709CD398120"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 201
+ message: Created
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/vlwcontainer83ec117a?api-version=2021-04-01
+- request:
+ body: abc
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '3'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5: kAFQmDzST7DWlj99KOF/cg==
+ date: Fri, 04 Jun 2021 03:35:29 GMT
+ etag: '"0x8D92709CD57F867"'
+ last-modified: Fri, 04 Jun 2021 03:35:30 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-content-crc64: 6/rBP7vK5QU=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:35:30.2919271Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a?comp=legalhold
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 03:35:29 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-legal-hold: 'true'
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a?comp=legalhold
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges: bytes
+ content-length: '3'
+ content-md5: kAFQmDzST7DWlj99KOF/cg==
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 03:35:29 GMT
+ etag: '"0x8D92709CD57F867"'
+ last-modified: Fri, 04 Jun 2021 03:35:30 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier: Hot
+ x-ms-access-tier-inferred: 'true'
+ x-ms-blob-type: BlockBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'true'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:35:30.2919271Z'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+ response:
+ body:
+ string: "\uFEFFBlobImmutableDueToLegalHoldThis
+ operation is not permitted as the blob is immutable due to one or more legal
+ holds.\nRequestId:42521f4c-d01e-002c-36f2-582fd5000000\nTime:2021-06-04T03:35:30.7571698Z"
+ headers:
+ content-length: '284'
+ content-type: application/xml
+ date: Fri, 04 Jun 2021 03:35:29 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code: BlobImmutableDueToLegalHold
+ x-ms-version: '2020-10-02'
+ status:
+ code: 409
+ message: This operation is not permitted as the blob is immutable due to one
+ or more legal holds.
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a?comp=legalhold
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 03:35:30 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-legal-hold: 'false'
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a?comp=legalhold
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges: bytes
+ content-length: '3'
+ content-md5: kAFQmDzST7DWlj99KOF/cg==
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 03:35:30 GMT
+ etag: '"0x8D92709CD57F867"'
+ last-modified: Fri, 04 Jun 2021 03:35:30 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-access-tier: Hot
+ x-ms-access-tier-inferred: 'true'
+ x-ms-blob-type: BlockBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 03:35:30 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'false'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:35:30.2919271Z'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer83ec117a/vlwblob83ec117a
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer83ec117a?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 03:35:31 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/utcontainer83ec117a?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_copy_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_copy_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..0ca586139375
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_copy_blob_with_immutability_policy.yaml
@@ -0,0 +1,223 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:33:27 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer250c19ad?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date: Fri, 04 Jun 2021 03:33:27 GMT
+ etag: '"0x8D92709843D15EB"'
+ last-modified: Fri, 04 Jun 2021 03:33:27 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/utcontainer250c19ad?restype=container&timeout=5
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer250c19ad?api-version=2021-04-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs
+ o0cf3W3Wk2ZaF6u2qJbN3Um2f3+yd+/edr6Xn2/v7376cPvgYOdge/9hPtmZHeSTbGd2t86bal1P
+ 88/rar1q7v7eJ2WRL9u7q7q6LGZ53dz9opjWVVOdt+PXbVVnF/ndRn4eT6fVetk2d5s8W1bZup03
+ LX18d1JWk9d5fVlM8+buLD/P1mV7d1ot26xYAuBleWX/2ru/M919mM0+Gn20zBY5jWHg2/Z6hW9v
+ Ribo3UJqCAQNaZXXbZE3Hz0igi0W6zablLkC+m7Rzn+SGhLliuUFWuRLfE10bet1/ktGH83yMm/x
+ 93lWNvnoozpfEGxq/Io+XoLkT7Nrgr0z+mieNWcCvyiL9vplVRbTa/siffs8v8jKb1elgfZLfsn/
+ A9wkcTbDAQAA
+ headers:
+ cache-control: no-cache
+ content-encoding: gzip
+ content-type: application/json
+ date: Fri, 04 Jun 2021 03:33:28 GMT
+ etag: '"0x8D9270984D5D50B"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ transfer-encoding: chunked
+ vary: Accept-Encoding
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/vlwcontainer250c19ad?api-version=2021-04-01
+- request:
+ body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '1024'
+ Content-Type:
+ - application/octet-stream
+ If-None-Match:
+ - '*'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:33:28 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer250c19ad/blob250c19ad
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5: yaNM/IXZgmmMasifdgcavQ==
+ date: Fri, 04 Jun 2021 03:33:28 GMT
+ etag: '"0x8D9270984F1F987"'
+ last-modified: Fri, 04 Jun 2021 03:33:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-content-crc64: ov8U1LLnyKc=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:33:28.8275335Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/utcontainer250c19ad/blob250c19ad
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-copy-source:
+ - https://seanoauthstage.blob.core.windows.net/utcontainer250c19ad/blob250c19ad
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:33:28 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:33:33 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer250c19ad/blob1copy
+ response:
+ body:
+ string: ''
+ headers:
+ date: Fri, 04 Jun 2021 03:33:28 GMT
+ etag: '"0x8D9270985009D5C"'
+ last-modified: Fri, 04 Jun 2021 03:33:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-copy-id: 87477c2c-1b83-445c-810c-05c5ea58f10e
+ x-ms-copy-status: success
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:33:28.9234780Z'
+ status:
+ code: 202
+ message: Accepted
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer250c19ad/blob1copy
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:33:28 GMT
+ x-ms-range:
+ - bytes=0-33554431
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer250c19ad/blob1copy
+ response:
+ body:
+ string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ headers:
+ accept-ranges: bytes
+ content-length: '1024'
+ content-range: bytes 0-1023/1024
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 03:33:28 GMT
+ etag: '"0x8D9270985009D5C"'
+ last-modified: Fri, 04 Jun 2021 03:33:28 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-content-md5: yaNM/IXZgmmMasifdgcavQ==
+ x-ms-blob-type: BlockBlob
+ x-ms-copy-completion-time: Fri, 04 Jun 2021 03:33:28 GMT
+ x-ms-copy-id: 87477c2c-1b83-445c-810c-05c5ea58f10e
+ x-ms-copy-progress: 1024/1024
+ x-ms-copy-source: https://seanoauthstage.blob.core.windows.net/utcontainer250c19ad/blob250c19ad
+ x-ms-copy-status: success
+ x-ms-creation-time: Fri, 04 Jun 2021 03:33:28 GMT
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 03:33:33 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'true'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:33:28.9234780Z'
+ status:
+ code: 206
+ message: Partial Content
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer250c19ad/blob1copy
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer250c19ad?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 03:33:28 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/utcontainer250c19ad?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_download_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_download_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..9045f957222f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_download_blob_with_immutability_policy.yaml
@@ -0,0 +1,267 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:42:50 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer8e401b4a?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date: Fri, 04 Jun 2021 03:42:50 GMT
+ etag: '"0x8D9270AD3F556EC"'
+ last-modified: Fri, 04 Jun 2021 03:42:50 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/utcontainer8e401b4a?restype=container&timeout=5
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer8e401b4a?api-version=2021-04-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs
+ o0cf3W3Wk2ZaF6u2qJbN3Um2f3+yd+/edr6Xn2/v7376cPvgYOdge/9hPtmZHeSTbGd2t86bal1P
+ 88/rar1q7v7eJ2WRL9u7q7q6LGZ53dz9opjWVVOdt+PXbVVnF/ndRn4eT6fVetk2d5s8W1bZup03
+ LX18d1JWk9d5fVlM8+buLD/P1mV7d1ot26xYAuBleWX/Osj3d3Yn+9lHo4+W2SKnMQx8216v8O3N
+ yAS9W0gNgaAhrfK6LfLmo0dEsMVi3WaTMldA3y3a+U9SQ6JcsbxAi3yJr4mubb3Of8noo1le5i3+
+ Ps/KJh99VOcLgk2NX9HHS5D8aXZNsHdGH82z5kzgF2XRXr+symJ6bV+kb5/nF1n57ao00H7JL/l/
+ ADS4My/DAQAA
+ headers:
+ cache-control: no-cache
+ content-encoding: gzip
+ content-type: application/json
+ date: Fri, 04 Jun 2021 03:42:53 GMT
+ etag: '"0x8D9270AD5685B50"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ transfer-encoding: chunked
+ vary: Accept-Encoding
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/vlwcontainer8e401b4a?api-version=2021-04-01
+- request:
+ body: abcedfg
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '7'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:42:53 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:42:58 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5: 3eUGUzgtctuRaJEq8fjAHg==
+ date: Fri, 04 Jun 2021 03:42:53 GMT
+ etag: '"0x8D9270AD59C9502"'
+ last-modified: Fri, 04 Jun 2021 03:42:53 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-content-crc64: mI9QQJ+DEzc=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:42:53.6610834Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:42:53 GMT
+ x-ms-range:
+ - bytes=0-33554431
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a
+ response:
+ body:
+ string: abcedfg
+ headers:
+ accept-ranges: bytes
+ content-length: '7'
+ content-range: bytes 0-6/7
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 03:42:53 GMT
+ etag: '"0x8D9270AD59C9502"'
+ last-modified: Fri, 04 Jun 2021 03:42:53 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-content-md5: 3eUGUzgtctuRaJEq8fjAHg==
+ x-ms-blob-type: BlockBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 03:42:53 GMT
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 03:42:58 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'true'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:42:53.6610834Z'
+ status:
+ code: 206
+ message: Partial Content
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:42:53 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a
+ response:
+ body:
+ string: "\uFEFFBlobImmutableDueToLegalHoldThis
+ operation is not permitted as the blob is immutable due to one or more legal
+ holds.\nRequestId:beffd37e-401e-0021-09f3-58bb8d000000\nTime:2021-06-04T03:42:53.8625983Z"
+ headers:
+ content-length: '284'
+ content-type: application/xml
+ date: Fri, 04 Jun 2021 03:42:53 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code: BlobImmutableDueToLegalHold
+ x-ms-version: '2020-10-02'
+ status:
+ code: 409
+ message: This operation is not permitted as the blob is immutable due to one
+ or more legal holds.
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:42:53 GMT
+ x-ms-legal-hold:
+ - 'false'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a?comp=legalhold
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 03:42:53 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-legal-hold: 'false'
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a?comp=legalhold
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:42:53 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: DELETE
+ uri: https://storagename.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a?comp=immutabilityPolicies
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 03:42:53 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer8e401b4a/vlwblob8e401b4a?comp=immutabilityPolicies
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer8e401b4a?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 03:42:54 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/utcontainer8e401b4a?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_list_blobs_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_list_blobs_with_immutability_policy.yaml
new file mode 100644
index 000000000000..f8737b445f88
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_common_blob_async.test_list_blobs_with_immutability_policy.yaml
@@ -0,0 +1,164 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:37:15 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer40161a21?restype=container&timeout=5
+ response:
+ body:
+ string: ''
+ headers:
+ date: Fri, 04 Jun 2021 03:37:15 GMT
+ etag: '"0x8D9270A0C4E9EFE"'
+ last-modified: Fri, 04 Jun 2021 03:37:15 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/utcontainer40161a21?restype=container&timeout=5
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer40161a21?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer40161a21","name":"vlwcontainer40161a21","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control: no-cache
+ content-length: '451'
+ content-type: application/json
+ date: Fri, 04 Jun 2021 03:37:16 GMT
+ etag: '"0x8D9270A0CED3E22"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1198'
+ status:
+ code: 201
+ message: Created
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/vlwcontainer40161a21?api-version=2021-04-01
+- request:
+ body: abcedfg
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '7'
+ Content-Type:
+ - application/octet-stream
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-type:
+ - BlockBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:37:17 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 03:37:22 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer40161a21/vlwblob40161a21
+ response:
+ body:
+ string: ''
+ headers:
+ content-md5: 3eUGUzgtctuRaJEq8fjAHg==
+ date: Fri, 04 Jun 2021 03:37:16 GMT
+ etag: '"0x8D9270A0D10AE40"'
+ last-modified: Fri, 04 Jun 2021 03:37:17 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-content-crc64: mI9QQJ+DEzc=
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T03:37:17.1999052Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer40161a21/vlwblob40161a21
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 03:37:17 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: GET
+ uri: https://storagename.blob.core.windows.net/vlwcontainer40161a21?restype=container&comp=list&include=immutabilitypolicy,legalhold
+ response:
+ body:
+ string: "\uFEFFvlwblob40161a212021-06-04T03:37:17.1999052ZtrueFri,
+ 04 Jun 2021 03:37:17 GMTFri, 04 Jun 2021 03:37:17
+ GMT0x8D9270A0D10AE407application/octet-stream3eUGUzgtctuRaJEq8fjAHg==BlockBlobHottrueunlockedavailabletrueFri,
+ 04 Jun 2021 03:37:22 GMTunlockedtrue"
+ headers:
+ content-type: application/xml
+ date: Fri, 04 Jun 2021 03:37:16 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seanoauthstage.blob.core.windows.net/vlwcontainer40161a21?restype=container&comp=list&include=immutabilitypolicy,legalhold
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer40161a21?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 03:37:17 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14998'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanoauthstage/blobServices/default/containers/utcontainer40161a21?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_get_container_properties.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_get_container_properties.yaml
index 82c54f21d97e..d0940b45bc99 100644
--- a/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_get_container_properties.yaml
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_get_container_properties.yaml
@@ -3,7 +3,7 @@ interactions:
body: null
headers:
Accept:
- - '*/*'
+ - application/xml
Accept-Encoding:
- gzip, deflate
Connection:
@@ -11,11 +11,11 @@ interactions:
Content-Length:
- '0'
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: PUT
uri: https://storagename.blob.core.windows.net/container9840123e?restype=container
response:
@@ -25,15 +25,15 @@ interactions:
content-length:
- '0'
date:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
etag:
- - '"0x8D75974FAB94E4D"'
+ - '"0x8D926F235BE42FB"'
last-modified:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
status:
code: 201
message: Created
@@ -41,7 +41,7 @@ interactions:
body: null
headers:
Accept:
- - '*/*'
+ - application/xml
Accept-Encoding:
- gzip, deflate
Connection:
@@ -49,15 +49,15 @@ interactions:
Content-Length:
- '0'
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
x-ms-meta-hello:
- world
x-ms-meta-number:
- '42'
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: PUT
uri: https://storagename.blob.core.windows.net/container9840123e?restype=container&comp=metadata
response:
@@ -67,15 +67,15 @@ interactions:
content-length:
- '0'
date:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
etag:
- - '"0x8D75974FAC24A4E"'
+ - '"0x8D926F235CCC105"'
last-modified:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
status:
code: 200
message: OK
@@ -83,17 +83,17 @@ interactions:
body: null
headers:
Accept:
- - '*/*'
+ - application/xml
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: GET
uri: https://storagename.blob.core.windows.net/container9840123e?restype=container
response:
@@ -103,11 +103,11 @@ interactions:
content-length:
- '0'
date:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
etag:
- - '"0x8D75974FAC24A4E"'
+ - '"0x8D926F235CCC105"'
last-modified:
- - Fri, 25 Oct 2019 17:58:45 GMT
+ - Fri, 04 Jun 2021 00:46:37 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-default-encryption-scope:
@@ -118,6 +118,8 @@ interactions:
- 'false'
x-ms-has-legal-hold:
- 'false'
+ x-ms-immutable-storage-with-versioning-enabled:
+ - 'false'
x-ms-lease-state:
- available
x-ms-lease-status:
@@ -127,7 +129,7 @@ interactions:
x-ms-meta-number:
- '42'
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
status:
code: 200
message: OK
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_containers.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_containers.yaml
index 5ab72efe679e..3da4498ca96d 100644
--- a/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_containers.yaml
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_container.test_list_containers.yaml
@@ -3,7 +3,7 @@ interactions:
body: null
headers:
Accept:
- - '*/*'
+ - application/xml
Accept-Encoding:
- gzip, deflate
Connection:
@@ -11,32 +11,33 @@ interactions:
Content-Length:
- '0'
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:59:39 GMT
+ - Thu, 03 Jun 2021 03:18:16 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: PUT
uri: https://storagename.blob.core.windows.net/container4760e81?restype=container
response:
body:
- string: ''
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:e54c3998-801e-0009-1527-5891f4000000\nTime:2021-06-03T03:18:16.7641480Z"
headers:
content-length:
- - '0'
+ - '230'
+ content-type:
+ - application/xml
date:
- - Fri, 25 Oct 2019 17:59:38 GMT
- etag:
- - '"0x8D759751AF08601"'
- last-modified:
- - Fri, 25 Oct 2019 17:59:39 GMT
+ - Thu, 03 Jun 2021 03:18:16 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
status:
- code: 201
- message: Created
+ code: 409
+ message: The specified container already exists.
- request:
body: null
headers:
@@ -47,60 +48,125 @@ interactions:
Connection:
- keep-alive
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:59:39 GMT
+ - Thu, 03 Jun 2021 03:18:18 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: GET
- uri: https://storagename.blob.core.windows.net/?comp=list
+ uri: https://storagename.blob.core.windows.net/?comp=list&include=
response:
body:
string: "\uFEFFcontainer11d00ec6Fri,
- 25 Oct 2019 17:58:37 GMT\"0x8D75974F64FBE9F\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer1e4e193bFri,
- 25 Oct 2019 17:58:53 GMT\"0x8D75974FF5A1986\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer1ea014b6Fri,
- 25 Oct 2019 17:58:53 GMT\"0x8D75974FF965A89\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainer202c14d1Fri,
- 25 Oct 2019 17:58:44 GMT\"0x8D75974FA1D3109\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainer21340f21Fri,
- 25 Oct 2019 17:58:44 GMT\"0x8D75974F9F6D2D3\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer40320ffdFri,
- 25 Oct 2019 17:58:39 GMT\"0x8D75974F735127E\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer4760e81Fri,
- 25 Oct 2019 17:59:39 GMT\"0x8D759751AF08601\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer4ef015fdFri,
- 25 Oct 2019 17:59:37 GMT\"0x8D7597519C8AAB2\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer617e10e3Fri,
- 25 Oct 2019 17:58:42 GMT\"0x8D75974F8E69A1C\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer61f210d7Fri,
- 25 Oct 2019 17:59:19 GMT\"0x8D759750F1EFF99\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainer70e51ab2Fri,
- 25 Oct 2019 17:58:39 GMT\"0x8D75974F7129DD8\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsecontainer73581132Fri,
- 25 Oct 2019 17:58:44 GMT\"0x8D75974FA567586\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer73941128Fri,
- 25 Oct 2019 17:59:36 GMT\"0x8D7597518ECA775\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer75091165Fri,
- 25 Oct 2019 17:59:38 GMT\"0x8D759751AA86553\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer77341677Fri,
- 25 Oct 2019 17:58:46 GMT\"0x8D75974FB38420F\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer781721d1Fri,
- 25 Oct 2019 17:58:38 GMT\"0x8D75974F6703E3A\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainer8f3e16e2Fri,
- 25 Oct 2019 17:58:45 GMT\"0x8D75974FA8D2376\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainer9840123eFri,
- 25 Oct 2019 17:58:45 GMT\"0x8D75974FAC24A4E\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainerab171296Fri,
- 25 Oct 2019 17:59:36 GMT\"0x8D75975192888AC\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainerc01c0c5dFri,
- 25 Oct 2019 17:59:35 GMT\"0x8D7597518B2735F\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainerc031481Fri,
- 25 Oct 2019 17:58:38 GMT\"0x8D75974F69CF8F1\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainerc09017d7Fri,
- 25 Oct 2019 17:59:35 GMT\"0x8D75975187E5ED8\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainerc2ce17eeFri,
- 25 Oct 2019 17:58:45 GMT\"0x8D75974FAF378A6\"unlockedbroken$account-encryption-keyfalsefalsefalsecontainerd2991398Fri,
- 25 Oct 2019 17:59:38 GMT\"0x8D759751A582601\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainerd2a01376Fri,
- 25 Oct 2019 17:58:37 GMT\"0x8D75974F620D13F\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainere23113a2Fri,
- 25 Oct 2019 17:58:46 GMT\"0x8D75974FB7688FE\"unlockedbroken$account-encryption-keyfalsefalsefalsecontainere26513acFri,
- 25 Oct 2019 17:58:40 GMT\"0x8D75974F78B6C41\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainere54813d5Fri,
- 25 Oct 2019 17:59:36 GMT\"0x8D75975197B6CE2\"unlockedavailable$account-encryption-keyfalsefalsefalsecontaineref7b188eFri,
- 25 Oct 2019 17:58:38 GMT\"0x8D75974F6CB5203\"unlockedavailableblob$account-encryption-keyfalsefalsefalsecontainerf3fe18d5Fri,
- 25 Oct 2019 17:59:37 GMT\"0x8D759751A0FBAD0\"unlockedavailable$account-encryption-keyfalsefalsefalsecontainerf7d9143cFri,
- 25 Oct 2019 17:59:19 GMT\"0x8D759750F527BDB\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsecontainer1232Wed,
+ 26 May 2021 04:57:39 GMT\"0x8D92002C9EF4317\"unlockedavailable$account-encryption-keyfalsefalsefalsetruecontainer4760e81Thu,
+ 03 Jun 2021 03:05:26 GMT\"0x8D9263C6FC3AD51\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-0018bb70-122d-49e8-87a4-605d96d0b859Thu,
+ 18 Mar 2021 19:24:24 GMT\"0x8D8EA4370982563\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-04bee97f-b374-4977-8759-17120d920e93Thu,
+ 18 Mar 2021 16:14:12 GMT\"0x8D8EA28DEAA72E5\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-0c54779f-6523-40f9-84f3-ff87adcb904aThu,
+ 18 Mar 2021 15:55:24 GMT\"0x8D8EA263E04B4C2\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-0d69218f-f854-4add-8e4e-69e6415e8be4Thu,
+ 18 Mar 2021 15:53:40 GMT\"0x8D8EA260022684A\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-0e48f1d5-78b4-45e1-9487-9a84c618b6feTue,
+ 23 Mar 2021 23:00:37 GMT\"0x8D8EE4F790CFB23\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-1072597a-d9d8-4d68-ba4b-4d3d127a617fTue,
+ 23 Mar 2021 23:27:10 GMT\"0x8D8EE532E8ACF5B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-1772b686-a76e-4b4c-8a2b-68880c20c11dMon,
+ 29 Mar 2021 22:20:22 GMT\"0x8D8F300D7FB103C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-17e17044-cc9e-4971-bb4c-6fdf5fae3464Thu,
+ 18 Mar 2021 19:21:58 GMT\"0x8D8EA431956D827\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-1874d400-6f54-45a8-b1cc-bf9b1d474282Wed,
+ 24 Mar 2021 17:05:18 GMT\"0x8D8EEE70057A86C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-1c31ccb2-9938-4616-ad6d-52aa59e078d7Thu,
+ 18 Mar 2021 15:55:21 GMT\"0x8D8EA263C955567\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-1d7100c4-e51b-4621-a003-9e0d7d11c770Tue,
+ 23 Mar 2021 23:25:37 GMT\"0x8D8EE52F7534FF3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-21eb328e-5df9-4e14-9884-26e6661ff71cFri,
+ 19 Mar 2021 18:15:31 GMT\"0x8D8EB02FB5C746A\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-289f11a9-f1cc-4edf-8ff7-3b141460fe06Thu,
+ 18 Mar 2021 16:35:03 GMT\"0x8D8EA2BC8303BA0\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-291ba3bc-93e7-4506-bf07-575bbb47c8e7Thu,
+ 18 Mar 2021 16:15:50 GMT\"0x8D8EA29191E129B\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-2a18f6d1-9fdf-447e-b3aa-24b6f9aef614Tue,
+ 23 Mar 2021 23:25:35 GMT\"0x8D8EE52F5D17CFC\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-2a6d0743-3868-424c-9c3f-8679977ae6a3Wed,
+ 17 Mar 2021 21:06:27 GMT\"0x8D8E98887CA6E38\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-2c7b7632-cad8-4e97-925d-6ead27a857ccWed,
+ 28 Apr 2021 17:36:14 GMT\"0x8D90A6C1F332AF9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-3015f4ec-ae33-4c36-b75b-cae73a3d0e7bTue,
+ 23 Mar 2021 23:21:57 GMT\"0x8D8EE527413A9A9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-30481731-6ce2-470a-a2dc-c44f6b3a5c27Mon,
+ 22 Mar 2021 22:31:33 GMT\"0x8D8ED823F1C0FCA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-3309002d-1581-43ba-8b6e-0042cf66e7d7Thu,
+ 18 Mar 2021 19:23:44 GMT\"0x8D8EA4358A271D6\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-37249450-0970-47f5-b829-ab7a6279b2c4Thu,
+ 18 Mar 2021 15:53:37 GMT\"0x8D8EA25FEA54F77\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-3abedadd-28af-45a4-8b13-ef9394d5b0feMon,
+ 22 Mar 2021 22:23:05 GMT\"0x8D8ED81106DA5F1\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-3e949a88-b1c8-44d8-8e34-589c57062c39Mon,
+ 22 Mar 2021 22:50:30 GMT\"0x8D8ED84E4FA4098\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-410fdb09-7d3c-432e-9702-c4704232a34cThu,
+ 18 Mar 2021 18:33:25 GMT\"0x8D8EA3C51633001\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-4501f0cb-3ca4-42fe-8c65-ca18ee3d6a9dWed,
+ 28 Apr 2021 17:37:10 GMT\"0x8D90A6C408FD2E1\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-46a11020-d715-42e5-8f9c-2e260472cc87Tue,
+ 23 Mar 2021 23:30:12 GMT\"0x8D8EE539B29983C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-4d99785b-cb69-4204-b910-5371cf830d9cFri,
+ 19 Mar 2021 18:14:21 GMT\"0x8D8EB02D18FDE7F\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-4e52c1b9-1a2b-4b5c-9d5c-a7ce6a1fa6faTue,
+ 23 Mar 2021 23:14:35 GMT\"0x8D8EE516C74C516\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-4f6d0e44-b071-4b6b-ad4b-5c3a6ae2048dThu,
+ 18 Mar 2021 19:26:09 GMT\"0x8D8EA43AF2BE5CB\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-4fa8ce2f-1cd0-4e6f-a0c5-3b9f05bae94aFri,
+ 19 Mar 2021 19:45:59 GMT\"0x8D8EB0F9EE36CF7\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-55599575-1c32-4540-9f91-199734005c55Mon,
+ 22 Mar 2021 20:44:51 GMT\"0x8D8ED73579F2B10\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-57cc3783-804c-4af9-a596-3d66fcaf326eThu,
+ 18 Mar 2021 16:01:21 GMT\"0x8D8EA2712D28B8D\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-58ed191e-fecb-4260-9f85-b5e0640b778cThu,
+ 18 Mar 2021 19:19:49 GMT\"0x8D8EA42CC8AB16E\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-599a92cf-ed06-4bc8-bb6e-f54c7dcbb000Fri,
+ 19 Mar 2021 19:54:02 GMT\"0x8D8EB10BE7C3307\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-5ae63cbb-58c0-4458-aa99-5079fc540a19Fri,
+ 26 Mar 2021 18:03:05 GMT\"0x8D8F08167C7B3BD\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-5c414fab-98b6-40b6-b946-701f3ff1501fMon,
+ 22 Mar 2021 20:42:04 GMT\"0x8D8ED72F3A32CE6\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-5eec2ff6-fa28-4ab0-9b41-9f8d25599e4fMon,
+ 22 Mar 2021 22:32:04 GMT\"0x8D8ED82516A862E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-61493a11-794f-4811-adfa-c7b2b6de2156Thu,
+ 18 Mar 2021 19:26:52 GMT\"0x8D8EA43C9043EF7\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-64fc9af6-19e5-4a3e-828a-5133728761a5Mon,
+ 22 Mar 2021 20:43:05 GMT\"0x8D8ED731838545D\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-6db310fd-4b30-4c3e-99ad-ece2f7ed26ddTue,
+ 23 Mar 2021 23:22:01 GMT\"0x8D8EE52765C58B9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-6ecb4cb7-f8b3-44a3-8bba-b94f6e4a637dThu,
+ 18 Mar 2021 19:16:19 GMT\"0x8D8EA424F49592D\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-6f8ebe40-bfb2-45c3-966b-3bf447c2d069Thu,
+ 18 Mar 2021 18:35:57 GMT\"0x8D8EA3CAC1EFEBD\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-716c4756-9241-4a0a-9695-63530053e7ccThu,
+ 18 Mar 2021 15:57:48 GMT\"0x8D8EA2693CD2D7E\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-727ab853-81d5-44ea-9729-ae78dd668c63Thu,
+ 18 Mar 2021 18:27:14 GMT\"0x8D8EA3B74561874\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-72f1e956-b332-45cc-9c38-1657b1235445Tue,
+ 23 Mar 2021 23:08:56 GMT\"0x8D8EE50A269C5D7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-73592b07-ba45-4683-8db7-29d6fd615f87Thu,
+ 18 Mar 2021 16:01:35 GMT\"0x8D8EA271B4A7A97\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-75ee72c7-bfc7-406a-af20-26b037eacb02Thu,
+ 18 Mar 2021 16:08:40 GMT\"0x8D8EA28188975EC\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-76365c04-21f6-43e5-9f24-2b0fa37e4512Fri,
+ 19 Mar 2021 20:16:23 GMT\"0x8D8EB13DE1DA50B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-7a32d8ab-7d6e-49c8-a1f7-acb6f5f07a7fTue,
+ 23 Mar 2021 23:02:57 GMT\"0x8D8EE4FCC7A19BB\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-7e759919-663b-45e4-8cc2-04152283b77fThu,
+ 18 Mar 2021 19:34:39 GMT\"0x8D8EA44DF391B10\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-8afb4a83-c592-4240-8425-5235ffab304cThu,
+ 18 Mar 2021 18:26:09 GMT\"0x8D8EA3B4D2D6049\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-8e1afbb0-e654-42c0-9f20-2be3e758d2aaThu,
+ 18 Mar 2021 18:33:39 GMT\"0x8D8EA3C599BD44F\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-90ac2512-a27b-4f16-af23-dd26a41a1903Wed,
+ 24 Mar 2021 17:38:34 GMT\"0x8D8EEEBA5E43E6D\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-90cb2b46-dee2-4487-9121-6f9df8af0440Thu,
+ 18 Mar 2021 15:55:07 GMT\"0x8D8EA2633E4D101\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-95445de7-cc2e-41b2-9f09-fd6fd0826cd8Thu,
+ 18 Mar 2021 15:54:13 GMT\"0x8D8EA2613AF4C7A\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-9f11db45-f9e9-42d4-9a39-a042756d2659Thu,
+ 18 Mar 2021 20:58:16 GMT\"0x8D8EA508DA38AC2\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-9f190e1e-204c-4aa9-b3e1-4f1f9dda7359Thu,
+ 18 Mar 2021 15:55:28 GMT\"0x8D8EA264092A046\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-a003c5fc-f1ae-4481-9574-f2fee041499fTue,
+ 23 Mar 2021 23:16:46 GMT\"0x8D8EE51BAAE1B5A\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-a2d1aa0e-ee8d-47fb-b03e-4ac24cad57d0Mon,
+ 22 Mar 2021 20:44:13 GMT\"0x8D8ED7340F10D8F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-a3e93887-3ee6-4a8c-a9a3-0509e3fe1761Wed,
+ 28 Apr 2021 17:36:11 GMT\"0x8D90A6C1DA2DA6B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-a7383557-0604-42d4-a58f-e1d2044a98dfThu,
+ 18 Mar 2021 16:08:20 GMT\"0x8D8EA280CCE71A3\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-a9f08824-4e7b-4ea1-85f7-b96f68a19387Fri,
+ 19 Mar 2021 19:57:10 GMT\"0x8D8EB112EEFFB3A\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-ace7efc3-bf86-45cd-9e83-1d850a8f534aThu,
+ 18 Mar 2021 15:55:26 GMT\"0x8D8EA263F3232D4\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-ae5841c6-1fbe-4b09-869c-61411bd74780Thu,
+ 18 Mar 2021 17:59:42 GMT\"0x8D8EA379B9AA940\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-b42053be-68c8-4d37-a734-9c9002999628Fri,
+ 19 Mar 2021 20:04:37 GMT\"0x8D8EB123974C425\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-bf55c4d1-fc50-47e8-abfd-d81726920257Fri,
+ 19 Mar 2021 19:52:26 GMT\"0x8D8EB10858A76C1\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-ca63513e-e2cd-42aa-a4c2-fb0e69e48875Thu,
+ 18 Mar 2021 19:37:54 GMT\"0x8D8EA45531A716C\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-cafcfd85-8874-4f81-b89e-761da72fc7b2Thu,
+ 18 Mar 2021 18:34:29 GMT\"0x8D8EA3C774561EF\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-cba5912b-f411-44c9-beeb-1c96091545b4Thu,
+ 18 Mar 2021 19:20:32 GMT\"0x8D8EA42E642BA07\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-cc0736ed-f582-424c-b09e-ce3fb853ad1eThu,
+ 18 Mar 2021 15:53:42 GMT\"0x8D8EA2601522FDD\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-cc5a6466-584e-4a95-9f92-63ef3c71d9c6Fri,
+ 30 Apr 2021 18:06:46 GMT\"0x8D90C02B7D0938F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-d29bc6a7-5d67-453a-93cc-e78be0dc66bbThu,
+ 18 Mar 2021 17:57:48 GMT\"0x8D8EA3757C1631F\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-d46ee5e1-ca72-4de2-bb15-718815562061Fri,
+ 19 Mar 2021 19:47:18 GMT\"0x8D8EB0FCDF3ABE3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-d52a7ce3-2545-4c05-a98e-b7aa47adb6e5Thu,
+ 18 Mar 2021 20:32:29 GMT\"0x8D8EA4CF3AED3B9\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-dd88b31d-348d-47ad-8776-035925900d79Mon,
+ 22 Mar 2021 20:46:44 GMT\"0x8D8ED739A621A24\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-de17f349-ede7-43fc-bc42-09d0146d377dFri,
+ 19 Mar 2021 19:51:10 GMT\"0x8D8EB10581CAD63\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-dec428c1-36ce-44bb-8b58-0c414ec05e5dThu,
+ 18 Mar 2021 19:18:21 GMT\"0x8D8EA42983E1F39\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-ef2e9492-d67e-4fe1-9238-6226544b5765Thu,
+ 18 Mar 2021 19:19:18 GMT\"0x8D8EA42B9E0B7FC\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-ef3cb093-97fc-4354-a7d8-ade90d4c9dc5Thu,
+ 18 Mar 2021 15:53:44 GMT\"0x8D8EA260281A955\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-ef6b1ca6-e256-46f9-987b-fb15bf2783deFri,
+ 19 Mar 2021 20:12:55 GMT\"0x8D8EB1361DF44F3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-f00d3d5d-7dae-4bfa-85fb-79d26d9b664fThu,
+ 18 Mar 2021 16:04:26 GMT\"0x8D8EA27817C577C\"unlockedavailable$account-encryption-keyfalsefalsefalsetruetest-container-f1c6cd1c-5ca0-4f5a-8aca-95900e41b6cfTue,
+ 23 Mar 2021 23:27:07 GMT\"0x8D8EE532D17A034\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetruetest-container-f25bb0be-2eb4-4985-b6b0-d800581295ddMon,
+ 22 Mar 2021 22:31:07 GMT\"0x8D8ED822F9EC528\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsetrueutcontaineraac312a8Tue,
+ 01 Jun 2021 22:15:06 GMT\"0x8D9254AB6750C45\"unlockedavailable$account-encryption-keyfalsetruefalsefalseutcontainerecd618bcWed,
+ 02 Jun 2021 23:59:26 GMT\"0x8D9262273F8D67C\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersourceecd618bcWed,
+ 02 Jun 2021 23:59:26 GMT\"0x8D9262274166C4D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsevlwcontainer1f2c0efdWed,
+ 02 Jun 2021 22:00:26 GMT\"0x8D92611D45B3949\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainer775416bcThu,
+ 03 Jun 2021 01:22:09 GMT\"0x8D9262E021745D9\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainer90f61730Thu,
+ 03 Jun 2021 02:46:53 GMT\"0x8D92639D850B979\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainera98317a4Thu,
+ 03 Jun 2021 03:03:22 GMT\"0x8D9263C25A1EC69\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainerbba812fbWed,
+ 02 Jun 2021 21:22:19 GMT\"0x8D9260C810B9223\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainerbd114a6Wed,
+ 02 Jun 2021 21:20:57 GMT\"0x8D9260C503EBDEF\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainerecd618bcThu,
+ 03 Jun 2021 00:28:14 GMT\"0x8D9262679E79044\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainerf03618cdThu,
+ 03 Jun 2021 01:21:32 GMT\"0x8D9262DEC19DFE6\"unlockedavailable$account-encryption-keyfalsefalsefalsetrue"
headers:
content-type:
- application/xml
date:
- - Fri, 25 Oct 2019 17:59:38 GMT
+ - Thu, 03 Jun 2021 03:18:17 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
- chunked
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
status:
code: 200
message: OK
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_get_container_properties.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_get_container_properties.yaml
index 77a525adcf55..592443daa0fb 100644
--- a/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_get_container_properties.yaml
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_get_container_properties.yaml
@@ -2,109 +2,95 @@ interactions:
- request:
body: null
headers:
+ Accept:
+ - application/xml
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:59:54 GMT
+ - Fri, 04 Jun 2021 03:39:25 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: PUT
uri: https://storagename.blob.core.windows.net/acontaineredc14bb?restype=container
response:
body:
string: ''
headers:
- content-length: '0'
- date: Fri, 25 Oct 2019 17:59:54 GMT
- etag: '"0x8D7597523E92018"'
- last-modified: Fri, 25 Oct 2019 17:59:54 GMT
+ date: Fri, 04 Jun 2021 03:39:26 GMT
+ etag: '"0x8D9270A5A0A2776"'
+ last-modified: Fri, 04 Jun 2021 03:39:26 GMT
server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
- x-ms-version: '2019-02-02'
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
status:
code: 201
message: Created
- url: !!python/object/new:yarl.URL
- state: !!python/tuple
- - !!python/object/new:urllib.parse.SplitResult
- - https
- - pyacrstoragekzoj3d7n4a5m.blob.core.windows.net
- - /acontaineredc14bb
- - restype=container
- - ''
+ url: https://seanoauthstage.blob.core.windows.net/acontaineredc14bb?restype=container
- request:
body: null
headers:
+ Accept:
+ - application/xml
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:59:54 GMT
+ - Fri, 04 Jun 2021 03:39:26 GMT
x-ms-meta-hello:
- world
x-ms-meta-number:
- '42'
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: PUT
uri: https://storagename.blob.core.windows.net/acontaineredc14bb?restype=container&comp=metadata
response:
body:
string: ''
headers:
- content-length: '0'
- date: Fri, 25 Oct 2019 17:59:54 GMT
- etag: '"0x8D7597523EEFF82"'
- last-modified: Fri, 25 Oct 2019 17:59:54 GMT
+ date: Fri, 04 Jun 2021 03:39:26 GMT
+ etag: '"0x8D9270A5A178240"'
+ last-modified: Fri, 04 Jun 2021 03:39:26 GMT
server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
- x-ms-version: '2019-02-02'
+ transfer-encoding: chunked
+ x-ms-version: '2020-10-02'
status:
code: 200
message: OK
- url: !!python/object/new:yarl.URL
- state: !!python/tuple
- - !!python/object/new:urllib.parse.SplitResult
- - https
- - pyacrstoragekzoj3d7n4a5m.blob.core.windows.net
- - /acontaineredc14bb
- - restype=container&comp=metadata
- - ''
+ url: https://seanoauthstage.blob.core.windows.net/acontaineredc14bb?restype=container&comp=metadata
- request:
body: null
headers:
+ Accept:
+ - application/xml
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 17:59:54 GMT
+ - Fri, 04 Jun 2021 03:39:26 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: GET
uri: https://storagename.blob.core.windows.net/acontaineredc14bb?restype=container
response:
body:
string: ''
headers:
- content-length: '0'
- date: Fri, 25 Oct 2019 17:59:54 GMT
- etag: '"0x8D7597523EEFF82"'
- last-modified: Fri, 25 Oct 2019 17:59:54 GMT
+ date: Fri, 04 Jun 2021 03:39:26 GMT
+ etag: '"0x8D9270A5A178240"'
+ last-modified: Fri, 04 Jun 2021 03:39:26 GMT
server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
x-ms-default-encryption-scope: $account-encryption-key
x-ms-deny-encryption-scope-override: 'false'
x-ms-has-immutability-policy: 'false'
x-ms-has-legal-hold: 'false'
+ x-ms-immutable-storage-with-versioning-enabled: 'false'
x-ms-lease-state: available
x-ms-lease-status: unlocked
x-ms-meta-hello: world
x-ms-meta-number: '42'
- x-ms-version: '2019-02-02'
+ x-ms-version: '2020-10-02'
status:
code: 200
message: OK
- url: !!python/object/new:yarl.URL
- state: !!python/tuple
- - !!python/object/new:urllib.parse.SplitResult
- - https
- - pyacrstoragekzoj3d7n4a5m.blob.core.windows.net
- - /acontaineredc14bb
- - restype=container
- - ''
+ url: https://seanoauthstage.blob.core.windows.net/acontaineredc14bb?restype=container
version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_list_containers.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_list_containers.yaml
index b5bfd6860bcc..e813807498ee 100644
--- a/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_list_containers.yaml
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_container_async.test_list_containers.yaml
@@ -2,12 +2,14 @@ interactions:
- request:
body: null
headers:
+ Accept:
+ - application/xml
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 18:00:48 GMT
+ - Fri, 04 Jun 2021 00:46:12 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: PUT
uri: https://storagename.blob.core.windows.net/acontainer649e10fe?restype=container
response:
@@ -15,88 +17,380 @@ interactions:
string: ''
headers:
content-length: '0'
- date: Fri, 25 Oct 2019 18:00:47 GMT
- etag: '"0x8D7597543F7A379"'
- last-modified: Fri, 25 Oct 2019 18:00:48 GMT
+ date: Fri, 04 Jun 2021 00:46:12 GMT
+ etag: '"0x8D926F226C4021A"'
+ last-modified: Fri, 04 Jun 2021 00:46:12 GMT
server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
- x-ms-version: '2019-02-02'
+ x-ms-version: '2020-10-02'
status:
code: 201
message: Created
- url: !!python/object/new:yarl.URL
- state: !!python/tuple
- - !!python/object/new:urllib.parse.SplitResult
- - https
- - pyacrstoragekzoj3d7n4a5m.blob.core.windows.net
- - /acontainer649e10fe
- - restype=container
- - ''
+ url: https://seanmcccanary3.blob.core.windows.net/acontainer649e10fe?restype=container
- request:
body: null
headers:
Accept:
- application/xml
User-Agent:
- - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0)
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 25 Oct 2019 18:00:48 GMT
+ - Fri, 04 Jun 2021 00:46:12 GMT
x-ms-version:
- - '2019-02-02'
+ - '2020-10-02'
method: GET
- uri: https://storagename.blob.core.windows.net/?comp=list
+ uri: https://storagename.blob.core.windows.net/?comp=list&include=
response:
body:
string: "\uFEFFacontainer13e20edaFri,
- 25 Oct 2019 18:00:43 GMT\"0x8D759754159B43D\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer1bc21d2fFri,
- 25 Oct 2019 17:59:48 GMT\"0x8D759752090967E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalseacontainer23b6195fFri,
- 25 Oct 2019 17:59:53 GMT\"0x8D75975238F6951\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontainer24301513Fri,
- 25 Oct 2019 18:00:44 GMT\"0x8D7597541C32B2F\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer50ac1615Fri,
- 25 Oct 2019 18:00:47 GMT\"0x8D7597543593522\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer50b315f3Fri,
- 25 Oct 2019 17:59:47 GMT\"0x8D759751FA0B50A\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontainer5a021a54Fri,
- 25 Oct 2019 18:00:43 GMT\"0x8D75975412EDF55\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontainer5c401a6bFri,
- 25 Oct 2019 17:59:54 GMT\"0x8D7597524172822\"unlockedbroken$account-encryption-keyfalsefalsefalseacontainer62c1161fFri,
- 25 Oct 2019 17:59:55 GMT\"0x8D7597524763E06\"unlockedbroken$account-encryption-keyfalsefalsefalseacontainer62f51629Fri,
- 25 Oct 2019 17:59:50 GMT\"0x8D7597521CC0DB7\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer649e10feFri,
- 25 Oct 2019 18:00:48 GMT\"0x8D7597543F7A379\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer65d81652Fri,
- 25 Oct 2019 18:00:45 GMT\"0x8D75975420F9B08\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer74751143Fri,
- 25 Oct 2019 17:59:47 GMT\"0x8D759751FFB8B2A\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer7ae616b9Fri,
- 25 Oct 2019 18:00:28 GMT\"0x8D7597537F83C20\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontainer8656119eFri,
- 25 Oct 2019 17:59:52 GMT\"0x8D7597522F53DB7\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer8de71b0bFri,
- 25 Oct 2019 17:59:48 GMT\"0x8D75975203E041D\"unlockedavailableblob$account-encryption-keyfalsefalsefalseacontainer917e16feFri,
- 25 Oct 2019 17:59:48 GMT\"0x8D75975201A2AB1\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer926a1b52Fri,
- 25 Oct 2019 18:00:46 GMT\"0x8D75975430C5A03\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainer92f18f4Fri,
- 25 Oct 2019 17:59:55 GMT\"0x8D7597524499868\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainera6981733Fri,
- 25 Oct 2019 18:00:02 GMT\"0x8D75975287392F3\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontainera824174eFri,
- 25 Oct 2019 17:59:53 GMT\"0x8D7597523204AAD\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontaineraa4e127aFri,
- 25 Oct 2019 17:59:49 GMT\"0x8D7597520AD2688\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainerc1a51bb8Fri,
- 25 Oct 2019 18:00:01 GMT\"0x8D75975283DBE2F\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainerc2c617d8Fri,
- 25 Oct 2019 18:00:45 GMT\"0x8D759754249AD33\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainerc39a1803Fri,
- 25 Oct 2019 18:00:45 GMT\"0x8D7597542829EC8\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainerd0941360Fri,
- 25 Oct 2019 17:59:51 GMT\"0x8D75975220EC28E\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainerd1081354Fri,
- 25 Oct 2019 18:00:27 GMT\"0x8D7597537CE108E\"lockedleasedinfinite$account-encryption-keyfalsefalsefalseacontainerdbe2187aFri,
- 25 Oct 2019 18:00:46 GMT\"0x8D7597542CB1456\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainere4eb13afFri,
- 25 Oct 2019 17:59:53 GMT\"0x8D759752365B9EC\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainere50b1c8cFri,
- 25 Oct 2019 17:59:47 GMT\"0x8D759751FD95E8A\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainere52713a5Fri,
- 25 Oct 2019 18:00:44 GMT\"0x8D75975418CB9B9\"unlockedavailable$account-encryption-keyfalsefalsefalseacontainere69c13e2Fri,
- 25 Oct 2019 18:00:47 GMT\"0x8D7597543A086D9\"unlockedavailable$account-encryption-keyfalsefalsefalseacontaineredc14bbFri,
- 25 Oct 2019 17:59:54 GMT\"0x8D7597523EEFF82\"unlockedavailable$account-encryption-keyfalsefalsefalse$webThu,
+ 05 Nov 2020 01:02:27 GMT\"0x8D88126770E6074\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse000Wed,
+ 16 Dec 2020 21:43:19 GMT\"0x8D8A20B9A659CE4\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse026505a70026505a7e5e3395237f733ef9cb44667977Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEE68FA4\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse06021594006021594bc390078182c95e659b8475cbceTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEB0D84F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse09578df3009578df35ca80527813a7cbf7454411dba4Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465A9316\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse0adb43840adb43844fe229566e97219e3f0c4d0d87Tue,
+ 01 Jun 2021 18:57:08 GMT\"0x8D9252F0EB27A44\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse0adb43840adb4384cb84529420abe8b28c9e40b285Tue,
+ 01 Jun 2021 18:30:49 GMT\"0x8D9252B60FD8977\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse0adb43840adb4384cfe1922295bffdbf06044f48a1Tue,
+ 01 Jun 2021 19:09:47 GMT\"0x8D92530D2DC99CE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse0ca24d1e00ca24d1ec5f88195d747792dfa284370aacTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FED085FE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse104cbcb20104cbcb24da8593791f7ec3b9aaf4b5f8efFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B3708\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse19e94ac4019e94ac47a73487613f7b130b02d4e48927Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B1841\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse209f0ce6-78d8-4aae-8047-c60ad1ddb6f4Thu,
+ 13 May 2021 23:15:33 GMT\"0x8D9166502826175\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse23d18a5b-4f37-4283-9f8c-f7defc5d6e13Fri,
+ 14 May 2021 21:32:24 GMT\"0x8D9171FC3DD8A44\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse268f66910268f66913b643368ab2bb8ed98c9429d810Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE83CCCF\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse284c031a0284c031af3150319558ddf1017e148d0b15Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FF0D1291\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse2ce09900-a697-4a99-8336-f325bfb6c74fWed,
+ 03 Mar 2021 00:47:48 GMT\"0x8D8DDDDF7CAD013\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse2da8c0cb02da8c0cbeac478815ee922b675004302ae4Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE85F447\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse2f86371502f863715c2406397a0e3f794301a4e4db03Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE29491C\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse30b294ff-22cb-4b48-a4f7-2faf3c3557a3Thu,
+ 13 May 2021 22:04:23 GMT\"0x8D9165B116872B9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse30b6ab46030b6ab467698474588aac7edb76c4d87a1aTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEE2477E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse37972bb0037972bb063b88263fc202648f1a54462908Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEB3447E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse3d84d72f-772a-4bcc-85b2-4f47f2341132Fri,
+ 14 May 2021 21:44:06 GMT\"0x8D917216645B085\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse3f39a55e03f39a55e340140621579ff172a6b4127806Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE6983E9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse3f67697b03f67697b37b04720c5109e5ab45b43e19b4Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B6C02\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse42109d3e042109d3e3336425123533de7f9b342c392fFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465C0204\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse46161b34046161b3405d3063157dfea1ef2c3430b849Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AA8F5\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse49438353049438353136724825328b557026941bd826Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE4379D3\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse4a00f595-2b1f-4b5e-8f24-891d3addde3dFri,
+ 19 Mar 2021 17:47:26 GMT\"0x8D8EAFF0F5D282D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse4bcebfde-274a-4a69-b5bf-8c1c928b56bcThu,
+ 13 May 2021 21:57:48 GMT\"0x8D9165A259482D6\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse4fac601e04fac601ed9541886251154df4a724f4e92dTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEF37DAC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse4fe5dc1a-8f61-48f1-8b31-33a72315ad61Fri,
+ 19 Mar 2021 18:50:45 GMT\"0x8D8EB07E78DF5E5\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse51c8f405051c8f4057193578046ebc4b67639495fa10Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465ADE0F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse530bf44e0530bf44e03b171476fd2ac5c10774430a41Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE4AB3FF\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse5b0bac7f05b0bac7f40a24031fb147c2a103b46b4952Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B7A34\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse5dc0c70405dc0c704fa711955339b1390e76149afbfdTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEB712B6\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse5f0d2a7505f0d2a75e7722575cf0ac310b3224960bbeFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BA2BD\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse630db3cc-c104-4e25-8c1a-f222f9dda9e6Thu,
+ 13 May 2021 21:54:35 GMT\"0x8D91659B2B25489\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse63f2e025-c91a-4095-a967-3c538ac6c568Fri,
+ 14 May 2021 17:58:52 GMT\"0x8D91701EF3000CD\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse651bcb150651bcb157268509654e285a520fd439e815Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A4658680A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse693dcefd0693dcefd76d202294c6da63040d8417baa0Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B1312\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse69526a37069526a37755641533341806ab6904d4983eTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE86F4F8\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse6d3b48f706d3b48f71838353365949254ea884431a5eFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AF08A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse6e08620f06e08620ff5c2897533d4f28ea8c54a09babFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A4657D031\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse7026ffbc07026ffbc2ab6084244a58bc1ca1e4d53aa9Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465ABAA7\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse70495b76070495b76b1f2215099af8e91b38b49c2a1fTue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE641BD9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse71d9a559071d9a559b7398450dfb7e21cebeb4ee7800Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BC802\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse742079b60742079b6e7b72459fd766ba9be8046e4bf1Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B1338\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse7c00fa5407c00fa5438166949f14ddec10f1046d6a54Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BA7E9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse7f8d84b107f8d84b1ed924070da2ebbdb3899432c958Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A4659D5FB\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse7fa197f607fa197f666a09634ddb36b5cd3b2417c97eFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A4657C218\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse86ef12de086ef12dea5b52203f36f26764eec44b1862Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B4EF4\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse878ec03c0878ec03cde1337322fa9580591bd4675bf8Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEC835B4\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse8bc77c5b-c718-4afc-8246-0f037e07422cFri,
+ 14 May 2021 21:47:16 GMT\"0x8D91721D7373367\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse8cd35bf308cd35bf3207184131a19adeee0fb4cdab75Tue,
+ 11 May 2021 23:39:16 GMT\"0x8D914D5FD5DD483\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse8d2761ae08d2761ae6c635106dd2216cf79d240e8997Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE284B4D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse8fa3ef09-53b9-41f2-8670-e65f5cb02521Thu,
+ 13 May 2021 22:00:47 GMT\"0x8D9165A90729B68\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse96ba0f79-ce34-4537-9814-c24d354ae063Wed,
+ 03 Mar 2021 01:05:35 GMT\"0x8D8DDE073A3B003\"unlockedavailable$account-encryption-keyfalsefalsefalsefalse9ff4239f09ff4239f29d3253397d77ad5588c46e4bbdFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AA163\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsea10702d80a10702d821176858df5746c5c8f042e096dTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEDF9AA0\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsea51b6700-cb26-4dfd-8300-a6a1f0c930e0Fri,
+ 14 May 2021 20:13:34 GMT\"0x8D91714C0AE3161\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseab46431a0ab46431a727605689132e71015054913b55Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B8404\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseacontainer649e10feFri,
+ 04 Jun 2021 00:46:12 GMT\"0x8D926F226C4021A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseacontainere4ee1c92Fri,
+ 04 Jun 2021 00:21:16 GMT\"0x8D926EEAB700A03\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsead761e9d0ad761e9de19058157c1e2b0fc124489691dFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BA1C6\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseadc2411d0adc2411d51c08533fe35ff9431604888839Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BAD8F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseaea265910aea26591eea67853657e470e3c6140a0b0dFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BF390\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseaf45f32e0af45f32eb4022918300f1f8f5cc6498cbadTue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE79FA45\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseb10c82a2-4f79-4aa4-84f2-e635836ad391Fri,
+ 14 May 2021 21:26:33 GMT\"0x8D9171EF2B0545A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseb4ca457e0b4ca457ed08754412ab1f920fcf64e16bd5Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AE385\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseb4d9705c0b4d9705ca88472602bb2892f858c4b7d958Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B9CEB\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseb73687f50b73687f518f715985a303790a98a4ee8863Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE4EC67D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseb7f8be8c0b7f8be8cbcc848927f466b49be1847c3be4Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE67E6D9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseb8dda32b0b8dda32b2ad88496ee7ef3ea8ee64e3d813Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465BA86B\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseba3500ee0ba3500eeba4874654e98e7cdff15415dae0Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE65BF41\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsebf47d00e0bf47d00e549947142efd47b03efa4b079cfTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEE8E2FC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsec7d5143c0c7d5143c09680433e62247c22b0048f4bbbTue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE6C8A50\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsec8cf56fb0c8cf56fbca7360424454ff5532e64182881Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEA8C94F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsec9ae84190c9ae841925180898b4c123440333463a96dFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B25FE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecb2c5f71-077e-4ec4-a081-fba68a061edbWed,
+ 03 Mar 2021 00:21:52 GMT\"0x8D8DDDA5833000D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecbe66a19-af44-47d2-8d45-4f6d3b5b2517Wed,
+ 03 Mar 2021 01:04:28 GMT\"0x8D8DDE04B9BBAD0\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecf31c28f-005d-43a8-8361-716253f96506Tue,
+ 25 May 2021 19:24:00 GMT\"0x8D91FB2A69A3FFF\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer1160577159301009756Thu,
+ 19 Nov 2020 07:39:54 GMT\"0x8D88C5E4E474297\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer1160587546491801745Fri,
+ 20 Nov 2020 12:31:06 GMT\"0x8D88D5026C9C26F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160577016253900031Thu,
+ 19 Nov 2020 07:16:03 GMT\"0x8D88C5AF997BCE2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160577149683805678Thu,
+ 19 Nov 2020 07:38:18 GMT\"0x8D88C5E1507535A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160579733155102089Thu,
+ 19 Nov 2020 14:48:52 GMT\"0x8D88C9A3BB42C2B\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587656253507595Fri,
+ 20 Nov 2020 12:49:23 GMT\"0x8D88D52B5250BB2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587656407807880Fri,
+ 20 Nov 2020 12:49:24 GMT\"0x8D88D52B5811684\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659351509595Fri,
+ 20 Nov 2020 12:49:53 GMT\"0x8D88D52C70C0ADF\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659411404376Fri,
+ 20 Nov 2020 12:49:54 GMT\"0x8D88D52C767F717\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659468104824Fri,
+ 20 Nov 2020 12:49:55 GMT\"0x8D88D52C7BE63EC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659524304238Fri,
+ 20 Nov 2020 12:49:55 GMT\"0x8D88D52C8148298\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659581201429Fri,
+ 20 Nov 2020 12:49:56 GMT\"0x8D88D52C86AEF96\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659637205982Fri,
+ 20 Nov 2020 12:49:56 GMT\"0x8D88D52C8C10E62\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659693801788Fri,
+ 20 Nov 2020 12:49:57 GMT\"0x8D88D52C9170612\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659750106840Fri,
+ 20 Nov 2020 12:49:57 GMT\"0x8D88D52C96C8886\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659806001209Fri,
+ 20 Nov 2020 12:49:58 GMT\"0x8D88D52C9C1E3DE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587659861605875Fri,
+ 20 Nov 2020 12:49:59 GMT\"0x8D88D52CA16A2B7\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587660278607655Fri,
+ 20 Nov 2020 12:50:03 GMT\"0x8D88D52CC9311D2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587662946904548Fri,
+ 20 Nov 2020 12:50:29 GMT\"0x8D88D52DC7BC224\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainer160587663278307340Fri,
+ 20 Nov 2020 12:50:33 GMT\"0x8D88D52DE75552D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainera8e61798Mon,
+ 24 May 2021 17:50:42 GMT\"0x8D91EDC7332E94C\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsecontainfwfddsnameFri,
+ 18 Dec 2020 05:42:38 GMT\"0x8D8A317BAEBD404\"unlockedavailableblob$account-encryption-keyfalsefalsefalsefalsecontainfwfdnameFri,
+ 18 Dec 2020 05:01:50 GMT\"0x8D8A31207D14D8E\"unlockedavailableblob$account-encryption-keyfalsefalsefalsefalsecontainfwnameFri,
+ 18 Dec 2020 05:00:12 GMT\"0x8D8A311CD54CFCB\"unlockedavailableblob$account-encryption-keyfalsefalsefalsefalsecontainnameFri,
+ 18 Dec 2020 04:59:25 GMT\"0x8D8A311B16A1819\"unlockedavailableblob$account-encryption-keyfalsefalsefalsefalsed0b5b5580d0b5b558a89813116237696cb52a4d0ea01Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AE580\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsed3b43433-f618-4390-bc8e-7c8ffa23a213Fri,
+ 14 May 2021 21:52:32 GMT\"0x8D9172293CB3D20\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsed427b9070d427b907909370243f0ac1cf8aac4e24b63Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AFF3B\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedc6261260dc626126f359088526cb374db1864ac49a3Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE88C18D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedc9eb9580dc9eb958e36379183d24d3c0e9224ff483bFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AAC71\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedd686d9f-2ca3-4903-8616-c23fa720b6e2Fri,
+ 14 May 2021 18:41:35 GMT\"0x8D91707E6C25116\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsede5f996f0de5f996f23784536eff221142b544bee935Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465B5019\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedece257d0dece257da8e749297e4ed60c4a234499b55Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE5C449D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedsdcfhbfws6d931a88Wed,
+ 02 Dec 2020 00:53:21 GMT\"0x8D8965CAABCDF0E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedsdfws6d931a88Wed,
+ 02 Dec 2020 00:43:30 GMT\"0x8D8965B4A05ED2B\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedsdfws8dea1eedWed,
+ 02 Dec 2020 00:43:07 GMT\"0x8D8965B3C9C3B73\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedsdfwsd34b185fWed,
+ 02 Dec 2020 00:43:57 GMT\"0x8D8965B5A93FA88\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsedsdfwse8d9187eWed,
+ 02 Dec 2020 00:43:41 GMT\"0x8D8965B5092E498\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsee0e3e6ff1e0e3e6ff1855296630eabfb93b9742b1963Wed,
+ 26 May 2021 20:55:05 GMT\"0x8D920888A171A70\"unlockedavailable$account-encryption-keyfalsefalsefalsetruee0e3e6ff1e0e3e6ff1b7634346642f1e255c2443ead3Wed,
+ 26 May 2021 20:57:41 GMT\"0x8D92088E72FA083\"unlockedavailable$account-encryption-keyfalsefalsefalsetruee0e3e6ff1e0e3e6ff84479556ac43531636a044e6a3cWed,
+ 26 May 2021 20:46:55 GMT\"0x8D92087664532B1\"unlockedavailable$account-encryption-keyfalsefalsefalsetruee0e3e6ff1e0e3e6ff92c035635c8f4f44fd374d789d2Wed,
+ 26 May 2021 20:53:44 GMT\"0x8D920885A2A4F71\"unlockedavailable$account-encryption-keyfalsefalsefalsetruee0e3e6ff1e0e3e6ff9c88825780d59b20b4ef452b8f9Wed,
+ 26 May 2021 20:50:34 GMT\"0x8D92087E88581F4\"unlockedavailable$account-encryption-keyfalsefalsefalsetruee0e3e6ff1e0e3e6ffa2f1108001fcbdcc706242b785dWed,
+ 26 May 2021 20:45:33 GMT\"0x8D920873541470F\"unlockedavailable$account-encryption-keyfalsefalsefalsetruee14f20a70e14f20a790a89512d5d826197a7644aca0bFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465C7B1D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsee283d7da0e283d7dab5443282e5c58eff60d8498db4dFri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A4657C811\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsee4978ce50e4978ce57ba19396d5aebc2c6f6f457bbd7Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A4657EB5E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsee704e23f0e704e23fce781941b40574d0a6a44076ac7Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEB103B8\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsee9c52be7-66cf-4fc7-ab21-aa66ecb4a2fdThu,
+ 13 May 2021 22:05:21 GMT\"0x8D9165B33EBA530\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseeacac392-454f-4f51-b158-6ae871300b84Fri,
+ 14 May 2021 20:15:45 GMT\"0x8D917150E81A2A6\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseeb2e24170eb2e24174c828482dc653025eac2467ba80Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465AD0B5\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseecf847ff0ecf847ffadf74503367608243cab4f5db65Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE918073\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsef1240fcb0f1240fcb52b99042ea1e52ecf695417bad7Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE918AE5\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsef2f10f6f0f2f10f6fb69098385f9245a4435141bbbf9Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FE9AC631\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsef57496290f5749629f4784466b86bef201f7c43caaebTue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE3EC2A6\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsef5e36ba80f5e36ba808c99383de1ba7f7be314673aaeTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FF0AFB4E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsef8ad3da50f8ad3da531b78044389bb2fe0ea94e6b8f5Tue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEBC8DC7\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsefb7dda960fb7dda9676b5009580cb98a1cd314f6c85dTue,
+ 11 May 2021 23:39:18 GMT\"0x8D914D5FEA9D2B9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsefb98e69b0fb98e69baa330549bbcc8dc53c044a2a972Fri,
+ 14 May 2021 20:53:06 GMT\"0x8D9171A465A8066\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsefbed87120fbed871289d01665efd73ae664894859a75Tue,
+ 11 May 2021 23:39:17 GMT\"0x8D914D5FE7F2FCE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsefdbe3964-c35c-42e6-817a-f4ac211e5294Fri,
+ 14 May 2021 22:10:10 GMT\"0x8D917250A660B57\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsejavablobsettierarchivestatus2086272bc1452ff2004cMon,
+ 05 Apr 2021 19:44:10 GMT\"0x8D8F86B2EFB2C28\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsejavablobsettierarchivestatus287692a5755500812945Mon,
+ 05 Apr 2021 19:44:11 GMT\"0x8D8F86B2FB85CFC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsejavablobsettierarchivestatus29295602e9c92d59df4aMon,
+ 05 Apr 2021 19:44:11 GMT\"0x8D8F86B2F5A747A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsejavablobsettierinferred2blobapitestsettierinferred3ac5912539Mon,
+ 05 Apr 2021 19:44:09 GMT\"0x8D8F86B2E946862\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsejtcchangebloblease0leaseapitestchangebloblease023326975acfMon,
+ 19 Apr 2021 22:20:33 GMT\"0x8D90381596FE644\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseoldnameTue,
+ 12 Jan 2021 00:42:07 GMT\"0x8D8B692E3AE3722\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-004a7075-6925-41eb-9354-0e7289626152Tue,
+ 23 Feb 2021 19:13:00 GMT\"0x8D8D82F099AF5CF\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-0063c83f-32b8-435d-9c8e-99369cc136c3Tue,
+ 23 Feb 2021 18:08:11 GMT\"0x8D8D825FB9E41AE\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-00a86452-0eb3-435b-823a-5ac9b627eeb0Tue,
+ 04 May 2021 15:29:02 GMT\"0x8D90F1158AD7864\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-00c690df-40a4-4793-9b23-be92ff6ab249Thu,
+ 03 Dec 2020 00:04:12 GMT\"0x8D8971EF774F01B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-02375164-3b78-4cad-8c01-660e658a17baThu,
+ 11 Feb 2021 17:03:24 GMT\"0x8D8CEAEF171D857\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-03da2b14-4a22-4d6e-ba9f-555f84672c98Wed,
+ 27 Jan 2021 21:36:55 GMT\"0x8D8C30BAB1918AE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-087b6f57-f287-425b-ad53-3c642339549bThu,
+ 11 Feb 2021 17:54:18 GMT\"0x8D8CEB60E154617\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-0c2a8e52-0bca-445a-8175-6c7306ca852dFri,
+ 12 Feb 2021 19:52:37 GMT\"0x8D8CF8FBF6D795F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-0cc22dfc-0fac-4be1-9f20-922b157766bbWed,
+ 10 Feb 2021 21:20:56 GMT\"0x8D8CE09C160FF70\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-0d9c8c05-5c33-4324-aebd-d4c7634ca08aThu,
+ 11 Feb 2021 01:14:17 GMT\"0x8D8CE2A5AAD79A3\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-0eb2ecfd-ab45-293d-e992-21d5187cee46Wed,
+ 17 Feb 2021 19:46:20 GMT\"0x8D8D37CB2D88F29\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-0edc6b89-3d49-44a1-b8b4-aad9ebf711dfThu,
+ 11 Feb 2021 16:51:40 GMT\"0x8D8CEAD4DF25CC6\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-0f4c56cf-9869-edf7-ffbb-a5a56a368e58Thu,
+ 03 Jun 2021 18:52:55 GMT\"0x8D926C0CC4BF7D3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-12e532a0-6bbd-4d48-b4d4-6396a1fd973dThu,
+ 11 Feb 2021 01:14:17 GMT\"0x8D8CE2A5A4C8A0B\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-152fa03d-1291-4967-b546-d86757571916Tue,
+ 16 Feb 2021 23:44:26 GMT\"0x8D8D2D4CBE8D9CE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-1743a64c-55fc-42af-9c4a-05441550b002Fri,
+ 29 Jan 2021 01:52:06 GMT\"0x8D8C3F87B60503E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-18b0fb99-63af-415d-a3bb-a7a58fcf23faFri,
+ 12 Feb 2021 17:53:55 GMT\"0x8D8CF7F2A80B77B\"unlockedavailableblob$account-encryption-keyfalsefalsefalsefalsetest-container-1ab026c1-ba22-483d-9542-b5743cc26c43Thu,
+ 11 Feb 2021 01:13:32 GMT\"0x8D8CE2A3FDBEC09\"unlockedbroken$account-encryption-keyfalsefalsefalsefalsetest-container-1ae05462-12d5-477f-960d-0aa85656eea8Thu,
+ 11 Feb 2021 01:13:36 GMT\"0x8D8CE2A41EE9251\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-1af22971-ff57-4bf8-af10-780563eabc15Thu,
+ 28 Jan 2021 16:44:37 GMT\"0x8D8C3ABFFF78EEC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-1b63a8a1-d130-47d3-823e-8b9d1bd51a00Fri,
+ 12 Feb 2021 18:19:51 GMT\"0x8D8CF82CA3D8CDB\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-1ca51f6c-8e37-4052-bacf-0fbc90c60144Thu,
+ 11 Feb 2021 18:22:52 GMT\"0x8D8CEBA0B3A9DC5\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-1cd01c60-ba45-4741-a53f-8952403bf08fFri,
+ 12 Feb 2021 17:05:04 GMT\"0x8D8CF7857D8FFA2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-1ee6a516-f0b9-4109-a0e0-a2b8c59b0c1dFri,
+ 12 Feb 2021 18:28:38 GMT\"0x8D8CF84046BCF15\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-2267e0b3-ffbb-4325-8703-d389291e8065Fri,
+ 12 Feb 2021 18:44:17 GMT\"0x8D8CF863390202B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-238c22ca-8ac1-4665-b13c-86a28392b589Thu,
+ 11 Feb 2021 19:19:16 GMT\"0x8D8CEC1ECAF440C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-25ee31f2-5582-4d29-8157-ca36b9fbc1b1Wed,
+ 17 Feb 2021 17:48:33 GMT\"0x8D8D36C3EBA84C6\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-2681738d-e1f3-4097-a5dc-d3c1a29ad53bFri,
+ 29 Jan 2021 02:11:06 GMT\"0x8D8C3FB22E47EDA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-2768c3da-948a-4a8d-acbb-4707d5db1f67Tue,
+ 23 Feb 2021 18:44:21 GMT\"0x8D8D82B0902F5C7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-29276b6b-414d-4271-a821-5b6bd14ef546Thu,
+ 11 Feb 2021 22:49:46 GMT\"0x8D8CEDF548AE8D4\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-29c45a50-5a36-4472-ad17-b90ad2ec4a1cWed,
+ 27 Jan 2021 23:09:31 GMT\"0x8D8C3189AAD7FBE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-2cdc263b-f83e-4e5a-a8ff-afda0043fdeaWed,
+ 27 Jan 2021 21:39:55 GMT\"0x8D8C30C161B93E0\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-2d3184de-3cde-478f-8e57-36e86f5a3e97Tue,
+ 23 Feb 2021 18:01:04 GMT\"0x8D8D824FC9085B2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-30a4db60-2a6a-4c60-b8b8-18d31aab4cfaThu,
+ 11 Feb 2021 17:53:40 GMT\"0x8D8CEB5F71A3BEA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-3172ecce-bf36-4cac-b9f8-92d6d79729fdWed,
+ 17 Mar 2021 02:23:28 GMT\"0x8D8E8EBA698FCC0\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-31853757-28ad-4ee5-871f-db8e6e7900baThu,
+ 11 Feb 2021 16:55:25 GMT\"0x8D8CEADD4558692\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-320ae665-2e54-4fc3-8f7c-949142ccb3feWed,
+ 27 Jan 2021 21:36:55 GMT\"0x8D8C30BAB595CB3\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-35084ddb-3d95-4694-bdbe-4e1640f8b143Tue,
+ 23 Feb 2021 18:50:12 GMT\"0x8D8D82BD9C1B6D8\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-356e61a1-669c-4bcf-9f40-7e8298c36c36Wed,
+ 17 Feb 2021 00:59:13 GMT\"0x8D8D2DF3E327DA9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-3671ca8d-4dd0-476e-8c08-dbb566d496b8Fri,
+ 12 Feb 2021 19:27:50 GMT\"0x8D8CF8C490A3E15\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-377e434d-e565-4881-b4a2-21ed3e9dcb1eTue,
+ 16 Feb 2021 23:51:43 GMT\"0x8D8D2D5D0412D4B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-3bc58251-2292-4296-9fac-9483e57b7c3dThu,
+ 28 Jan 2021 21:58:50 GMT\"0x8D8C3D7E57669B5\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-3d1fa27f-80d6-4529-bec9-ab0f254f43a0Tue,
+ 23 Feb 2021 19:05:48 GMT\"0x8D8D82E07B8E3B8\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-40956323-d30d-42be-9e8f-24f32d8a0f72Thu,
+ 11 Feb 2021 01:13:50 GMT\"0x8D8CE2A4A986AFD\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsefalsetest-container-423fc05f-e19c-4d9e-9564-2978745af3aaFri,
+ 14 May 2021 16:34:04 GMT\"0x8D916F6163DC7B9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-439fb2fd-5c43-47ed-8c41-ab41260d25ccFri,
+ 29 Jan 2021 01:52:05 GMT\"0x8D8C3F87ACBBD51\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-43aca3b5-4084-4ca5-8461-41dd00d9404fWed,
+ 27 Jan 2021 21:21:08 GMT\"0x8D8C30976848B4E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-43aed6a3-9683-4920-8fb0-a01400596398Tue,
+ 23 Feb 2021 18:29:44 GMT\"0x8D8D828FE3B103B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-441d4ff1-fb09-4e8d-9336-36ff48b2d5d2Wed,
+ 27 Jan 2021 23:09:31 GMT\"0x8D8C3189A6C17E1\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-452d0b34-855e-43ed-b534-7cf23e159293Thu,
+ 11 Feb 2021 01:13:51 GMT\"0x8D8CE2A4ACC4EFE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-4597d8dd-b3d3-4adb-82df-b2151f2d7d09Thu,
+ 11 Feb 2021 17:44:21 GMT\"0x8D8CEB4AA1188C6\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-46096f5d-0dbb-4b51-b1fd-84dfd00712d3Tue,
+ 23 Feb 2021 19:32:39 GMT\"0x8D8D831C8385840\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-49bc813b-bb70-450f-ab1d-5f43667e0900Wed,
+ 02 Dec 2020 18:33:56 GMT\"0x8D896F0D439EECA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-4b6aac90-078f-4ecf-8f16-91ae0a809be8Thu,
+ 28 Jan 2021 02:28:25 GMT\"0x8D8C33463E018F9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-4b8c6b40-87ed-4600-84a3-396d5fe6f7b1Fri,
+ 26 Mar 2021 18:52:33 GMT\"0x8D8F08851138B1B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-4f027269-0d31-4774-b656-59085caf4453Fri,
+ 14 May 2021 16:42:14 GMT\"0x8D916F73AC9ED4B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-4f0bc060-7dd2-4612-a094-74d01cd79f98Fri,
+ 29 Jan 2021 01:49:46 GMT\"0x8D8C3F827DC4458\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-4f109068-2483-4871-aaa8-813b8abe5380Fri,
+ 12 Feb 2021 17:05:04 GMT\"0x8D8CF7857B4F9BD\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-509e5ebe-6fef-47e8-980f-636b664a1938Wed,
+ 17 Feb 2021 00:41:51 GMT\"0x8D8D2DCD0CB38D5\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-55af57d6-b81c-4dc5-bd01-9768f694b891Wed,
+ 17 Feb 2021 00:32:48 GMT\"0x8D8D2DB8D7369D5\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-56bdfc45-d746-46de-8fde-749afaec66b4Thu,
+ 11 Feb 2021 01:13:35 GMT\"0x8D8CE2A41BC7DBC\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-59c33767-c593-48e2-b00a-94fd55c2a017Tue,
+ 23 Feb 2021 18:50:35 GMT\"0x8D8D82BE76AFD2E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-5b58ebde-8690-44fc-8141-fd95face0ef8Thu,
+ 11 Feb 2021 01:15:52 GMT\"0x8D8CE2A933E3264\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-5c3f8695-99d0-485a-817f-1420a9e4aa98Wed,
+ 27 Jan 2021 21:39:55 GMT\"0x8D8C30C165A17F3\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-5fa2d8b5-c0a9-4951-accd-ea0cae2ab432Fri,
+ 12 Feb 2021 18:42:49 GMT\"0x8D8CF85FF9AB996\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-6099c5b7-4f7b-4438-8db3-74c35ed6b8dbTue,
+ 23 Feb 2021 18:31:15 GMT\"0x8D8D82934460C7E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-610bbabc-d750-4daa-a072-1ba60c837d3cTue,
+ 23 Feb 2021 18:42:43 GMT\"0x8D8D82ACE414485\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-61767317-afc0-4fca-967a-1a04d5767ad6Thu,
+ 11 Feb 2021 16:56:51 GMT\"0x8D8CEAE073001CF\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-619e89c0-d44e-4406-ac9c-65753183f995Fri,
+ 12 Feb 2021 21:38:12 GMT\"0x8D8CF9E7FA8F036\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-63bbdb8d-59ea-45a3-9ef8-093ae799defeWed,
+ 17 Feb 2021 18:01:59 GMT\"0x8D8D36E1F41DA6D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-644b88e6-a0fc-4f74-be05-7082deb53361Wed,
+ 10 Feb 2021 21:20:23 GMT\"0x8D8CE09AD6961B5\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-6793ce56-b86e-4939-a0cf-6c5759051cf9Fri,
+ 29 Jan 2021 02:07:19 GMT\"0x8D8C3FA9B7E53C6\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-67b1a89b-d796-49c2-b3f7-3f495a2f501dTue,
+ 16 Feb 2021 23:44:27 GMT\"0x8D8D2D4CC1629E2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-68421f76-08da-4014-83b8-e7d873b2ab24Tue,
+ 23 Feb 2021 17:59:24 GMT\"0x8D8D824C14A2617\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-69188b57-4012-d965-4b4c-5e4407c7e3f9Wed,
+ 17 Feb 2021 02:30:04 GMT\"0x8D8D2EBEF3025BE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-69a21a29-baa7-4b30-a637-f01bd5d65cd3Thu,
+ 11 Feb 2021 01:13:35 GMT\"0x8D8CE2A41735865\"unlockedexpiredcontainer$account-encryption-keyfalsefalsefalsefalsetest-container-6fd6a3a3-370e-4e81-b995-98a73a3998f5Thu,
+ 11 Feb 2021 02:52:22 GMT\"0x8D8CE380E441AD6\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-711d4643-ae82-4621-90c8-1de4f3829220Thu,
+ 11 Feb 2021 01:14:18 GMT\"0x8D8CE2A5AE02712\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-735d9ad8-5ce7-487d-bc05-e6961abe6590Thu,
+ 28 Jan 2021 21:58:54 GMT\"0x8D8C3D7E7D64AE2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-77764f80-0069-4d03-9df3-a2d8ef944743Tue,
+ 23 Feb 2021 17:57:28 GMT\"0x8D8D8247BE0013D\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-78375fe4-3078-4f86-8624-f3a0fe681483Thu,
+ 11 Feb 2021 17:53:13 GMT\"0x8D8CEB5E715ED2E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-7a224940-36ed-49e4-8a65-e25b756c0bd9Tue,
+ 23 Feb 2021 19:31:44 GMT\"0x8D8D831A74095A9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-7c18f354-f4d1-4131-880a-03bfaf8b580fThu,
+ 11 Feb 2021 01:13:30 GMT\"0x8D8CE2A3E5F2F89\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-7d23633b-981f-4ed3-a2a1-690776968790Fri,
+ 12 Feb 2021 21:38:12 GMT\"0x8D8CF9E7F7E9C2E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-808c4c61-a10a-4ff8-93e7-d049e76954b3Thu,
+ 11 Feb 2021 01:13:51 GMT\"0x8D8CE2A4AF4155C\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-81de7b4e-2daf-47a0-a9fe-dd9d9de21b4eThu,
+ 11 Feb 2021 22:55:14 GMT\"0x8D8CEE0183A2846\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-8268fdfa-18a7-428e-bbcc-d44a273b442dThu,
+ 11 Feb 2021 01:14:18 GMT\"0x8D8CE2A5B1AD835\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-828b3047-5062-4169-95bc-c9c3857119a2Wed,
+ 27 Jan 2021 21:21:08 GMT\"0x8D8C30976E59E5F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-830ca1ba-8c20-4ef7-b3ca-cdbf545faea1Tue,
+ 04 May 2021 15:27:36 GMT\"0x8D90F11258E9D3E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-840ccb70-918a-4df5-9701-ca213875bfb2Wed,
+ 17 Feb 2021 17:45:25 GMT\"0x8D8D36BCEE163BB\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-85172c7e-c49d-4ecf-81be-43d83447194bThu,
+ 11 Feb 2021 01:14:25 GMT\"0x8D8CE2A5EF9741F\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsefalsetest-container-88cbf348-3b56-42c3-8429-395492fb1631Tue,
+ 23 Feb 2021 19:35:51 GMT\"0x8D8D8323AB2574C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-8afcd31f-263f-4874-a77b-1493dfbdeccfWed,
+ 27 Jan 2021 19:57:35 GMT\"0x8D8C2FDCABB21BD\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-8c70dfbf-2f3e-48f0-a12e-89de1c847929Thu,
+ 28 Jan 2021 01:04:08 GMT\"0x8D8C3289DD534EC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-8ee495fc-e088-48aa-bfea-dcc681331426Tue,
+ 23 Feb 2021 18:30:13 GMT\"0x8D8D8290F6165D2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-8f1ace28-5ff6-4804-b848-d772b72b98c4Thu,
+ 11 Feb 2021 17:14:12 GMT\"0x8D8CEB073D17373\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-903ae3e2-c10f-4da0-a2d3-27d07da37d4fFri,
+ 29 Jan 2021 01:49:47 GMT\"0x8D8C3F828B406B3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-90f2d9d8-0d14-4bf3-a18f-51342fea6428Fri,
+ 19 Feb 2021 01:22:48 GMT\"0x8D8D474DE40C30D\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-913d087b-4d17-4a56-97b1-71cc6168457bFri,
+ 12 Feb 2021 19:26:34 GMT\"0x8D8CF8C1C35CA5F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-934ce2b8-aca4-4263-b40d-c047fc04a7d1Wed,
+ 27 Jan 2021 21:24:33 GMT\"0x8D8C309F096FA08\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-979ccb7f-112b-4a34-8896-7a46c9568ffcThu,
+ 11 Feb 2021 01:13:58 GMT\"0x8D8CE2A4EEA65BB\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsefalsetest-container-99aa1a9e-4744-43ed-8a41-33109a353868Thu,
+ 11 Feb 2021 18:43:13 GMT\"0x8D8CEBCE358E87F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-9cc9b913-5cc6-41a2-b5fd-e957aae47f04Wed,
+ 17 Feb 2021 17:44:59 GMT\"0x8D8D36BBF0EF0F5\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-9e6a867d-8802-4ace-84a6-17ec4e0cf262Wed,
+ 17 Feb 2021 00:34:13 GMT\"0x8D8D2DBC041C77B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-a1a88cbf-370d-4cc4-92af-7978633c5afdFri,
+ 12 Feb 2021 18:45:03 GMT\"0x8D8CF864F0A1815\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-a58d435e-3325-4016-a390-52eb82c7e16bThu,
+ 28 Jan 2021 21:54:35 GMT\"0x8D8C3D74D4E5CE4\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-a829c23b-441e-40af-8176-b2ca10ec4e7aThu,
+ 28 Jan 2021 02:28:25 GMT\"0x8D8C334639F24C9\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-abe99db8-f95d-4fe1-b912-77f6bc2d85eeThu,
+ 28 Jan 2021 16:44:36 GMT\"0x8D8C3ABFFB56A99\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-ac22f3bd-6ba6-4cca-a4af-5f6ce3cc3b04Thu,
+ 28 Jan 2021 01:04:08 GMT\"0x8D8C3289D908B4D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-adc4ba57-9457-49a3-abdb-ece2606fa9f4Tue,
+ 23 Feb 2021 19:33:09 GMT\"0x8D8D831DA369F25\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-b4aaf541-d001-487c-a618-f582fd494e7eFri,
+ 12 Feb 2021 18:19:51 GMT\"0x8D8CF82CA14854B\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-b4b1511a-5743-4887-99fd-d0d499c21e22Tue,
+ 23 Feb 2021 19:29:24 GMT\"0x8D8D83153CC51A7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-b608b0a5-6c39-4ce9-9382-c4eddbfcbbfbTue,
+ 23 Feb 2021 18:00:24 GMT\"0x8D8D824E545C48C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-b627740c-e8b1-4e9a-b063-65be0ebfe550Thu,
+ 11 Feb 2021 17:01:19 GMT\"0x8D8CEAEA6E52E5F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-b839a54b-7118-4401-a100-338e02969750Thu,
+ 11 Feb 2021 16:57:23 GMT\"0x8D8CEAE1A391766\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-ba681811-aa99-4180-8ed2-83cfe143643aFri,
+ 12 Feb 2021 18:26:36 GMT\"0x8D8CF83BBB28BEC\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-bb90b9d8-9cca-41cb-a984-9f745aa3ee54Tue,
+ 23 Feb 2021 19:32:02 GMT\"0x8D8D831B1C2BE18\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-bc6a050b-2368-4628-9a72-b47bd621d94eFri,
+ 29 Jan 2021 02:11:05 GMT\"0x8D8C3FB22617B70\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-bccab32d-51e6-40e7-b6c4-534c2ee2e9c1Fri,
+ 12 Feb 2021 19:27:50 GMT\"0x8D8CF8C4930DDF2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-bd715a23-8f19-4b6d-9f92-82c1a01913c5Thu,
+ 11 Feb 2021 01:13:30 GMT\"0x8D8CE2A3E928504\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-bf9d6770-353f-4c32-94ea-a359b0c3fc54Fri,
+ 29 Jan 2021 02:07:19 GMT\"0x8D8C3FA9C0093C4\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-c00fd09e-9b95-452d-8c35-53de7e73d986Wed,
+ 10 Feb 2021 22:28:09 GMT\"0x8D8CE132510326B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-c147cbd2-1406-4152-9440-b1f4747cc650Wed,
+ 17 Feb 2021 00:54:55 GMT\"0x8D8D2DEA49BE354\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-c494e72f-0126-0411-ac44-57b1edcc288eWed,
+ 17 Feb 2021 02:31:21 GMT\"0x8D8D2EC1D395D79\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-c55896c2-5854-4e22-9bd9-21a96b07e370Fri,
+ 12 Feb 2021 19:52:36 GMT\"0x8D8CF8FBF46E847\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-c727f411-1628-49dd-b1a0-2810c6d2603dFri,
+ 12 Feb 2021 17:49:42 GMT\"0x8D8CF7E93832D26\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-c790f187-1695-4775-820d-4e7600e38d1cThu,
+ 11 Feb 2021 01:15:09 GMT\"0x8D8CE2A79472217\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-c861ef3c-87ea-4bb1-9939-e89ccbf553bcWed,
+ 27 Jan 2021 21:28:24 GMT\"0x8D8C30A7A9D592F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-ce038060-4bc1-47a8-807d-e296c31ad98bWed,
+ 17 Feb 2021 01:12:28 GMT\"0x8D8D2E117C772CD\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-ce2880c8-d9fb-4759-ac52-aabf8f9a8e9eTue,
+ 23 Feb 2021 18:51:53 GMT\"0x8D8D82C15E8D48E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-ce704fd5-71cd-4a1d-9019-40615dddfaeeThu,
+ 11 Feb 2021 01:14:20 GMT\"0x8D8CE2A5C78573B\"lockedleasedinfinite$account-encryption-keyfalsefalsefalsefalsetest-container-cec859db-bff7-4ba8-bb50-2526ada01c5cFri,
+ 29 Jan 2021 01:57:24 GMT\"0x8D8C3F9391F4FDC\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-d0b9db4b-4954-4d42-bdc7-8c60a7db3564Thu,
+ 11 Feb 2021 01:13:33 GMT\"0x8D8CE2A402435F3\"unlockedexpired$account-encryption-keyfalsefalsefalsefalsetest-container-d3b53c7a-b299-466c-9396-5416a88d3e92Wed,
+ 27 Jan 2021 21:32:49 GMT\"0x8D8C30B188B60A4\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-d637b42e-31f5-4fc2-80be-4a9e160041bbWed,
+ 27 Jan 2021 21:24:32 GMT\"0x8D8C309F057C0E3\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-d9a61191-efa5-4bea-bd27-9f47acc0749aWed,
+ 27 Jan 2021 19:57:35 GMT\"0x8D8C2FDCA7AC162\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-df1a1934-eb8f-4dc1-9e3f-14691fd277bcFri,
+ 29 Jan 2021 01:57:39 GMT\"0x8D8C3F94238163B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-e0852ece-545c-47ac-b1df-5bd4652cbc82Thu,
+ 28 Jan 2021 21:54:34 GMT\"0x8D8C3D74CD98CFD\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-e3264db8-ca6a-4cdc-9cb3-0ef53bf136caWed,
+ 17 Feb 2021 18:01:59 GMT\"0x8D8D36E1F6A9A04\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-e741b92b-e6b5-4027-849b-a3c1aef163a4Fri,
+ 12 Feb 2021 21:25:37 GMT\"0x8D8CF9CBD77BF77\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-e75936e3-9265-4237-bef4-56c506213413Thu,
+ 28 Jan 2021 21:53:05 GMT\"0x8D8C3D717D91AB8\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-e7eef32f-aca7-4351-b351-d0c816e5054aFri,
+ 29 Jan 2021 02:06:23 GMT\"0x8D8C3FA7A8F7DAD\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-eb8c4b97-41ee-428b-9fc5-abd8a9634702Wed,
+ 27 Jan 2021 21:28:24 GMT\"0x8D8C30A7A5D6A0D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-ed627ebb-73d1-4dda-9585-7b241a62b6a4Thu,
+ 11 Feb 2021 01:47:14 GMT\"0x8D8CE2EF50CEA85\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-eeff9dc2-bbae-4542-93de-85f146fa5788Wed,
+ 17 Feb 2021 00:49:20 GMT\"0x8D8D2DDDCD54827\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-f197d29d-4bb4-40df-87cc-bde2aad76179Thu,
+ 11 Feb 2021 17:44:26 GMT\"0x8D8CEB4AD24F10E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-f385e036-c465-4a8d-aa86-f6ef15b11b1bThu,
+ 11 Feb 2021 01:14:14 GMT\"0x8D8CE2A58F55CC5\"unlockedexpiredcontainer$account-encryption-keyfalsefalsefalsefalsetest-container-f396c4de-1fd6-48cd-8c66-64b6b46ae4ffWed,
+ 27 Jan 2021 21:32:50 GMT\"0x8D8C30B18CA95D2\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-f42c25a8-f24e-4ceb-9309-db40973a0addThu,
+ 11 Feb 2021 17:01:19 GMT\"0x8D8CEAEA71699D1\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-f4f4dcc4-27f7-4078-8667-5033574b6f47Wed,
+ 17 Feb 2021 01:11:01 GMT\"0x8D8D2E0E3F760DC\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-f5a24da1-cd2e-40c6-8bb1-733f36658c6fWed,
+ 17 Feb 2021 01:16:34 GMT\"0x8D8D2E1AAC71E24\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-f638a6cf-be12-45b4-9933-3a25b14ac296Fri,
+ 12 Feb 2021 19:26:34 GMT\"0x8D8CF8C1C0E80BA\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-f7e5c21c-de1e-4808-a04e-1e7f25b25c9fWed,
+ 17 Feb 2021 00:29:40 GMT\"0x8D8D2DB1D257B91\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetest-container-fa37b194-7db2-8811-5df6-907f10c7ecccWed,
+ 17 Feb 2021 02:31:22 GMT\"0x8D8D2EC1D62B5BE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-faa9b90c-56c4-0a69-cb5a-30714ad70c14Wed,
+ 17 Feb 2021 02:30:04 GMT\"0x8D8D2EBEF0827B0\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetest-container-ff96e927-1c86-4c63-9813-32b8e8e8b91aWed,
+ 17 Feb 2021 00:13:39 GMT\"0x8D8D2D8E0A1B64E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalsefalsetestcontainer898e1b1eTue,
+ 01 Dec 2020 21:49:45 GMT\"0x8D896430452B35D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetestcontainerae6c1f24Tue,
+ 01 Dec 2020 21:49:54 GMT\"0x8D8964309DBA91D\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsetestcontainerf7f71ca7Tue,
+ 01 Dec 2020 21:48:19 GMT\"0x8D89642D15CA400\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer17971d05Tue,
+ 01 Dec 2020 21:50:39 GMT\"0x8D89643246A277F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer206719b0Tue,
+ 01 Dec 2020 21:48:59 GMT\"0x8D89642E930F974\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer50d0216aTue,
+ 01 Dec 2020 21:50:47 GMT\"0x8D89643294D6B13\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer54918fbTue,
+ 01 Dec 2020 21:50:03 GMT\"0x8D896430F0A5CCB\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer6d931a88Tue,
+ 01 Dec 2020 21:49:08 GMT\"0x8D89642EE39074E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer6e611adcTue,
+ 01 Dec 2020 21:49:35 GMT\"0x8D89642FEA07746\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer7427167eTue,
+ 01 Dec 2020 21:48:29 GMT\"0x8D89642D77939BC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer7ce1476Tue,
+ 01 Dec 2020 21:48:48 GMT\"0x8D89642E2652DEC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer866c1afbTue,
+ 01 Dec 2020 21:50:12 GMT\"0x8D896431458D3CA\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer879205cWed,
+ 16 Dec 2020 23:34:59 GMT\"0x8D8A21B340C8378\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer8c7016f3Tue,
+ 01 Dec 2020 21:50:22 GMT\"0x8D896431A79909E\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer8dea1eedTue,
+ 01 Dec 2020 21:49:16 GMT\"0x8D89642F33597BA\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainer927f11f2Wed,
+ 16 Dec 2020 23:35:07 GMT\"0x8D8A21B38AFFB9C\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerb59f1281Wed,
+ 16 Dec 2020 23:35:06 GMT\"0x8D8A21B37FC7DA0\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerba52179cWed,
+ 16 Dec 2020 03:02:21 GMT\"0x8D8A16F01E33300\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerc2e51c2dTue,
+ 01 Dec 2020 21:50:30 GMT\"0x8D896431F67999A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerc8131f7dWed,
+ 16 Dec 2020 23:35:02 GMT\"0x8D8A21B35F91A6A\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerd0ba1817Wed,
+ 16 Dec 2020 23:35:08 GMT\"0x8D8A21B396D8F82\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerd34b185fTue,
+ 01 Dec 2020 21:47:54 GMT\"0x8D89642C29C7D1B\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainere8d9187eTue,
+ 01 Dec 2020 21:48:39 GMT\"0x8D89642DD41E438\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainerebfb18a1Tue,
+ 01 Dec 2020 21:48:07 GMT\"0x8D89642CA041AC3\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersource1c30197aFri,
+ 04 Jun 2021 00:44:21 GMT\"0x8D926F1E4DE86DC\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersource698c1aafFri,
+ 04 Jun 2021 00:24:21 GMT\"0x8D926EF1932594F\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersource879205cWed,
+ 16 Dec 2020 23:34:59 GMT\"0x8D8A21B34228072\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersource927f11f2Wed,
+ 16 Dec 2020 23:35:07 GMT\"0x8D8A21B38C4BFE3\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersourceb59f1281Wed,
+ 16 Dec 2020 23:35:06 GMT\"0x8D8A21B38103045\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersourcec8131f7dWed,
+ 16 Dec 2020 23:35:02 GMT\"0x8D8A21B360C30BE\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersourcecb3e1fa9Fri,
+ 04 Jun 2021 00:24:42 GMT\"0x8D926EF25A23EC1\"unlockedavailable$account-encryption-keyfalsefalsefalsefalseutcontainersourced0ba1817Wed,
+ 16 Dec 2020 23:35:08 GMT\"0x8D8A21B39831731\"unlockedavailable$account-encryption-keyfalsefalsefalsefalsevlwcontainer1c30197aFri,
+ 04 Jun 2021 00:45:08 GMT\"0x8D926F200A0D2F4\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainer698c1aafFri,
+ 04 Jun 2021 00:24:23 GMT\"0x8D926EF1A8DAD5A\"unlockedavailable$account-encryption-keyfalsefalsefalsetruevlwcontainerasynccb3e1fa9Fri,
+ 04 Jun 2021 00:24:43 GMT\"0x8D926EF266AF622\"unlockedavailable$account-encryption-keyfalsefalsefalsetrue"
headers:
content-type: application/xml
- date: Fri, 25 Oct 2019 18:00:47 GMT
+ date: Fri, 04 Jun 2021 00:46:12 GMT
server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
- x-ms-version: '2019-02-02'
+ x-ms-version: '2020-10-02'
status:
code: 200
message: OK
- url: !!python/object/new:yarl.URL
- state: !!python/tuple
- - !!python/object/new:urllib.parse.SplitResult
- - https
- - pyacrstoragekzoj3d7n4a5m.blob.core.windows.net
- - /
- - comp=list
- - ''
+ url: https://seanmcccanary3.blob.core.windows.net/?comp=list&include=
version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_create_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_create_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..ff0b789f6741
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_create_blob_with_immutability_policy.yaml
@@ -0,0 +1,247 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 03:31:02 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer88a816fd?restype=container
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:fe73fc68-401e-0000-3328-587b72000000\nTime:2021-06-03T03:31:02.9194963Z"
+ headers:
+ content-length:
+ - '230'
+ content-type:
+ - application/xml
+ date:
+ - Thu, 03 Jun 2021 03:31:02 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code:
+ - ContainerAlreadyExists
+ x-ms-version:
+ - '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer88a816fd?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer88a816fd","name":"vlwcontainer88a816fd","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '451'
+ content-type:
+ - application/json
+ date:
+ - Thu, 03 Jun 2021 03:31:04 GMT
+ etag:
+ - '"0x8D9264004BA1FA8"'
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-content-length:
+ - '1024'
+ x-ms-blob-type:
+ - PageBlob
+ x-ms-date:
+ - Thu, 03 Jun 2021 03:31:05 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 03:31:10 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer88a816fd/vlwblob88a816fd
+ response:
+ body:
+ string: ''
+ headers:
+ date:
+ - Thu, 03 Jun 2021 03:31:04 GMT
+ etag:
+ - '"0x8D9264004E845D2"'
+ last-modified:
+ - Thu, 03 Jun 2021 03:31:05 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-request-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T03:31:05.1739362Z'
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Thu, 03 Jun 2021 03:31:05 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer88a816fd/vlwblob88a816fd
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges:
+ - bytes
+ content-length:
+ - '1024'
+ content-type:
+ - application/octet-stream
+ date:
+ - Thu, 03 Jun 2021 03:31:04 GMT
+ etag:
+ - '"0x8D9264004E845D2"'
+ last-modified:
+ - Thu, 03 Jun 2021 03:31:05 GMT
+ server:
+ - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-sequence-number:
+ - '0'
+ x-ms-blob-type:
+ - PageBlob
+ x-ms-creation-time:
+ - Thu, 03 Jun 2021 03:31:05 GMT
+ x-ms-immutability-policy-mode:
+ - unlocked
+ x-ms-immutability-policy-until-date:
+ - Thu, 03 Jun 2021 03:31:10 GMT
+ x-ms-is-current-version:
+ - 'true'
+ x-ms-lease-state:
+ - available
+ x-ms-lease-status:
+ - unlocked
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-server-encrypted:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ x-ms-version-id:
+ - '2021-06-03T03:31:05.1739362Z'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer88a816fd?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ content-type:
+ - text/plain; charset=utf-8
+ date:
+ - Thu, 03 Jun 2021 03:31:05 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob_async.test_create_blob_with_immutability_policy.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob_async.test_create_blob_with_immutability_policy.yaml
new file mode 100644
index 000000000000..7352da1c0e6f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob_async.test_create_blob_with_immutability_policy.yaml
@@ -0,0 +1,170 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:45:06 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/utcontainer1c30197a?restype=container
+ response:
+ body:
+ string: "\uFEFFContainerAlreadyExistsThe
+ specified container already exists.\nRequestId:a2bc0215-301e-0062-14da-5818e5000000\nTime:2021-06-04T00:45:06.8513175Z"
+ headers:
+ content-length: '230'
+ content-type: application/xml
+ date: Fri, 04 Jun 2021 00:45:06 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-error-code: ContainerAlreadyExists
+ x-ms-version: '2020-10-02'
+ status:
+ code: 409
+ message: The specified container already exists.
+ url: https://seanmcccanary3.blob.core.windows.net/utcontainer1c30197a?restype=container
+- request:
+ body: '{"properties": {"immutableStorageWithVersioning": {"enabled": true}}}'
+ headers:
+ Accept:
+ - application/json
+ Content-Length:
+ - '69'
+ Content-Type:
+ - application/json
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer1c30197a?api-version=2021-04-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/vlwcontainer1c30197a","name":"vlwcontainer1c30197a","type":"Microsoft.Storage/storageAccounts/blobServices/containers","properties":{"immutableStorageWithVersioning":{"enabled":true},"deleted":false,"remainingRetentionDays":0,"hasImmutabilityPolicy":false,"hasLegalHold":false}}'
+ headers:
+ cache-control: no-cache
+ content-length: '451'
+ content-type: application/json
+ date: Fri, 04 Jun 2021 00:45:07 GMT
+ etag: '"0x8D926F2009E8895"'
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-writes: '1199'
+ status:
+ code: 201
+ message: Created
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanmcccanary3/blobServices/default/containers/vlwcontainer1c30197a?api-version=2021-04-01
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '0'
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-blob-content-length:
+ - '1024'
+ x-ms-blob-type:
+ - PageBlob
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:45:08 GMT
+ x-ms-immutability-policy-mode:
+ - Unlocked
+ x-ms-immutability-policy-until-date:
+ - Fri, 04 Jun 2021 00:45:13 GMT
+ x-ms-legal-hold:
+ - 'true'
+ x-ms-version:
+ - '2020-10-02'
+ method: PUT
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1c30197a/vlwblob1c30197a
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Fri, 04 Jun 2021 00:45:08 GMT
+ etag: '"0x8D926F200C6E57E"'
+ last-modified: Fri, 04 Jun 2021 00:45:08 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-request-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T00:45:08.6611838Z'
+ status:
+ code: 201
+ message: Created
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer1c30197a/vlwblob1c30197a
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ User-Agent:
+ - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Fri, 04 Jun 2021 00:45:08 GMT
+ x-ms-version:
+ - '2020-10-02'
+ method: HEAD
+ uri: https://storagename.blob.core.windows.net/vlwcontainer1c30197a/vlwblob1c30197a
+ response:
+ body:
+ string: ''
+ headers:
+ accept-ranges: bytes
+ content-length: '1024'
+ content-type: application/octet-stream
+ date: Fri, 04 Jun 2021 00:45:08 GMT
+ etag: '"0x8D926F200C6E57E"'
+ last-modified: Fri, 04 Jun 2021 00:45:08 GMT
+ server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-blob-sequence-number: '0'
+ x-ms-blob-type: PageBlob
+ x-ms-creation-time: Fri, 04 Jun 2021 00:45:08 GMT
+ x-ms-immutability-policy-mode: unlocked
+ x-ms-immutability-policy-until-date: Fri, 04 Jun 2021 00:45:13 GMT
+ x-ms-is-current-version: 'true'
+ x-ms-lease-state: available
+ x-ms-lease-status: unlocked
+ x-ms-legal-hold: 'true'
+ x-ms-server-encrypted: 'true'
+ x-ms-version: '2020-10-02'
+ x-ms-version-id: '2021-06-04T00:45:08.6611838Z'
+ status:
+ code: 200
+ message: OK
+ url: https://seanmcccanary3.blob.core.windows.net/vlwcontainer1c30197a/vlwblob1c30197a
+- request:
+ body: null
+ headers:
+ User-Agent:
+ - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/storagename/blobServices/default/containers/utcontainer1c30197a?api-version=2021-04-01
+ response:
+ body:
+ string: ''
+ headers:
+ cache-control: no-cache
+ content-length: '0'
+ content-type: text/plain; charset=utf-8
+ date: Fri, 04 Jun 2021 00:45:08 GMT
+ expires: '-1'
+ pragma: no-cache
+ server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0
+ strict-transport-security: max-age=31536000; includeSubDomains
+ x-content-type-options: nosniff
+ x-ms-ratelimit-remaining-subscription-deletes: '14999'
+ status:
+ code: 200
+ message: OK
+ url: https://management.azure.com/subscriptions/ba45b233-e2ef-4169-8808-49eb0d8eba0d/resourceGroups/XClient/providers/Microsoft.Storage/storageAccounts/seanmcccanary3/blobServices/default/containers/utcontainer1c30197a?api-version=2021-04-01
+version: 1
diff --git a/sdk/storage/azure-storage-blob/tests/test_append_blob.py b/sdk/storage/azure-storage-blob/tests/test_append_blob.py
index 4f044ffbd81b..4984f0bf1334 100644
--- a/sdk/storage/azure-storage-blob/tests/test_append_blob.py
+++ b/sdk/storage/azure-storage-blob/tests/test_append_blob.py
@@ -15,6 +15,9 @@
import uuid
from datetime import datetime, timedelta
+from azure.mgmt.storage import StorageManagementClient
+from devtools_testutils import BlobAccountPreparer, ResourceGroupPreparer
+
from azure.core import MatchConditions
from azure.core.exceptions import ResourceNotFoundError, ResourceModifiedError, HttpResponseError
from azure.storage.blob import (
@@ -23,7 +26,7 @@
ContainerClient,
BlobClient,
BlobType,
- BlobSasPermissions)
+ BlobSasPermissions, BlobImmutabilityPolicyMode, ImmutabilityPolicy)
from azure.storage.blob._shared.policies import StorageContentValidation
from _shared.testcase import GlobalStorageAccountPreparer, StorageAccountPreparer, GlobalResourceGroupPreparer
@@ -1321,4 +1324,41 @@ def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, resource_g
self.assertIsNone(prop.is_append_blob_sealed)
copied_blob3.append_block("abc")
+
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_create_append_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024)
+ self._setup(bsc)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = bsc.get_blob_client(container_name, blob_name)
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ blob.create_append_blob(immutability_policy=immutability_policy,
+ legal_hold=True)
+
+ props = blob.get_blob_properties()
+
+ with self.assertRaises(HttpResponseError):
+ blob.delete_blob()
+
+ self.assertTrue(props['has_legal_hold'])
+ self.assertIsNotNone(props['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(props['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
# ------------------------------------------------------------------------------
diff --git a/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py
index 153c0caa08f5..0fed67675466 100644
--- a/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py
+++ b/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py
@@ -17,12 +17,15 @@
import unittest
import uuid
+from azure.mgmt.storage.aio import StorageManagementClient
+from devtools_testutils import BlobAccountPreparer, ResourceGroupPreparer
+
from azure.core import MatchConditions
from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceModifiedError
from azure.core.pipeline.transport import AioHttpTransport
from multidict import CIMultiDict, CIMultiDictProxy
-from azure.storage.blob import BlobSasPermissions, generate_blob_sas
+from azure.storage.blob import BlobSasPermissions, generate_blob_sas, BlobImmutabilityPolicyMode, ImmutabilityPolicy
from azure.storage.blob._shared.policies import StorageContentValidation
from azure.storage.blob import BlobType
from azure.storage.blob.aio import (
@@ -1403,4 +1406,41 @@ async def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, reso
self.assertIsNone(prop.is_append_blob_sealed)
await copied_blob3.append_block("abc")
+
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_create_append_blob_with_immutability_policy_async(self, resource_group, location, storage_account, storage_account_key):
+ bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024)
+ await self._setup(bsc)
+
+ container_name = self.get_resource_name('vlwcontainerasync')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = bsc.get_blob_client(container_name, blob_name)
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ await blob.create_append_blob(immutability_policy=immutability_policy,
+ legal_hold=True)
+
+ props = await blob.get_blob_properties()
+
+ with self.assertRaises(HttpResponseError):
+ await blob.delete_blob()
+
+ self.assertTrue(props['has_legal_hold'])
+ self.assertIsNotNone(props['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(props['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
# ------------------------------------------------------------------------------
diff --git a/sdk/storage/azure-storage-blob/tests/test_block_blob.py b/sdk/storage/azure-storage-blob/tests/test_block_blob.py
index 2b56f65683f0..298ff79216a5 100644
--- a/sdk/storage/azure-storage-blob/tests/test_block_blob.py
+++ b/sdk/storage/azure-storage-blob/tests/test_block_blob.py
@@ -12,6 +12,9 @@
import pytest
import uuid
+from azure.mgmt.storage import StorageManagementClient
+
+
from azure.storage.blob._shared.policies import StorageContentValidation
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceModifiedError, ResourceNotFoundError
@@ -22,9 +25,9 @@
BlobType,
ContentSettings,
BlobBlock,
- StandardBlobTier, generate_blob_sas, BlobSasPermissions, CustomerProvidedEncryptionKey
-)
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+ StandardBlobTier, generate_blob_sas, BlobSasPermissions, CustomerProvidedEncryptionKey,
+ BlobImmutabilityPolicyMode, ImmutabilityPolicy)
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer
from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer
from devtools_testutils.storage import StorageTestCase
@@ -422,6 +425,48 @@ def test_put_block_list(self, resource_group, location, storage_account, storage
self.assertEqual(content.properties.etag, put_block_list_resp.get('etag'))
self.assertEqual(content.properties.last_modified, put_block_list_resp.get('last_modified'))
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_put_block_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ self._setup(storage_account, storage_account_key)
+ container_name = self.get_resource_name('vlwcontainer')
+
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = self._get_blob_reference()
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ blob.stage_block('1', b'AAA')
+ blob.stage_block('2', b'BBB')
+ blob.stage_block('3', b'CCC')
+
+ # Act
+ block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')]
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ put_block_list_resp = blob.commit_block_list(block_list,
+ immutability_policy=immutability_policy,
+ legal_hold=True,
+ )
+
+ # Assert
+ download_resp = blob.download_blob()
+ self.assertEqual(download_resp.readall(), b'AAABBBCCC')
+ self.assertEqual(download_resp.properties.etag, put_block_list_resp.get('etag'))
+ self.assertEqual(download_resp.properties.last_modified, put_block_list_resp.get('last_modified'))
+ self.assertTrue(download_resp.properties['has_legal_hold'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
@GlobalStorageAccountPreparer()
def test_put_block_list_invalid_block_id(self, resource_group, location, storage_account, storage_account_key):
self._setup(storage_account, storage_account_key)
diff --git a/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py
index 61c89994cc15..a94707a5ff33 100644
--- a/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py
+++ b/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py
@@ -13,12 +13,15 @@
from datetime import datetime, timedelta
+from azure.mgmt.storage.aio import StorageManagementClient
+
+
from azure.storage.blob._shared.policies import StorageContentValidation
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceModifiedError, ResourceNotFoundError
from azure.core.pipeline.transport import AioHttpTransport
from multidict import CIMultiDict, CIMultiDictProxy
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer
from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer
from devtools_testutils.storage.aio import AsyncStorageTestCase
@@ -28,8 +31,8 @@
BlobBlock,
StandardBlobTier,
generate_blob_sas,
- BlobSasPermissions, CustomerProvidedEncryptionKey
-)
+ BlobSasPermissions, CustomerProvidedEncryptionKey,
+ BlobImmutabilityPolicyMode, ImmutabilityPolicy)
from azure.storage.blob.aio import (
BlobServiceClient,
@@ -525,6 +528,49 @@ async def test_put_block_list(self, resource_group, location, storage_account, s
self.assertEqual(content.properties.etag, put_block_list_resp.get('etag'))
self.assertEqual(content.properties.last_modified, put_block_list_resp.get('last_modified'))
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_put_block_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ await self._setup(storage_account, storage_account_key)
+ container_name = self.get_resource_name('vlwcontainer')
+
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = self._get_blob_reference()
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ await blob.stage_block('1', b'AAA')
+ await blob.stage_block('2', b'BBB')
+ await blob.stage_block('3', b'CCC')
+
+ # Act
+ block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')]
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ put_block_list_resp = await blob.commit_block_list(block_list,
+ immutability_policy=immutability_policy,
+ legal_hold=True,
+ )
+
+ # Assert
+ download_resp = await blob.download_blob()
+ content = await download_resp.readall()
+ self.assertEqual(content, b'AAABBBCCC')
+ self.assertEqual(download_resp.properties.etag, put_block_list_resp.get('etag'))
+ self.assertEqual(download_resp.properties.last_modified, put_block_list_resp.get('last_modified'))
+ self.assertTrue(download_resp.properties['has_legal_hold'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_put_block_list_invalid_block_id(self, resource_group, location, storage_account, storage_account_key):
diff --git a/sdk/storage/azure-storage-blob/tests/test_common_blob.py b/sdk/storage/azure-storage-blob/tests/test_common_blob.py
index fa9cae40029d..9a22a748ea94 100644
--- a/sdk/storage/azure-storage-blob/tests/test_common_blob.py
+++ b/sdk/storage/azure-storage-blob/tests/test_common_blob.py
@@ -14,6 +14,9 @@
import sys
from datetime import datetime, timedelta
+from azure.mgmt.storage import StorageManagementClient
+
+
from azure.core import MatchConditions
from azure.core.credentials import AzureSasCredential
from azure.core.exceptions import (
@@ -41,9 +44,9 @@
ResourceTypes,
AccountSasPermissions,
StandardBlobTier,
-)
+ BlobImmutabilityPolicyMode, ImmutabilityPolicy)
from azure.storage.blob._generated.models import RehydratePriority
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer
from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer
from devtools_testutils.storage import StorageTestCase
@@ -150,7 +153,7 @@ def _assert_blob_not_soft_deleted(self, blob):
@GlobalStorageAccountPreparer()
def test_blob_exists(self, resource_group, location, storage_account, storage_account_key):
self._setup(storage_account, storage_account_key)
- blob_name = self._create_block_blob()
+ blob_name = self._create_block_blob(overwrite=True)
# Act
blob = self.bsc.get_blob_client(self.container_name, blob_name)
@@ -1161,6 +1164,45 @@ def test_copy_blob_with_existing_blob(self, resource_group, location, storage_ac
copy_content = copyblob.download_blob().readall()
self.assertEqual(copy_content, self.byte_data)
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_copy_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = self._create_block_blob()
+ # Act
+ sourceblob = '{0}/{1}/{2}'.format(
+ self.account_url(storage_account, "blob"), self.container_name, blob_name)
+
+ copyblob = self.bsc.get_blob_client(container_name, 'blob1copy')
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ copy = copyblob.start_copy_from_url(sourceblob, immutability_policy=immutability_policy,
+ legal_hold=True,
+ )
+
+ download_resp = copyblob.download_blob()
+ self.assertEqual(download_resp.readall(), self.byte_data)
+
+ self.assertTrue(download_resp.properties['has_legal_hold'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['policy_mode'])
+ self.assertIsNotNone(copy)
+ self.assertEqual(copy['copy_status'], 'success')
+ self.assertFalse(isinstance(copy['copy_status'], Enum))
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
@GlobalResourceGroupPreparer()
@StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename')
def test_async_copy_blob_with_if_tags(self, resource_group, location, storage_account, storage_account_key):
@@ -1723,6 +1765,84 @@ def test_account_sas(self, resource_group, location, storage_account, storage_ac
self.assertEqual(self.byte_data, blob_response.content)
self.assertTrue(container_response.ok)
+ @pytest.mark.live_test_only
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_set_immutability_policy_using_sas(self, resource_group, location, storage_account, storage_account_key):
+ # SAS URL is calculated from storage key, so this test runs live only
+
+ self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ blob.upload_blob(b"abc", overwrite=True)
+
+ # Act using account sas
+ account_sas_token = generate_account_sas(
+ self.bsc.account_name,
+ self.bsc.credential.account_key,
+ ResourceTypes(container=True, object=True),
+ AccountSasPermissions(read=True, set_immutability_policy=True),
+ datetime.utcnow() + timedelta(hours=1),
+ )
+ blob = BlobClient(
+ self.bsc.url, container_name= container_name, blob_name=blob_name, credential=account_sas_token)
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp_with_account_sas = blob.set_immutability_policy(immutability_policy=immutability_policy)
+ blob_response = requests.get(blob.url)
+
+ # Assert response using account sas
+ self.assertTrue(blob_response.ok)
+ self.assertIsNotNone(resp_with_account_sas['immutability_policy_until_date'])
+ self.assertIsNotNone(resp_with_account_sas['immutability_policy_mode'])
+
+ # Acting using container sas
+ container_sas_token = generate_container_sas(
+ self.bsc.account_name,
+ container_name,
+ account_key=self.bsc.credential.account_key,
+ permission=ContainerSasPermissions(read=True, set_immutability_policy=True),
+ expiry=datetime.utcnow() + timedelta(hours=1),
+ )
+ blob1 = BlobClient(
+ self.bsc.url, container_name=container_name, blob_name=blob_name, credential=container_sas_token)
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp_with_container_sas = blob1.set_immutability_policy(immutability_policy=immutability_policy)
+ # Assert response using container sas
+ self.assertIsNotNone(resp_with_container_sas['immutability_policy_until_date'])
+ self.assertIsNotNone(resp_with_container_sas['immutability_policy_mode'])
+
+ # Acting using blob sas
+ blob_sas_token = generate_blob_sas(
+ self.bsc.account_name,
+ container_name,
+ blob_name,
+ account_key=self.bsc.credential.account_key,
+ permission=BlobSasPermissions(read=True, set_immutability_policy=True),
+ expiry=datetime.utcnow() + timedelta(hours=1),
+ )
+ blob2 = BlobClient(
+ self.bsc.url, container_name=container_name, blob_name=blob_name, credential=blob_sas_token)
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp_with_blob_sas = blob2.set_immutability_policy(immutability_policy=immutability_policy)
+
+ # Assert response using blob sas
+ self.assertIsNotNone(resp_with_blob_sas['immutability_policy_until_date'])
+ self.assertIsNotNone(resp_with_blob_sas['immutability_policy_mode'])
+
@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
def test_account_sas_credential(self, resource_group, location, storage_account, storage_account_key):
@@ -2401,4 +2521,154 @@ def fail_response(response):
# Assert that the token attempts to refresh 4 times (i.e, get_token called 4 times)
self.assertEqual(token_credential.get_token_count, 4)
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_blob_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ blob.upload_blob(b"abc", overwrite=True)
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp = blob.set_immutability_policy(immutability_policy=immutability_policy)
+
+ # Assert
+ # check immutability policy after set_immutability_policy()
+ props = blob.get_blob_properties()
+ self.assertIsNotNone(resp['immutability_policy_until_date'])
+ self.assertIsNotNone(resp['immutability_policy_mode'])
+ self.assertIsNotNone(props['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(props['immutability_policy']['policy_mode'])
+ self.assertEqual(props['immutability_policy']['policy_mode'], "unlocked")
+
+ # check immutability policy after delete_immutability_policy()
+ blob.delete_immutability_policy()
+ props = blob.get_blob_properties()
+ self.assertIsNone(props['immutability_policy']['policy_mode'])
+ self.assertIsNone(props['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
+ @GlobalStorageAccountPreparer()
+ def test_blob_legal_hold(self, resource_group, location, storage_account, storage_account_key):
+ self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ blob.upload_blob(b"abc", overwrite=True)
+ resp = blob.set_legal_hold(True)
+ props = blob.get_blob_properties()
+
+ with self.assertRaises(HttpResponseError):
+ blob.delete_blob()
+
+ self.assertTrue(resp['legal_hold'])
+ self.assertTrue(props['has_legal_hold'])
+
+ resp2 = blob.set_legal_hold(False)
+ props2 = blob.get_blob_properties()
+
+ self.assertFalse(resp2['legal_hold'])
+ self.assertFalse(props2['has_legal_hold'])
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_download_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ self._setup(storage_account, storage_account_key)
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ content = b"abcedfg"
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ blob.upload_blob(content,
+ immutability_policy=immutability_policy,
+ legal_hold=True,
+ overwrite=True)
+
+ download_resp = blob.download_blob()
+
+ with self.assertRaises(HttpResponseError):
+ blob.delete_blob()
+
+ self.assertTrue(download_resp.properties['has_legal_hold'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['policy_mode'])
+
+ # Cleanup
+ blob.set_legal_hold(False)
+ blob.delete_immutability_policy()
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_list_blobs_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ self._setup(storage_account, storage_account_key)
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ container_client = self.bsc.get_container_client(container_name)
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ content = b"abcedfg"
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ blob.upload_blob(content,immutability_policy=immutability_policy,
+ legal_hold=True,
+ overwrite=True)
+
+ blob_list = list(container_client.list_blobs(include=['immutabilitypolicy', 'legalhold']))
+
+ self.assertTrue(blob_list[0]['has_legal_hold'])
+ self.assertIsNotNone(blob_list[0]['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(blob_list[0]['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
# ------------------------------------------------------------------------------
diff --git a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
index 9f8dd7f6c955..44e7373d338a 100644
--- a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
+++ b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
@@ -16,6 +16,8 @@
import uuid
from datetime import datetime, timedelta
+from azure.mgmt.storage.aio import StorageManagementClient
+
from azure.core import MatchConditions
from azure.core.credentials import AzureSasCredential
from azure.core.exceptions import (
@@ -49,9 +51,10 @@
AccessPolicy,
ResourceTypes,
AccountSasPermissions,
- StandardBlobTier, RehydratePriority)
+ StandardBlobTier, RehydratePriority, BlobImmutabilityPolicyMode, ImmutabilityPolicy)
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer, \
+ CachedResourceGroupPreparer
from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer
from devtools_testutils.storage.aio import AsyncStorageTestCase
@@ -1432,6 +1435,46 @@ async def test_copy_blob_with_existing_blob(self, resource_group, location, stor
copy_content = await (await copyblob.download_blob()).readall()
self.assertEqual(copy_content, self.byte_data)
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_copy_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ await self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = await self._create_block_blob()
+ # Act
+ sourceblob = '{0}/{1}/{2}'.format(
+ self.account_url(storage_account, "blob"), self.container_name, blob_name)
+
+ copyblob = self.bsc.get_blob_client(container_name, 'blob1copy')
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+
+ copy = await copyblob.start_copy_from_url(sourceblob, immutability_policy=immutability_policy,
+ legal_hold=True,
+ )
+
+ download_resp = await copyblob.download_blob()
+ self.assertEqual(await download_resp.readall(), self.byte_data)
+
+ self.assertTrue(download_resp.properties['has_legal_hold'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['policy_mode'])
+ self.assertIsNotNone(copy)
+ self.assertEqual(copy['copy_status'], 'success')
+ self.assertFalse(isinstance(copy['copy_status'], Enum))
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
# @GlobalStorageAccountPreparer()
# @AsyncStorageTestCase.await_prepared_test
@@ -2488,4 +2531,159 @@ async def test_transport_closed_only_once(self, resource_group, location, storag
await bsc.get_service_properties()
assert transport.session is not None
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_blob_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ await self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ await blob.upload_blob(b"abc", overwrite=True)
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp = await blob.set_immutability_policy(
+ immutability_policy=immutability_policy)
+
+ # Assert
+ # check immutability policy after set_immutability_policy()
+ props = await blob.get_blob_properties()
+ self.assertIsNotNone(resp['immutability_policy_until_date'])
+ self.assertIsNotNone(resp['immutability_policy_mode'])
+ self.assertIsNotNone(props['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(props['immutability_policy']['policy_mode'])
+ self.assertEqual(props['immutability_policy']['policy_mode'], "unlocked")
+
+ # check immutability policy after delete_immutability_policy()
+ await blob.delete_immutability_policy()
+ props = await blob.get_blob_properties()
+ self.assertIsNone(props['immutability_policy']['policy_mode'])
+ self.assertIsNone(props['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
+ @GlobalStorageAccountPreparer()
+ async def test_blob_legal_hold(self, resource_group, location, storage_account, storage_account_key):
+ await self._setup(storage_account, storage_account_key)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ await blob.upload_blob(b"abc", overwrite=True)
+ resp = await blob.set_legal_hold(True)
+ props = await blob.get_blob_properties()
+
+ with self.assertRaises(HttpResponseError):
+ await blob.delete_blob()
+
+ self.assertTrue(resp['legal_hold'])
+ self.assertTrue(props['has_legal_hold'])
+
+ resp2 = await blob.set_legal_hold(False)
+ props2 = await blob.get_blob_properties()
+
+ self.assertFalse(resp2['legal_hold'])
+ self.assertFalse(props2['has_legal_hold'])
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_download_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ await self._setup(storage_account, storage_account_key)
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ content = b"abcedfg"
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ await blob.upload_blob(content,
+ immutability_policy=immutability_policy,
+ legal_hold=True,
+ overwrite=True)
+
+ download_resp = await blob.download_blob()
+
+ with self.assertRaises(HttpResponseError):
+ await blob.delete_blob()
+
+ self.assertTrue(download_resp.properties['has_legal_hold'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(download_resp.properties['immutability_policy']['policy_mode'])
+
+ # Cleanup
+ await blob.set_legal_hold(False)
+ await blob.delete_immutability_policy()
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_list_blobs_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ await self._setup(storage_account, storage_account_key)
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ # Act
+ blob_name = self.get_resource_name('vlwblob')
+ container_client = self.bsc.get_container_client(container_name)
+ blob = self.bsc.get_blob_client(container_name, blob_name)
+ content = b"abcedfg"
+
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ await blob.upload_blob(content,
+ immutability_policy=immutability_policy,
+ legal_hold=True,
+ overwrite=True)
+
+ blob_list = list()
+ async for blob in container_client.list_blobs(include=['immutabilitypolicy', 'legalhold']):
+ blob_list.append(blob)
+
+ self.assertTrue(blob_list[0]['has_legal_hold'])
+ self.assertIsNotNone(blob_list[0]['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(blob_list[0]['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
# ------------------------------------------------------------------------------
diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py
index 6055fe4fca44..ba9b21c67d06 100644
--- a/sdk/storage/azure-storage-blob/tests/test_container.py
+++ b/sdk/storage/azure-storage-blob/tests/test_container.py
@@ -12,6 +12,7 @@
import pytest
import requests
+from devtools_testutils import ResourceGroupPreparer, BlobAccountPreparer
from _shared.testcase import StorageTestCase, LogCaptured, GlobalStorageAccountPreparer, GlobalResourceGroupPreparer, StorageAccountPreparer
from azure.core import MatchConditions
@@ -226,6 +227,7 @@ def test_list_containers(self, resource_group, location, storage_account, storag
self.assertNamedItemInContainer(containers, container.container_name)
self.assertIsNotNone(containers[0].has_immutability_policy)
self.assertIsNotNone(containers[0].has_legal_hold)
+ self.assertIsNotNone(containers[0].is_immutable_storage_with_versioning_enabled)
@GlobalStorageAccountPreparer()
def test_list_containers_with_prefix(self, resource_group, location, storage_account, storage_account_key):
@@ -398,6 +400,7 @@ def test_get_container_properties(self, resource_group, location, storage_accoun
# Assert
self.assertIsNotNone(props)
self.assertDictEqual(props.metadata, metadata)
+ self.assertIsNotNone(props.is_immutable_storage_with_versioning_enabled)
# self.assertEqual(props.lease.duration, 'infinite')
# self.assertEqual(props.lease.state, 'leased')
# self.assertEqual(props.lease.status, 'locked')
@@ -1085,7 +1088,8 @@ def test_list_blobs_with_include_metadata(self, resource_group, location, storag
self.assertEqual(blobs[1].content_settings.content_language, 'spanish')
self.assertEqual(blobs[1].content_settings.content_disposition, 'inline')
- @GlobalStorageAccountPreparer()
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
def test_list_blobs_include_deletedwithversion(self, resource_group, location, storage_account, storage_account_key):
bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key)
# pytest.skip("Waiting on metadata XML fix in msrest")
diff --git a/sdk/storage/azure-storage-blob/tests/test_container_async.py b/sdk/storage/azure-storage-blob/tests/test_container_async.py
index a7cbf594d671..f630bd76404d 100644
--- a/sdk/storage/azure-storage-blob/tests/test_container_async.py
+++ b/sdk/storage/azure-storage-blob/tests/test_container_async.py
@@ -19,7 +19,7 @@
from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceExistsError, ResourceModifiedError
from azure.core.pipeline.transport import AioHttpTransport
from multidict import CIMultiDict, CIMultiDictProxy
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer
from azure.storage.blob import (
PublicAccess,
@@ -297,6 +297,7 @@ async def test_list_containers(self, resource_group, location, storage_account,
self.assertNamedItemInContainer(containers, container.container_name)
self.assertIsNotNone(containers[0].has_immutability_policy)
self.assertIsNotNone(containers[0].has_legal_hold)
+ self.assertIsNotNone(containers[0].is_immutable_storage_with_versioning_enabled)
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
@@ -497,6 +498,7 @@ async def test_get_container_properties(self, resource_group, location, storage_
# Assert
self.assertIsNotNone(props)
self.assertDictEqual(props.metadata, metadata)
+ self.assertIsNotNone(props.is_immutable_storage_with_versioning_enabled)
# self.assertEqual(props.lease.duration, 'infinite')
# self.assertEqual(props.lease.state, 'leased')
# self.assertEqual(props.lease.status, 'locked')
@@ -1161,7 +1163,8 @@ async def test_list_blobs_with_include_metadata(self, resource_group, location,
self.assertEqual(blobs[1].metadata['number'], '2')
self.assertEqual(blobs[1].metadata['name'], 'car')
- @GlobalStorageAccountPreparer()
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
async def test_list_blobs_include_deletedwithversion_async(self, resource_group, location, storage_account, storage_account_key):
bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key)
# pytest.skip("Waiting on metadata XML fix in msrest")
diff --git a/sdk/storage/azure-storage-blob/tests/test_page_blob.py b/sdk/storage/azure-storage-blob/tests/test_page_blob.py
index 13c804cba882..e8ac76b9ce82 100644
--- a/sdk/storage/azure-storage-blob/tests/test_page_blob.py
+++ b/sdk/storage/azure-storage-blob/tests/test_page_blob.py
@@ -12,6 +12,10 @@
import unittest
import uuid
from datetime import datetime, timedelta
+
+from azure.mgmt.storage import StorageManagementClient
+
+
from azure.core import MatchConditions
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceModifiedError
@@ -25,8 +29,8 @@
PremiumPageBlobTier,
SequenceNumberAction,
StorageErrorCode,
- generate_blob_sas)
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+ generate_blob_sas, BlobImmutabilityPolicyMode, ImmutabilityPolicy)
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer
from azure.storage.blob._shared.policies import StorageContentValidation
from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer
from devtools_testutils.storage import StorageTestCase
@@ -140,6 +144,41 @@ def test_create_blob(self, resource_group, location, storage_account, storage_ac
self.assertIsNotNone(resp.get('last_modified'))
self.assertTrue(blob.get_blob_properties())
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ def test_create_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024)
+ self._setup(bsc)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = self.get_resource_name("vlwblob")
+ blob = bsc.get_blob_client(container_name, blob_name)
+
+ # Act
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp = blob.create_page_blob(1024, immutability_policy=immutability_policy,
+ legal_hold=True)
+ props = blob.get_blob_properties()
+
+ # Assert
+ self.assertIsNotNone(resp.get('etag'))
+ self.assertIsNotNone(resp.get('last_modified'))
+ self.assertTrue(props['has_legal_hold'])
+ self.assertIsNotNone(props['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(props['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_create_page_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key):
diff --git a/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py
index affdb1556bb8..543c2f3e064e 100644
--- a/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py
+++ b/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py
@@ -13,12 +13,15 @@
import uuid
from datetime import datetime, timedelta
+from azure.mgmt.storage.aio import StorageManagementClient
+
+
from azure.core import MatchConditions
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceModifiedError
from azure.core.pipeline.transport import AioHttpTransport
from multidict import CIMultiDict, CIMultiDictProxy
from azure.storage.blob._shared.policies import StorageContentValidation
-from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer
+from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer
from azure.storage.blob import (
BlobProperties,
@@ -27,8 +30,8 @@
PremiumPageBlobTier,
SequenceNumberAction,
StorageErrorCode,
- generate_blob_sas
-)
+ generate_blob_sas,
+ BlobImmutabilityPolicyMode, ImmutabilityPolicy)
from azure.storage.blob.aio import (
BlobServiceClient,
@@ -157,6 +160,42 @@ async def test_create_blob(self, resource_group, location, storage_account, stor
self.assertIsNotNone(resp.get('last_modified'))
self.assertTrue(await blob.get_blob_properties())
+ @ResourceGroupPreparer(name_prefix='storagename', use_cache=True)
+ @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", use_cache=True)
+ async def test_create_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key):
+ bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024)
+ await self._setup(bsc)
+
+ container_name = self.get_resource_name('vlwcontainer')
+ if self.is_live:
+ token_credential = self.generate_oauth_token()
+ subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
+ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01')
+ property = mgmt_client.models().BlobContainer(
+ immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True))
+ await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property)
+
+ blob_name = self.get_resource_name("vlwblob")
+ blob = bsc.get_blob_client(container_name, blob_name)
+
+ # Act
+ immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5),
+ policy_mode=BlobImmutabilityPolicyMode.UNLOCKED)
+ resp = await blob.create_page_blob(1024,
+ immutability_policy=immutability_policy,
+ legal_hold=True)
+ props = await blob.get_blob_properties()
+
+ # Assert
+ self.assertIsNotNone(resp.get('etag'))
+ self.assertIsNotNone(resp.get('last_modified'))
+ self.assertTrue(props['has_legal_hold'])
+ self.assertIsNotNone(props['immutability_policy']['expiry_time'])
+ self.assertIsNotNone(props['immutability_policy']['policy_mode'])
+
+ if self.is_live:
+ await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, self.container_name)
+
@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test