models Module

Classes

AccessPolicy

Access Policy class used by the set and get acl methods in each service.

A stored access policy can specify the start time, expiry time, and permissions for the Shared Access Signatures with which it's associated. Depending on how you want to control access to your resource, you can specify all of these parameters within the stored access policy, and omit them from the URL for the Shared Access Signature. Doing so permits you to modify the associated signature's behavior at any time, as well as to revoke it. Or you can specify one or more of the access policy parameters within the stored access policy, and the others on the URL. Finally, you can specify all of the parameters on the URL. In this case, you can use the stored access policy to revoke the signature, but not to modify its behavior.

Together the Shared Access Signature and the stored access policy must include all fields required to authenticate the signature. If any required fields are missing, the request will fail. Likewise, if a field is specified both in the Shared Access Signature URL and in the stored access policy, the request will fail with status code 400 (Bad Request).

AccountPermissions

ResourceTypes class to be used with generate_shared_access_signature method and for the AccessPolicies used with set_*_acl. There are two types of SAS which may be used to grant resource access. One is to grant access to a specific resource (resource-specific). Another is to grant access to the entire service for a specific account and allow certain operations based on perms found here.

CorsRule

CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.

For more information, see https://msdn.microsoft.com/en-us/library/azure/dn535601.aspx

DeleteRetentionPolicy

To set DeleteRetentionPolicy, you must call Set Blob Service Properties using version 2017-07-29 or later. This class groups the settings related to delete retention policy.

GeoReplication

Contains statistics related to replication for the given service.

ListGenerator

A generator object used to list storage resources. The generator will lazily follow the continuation tokens returned by the service and stop when all resources have been returned or max_results is reached.

If max_results is specified and the account has more than that number of resources, the generator will have a populated next_marker field once it finishes. This marker can be used to create a new generator if more results are desired.

LocationMode

Specifies the location the request should be sent to. This mode only applies for RA-GRS accounts which allow secondary read access. All other account types must use PRIMARY.

Logging

Storage Analytics logs detailed information about successful and failed requests to a storage service. This information can be used to monitor individual requests and to diagnose issues with a storage service. Requests are logged on a best-effort basis.

All logs are stored in block blobs in a container named $logs, which is automatically created when Storage Analytics is enabled for a storage account. The $logs container is located in the blob namespace of the storage account. This container cannot be deleted once Storage Analytics has been enabled, though its contents can be deleted.

For more information, see https://msdn.microsoft.com/en-us/library/azure/hh343262.aspx

Metrics

Metrics include aggregated transaction statistics and capacity data about requests to a storage service. Transactions are reported at both the API operation level as well as at the storage service level, and capacity is reported at the storage service level. Metrics data can be used to analyze storage service usage, diagnose issues with requests made against the storage service, and to improve the performance of applications that use a service.

For more information, see https://msdn.microsoft.com/en-us/library/azure/hh343258.aspx

Protocol

Specifies the protocol permitted for a SAS token. Note that HTTP only is not allowed.

ResourceTypes

Specifies the resource types that are accessible with the account SAS.

RetentionPolicy

By default, Storage Analytics will not delete any logging or metrics data. Blobs will continue to be written until the shared 20TB limit is reached. Once the 20TB limit is reached, Storage Analytics will stop writing new data and will not resume until free space is available. This 20TB limit is independent of the total limit for your storage account.

There are two ways to delete Storage Analytics data: by manually making deletion requests or by setting a data retention policy. Manual requests to delete Storage Analytics data are billable, but delete requests resulting from a retention policy are not billable.

RetryContext

Contains the request and response information that can be used to determine whether and how to retry. This context is stored across retries and may be used to store other information relevant to the retry strategy.

ServiceProperties

Returned by get_*_service_properties functions. Contains the properties of a storage service, including Analytics and CORS rules.

Azure Storage Analytics performs logging and provides metrics data for a storage account. You can use this data to trace requests, analyze usage trends, and diagnose issues with your storage account. To use Storage Analytics, you must enable it individually for each service you want to monitor.

The aggregated data is stored in a well-known blob (for logging) and in well-known tables (for metrics), which may be accessed using the Blob service and Table service APIs.

For an in-depth guide on using Storage Analytics and other tools to identify, diagnose, and troubleshoot Azure Storage-related issues, see http://azure.microsoft.com/documentation/articles/storage-monitoring-diagnosing-troubleshooting/

For more information on CORS, see https://msdn.microsoft.com/en-us/library/azure/dn535601.aspx

ServiceStats

Returned by get_*_service_stats functions. Contains statistics related to replication for the given service. It is only available when read-access geo-redundant replication is enabled for the storage account.

Services

Specifies the services accessible with the account SAS.

StaticWebsite

Class representing the service properties pertaining to static websites. To set StaticWebsite, you must call Set Blob Service Properties using version 2018-03-28 or later.