6#include "azure/storage/files/datalake/datalake_responses.hpp"
8#include <azure/core/nullable.hpp>
9#include <azure/storage/common/account_sas_builder.hpp>
15namespace Azure {
namespace Storage {
namespace Sas {
20 enum class DataLakeSasResource
43 enum class DataLakeFileSystemSasPermissions
81 inline DataLakeFileSystemSasPermissions operator|(
82 DataLakeFileSystemSasPermissions lhs,
83 DataLakeFileSystemSasPermissions rhs)
85 using type = std::underlying_type_t<DataLakeFileSystemSasPermissions>;
86 return static_cast<DataLakeFileSystemSasPermissions
>(
87 static_cast<type
>(lhs) |
static_cast<type
>(rhs));
90 inline DataLakeFileSystemSasPermissions operator&(
91 DataLakeFileSystemSasPermissions lhs,
92 DataLakeFileSystemSasPermissions rhs)
94 using type = std::underlying_type_t<DataLakeFileSystemSasPermissions>;
95 return static_cast<DataLakeFileSystemSasPermissions
>(
96 static_cast<type
>(lhs) &
static_cast<type
>(rhs));
102 enum class DataLakeSasPermissions
150 ManageOwnership = 256,
155 ManageAccessControl = 512,
163 inline DataLakeSasPermissions operator|(DataLakeSasPermissions lhs, DataLakeSasPermissions rhs)
165 using type = std::underlying_type_t<DataLakeSasPermissions>;
166 return static_cast<DataLakeSasPermissions
>(
static_cast<type
>(lhs) |
static_cast<type
>(rhs));
169 inline DataLakeSasPermissions operator&(DataLakeSasPermissions lhs, DataLakeSasPermissions rhs)
171 using type = std::underlying_type_t<DataLakeSasPermissions>;
172 return static_cast<DataLakeSasPermissions
>(
static_cast<type
>(lhs) &
static_cast<type
>(rhs));
329 void SetPermissions(std::string rawPermissions) { Permissions = std::move(rawPermissions); }
341 const Files::DataLake::Models::UserDelegationKey& userDelegationKey,
342 const std::string& accountName);
364 const Blobs::Models::UserDelegationKey& userDelegationKey,
365 const std::string& accountName);
368 std::string Permissions;
DataLakeSasBuilder is used to generate a Shared Access Signature (SAS) for an Azure Storage DataLake ...
Definition datalake_sas_builder.hpp:180
std::string ContentLanguage
Override the value returned for Content-Language response header.
Definition datalake_sas_builder.hpp:262
std::string PreauthorizedAgentObjectId
This value will be used for the AAD Object ID of a user authorized by the owner of the User Delegatio...
Definition datalake_sas_builder.hpp:277
std::string FileSystemName
The name of the filesystem being made accessible.
Definition datalake_sas_builder.hpp:217
std::string EncryptionScope
Optional encryption scope to use when sending requests authorized with this SAS url.
Definition datalake_sas_builder.hpp:299
std::string AgentObjectId
This value will be used for the AAD Object ID of a user authorized by the owner of the User Delegatio...
Definition datalake_sas_builder.hpp:287
DataLakeSasResource Resource
Specifies which resources are accessible via the shared access signature.
Definition datalake_sas_builder.hpp:242
void SetPermissions(DataLakeSasPermissions permissions)
Sets the permissions for the file SAS or directory SAS.
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 datalake_sas_builder.hpp:206
std::string GenerateSasStringToSign(const Blobs::Models::UserDelegationKey &userDelegationKey, const std::string &accountName)
For debugging purposes only.
std::string ContentType
Override the value returned for Content-Type response header.
Definition datalake_sas_builder.hpp:267
Azure::DateTime ExpiresOn
The time at which the shared access signature becomes invalid. This field must be omitted if it has b...
Definition datalake_sas_builder.hpp:198
std::string Path
The name of the path being made accessible, or empty for a filesystem SAS.
Definition datalake_sas_builder.hpp:222
void SetPermissions(DataLakeFileSystemSasPermissions permissions)
Sets the permissions for the filesystem SAS.
void SetPermissions(std::string rawPermissions)
Sets the permissions for the SAS using a raw permissions string.
Definition datalake_sas_builder.hpp:329
std::string ContentEncoding
Override the value returned for Content-Encoding response header.
Definition datalake_sas_builder.hpp:257
std::string GenerateSasToken(const Files::DataLake::Models::UserDelegationKey &userDelegationKey, const std::string &accountName)
Uses an account's user delegation key to sign this shared access signature, to produce the proper SAS...
bool IsDirectory
Defines whether or not the Path is a directory. If this value is set to true, the Path is a directory...
Definition datalake_sas_builder.hpp:229
std::string CacheControl
Override the value returned for Cache-Control response header.
Definition datalake_sas_builder.hpp:247
Azure::Nullable< Azure::DateTime > StartsOn
Optionally specify the time at which the shared access signature becomes valid. This timestamp will b...
Definition datalake_sas_builder.hpp:191
std::string GenerateSasToken(const StorageSharedKeyCredential &credential)
Uses the StorageSharedKeyCredential to sign this shared access signature, to produce the proper SAS q...
std::string GenerateSasStringToSign(const StorageSharedKeyCredential &credential)
For debugging purposes only.
SasProtocol Protocol
The optional signed protocol field specifies the protocol permitted for a request made with the SAS.
Definition datalake_sas_builder.hpp:185
std::string Identifier
An optional unique value up to 64 characters in length that correlates to an access policy specified ...
Definition datalake_sas_builder.hpp:212
std::string CorrelationId
This value will be used for correlating the storage audit logs with the audit logs used by the princi...
Definition datalake_sas_builder.hpp:294
Azure::Nullable< int32_t > DirectoryDepth
Required when Resource is set to Directory to indicate the depth of the directory specified in the ca...
Definition datalake_sas_builder.hpp:237
std::string ContentDisposition
Override the value returned for Content-Disposition response header.
Definition datalake_sas_builder.hpp:252