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::account_shared_access_policy Class Reference

Represents a shared access policy for an account, which specifies the start time, expiry time, permissions, singed service, signed resource type, signed protocol, and signed IP addresses for a shared access signature. More...

Inheritance diagram for azure::storage::account_shared_access_policy:
azure::storage::shared_access_policy

Public Types

enum  permissions {
  none = 0, read = 1, write = 2, del = 4,
  list = 8, add = 0x10, update = 0x20, process = 0x40,
  create = 0x80
}
 An enumeration describing permissions that may be used for a shared access signature. More...
 
enum  service_types { blob = 0x1, queue = 0x2, table = 0x4, file = 0x8 }
 Specifies the set of possible signed services for a shared access account policy. More...
 
enum  resource_types { service = 0x1, container = 0x2, object = 0x4 }
 Specifies the set of possible signed resource types for a shared access account policy. 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

utility::string_t service_types_to_string () const
 Get a canonical string representation of the services for a shared access policy. More...
 
utility::string_t resource_types_to_string () const
 Get a canonical string representation of the resource types for a shared access policy. More...
 
 account_shared_access_policy ()
 Initializes a new instance of the azure::storage::account_shared_access_policy class. More...
 
 account_shared_access_policy (service_types service, resource_types resource)
 Initializes a new instance of the azure::storage::account_shared_access_policy class. More...
 
 account_shared_access_policy (utility::datetime expiry, uint8_t permission, service_types service, resource_types resource)
 Initializes a new instance of the azure::storage::account_shared_access_policy class. More...
 
 account_shared_access_policy (utility::datetime start, utility::datetime expiry, uint8_t permission, service_types service, resource_types resource)
 Initializes a new instance of the azure::storage::account_shared_access_policy class. More...
 
 account_shared_access_policy (utility::datetime start, utility::datetime expiry, uint8_t permission, protocols protocol, utility::string_t address, service_types service, resource_types resource)
 Initializes a new instance of the azure::storage::account_shared_access_policy class. More...
 
 account_shared_access_policy (utility::datetime start, utility::datetime expiry, uint8_t permission, protocols protocol, utility::string_t minimum_address, utility::string_t maximum_address, service_types service, resource_types resource)
 Initializes a new instance of the azure::storage::account_shared_access_policy class. More...
 
void set_service_type (service_types value)
 Sets the services (blob, file, queue, table) for a shared access signature associated with this shared access policy. More...
 
service_types service_type ()
 Gets the services (blob, file, queue, table) for a shared access signature associated with this shared access policy. More...
 
void set_resource_type (resource_types value)
 Sets the resource type for a shared access signature associated with this shared access policy. More...
 
resource_types resource_type ()
 Gets the resource type for a shared access signature associated with this shared access policy. 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 for an account, which specifies the start time, expiry time, permissions, singed service, signed resource type, signed protocol, and signed IP addresses for a shared access signature.

Member Enumeration Documentation

◆ permissions

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

Enumerator
none 

No shared access granted.

read 

Permission to read resources and list queues and tables granted.

write 

Permission to write resources granted.

del 

Permission to delete resources granted.

list 

Permission to list blob containers, blobs, shares, directories, and files granted.

add 

Permission to add messages, table entities, blobs, and files granted.

update 

Permissions to update messages and table entities granted.

process 

Permission to get and delete messages granted.

create 

Permission to create containers, blobs, shares, directories, and files granted.

◆ resource_types

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

Enumerator
service 

Permission to access service level APIs granted.

container 

Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.

object 

Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted

◆ service_types

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

Enumerator
blob 

Permission to access blob resources granted.

queue 

Permission to access queue resources granted.

table 

Permission to access table resources granted.

file 

Permission to access file resources granted.

Constructor & Destructor Documentation

◆ account_shared_access_policy() [1/6]

azure::storage::account_shared_access_policy::account_shared_access_policy ( )
inline

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

◆ account_shared_access_policy() [2/6]

azure::storage::account_shared_access_policy::account_shared_access_policy ( service_types  service,
resource_types  resource 
)
inline

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

Parameters
serviceThe services (blob, file, queue, table) for the shared access policy.
resourceThe resource type for the shared access policy.

◆ account_shared_access_policy() [3/6]

azure::storage::account_shared_access_policy::account_shared_access_policy ( utility::datetime  expiry,
uint8_t  permission,
service_types  service,
resource_types  resource 
)
inline

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

Parameters
expiryThe expiration date and time of the policy.
permissionA mask containing the permissions of the policy
serviceThe services (blob, file, queue, table) for the shared access policy.
resourceThe resource type for the shared access policy.

◆ account_shared_access_policy() [4/6]

azure::storage::account_shared_access_policy::account_shared_access_policy ( utility::datetime  start,
utility::datetime  expiry,
uint8_t  permission,
service_types  service,
resource_types  resource 
)
inline

Initializes a new instance of the azure::storage::account_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
serviceThe services (blob, file, queue, table) for the shared access policy.
resourceThe resource type for the shared access policy.

◆ account_shared_access_policy() [5/6]

azure::storage::account_shared_access_policy::account_shared_access_policy ( utility::datetime  start,
utility::datetime  expiry,
uint8_t  permission,
protocols  protocol,
utility::string_t  address,
service_types  service,
resource_types  resource 
)
inline

Initializes a new instance of the azure::storage::account_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
protocolThe allowed protocols for the shared access policy.
addressThe allowed IP address for a shared access signature associated with this shared access policy.
serviceThe services (blob, file, queue, table) for the shared access policy.
resourceThe resource type for the shared access policy.

◆ account_shared_access_policy() [6/6]

azure::storage::account_shared_access_policy::account_shared_access_policy ( utility::datetime  start,
utility::datetime  expiry,
uint8_t  permission,
protocols  protocol,
utility::string_t  minimum_address,
utility::string_t  maximum_address,
service_types  service,
resource_types  resource 
)
inline

Initializes a new instance of the azure::storage::account_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
protocolThe allowed protocols for the shared access policy.
minimum_addressThe minimum allowed address for an IP range for the shared access policy.
maximum_addressThe maximum allowed address for an IP range for the shared access policy.
serviceThe services (blob, file, queue, table) for the shared access policy.
resourceThe resource type for the shared access policy.

Member Function Documentation

◆ resource_type()

resource_types azure::storage::account_shared_access_policy::resource_type ( )
inline

Gets the resource type for a shared access signature associated with this shared access policy.

Returns
The resource type for the shared access policy.

◆ resource_types_to_string()

utility::string_t azure::storage::account_shared_access_policy::resource_types_to_string ( ) const
inline

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

◆ service_type()

service_types azure::storage::account_shared_access_policy::service_type ( )
inline

Gets the services (blob, file, queue, table) for a shared access signature associated with this shared access policy.

Returns
The services for the shared access policy.

◆ service_types_to_string()

utility::string_t azure::storage::account_shared_access_policy::service_types_to_string ( ) const
inline

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

◆ set_resource_type()

void azure::storage::account_shared_access_policy::set_resource_type ( resource_types  value)
inline

Sets the resource type for a shared access signature associated with this shared access policy.

Parameters
valueThe resource type for the shared access policy.

◆ set_service_type()

void azure::storage::account_shared_access_policy::set_service_type ( service_types  value)
inline

Sets the services (blob, file, queue, table) for a shared access signature associated with this shared access policy.

Parameters
valueThe services for the shared access policy.