Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-blob/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- NoRetry policy has been removed. Use keyword argument `retry_total=0` for no retries.
- Removed types that were accidentally exposed from two modules. Only `BlobServiceClient`, `ContainerClient`,
`BlobClient` and `LeaseClient` should be imported from azure.storage.blob.aio
- `Logging` has been renamed to `BlobAnalyticsLogging`.

**New features**

Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
PremiumPageBlobTier,
SequenceNumberAction,
PublicAccess,
Logging,
BlobAnalyticsLogging,
Metrics,
RetentionPolicy,
StaticWebsite,
Expand Down Expand Up @@ -69,7 +69,7 @@
'PremiumPageBlobTier',
'SequenceNumberAction',
'PublicAccess',
'Logging',
'BlobAnalyticsLogging',
'Metrics',
'RetentionPolicy',
'StaticWebsite',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from .lease_async import LeaseClient
from ..models import (
BlobProperties,
Logging,
BlobAnalyticsLogging,
Metrics,
RetentionPolicy,
StaticWebsite,
Expand Down Expand Up @@ -236,7 +236,7 @@ async def get_service_properties(self, **kwargs):

@distributed_trace_async
async def set_service_properties(
self, logging=None, # type: Optional[Logging]
self, analytics_logging=None, # type: Optional[BlobAnalyticsLogging]
hour_metrics=None, # type: Optional[Metrics]
minute_metrics=None, # type: Optional[Metrics]
cors=None, # type: Optional[List[CorsRule]]
Expand All @@ -249,12 +249,12 @@ async def set_service_properties(
"""Sets the properties of a storage account's Blob service, including
Azure Storage Analytics.

If an element (e.g. Logging) is left as None, the
If an element (e.g. analytics_logging) is left as None, the
existing settings on the service for that functionality are preserved.

:param logging:
:param analytics_logging:
Groups the Azure Analytics Logging settings.
:type logging: ~azure.storage.blob.Logging
:type analytics_logging: ~azure.storage.blob.BlobAnalyticsLogging
:param hour_metrics:
The hour metrics settings provide a summary of request
statistics grouped by API in hourly aggregates for blobs.
Expand Down Expand Up @@ -293,7 +293,7 @@ async def set_service_properties(
:caption: Setting service properties for the blob service.
"""
props = StorageServiceProperties(
logging=logging,
logging=analytics_logging,
hour_metrics=hour_metrics,
minute_metrics=minute_metrics,
cors=cors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from .lease import LeaseClient
from .models import (
BlobProperties,
Logging,
BlobAnalyticsLogging,
Metrics,
RetentionPolicy,
StaticWebsite,
Expand Down Expand Up @@ -354,7 +354,7 @@ def get_service_properties(self, **kwargs):

@distributed_trace
def set_service_properties(
self, logging=None, # type: Optional[Logging]
self, analytics_logging=None, # type: Optional[BlobAnalyticsLogging]
hour_metrics=None, # type: Optional[Metrics]
minute_metrics=None, # type: Optional[Metrics]
cors=None, # type: Optional[List[CorsRule]]
Expand All @@ -367,12 +367,12 @@ def set_service_properties(
"""Sets the properties of a storage account's Blob service, including
Azure Storage Analytics.

If an element (e.g. Logging) is left as None, the
If an element (e.g. analytics_logging) is left as None, the
existing settings on the service for that functionality are preserved.

:param logging:
:param analytics_logging:
Groups the Azure Analytics Logging settings.
:type logging: ~azure.storage.blob.Logging
:type analytics_logging: ~azure.storage.blob.BlobAnalyticsLogging
:param hour_metrics:
The hour metrics settings provide a summary of request
statistics grouped by API in hourly aggregates for blobs.
Expand Down Expand Up @@ -411,7 +411,7 @@ def set_service_properties(
:caption: Setting service properties for the blob service.
"""
props = StorageServiceProperties(
logging=logging,
logging=analytics_logging,
hour_metrics=hour_metrics,
minute_metrics=minute_metrics,
cors=cors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class PublicAccess(str, Enum):
"""


class Logging(GeneratedLogging):
class BlobAnalyticsLogging(GeneratedLogging):
"""Azure Analytics Logging settings.

:param str version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ interactions:
uri: https://remotestoragename.blob.core.windows.net/?restype=service&comp=properties
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\
\ /><DeleteRetentionPolicy><Enabled>false</Enabled></DeleteRetentionPolicy><StaticWebsite><Enabled>true</Enabled><IndexDocument>index.html</IndexDocument></StaticWebsite><DefaultServiceVersion>2014-02-14</DefaultServiceVersion></StorageServiceProperties>"
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors
/><DeleteRetentionPolicy><Enabled>false</Enabled></DeleteRetentionPolicy><StaticWebsite><Enabled>true</Enabled><IndexDocument>index.html</IndexDocument></StaticWebsite><DefaultServiceVersion>2014-02-14</DefaultServiceVersion></StorageServiceProperties>"
headers:
Content-Type:
- application/xml
Expand Down Expand Up @@ -147,8 +147,8 @@ interactions:
uri: https://storagename.blob.core.windows.net/?restype=service&comp=properties
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\
\ /><DeleteRetentionPolicy><Enabled>false</Enabled></DeleteRetentionPolicy><StaticWebsite><Enabled>true</Enabled><IndexDocument>index.html</IndexDocument></StaticWebsite><DefaultServiceVersion>2014-02-14</DefaultServiceVersion></StorageServiceProperties>"
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors
/><DeleteRetentionPolicy><Enabled>false</Enabled></DeleteRetentionPolicy><StaticWebsite><Enabled>true</Enabled><IndexDocument>index.html</IndexDocument></StaticWebsite><DefaultServiceVersion>2014-02-14</DefaultServiceVersion></StorageServiceProperties>"
headers:
Content-Type:
- application/xml
Expand All @@ -167,4 +167,88 @@ interactions:
status:
code: 200
message: OK
- request:
body: '<?xml version=''1.0'' encoding=''utf-8''?>

<StorageServiceProperties><Logging><Version>1.0</Version><Delete>false</Delete><Read>false</Read><Write>false</Write><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors
/><DefaultServiceVersion>2014-02-14</DefaultServiceVersion></StorageServiceProperties>'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '585'
Content-Type:
- application/xml; charset=utf-8
User-Agent:
- azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0)
x-ms-client-request-id:
- 19134036-f033-11e9-a231-b831b58100e8
x-ms-date:
- Wed, 16 Oct 2019 16:36:26 GMT
x-ms-version:
- '2019-02-02'
method: PUT
uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Wed, 16 Oct 2019 16:36:26 GMT
Server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- aa29e103-401e-000d-773f-848b0c000000
x-ms-version:
- '2019-02-02'
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.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0)
x-ms-client-request-id:
- 194772b8-f033-11e9-9f32-b831b58100e8
x-ms-date:
- Wed, 16 Oct 2019 16:36:26 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors
/><DeleteRetentionPolicy><Enabled>false</Enabled></DeleteRetentionPolicy><StaticWebsite><Enabled>true</Enabled><IndexDocument>index.html</IndexDocument></StaticWebsite><DefaultServiceVersion>2014-02-14</DefaultServiceVersion></StorageServiceProperties>"
headers:
Content-Type:
- application/xml
Date:
- Wed, 16 Oct 2019 16:36:26 GMT
Server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Transfer-Encoding:
- chunked
Vary:
- Origin
x-ms-request-id:
- aa29e120-401e-000d-0d3f-848b0c000000
x-ms-version:
- '2019-02-02'
status:
code: 200
message: OK
version: 1
Loading