Skip to content

Commit

Permalink
STG94 (#40026)
Browse files Browse the repository at this point in the history
* STG94 Versions (#39551)

* version updates and asset file (?)

* redoing asset files pt 1

* redoing asset files pt 2

* STG94 Get Account Info on Container and Blob level (#39597)

* feature and tests

* style

* STG94 Files OAuth - full data plane support (#39653)

* swagger

* tests

* missed recording

* link and quotaInGB description changes

* Revert "STG94 Files OAuth - full data plane support (#39653)" (#39738)

This reverts commit 02c23b5.

* STG94 Authorization Error Detail  (#39655)

* tests and recordings

* style

* Stg94 Snapshot management support via REST for NFS shares (#39739)

* Stg93 Snapshot management support via REST for NFS shares (Cleaned) (#38845)

* swagger and hookup

* everything

* style

* removing preprod from test environment suffix

* adding better descriptions

* renaming

* re-recording

* updating required service version for tests

* STG94 Error Code For Copy Blob (#39795)

* everything

* resolving conflicts

* style

* style

* changes to retry policy

* adding back generated changes from other feature

* retry changes and client changes

* recording changes

* swagger changes

* retry constant change and appendblob test troubleshooting

* creating new test copies

* re-recording whole appendblob files

* cleanup

* fixing sharesimpl

* STG94 Bearer Challenge Implementation  (#39934)

* bearer challenge implementation

* making tests live only

* style

* queue changes and adding support for blobs

* style

* datalake implementation

* blob recording

* fileshare implementation pt1

* removing fileshare implementation

* style

* wip

* file swagger changes and making nfs share work again

* resolving some comments

* adding comment and changing the parsing to how tables does it

* changelogs

* disabling error code for copy blob

* making nfs feature tests premium accounts

* analyze

* fixing async bearer challenge

* commenting out missed tests from the copy blob error code removal

* fixing headers for one of the NFS tests

* linting
  • Loading branch information
ibrandes authored Jun 11, 2024
1 parent bdd236e commit f6e3c17
Show file tree
Hide file tree
Showing 75 changed files with 1,678 additions and 295 deletions.
2 changes: 2 additions & 0 deletions sdk/storage/azure-storage-blob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 12.27.0-beta.1 (Unreleased)
- Added support for getting account info on blob container clients and the blob base client.
- Added support for bearer token challenges.

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-blob/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/storage/azure-storage-blob",
"Tag": "java/storage/azure-storage-blob_bd8a4072b4"
"Tag": "java/storage/azure-storage-blob_e9a4d152f3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,8 @@ public Mono<Response<StorageAccountInfo>> getAccountInfoWithResponse() {

Mono<Response<StorageAccountInfo>> getAccountInfoWithResponse(Context context) {
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getContainers().getAccountInfoWithResponseAsync(containerName, context)
return this.azureBlobStorage.getContainers().getAccountInfoWithResponseAsync(containerName, null,
null, context)
.map(rb -> {
ContainersGetAccountInfoHeaders hd = rb.getDeserializedHeaders();
return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ public Mono<Response<StorageAccountInfo>> getAccountInfoWithResponse() {

Mono<Response<StorageAccountInfo>> getAccountInfoWithResponse(Context context) {
throwOnAnonymousAccess();
return this.azureBlobStorage.getServices().getAccountInfoWithResponseAsync(context)
return this.azureBlobStorage.getServices().getAccountInfoWithResponseAsync(null, null, context)
.map(rb -> {
ServicesGetAccountInfoHeaders hd = rb.getDeserializedHeaders();
return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ public enum BlobServiceVersion implements ServiceVersion {
/**
* Service version {@code 2024-05-04}.
*/
V2024_05_04("2024-05-04");
V2024_05_04("2024-05-04"),

/**
* Service version {@code 2024-08-04}.
*/
V2024_08_04("2024-08-04");

private final String version;

Expand All @@ -139,6 +144,6 @@ public String getVersion() {
* @return the latest {@link BlobServiceVersion}
*/
public static BlobServiceVersion getLatest() {
return V2024_05_04;
return V2024_08_04;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public AzureBlobStorageImplBuilder retryPolicy(RetryPolicy retryPolicy) {
@Generated
public AzureBlobStorageImpl buildClient() {
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
String localVersion = (version != null) ? version : "2021-12-02";
String localVersion = (version != null) ? version : "2024-08-04";
SerializerAdapter localSerializerAdapter =
(serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter();
AzureBlobStorageImpl client =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,9 @@ Mono<ResponseBase<BlobsGetAccountInfoHeaders, Void>> getAccountInfo(
@PathParam("blob") String blob,
@QueryParam("restype") String restype,
@QueryParam("comp") String comp,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
@HeaderParam("Accept") String accept,
Context context);

Expand All @@ -995,7 +997,9 @@ Mono<Response<Void>> getAccountInfoNoCustomHeaders(
@PathParam("blob") String blob,
@QueryParam("restype") String restype,
@QueryParam("comp") String comp,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
@HeaderParam("Accept") String accept,
Context context);

Expand Down Expand Up @@ -9178,14 +9182,19 @@ public Mono<Response<Void>> setTierNoCustomHeadersWithResponseAsync(
*
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations"&gt;Setting
* Timeouts for Blob Service Operations.&lt;/a&gt;.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws BlobStorageException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link ResponseBase} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ResponseBase<BlobsGetAccountInfoHeaders, Void>> getAccountInfoWithResponseAsync(
String containerName, String blob) {
String containerName, String blob, Integer timeout, String requestId) {
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
Expand All @@ -9197,7 +9206,9 @@ public Mono<ResponseBase<BlobsGetAccountInfoHeaders, Void>> getAccountInfoWithRe
blob,
restype,
comp,
timeout,
this.client.getVersion(),
requestId,
accept,
context));
}
Expand All @@ -9207,6 +9218,11 @@ public Mono<ResponseBase<BlobsGetAccountInfoHeaders, Void>> getAccountInfoWithRe
*
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations"&gt;Setting
* Timeouts for Blob Service Operations.&lt;/a&gt;.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws BlobStorageException thrown if the request is rejected by server.
Expand All @@ -9215,57 +9231,85 @@ public Mono<ResponseBase<BlobsGetAccountInfoHeaders, Void>> getAccountInfoWithRe
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ResponseBase<BlobsGetAccountInfoHeaders, Void>> getAccountInfoWithResponseAsync(
String containerName, String blob, Context context) {
String containerName, String blob, Integer timeout, String requestId, Context context) {
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
return service.getAccountInfo(
this.client.getUrl(), containerName, blob, restype, comp, this.client.getVersion(), accept, context);
this.client.getUrl(),
containerName,
blob,
restype,
comp,
timeout,
this.client.getVersion(),
requestId,
accept,
context);
}

/**
* Returns the sku name and account kind.
*
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations"&gt;Setting
* Timeouts for Blob Service Operations.&lt;/a&gt;.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws BlobStorageException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> getAccountInfoAsync(String containerName, String blob) {
return getAccountInfoWithResponseAsync(containerName, blob).flatMap(ignored -> Mono.empty());
public Mono<Void> getAccountInfoAsync(String containerName, String blob, Integer timeout, String requestId) {
return getAccountInfoWithResponseAsync(containerName, blob, timeout, requestId)
.flatMap(ignored -> Mono.empty());
}

/**
* Returns the sku name and account kind.
*
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations"&gt;Setting
* Timeouts for Blob Service Operations.&lt;/a&gt;.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws BlobStorageException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> getAccountInfoAsync(String containerName, String blob, Context context) {
return getAccountInfoWithResponseAsync(containerName, blob, context).flatMap(ignored -> Mono.empty());
public Mono<Void> getAccountInfoAsync(
String containerName, String blob, Integer timeout, String requestId, Context context) {
return getAccountInfoWithResponseAsync(containerName, blob, timeout, requestId, context)
.flatMap(ignored -> Mono.empty());
}

/**
* Returns the sku name and account kind.
*
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations"&gt;Setting
* Timeouts for Blob Service Operations.&lt;/a&gt;.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws BlobStorageException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> getAccountInfoNoCustomHeadersWithResponseAsync(String containerName, String blob) {
public Mono<Response<Void>> getAccountInfoNoCustomHeadersWithResponseAsync(
String containerName, String blob, Integer timeout, String requestId) {
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
Expand All @@ -9277,7 +9321,9 @@ public Mono<Response<Void>> getAccountInfoNoCustomHeadersWithResponseAsync(Strin
blob,
restype,
comp,
timeout,
this.client.getVersion(),
requestId,
accept,
context));
}
Expand All @@ -9287,6 +9333,11 @@ public Mono<Response<Void>> getAccountInfoNoCustomHeadersWithResponseAsync(Strin
*
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations"&gt;Setting
* Timeouts for Blob Service Operations.&lt;/a&gt;.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws BlobStorageException thrown if the request is rejected by server.
Expand All @@ -9295,12 +9346,21 @@ public Mono<Response<Void>> getAccountInfoNoCustomHeadersWithResponseAsync(Strin
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> getAccountInfoNoCustomHeadersWithResponseAsync(
String containerName, String blob, Context context) {
String containerName, String blob, Integer timeout, String requestId, Context context) {
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
return service.getAccountInfoNoCustomHeaders(
this.client.getUrl(), containerName, blob, restype, comp, this.client.getVersion(), accept, context);
this.client.getUrl(),
containerName,
blob,
restype,
comp,
timeout,
this.client.getVersion(),
requestId,
accept,
context);
}

/**
Expand Down
Loading

0 comments on commit f6e3c17

Please sign in to comment.