6#include "azure/data/tables/credentials/named_key_credential.hpp"
9#include <azure/core/datetime.hpp>
10#include <azure/core/nullable.hpp>
14namespace Azure {
namespace Data {
namespace Tables {
namespace Sas {
15 constexpr const char* HttpsAndHttp =
"https,http";
16 constexpr const char* HttpsOnly =
"https";
21 enum class SasProtocol
35 inline std::string SasProtocolToString(SasProtocol protocol)
37 return protocol == SasProtocol::HttpsAndHttp ? HttpsAndHttp : HttpsOnly;
45 enum class AccountSasResourceType
75 enum class AccountSasServices
92 enum class AccountSasPermissions
192 void SetPermissions(std::string rawPermissions) { Permissions = std::move(rawPermissions); }
205 std::string Permissions;
A NamedKeyCredential is a credential backed by an account's name and one of its access keys.
Definition named_key_credential.hpp:26
AccountSasBuilder is used to generate an account level Shared Access Signature (SAS) for Azure Storag...
Definition account_sas_builder.hpp:134
AccountSasResourceType ResourceTypes
Definition account_sas_builder.hpp:172
AccountSasServices Services
The services associated with the shared access signature. The user is restricted to operations with t...
Definition account_sas_builder.hpp:166
Azure::Nullable< Azure::DateTime > StartsOn
Optionally specify the time at which the shared access signature becomes valid.
Definition account_sas_builder.hpp:146
SasProtocol Protocol
The optional signed protocol field specifies the protocol permitted for a request made with the SAS.
Definition account_sas_builder.hpp:140
std::string GenerateSasToken(const Azure::Data::Tables::Credentials::NamedKeyCredential &credential)
Uses the NamedKeyCredential to sign this shared access signature, to produce the proper SAS query par...
Definition account_sas_builder.cpp:46
Azure::Nullable< std::string > IPRange
Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address f...
Definition account_sas_builder.hpp:160
std::string EncryptionScope
Optional encryption scope to use when sending requests authorized with this SAS url.
Definition account_sas_builder.hpp:177
Azure::DateTime ExpiresOn
The time at which the shared access signature becomes invalid. This field must be omitted if it has b...
Definition account_sas_builder.hpp:152
void SetPermissions(AccountSasPermissions permissions)
Sets the permissions for an account SAS.
Definition account_sas_builder.cpp:17
void SetPermissions(std::string rawPermissions)
Sets the permissions for the SAS using a raw permissions string.
Definition account_sas_builder.hpp:192
Defines bitwise operators for enums.