Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Types | Public Member Functions | List of all members
azure::storage::blob_shared_access_policy Class Reference

Represents a shared access policy, which specifies the start time, expiry time, and permissions for a shared access signature for a blob or container. More...

Inheritance diagram for azure::storage::blob_shared_access_policy:
azure::storage::shared_access_policy

Public Types

enum  permissions {
  none = 0, read = 1, write = 2, del = 4,
  list = 8, add = 0x10, create = 0x80
}
 An enumeration describing permissions that may be used for a shared access signature. More...
 
- Public Types inherited from azure::storage::shared_access_policy
enum  protocols { https_only = 0x1, https_or_http = 0x2 }
 Specifies the set of possible signed protocols for a shared access account policy. More...
 

Public Member Functions

 blob_shared_access_policy ()
 Initializes a new instance of the azure::storage::blob_shared_access_policy class. More...
 
 blob_shared_access_policy (utility::datetime expiry, uint8_t permission)
 Initializes a new instance of the azure::storage::blob_shared_access_policy class. More...
 
 blob_shared_access_policy (utility::datetime start, utility::datetime expiry, uint8_t permission)
 Initializes a new instance of the azure::storage::blob_shared_access_policy class. More...
 
- Public Member Functions inherited from azure::storage::shared_access_policy
utility::string_t protocols_to_string () const
 Get a canonical string representation of the protocols for a shared access policy. More...
 
utility::string_t permissions_to_string () const
 Get a canonical string representation of the permissions for a shared access policy. More...
 
void set_permissions_from_string (const utility::string_t &value)
 Sets the permissions from the given string. More...
 
void set_permissions (uint8_t value)
 Sets the permissions from the specified permissions. More...
 
uint8_t permission () const
 Gets the permissions for the shared access policy. More...
 
void set_start (utility::datetime value)
 Sets the start time for the shared access policy. More...
 
utility::datetime start () const
 Gets the start time for the shared access policy. More...
 
void set_expiry (utility::datetime value)
 Sets the expiry time for the shared access policy. More...
 
utility::datetime expiry () const
 Gets the expiry time for the shared access policy. More...
 
bool is_valid () const
 Indicates whether the azure::storage::shared_access_policy object is valid. More...
 
void set_protocol (protocols value)
 Sets the allowed protocols for a shared access signature associated with this shared access policy. More...
 
protocols protocol () const
 Gets the allowed protocols for a shared access signature associated with this shared access policy. More...
 
void set_address_or_range (ip_address_or_range value)
 Sets the allowed IP address or IP address range for a shared access signature associated with this shared access policy. More...
 
const ip_address_or_rangeaddress_or_range () const
 Gets the allowed IP address or IP address range for a shared access signature associated with this shared access policy. More...
 

Detailed Description

Represents a shared access policy, which specifies the start time, expiry time, and permissions for a shared access signature for a blob or container.

Member Enumeration Documentation

◆ permissions

An enumeration describing permissions that may be used for a shared access signature.

Enumerator
none 

No permissions granted.

read 

Permission granted to read the content, properties, metadata, and block list for a blob or any blob in a container. Use blob as the source of a copy operation.

write 

Permission granted to create or write the content, properties, metadata, and block list for a blob or any blob in a container. Snapshot or lease the blob. Resize the blob (page blob only). Use the blob as the destination of a copy operation within the same account.

del 

Permission granted to delete a blob or any blob in a container.

list 

Permission granted to list the blobs in a container.

add 

Permission to add a block to an append blob granted.

create 

Permission to write a new blob, snapshot a blob, or copy a blob to a new blob granted.

Constructor & Destructor Documentation

◆ blob_shared_access_policy() [1/3]

azure::storage::blob_shared_access_policy::blob_shared_access_policy ( )
inline

Initializes a new instance of the azure::storage::blob_shared_access_policy class.

◆ blob_shared_access_policy() [2/3]

azure::storage::blob_shared_access_policy::blob_shared_access_policy ( utility::datetime  expiry,
uint8_t  permission 
)
inline

Initializes a new instance of the azure::storage::blob_shared_access_policy class.

Parameters
expiryThe expiration date and time of the policy.
permissionA mask containing the permissions of the policy

◆ blob_shared_access_policy() [3/3]

azure::storage::blob_shared_access_policy::blob_shared_access_policy ( utility::datetime  start,
utility::datetime  expiry,
uint8_t  permission 
)
inline

Initializes a new instance of the azure::storage::blob_shared_access_policy class.

Parameters
startThe start date and time of the policy.
expiryThe expiration date and time of the policy.
permissionA mask containing the permissions of the policy