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++.
Classes | Public Types | Public Member Functions | List of all members
azure::storage::shared_access_policy Class Reference

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

Inheritance diagram for azure::storage::shared_access_policy:
azure::storage::account_shared_access_policy azure::storage::blob_shared_access_policy azure::storage::file_shared_access_policy azure::storage::queue_shared_access_policy azure::storage::table_shared_access_policy

Classes

class  ip_address_or_range
 Specifies either a single IP Address or a single range of IP Addresses (a minimum and a maximum, inclusive.) More...
 

Public Types

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

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.

Member Enumeration Documentation

◆ protocols

Specifies the set of possible signed protocols for a shared access account policy.

Enumerator
https_only 

Permission to use SAS only through https granted.

https_or_http 

Permission to use SAS through https or http granted. Equivalent to not specifying any permission at all.

Member Function Documentation

◆ address_or_range()

const ip_address_or_range& azure::storage::shared_access_policy::address_or_range ( ) const
inline

Gets the allowed IP address or IP address range for a shared access signature associated with this shared access policy.

Returns
The allowed IP address or IP address range for the shared access policy.

◆ expiry()

utility::datetime azure::storage::shared_access_policy::expiry ( ) const
inline

Gets the expiry time for the shared access policy.

Returns
The expiry time for the shared access policy.

◆ is_valid()

bool azure::storage::shared_access_policy::is_valid ( ) const
inline

Indicates whether the azure::storage::shared_access_policy object is valid.

Returns
true if the azure::storage::shared_access_policy object is valid; otherwise, false.

◆ permission()

uint8_t azure::storage::shared_access_policy::permission ( ) const
inline

Gets the permissions for the shared access policy.

Returns
The permissions for the shared access policy.

◆ permissions_to_string()

utility::string_t azure::storage::shared_access_policy::permissions_to_string ( ) const
inline

Get a canonical string representation of the permissions for a shared access policy.

◆ protocol()

protocols azure::storage::shared_access_policy::protocol ( ) const
inline

Gets the allowed protocols for a shared access signature associated with this shared access policy.

Returns
The allowed protocols for the shared access policy.

◆ protocols_to_string()

utility::string_t azure::storage::shared_access_policy::protocols_to_string ( ) const
inline

Get a canonical string representation of the protocols for a shared access policy.

◆ set_address_or_range()

void azure::storage::shared_access_policy::set_address_or_range ( ip_address_or_range  value)
inline

Sets the allowed IP address or IP address range for a shared access signature associated with this shared access policy.

Parameters
valueThe allowed IP address or IP address range for the shared access policy.

◆ set_expiry()

void azure::storage::shared_access_policy::set_expiry ( utility::datetime  value)
inline

Sets the expiry time for the shared access policy.

Parameters
valueThe expiry time for the shared access policy.

◆ set_permissions()

void azure::storage::shared_access_policy::set_permissions ( uint8_t  value)
inline

Sets the permissions from the specified permissions.

Parameters
valueThe permissions for the shared access policy.

◆ set_permissions_from_string()

void azure::storage::shared_access_policy::set_permissions_from_string ( const utility::string_t &  value)
inline

Sets the permissions from the given string.

Parameters
valueThe permissions for the shared access policy.

◆ set_protocol()

void azure::storage::shared_access_policy::set_protocol ( protocols  value)
inline

Sets the allowed protocols for a shared access signature associated with this shared access policy.

Parameters
valueThe allowed protocols for the shared access policy.

◆ set_start()

void azure::storage::shared_access_policy::set_start ( utility::datetime  value)
inline

Sets the start time for the shared access policy.

Parameters
valueThe start time for the access policy.

◆ start()

utility::datetime azure::storage::shared_access_policy::start ( ) const
inline

Gets the start time for the shared access policy.

Returns
The start time for the access policy.