Skip to content

Commit a4333f3

Browse files
authored
Storage/STG95 Files OAuth - full data plane support (#5759)
* File OAuth * Remove comment * update test record
1 parent f8130a2 commit a4333f3

9 files changed

Lines changed: 260 additions & 77 deletions

File tree

sdk/storage/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "cpp",
44
"TagPrefix": "cpp/storage",
5-
"Tag": "cpp/storage_75931731d9"
5+
"Tag": "cpp/storage_8eb3907e27"
66
}

sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
3131
/**
3232
* The version used for the operations to Azure storage services.
3333
*/
34-
constexpr static const char* ApiVersion = "2024-08-04";
34+
constexpr static const char* ApiVersion = "2024-11-04";
3535
} // namespace _detail
3636
namespace Models {
3737
/**
@@ -138,6 +138,27 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
138138
*/
139139
SmbSettings Settings;
140140
};
141+
/**
142+
* @brief Valid value is backup.
143+
*/
144+
class ShareTokenIntent final {
145+
public:
146+
/** Constructs a new ShareTokenIntent instance */
147+
ShareTokenIntent() = default;
148+
/** Constructs a new ShareTokenIntent from a string. */
149+
explicit ShareTokenIntent(std::string value) : m_value(std::move(value)) {}
150+
/** Compares with another ShareTokenIntent. */
151+
bool operator==(const ShareTokenIntent& other) const { return m_value == other.m_value; }
152+
/** Compares with another ShareTokenIntent. */
153+
bool operator!=(const ShareTokenIntent& other) const { return !(*this == other); }
154+
/** Converts the value to a string. */
155+
const std::string& ToString() const { return m_value; }
156+
/** Constant value of type ShareTokenIntent: Backup */
157+
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent Backup;
158+
159+
private:
160+
std::string m_value;
161+
};
141162
/**
142163
* @brief Response type for #Azure::Storage::Files::Shares::ShareServiceClient::SetProperties.
143164
*/
@@ -747,27 +768,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
747768
*/
748769
DateTime LastModified;
749770
};
750-
/**
751-
* @brief Valid value is backup.
752-
*/
753-
class ShareTokenIntent final {
754-
public:
755-
/** Constructs a new ShareTokenIntent instance */
756-
ShareTokenIntent() = default;
757-
/** Constructs a new ShareTokenIntent from a string. */
758-
explicit ShareTokenIntent(std::string value) : m_value(std::move(value)) {}
759-
/** Compares with another ShareTokenIntent. */
760-
bool operator==(const ShareTokenIntent& other) const { return m_value == other.m_value; }
761-
/** Compares with another ShareTokenIntent. */
762-
bool operator!=(const ShareTokenIntent& other) const { return !(*this == other); }
763-
/** Converts the value to a string. */
764-
const std::string& ToString() const { return m_value; }
765-
/** Constant value of type ShareTokenIntent: Backup */
766-
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent Backup;
767-
768-
private:
769-
std::string m_value;
770-
};
771771
/**
772772
* @brief Response type for #Azure::Storage::Files::Shares::ShareClient::CreatePermission.
773773
*/
@@ -2061,6 +2061,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
20612061
struct SetServicePropertiesOptions final
20622062
{
20632063
Models::ShareServiceProperties ShareServiceProperties;
2064+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
20642065
};
20652066
static Response<Models::SetServicePropertiesResult> SetProperties(
20662067
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2069,6 +2070,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
20692070
const Core::Context& context);
20702071
struct GetServicePropertiesOptions final
20712072
{
2073+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
20722074
};
20732075
static Response<Models::ShareServiceProperties> GetProperties(
20742076
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2081,6 +2083,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
20812083
Nullable<std::string> Marker;
20822084
Nullable<int32_t> MaxResults;
20832085
Nullable<Models::ListSharesIncludeFlags> Include;
2086+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
20842087
};
20852088
static Response<Models::_detail::ListSharesResponse> ListSharesSegment(
20862089
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2098,6 +2101,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
20982101
Nullable<Models::ShareProtocols> EnabledProtocols;
20992102
Nullable<Models::ShareRootSquash> RootSquash;
21002103
Nullable<bool> EnableSnapshotVirtualDirectoryAccess;
2104+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21012105
};
21022106
static Response<Models::CreateShareResult> Create(
21032107
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2108,6 +2112,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21082112
{
21092113
Nullable<std::string> Sharesnapshot;
21102114
Nullable<std::string> LeaseId;
2115+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21112116
};
21122117
static Response<Models::ShareProperties> GetProperties(
21132118
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2119,6 +2124,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21192124
Nullable<std::string> Sharesnapshot;
21202125
Nullable<Models::DeleteSnapshotsOption> DeleteSnapshots;
21212126
Nullable<std::string> LeaseId;
2127+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21222128
};
21232129
static Response<Models::DeleteShareResult> Delete(
21242130
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2130,6 +2136,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21302136
Nullable<int32_t> Duration;
21312137
Nullable<std::string> ProposedLeaseId;
21322138
Nullable<std::string> Sharesnapshot;
2139+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21332140
};
21342141
static Response<Models::_detail::AcquireShareLeaseResult> AcquireLease(
21352142
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2140,6 +2147,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21402147
{
21412148
std::string LeaseId;
21422149
Nullable<std::string> Sharesnapshot;
2150+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21432151
};
21442152
static Response<Models::_detail::ReleaseShareLeaseResult> ReleaseLease(
21452153
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2151,6 +2159,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21512159
std::string LeaseId;
21522160
Nullable<std::string> ProposedLeaseId;
21532161
Nullable<std::string> Sharesnapshot;
2162+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21542163
};
21552164
static Response<Models::_detail::ChangeShareLeaseResult> ChangeLease(
21562165
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2161,6 +2170,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21612170
{
21622171
std::string LeaseId;
21632172
Nullable<std::string> Sharesnapshot;
2173+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21642174
};
21652175
static Response<Models::_detail::RenewShareLeaseResult> RenewLease(
21662176
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2172,6 +2182,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21722182
Nullable<int32_t> BreakPeriod;
21732183
Nullable<std::string> LeaseId;
21742184
Nullable<std::string> Sharesnapshot;
2185+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21752186
};
21762187
static Response<Models::_detail::BreakShareLeaseResult> BreakLease(
21772188
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2181,6 +2192,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
21812192
struct CreateShareSnapshotOptions final
21822193
{
21832194
std::map<std::string, std::string> Metadata;
2195+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
21842196
};
21852197
static Response<Models::CreateShareSnapshotResult> CreateSnapshot(
21862198
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2214,6 +2226,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
22142226
Nullable<std::string> LeaseId;
22152227
Nullable<Models::ShareRootSquash> RootSquash;
22162228
Nullable<bool> EnableSnapshotVirtualDirectoryAccess;
2229+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
22172230
};
22182231
static Response<Models::SetSharePropertiesResult> SetProperties(
22192232
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2224,6 +2237,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
22242237
{
22252238
std::map<std::string, std::string> Metadata;
22262239
Nullable<std::string> LeaseId;
2240+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
22272241
};
22282242
static Response<Models::SetShareMetadataResult> SetMetadata(
22292243
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2233,6 +2247,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
22332247
struct GetShareAccessPolicyOptions final
22342248
{
22352249
Nullable<std::string> LeaseId;
2250+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
22362251
};
22372252
static Response<Models::ShareAccessPolicy> GetAccessPolicy(
22382253
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2243,6 +2258,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
22432258
{
22442259
std::vector<Models::SignedIdentifier> ShareAcl;
22452260
Nullable<std::string> LeaseId;
2261+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
22462262
};
22472263
static Response<Models::SetShareAccessPolicyResult> SetAccessPolicy(
22482264
Core::Http::_internal::HttpPipeline& pipeline,
@@ -2252,6 +2268,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
22522268
struct GetShareStatisticsOptions final
22532269
{
22542270
Nullable<std::string> LeaseId;
2271+
Nullable<Models::ShareTokenIntent> FileRequestIntent;
22552272
};
22562273
static Response<Models::ShareStatistics> GetStatistics(
22572274
Core::Http::_internal::HttpPipeline& pipeline,

0 commit comments

Comments
 (0)