6#include "azure/storage/blobs/blob_responses.hpp"
8#include <azure/storage/common/account_sas_builder.hpp>
12namespace Azure {
namespace Storage {
namespace Sas {
17 enum class BlobSasResource
46 enum class BlobContainerSasPermissions
91 SetImmutabilityPolicy = 256,
96 PermanentDelete = 512,
104 inline BlobContainerSasPermissions operator|(
105 BlobContainerSasPermissions lhs,
106 BlobContainerSasPermissions rhs)
108 using type = std::underlying_type_t<BlobContainerSasPermissions>;
109 return static_cast<BlobContainerSasPermissions
>(
110 static_cast<type
>(lhs) |
static_cast<type
>(rhs));
113 inline BlobContainerSasPermissions operator&(
114 BlobContainerSasPermissions lhs,
115 BlobContainerSasPermissions rhs)
117 using type = std::underlying_type_t<BlobContainerSasPermissions>;
118 return static_cast<BlobContainerSasPermissions
>(
119 static_cast<type
>(lhs) &
static_cast<type
>(rhs));
125 enum class BlobSasPermissions
166 SetImmutabilityPolicy = 128,
171 PermanentDelete = 256,
179 inline BlobSasPermissions operator|(BlobSasPermissions lhs, BlobSasPermissions rhs)
181 using type = std::underlying_type_t<BlobSasPermissions>;
182 return static_cast<BlobSasPermissions
>(
static_cast<type
>(lhs) |
static_cast<type
>(rhs));
185 inline BlobSasPermissions operator&(BlobSasPermissions lhs, BlobSasPermissions rhs)
187 using type = std::underlying_type_t<BlobSasPermissions>;
188 return static_cast<BlobSasPermissions
>(
static_cast<type
>(lhs) &
static_cast<type
>(rhs));
306 void SetPermissions(std::string rawPermissions) { Permissions = std::move(rawPermissions); }
328 const std::string& accountName);
351 const std::string& accountName);
354 std::string Permissions;
A user delegation key.
Definition rest_client.hpp:511
BlobSasBuilder is used to generate a Shared Access Signature (SAS) for an Azure Storage container or ...
Definition blob_sas_builder.hpp:196
void SetPermissions(std::string rawPermissions)
Sets the permissions for the SAS using a raw permissions string.
Definition blob_sas_builder.hpp:306
std::string Snapshot
The name of the blob snapshot being made accessible, or empty for a container SAS and blob SAS.
Definition blob_sas_builder.hpp:244
Azure::Nullable< Azure::DateTime > StartsOn
Optionally specify the time at which the shared access signature becomes valid. This timestamp will b...
Definition blob_sas_builder.hpp:207
void SetPermissions(BlobContainerSasPermissions permissions)
Sets the permissions for the blob container SAS.
Definition blob_sas_builder.cpp:41
std::string BlobName
The name of the blob being made accessible, or empty for a container SAS..
Definition blob_sas_builder.hpp:238
SasProtocol Protocol
The optional signed protocol field specifies the protocol permitted for a request made with the SAS.
Definition blob_sas_builder.hpp:201
std::string CacheControl
Override the value returned for Cache-Control response header..
Definition blob_sas_builder.hpp:260
std::string Identifier
An optional unique value up to 64 characters in length that correlates to an access policy specified ...
Definition blob_sas_builder.hpp:228
std::string ContentType
Override the value returned for Content-Type response header..
Definition blob_sas_builder.hpp:280
Azure::DateTime ExpiresOn
The time at which the shared access signature becomes invalid. This field must be omitted if it has b...
Definition blob_sas_builder.hpp:214
std::string GenerateSasStringToSign(const StorageSharedKeyCredential &credential)
For debugging purposes only.
Definition blob_sas_builder.cpp:326
std::string ContentLanguage
Override the value returned for Content-Language response header..
Definition blob_sas_builder.hpp:275
std::string GenerateSasToken(const StorageSharedKeyCredential &credential)
Uses the StorageSharedKeyCredential to sign this shared access signature, to produce the proper SAS q...
Definition blob_sas_builder.cpp:133
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 blob_sas_builder.hpp:222
std::string ContentDisposition
Override the value returned for Content-Disposition response header..
Definition blob_sas_builder.hpp:265
BlobSasResource Resource
Specifies which resources are accessible via the shared access signature.
Definition blob_sas_builder.hpp:255
std::string ContentEncoding
Override the value returned for Content-Encoding response header..
Definition blob_sas_builder.hpp:270
std::string EncryptionScope
Optional encryption scope to use when sending requests authorized with this SAS url.
Definition blob_sas_builder.hpp:285
std::string BlobVersionId
The ID of the blob version being made accessible, or empty for a container SAS, blob SAS and blob sna...
Definition blob_sas_builder.hpp:250
std::string BlobContainerName
The name of the blob container being made accessible.
Definition blob_sas_builder.hpp:233