From 538cf80885d1029b02380a94ebc2c565a66d45a9 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 23 Mar 2026 13:25:23 -0400 Subject: [PATCH 01/65] generate new api based on swagger docs --- .../blob/implementation/ContainersImpl.java | 489 + ...ListBlobFlatSegmentApacheArrowHeaders.java | 186 + .../azure-storage-blob/swagger/README.md | 3 +- .../azure-storage-blob/swagger/blob.json | 12881 ++++++++++++++++ 4 files changed, 13557 insertions(+), 2 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java create mode 100644 sdk/storage/azure-storage-blob/swagger/blob.json diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 7fd2af96e4df..bbd54152b2b4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -37,6 +37,7 @@ import com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders; import com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; import com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders; @@ -807,6 +808,57 @@ Response changeLeaseNoCustomHeadersSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, Context context); + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Mono>> + listBlobFlatSegmentApacheArrow(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, + @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Mono listBlobFlatSegmentApacheArrowNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, + @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + ResponseBase listBlobFlatSegmentApacheArrowSync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, + @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Response listBlobFlatSegmentApacheArrowNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, + @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @Get("/{containerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) @@ -5688,6 +5740,443 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam } } + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> + listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId) { + return FluxUtil + .withContext(context -> listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, + marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> + listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .listBlobFlatSegmentApacheArrow(this.client.getUrl(), containerName, restype, comp, accept, prefix, + delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Flux listBlobFlatSegmentApacheArrowAsync(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId) { + return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, + include, timeout, startFrom, endBefore, requestId) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Flux listBlobFlatSegmentApacheArrowAsync(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId, Context context) { + return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, + include, timeout, startFrom, endBefore, requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, + String delimiter, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String startFrom, String endBefore, String requestId) { + return FluxUtil + .withContext(context -> listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(containerName, + delimiter, prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, + String delimiter, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String startFrom, String endBefore, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .listBlobFlatSegmentApacheArrowNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, accept, + prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobFlatSegmentApacheArrowWithResponse(String containerName, String delimiter, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, + String requestId, Context context) { + try { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentApacheArrowSync(this.client.getUrl(), containerName, restype, comp, + accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream listBlobFlatSegmentApacheArrow(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId) { + try { + return listBlobFlatSegmentApacheArrowWithResponse(containerName, delimiter, prefix, marker, maxresults, + include, timeout, startFrom, endBefore, requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + + /** + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponse(String containerName, + String delimiter, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String startFrom, String endBefore, String requestId, Context context) { + try { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentApacheArrowNoCustomHeadersSync(this.client.getUrl(), containerName, + restype, comp, accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, + endBefore, this.client.getVersion(), requestId, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java new file mode 100644 index 000000000000..64ebc8f7c997 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The ContainersListBlobFlatSegmentApacheArrowHeaders model. + */ +@Fluent +public final class ContainersListBlobFlatSegmentApacheArrowHeaders { + /* + * The x-ms-version property. + */ + @Generated + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @Generated + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private String xMsClientRequestId; + + /* + * The Date property. + */ + @Generated + private DateTimeRfc1123 date; + + /* + * The Content-Type property. + */ + @Generated + private String contentType; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersListBlobFlatSegmentApacheArrowHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersListBlobFlatSegmentApacheArrowHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + @Generated + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + @Generated + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + @Generated + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Set the date property: The Date property. + * + * @param date the date value to set. + * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobFlatSegmentApacheArrowHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobFlatSegmentApacheArrowHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 98afe0c616dc..fb0cf0d039b1 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.63' -input-file: https://raw.githubusercontent.com/seanmcc-msft/azure-rest-api-specs/eb29a830edf5db50758e7d044160c7f18077f7f7/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-10-06/blob.json +input-file: C:\repos\azure-sdk-for-java\sdk\storage\azure-storage-blob\swagger\blob.json java: true output-folder: ../ namespace: com.azure.storage.blob @@ -708,4 +708,3 @@ directive: ]; ``` - diff --git a/sdk/storage/azure-storage-blob/swagger/blob.json b/sdk/storage/azure-storage-blob/swagger/blob.json new file mode 100644 index 000000000000..969dd7f67f0a --- /dev/null +++ b/sdk/storage/azure-storage-blob/swagger/blob.json @@ -0,0 +1,12881 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Blob Storage", + "version": "2026-10-06", + "x-ms-code-generation-settings": { + "header": "MIT", + "strictSpecAdherence": false + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{url}", + "useSchemePrefix": false, + "positionInOperation": "first", + "parameters": [ + { + "$ref": "#/parameters/Url" + } + ] + }, + "schemes": [ + "https" + ], + "consumes": [ + "application/xml" + ], + "produces": [ + "application/xml" + ], + "paths": {}, + "x-ms-paths": { + "/?restype=service&comp=properties": { + "put": { + "tags": [ + "service" + ], + "operationId": "Service_SetProperties", + "description": "Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules", + "parameters": [ + { + "$ref": "#/parameters/StorageServiceProperties" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "202": { + "description": "Success (Accepted)", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "get": { + "tags": [ + "service" + ], + "operationId": "Service_GetProperties", + "description": "gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + } + }, + "schema": { + "$ref": "#/definitions/StorageServiceProperties" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "service" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/?restype=service&comp=stats": { + "get": { + "tags": [ + "service" + ], + "operationId": "Service_GetStatistics", + "description": "Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/StorageServiceStats" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "service" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "stats" + ] + } + ] + }, + "/?comp=list": { + "get": { + "tags": [ + "service" + ], + "operationId": "Service_ListContainersSegment", + "description": "The List Containers Segment operation returns a list of the containers under the specified account", + "parameters": [ + { + "$ref": "#/parameters/Prefix" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/ListContainersInclude" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + } + }, + "schema": { + "$ref": "#/definitions/ListContainersSegmentResponse" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "NextMarker" + } + }, + "parameters": [ + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "list" + ] + } + ] + }, + "/?restype=service&comp=userdelegationkey": { + "post": { + "tags": [ + "service" + ], + "operationId": "Service_GetUserDelegationKey", + "description": "Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication.", + "parameters": [ + { + "$ref": "#/parameters/KeyInfo" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/UserDelegationKey" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "service" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "userdelegationkey" + ] + } + ] + }, + "/?restype=account&comp=properties": { + "get": { + "tags": [ + "service" + ], + "operationId": "Service_GetAccountInfo", + "description": "Returns the sku name and account kind ", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success (OK)", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-sku-name": { + "x-ms-client-name": "SkuName", + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + "Standard_GZRS", + "Premium_ZRS", + "Standard_RAGZRS" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": false + }, + "description": "Identifies the sku name of the account" + }, + "x-ms-account-kind": { + "x-ms-client-name": "AccountKind", + "type": "string", + "enum": [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ], + "x-ms-enum": { + "name": "AccountKind", + "modelAsString": false + }, + "description": "Identifies the account kind" + }, + "x-ms-is-hns-enabled": { + "x-ms-client-name": "IsHierarchicalNamespaceEnabled", + "type": "boolean", + "description": "Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "account" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/?comp=batch": { + "post": { + "tags": [ + "service" + ], + "operationId": "Service_SubmitBatch", + "description": "The Batch operation allows multiple API calls to be embedded into a single HTTP request.", + "parameters": [ + { + "$ref": "#/parameters/Body" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/MultipartContentType" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchresponse_GUID" + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "batch" + ] + } + ] + }, + "/?comp=blobs": { + "get": { + "tags": [ + "service" + ], + "operationId": "Service_FilterBlobs", + "description": "The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/FilterBlobsWhere" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/FilterBlobsInclude" + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/FilterBlobSegment" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "blobs" + ] + } + ] + }, + "/{containerName}?restype=container": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_Create", + "description": "creates a new container under the specified account. If the container with the same name already exists, the operation fails", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/BlobPublicAccess" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/DefaultEncryptionScope" + }, + { + "$ref": "#/parameters/DenyEncryptionScopeOverride" + } + ], + "responses": { + "201": { + "description": "Success, Container created.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "get": { + "tags": [ + "container" + ], + "operationId": "Container_GetProperties", + "description": "returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "x-ms-meta": { + "type": "string", + "x-ms-client-name": "Metadata", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-duration": { + "x-ms-client-name": "LeaseDuration", + "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "x-ms-lease-state": { + "x-ms-client-name": "LeaseState", + "description": "Lease state of the blob.", + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "x-ms-lease-status": { + "x-ms-client-name": "LeaseStatus", + "description": "The current lease status of the blob.", + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-public-access": { + "x-ms-client-name": "BlobPublicAccess", + "description": "Indicated whether data in the container may be accessed publicly and the level of access", + "type": "string", + "enum": [ + "container", + "blob" + ], + "x-ms-enum": { + "name": "PublicAccessType", + "modelAsString": true + } + }, + "x-ms-has-immutability-policy": { + "x-ms-client-name": "HasImmutabilityPolicy", + "description": "Indicates whether the container has an immutability policy set on it.", + "type": "boolean" + }, + "x-ms-has-legal-hold": { + "x-ms-client-name": "HasLegalHold", + "description": "Indicates whether the container has a legal hold.", + "type": "boolean" + }, + "x-ms-default-encryption-scope": { + "x-ms-client-name": "DefaultEncryptionScope", + "description": "The default encryption scope for the container.", + "type": "string" + }, + "x-ms-deny-encryption-scope-override": { + "x-ms-client-name": "DenyEncryptionScopeOverride", + "description": "Indicates whether the container's default encryption scope can be overriden.", + "type": "boolean" + }, + "x-ms-immutable-storage-with-versioning-enabled": { + "x-ms-client-name": "IsImmutableStorageWithVersioningEnabled", + "description": "Indicates whether version level worm is enabled on a container.", + "type": "boolean" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "delete": { + "tags": [ + "container" + ], + "operationId": "Container_Delete", + "description": "operation marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + } + ] + }, + "/{containerName}?restype=container&comp=metadata": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_SetMetadata", + "description": "operation sets one or more user-defined name-value pairs for the specified container.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "metadata" + ] + } + ] + }, + "/{containerName}?restype=container&comp=acl": { + "get": { + "tags": [ + "container" + ], + "operationId": "Container_GetAccessPolicy", + "description": "gets the permissions for the specified container. The permissions indicate whether container data may be accessed publicly.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "x-ms-blob-public-access": { + "x-ms-client-name": "BlobPublicAccess", + "description": "Indicated whether data in the container may be accessed publicly and the level of access", + "type": "string", + "enum": [ + "container", + "blob" + ], + "x-ms-enum": { + "name": "PublicAccessType", + "modelAsString": true + } + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/SignedIdentifiers" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "put": { + "tags": [ + "container" + ], + "operationId": "Container_SetAccessPolicy", + "description": "sets the permissions for the specified container. The permissions indicate whether blobs in a container may be accessed publicly.", + "parameters": [ + { + "$ref": "#/parameters/ContainerAcl" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobPublicAccess" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "acl" + ] + } + ] + }, + "/{containerName}?restype=container&comp=undelete": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_Restore", + "description": "Restores a previously-deleted container.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/DeletedContainerName" + }, + { + "$ref": "#/parameters/DeletedContainerVersion" + } + ], + "responses": { + "201": { + "description": "Created.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "undelete" + ] + } + ] + }, + "/{containerName}?restype=container&comp=rename": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_Rename", + "description": "Renames an existing container.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/SourceContainerName" + }, + { + "$ref": "#/parameters/SourceLeaseId" + } + ], + "responses": { + "200": { + "description": "Created.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "rename" + ] + } + ] + }, + "/{containerName}?restype=container&comp=batch": { + "post": { + "tags": [ + "container" + ], + "operationId": "Container_SubmitBatch", + "description": "The Batch operation allows multiple API calls to be embedded into a single HTTP request.", + "parameters": [ + { + "$ref": "#/parameters/Body" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/MultipartContentType" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "202": { + "description": "Success.", + "headers": { + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchresponse_GUID" + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "batch" + ] + } + ] + }, + "/{containerName}?restype=container&comp=blobs": { + "get": { + "tags": [ + "container" + ], + "operationId": "Container_FilterBlobs", + "description": "The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search expression. Filter blobs searches within the given container.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/FilterBlobsWhere" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/FilterBlobsInclude" + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/FilterBlobSegment" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "blobs" + ] + } + ] + }, + "/{containerName}?comp=lease&restype=container&acquire": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_AcquireLease", + "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseDuration" + }, + { + "$ref": "#/parameters/ProposedLeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "201": { + "description": "The Acquire operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-id": { + "x-ms-client-name": "LeaseId", + "type": "string", + "description": "Uniquely identifies a container's lease" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "acquire" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}?comp=lease&restype=container&release": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_ReleaseLease", + "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdRequired" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Release operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "release" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}?comp=lease&restype=container&renew": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_RenewLease", + "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdRequired" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Renew operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-id": { + "x-ms-client-name": "LeaseId", + "type": "string", + "description": "Uniquely identifies a container's lease" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "renew" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}?comp=lease&restype=container&break": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_BreakLease", + "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseBreakPeriod" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "202": { + "description": "The Break operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-time": { + "x-ms-client-name": "LeaseTime", + "type": "integer", + "description": "Approximate time remaining in the lease period, in seconds." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "break" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}?comp=lease&restype=container&change": { + "put": { + "tags": [ + "container" + ], + "operationId": "Container_ChangeLease", + "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdRequired" + }, + { + "$ref": "#/parameters/ProposedLeaseIdRequired" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Change operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-id": { + "x-ms-client-name": "LeaseId", + "type": "string", + "description": "Uniquely identifies a container's lease" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "change" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}?restype=container&comp=list&flat&arrow": { + "get": { + "tags": [ + "containers" + ], + "operationId": "Container_ListBlobFlatSegment_ApacheArrow", + "description": "The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache Arrow use case so response is returned as raw to be deserialized by the client.", + "produces": [ + "application/vnd.apache.arrow.stream", + "application/xml" + ], + "parameters": [ + { + "name": "Accept", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "application/vnd.apache.arrow.stream" + ], + "default": "application/vnd.apache.arrow.stream", + "description": "Must be set to 'application/vnd.apache.arrow.stream' to request Apache Arrow format. The service may still return XML if Arrow is not enabled for the account — clients must check the Content-Type response header." + }, + { + "$ref": "#/parameters/Prefix" + }, + { + "$ref": "#/parameters/Delimiter" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/ListBlobsInclude" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ListBlobsStartFrom" + }, + { + "$ref": "#/parameters/ListBlobsEndBefore" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success. Response body is an Apache Arrow IPC stream (application/vnd.apache.arrow.stream) or XML (application/xml) if Arrow is not enabled for the account. Check the Content-Type response header to determine format. Arrow responses carry NextMarker and NumberOfRecords in the Arrow schema metadata, not in HTTP headers.", + "headers": { + "Content-Type": { + "type": "string", + "description": "The media type of the response body. Either 'application/vnd.apache.arrow.stream' if Arrow is enabled for the account, or 'application/xml' as a fallback. Clients must check this header to determine how to deserialize the response." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Failure. Error responses are always returned in XML regardless of the Accept header.", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "list" + ] + } + ] + }, + "/{containerName}?restype=container&comp=list&flat": { + "get": { + "tags": [ + "containers" + ], + "operationId": "Container_ListBlobFlatSegment", + "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", + "parameters": [ + { + "$ref": "#/parameters/Prefix" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/ListBlobsInclude" + }, + { + "$ref": "#/parameters/ListBlobsStartFrom" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For List Blobs this is 'application/xml'" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/ListBlobsFlatSegmentResponse" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "NextMarker" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "list" + ] + } + ] + }, + "/{containerName}?restype=container&comp=list&hierarchy": { + "get": { + "tags": [ + "containers" + ], + "operationId": "Container_ListBlobHierarchySegment", + "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", + "parameters": [ + { + "$ref": "#/parameters/Prefix" + }, + { + "$ref": "#/parameters/Delimiter" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/ListBlobsInclude" + }, + { + "$ref": "#/parameters/ListBlobsStartFrom" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For List Blobs this is 'application/xml'" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/ListBlobsHierarchySegmentResponse" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "NextMarker" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "list" + ] + } + ] + }, + "/{containerName}?restype=account&comp=properties": { + "get": { + "tags": [ + "container" + ], + "operationId": "Container_GetAccountInfo", + "description": "Returns the sku name and account kind ", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success (OK)", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-sku-name": { + "x-ms-client-name": "SkuName", + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + "Standard_GZRS", + "Premium_ZRS", + "Standard_RAGZRS" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": false + }, + "description": "Identifies the sku name of the account" + }, + "x-ms-account-kind": { + "x-ms-client-name": "AccountKind", + "type": "string", + "enum": [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ], + "x-ms-enum": { + "name": "AccountKind", + "modelAsString": false + }, + "description": "Identifies the account kind" + }, + "x-ms-is-hns-enabled": { + "x-ms-client-name": "IsHierarchicalNamespaceEnabled", + "type": "boolean", + "description": "Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "account" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/{containerName}/{blob}": { + "get": { + "tags": [ + "blob" + ], + "operationId": "Blob_Download", + "description": "The Download operation reads or downloads a blob from the system, including its metadata and properties. You can also call Download to read a snapshot.", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Range" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/GetRangeContentMD5" + }, + { + "$ref": "#/parameters/GetRangeContentCRC64" + }, + { + "$ref": "#/parameters/StructuredBodyGet" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Returns the content of the entire blob.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-creation-time": { + "x-ms-client-name": "CreationTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was created." + }, + "x-ms-meta": { + "type": "string", + "x-ms-client-name": "Metadata", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "x-ms-or-policy-id": { + "x-ms-client-name": "ObjectReplicationPolicyId", + "type": "string", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." + }, + "x-ms-or": { + "type": "string", + "x-ms-client-name": "ObjectReplicationRules", + "x-ms-header-collection-prefix": "x-ms-or-", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed)." + }, + "Content-Length": { + "type": "integer", + "format": "int64", + "description": "The number of bytes present in the response body." + }, + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" + }, + "Content-Range": { + "type": "string", + "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "Content-Encoding": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Encoding request header" + }, + "Cache-Control": { + "type": "string", + "description": "This header is returned if it was previously specified for the blob." + }, + "Content-Disposition": { + "type": "string", + "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." + }, + "Content-Language": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Language request header." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-blob-type": { + "x-ms-client-name": "BlobType", + "description": "The blob's type.", + "type": "string", + "enum": [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + }, + "x-ms-copy-completion-time": { + "x-ms-client-name": "CopyCompletionTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status-description": { + "x-ms-client-name": "CopyStatusDescription", + "type": "string", + "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-progress": { + "x-ms-client-name": "CopyProgress", + "type": "string", + "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-source": { + "x-ms-client-name": "CopySource", + "type": "string", + "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + }, + "x-ms-lease-duration": { + "x-ms-client-name": "LeaseDuration", + "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "x-ms-lease-state": { + "x-ms-client-name": "LeaseState", + "description": "Lease state of the blob.", + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "x-ms-lease-status": { + "x-ms-client-name": "LeaseStatus", + "description": "The current lease status of the blob.", + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "x-ms-is-current-version": { + "x-ms-client-name": "IsCurrentVersion", + "type": "boolean", + "description": "The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header." + }, + "Accept-Ranges": { + "type": "string", + "description": "Indicates that the service supports requests for partial blob content." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-blob-content-md5": { + "x-ms-client-name": "BlobContentMD5", + "type": "string", + "format": "byte", + "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" + }, + "x-ms-tag-count": { + "x-ms-client-name": "TagCount", + "type": "integer", + "format": "int64", + "description": "The number of tags associated with the blob" + }, + "x-ms-blob-sealed": { + "x-ms-client-name": "IsSealed", + "type": "boolean", + "description": "If this blob has been sealed" + }, + "x-ms-last-access-time": { + "x-ms-client-name": "LastAccessed", + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the blob was last read or written to" + }, + "x-ms-immutability-policy-until-date": { + "x-ms-client-name": "ImmutabilityPolicyExpiresOn", + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire." + }, + "x-ms-immutability-policy-mode": { + "x-ms-client-name": "ImmutabilityPolicyMode", + "type": "string", + "enum": [ + "Mutable", + "Unlocked", + "Locked" + ], + "x-ms-enum": { + "name": "BlobImmutabilityPolicyMode", + "modelAsString": false + }, + "description": "Indicates immutability policy mode." + }, + "x-ms-legal-hold": { + "x-ms-client-name": "LegalHold", + "type": "boolean", + "description": "Indicates if a legal hold is present on the blob." + }, + "x-ms-structured-body": { + "x-ms-client-name": "StructuredBodyType", + "type": "string", + "description": "Indicates the response body contains a structured message and specifies the message schema version and properties." + }, + "x-ms-structured-content-length": { + "x-ms-client-name": "StructuredContentLength", + "type": "integer", + "format": "int64", + "description": "The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length." + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "206": { + "description": "Returns the content of a specified range of the blob.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-creation-time": { + "x-ms-client-name": "CreationTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was created." + }, + "x-ms-meta": { + "type": "string", + "x-ms-client-name": "Metadata", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "x-ms-or-policy-id": { + "x-ms-client-name": "ObjectReplicationPolicyId", + "type": "string", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." + }, + "x-ms-or": { + "type": "string", + "x-ms-client-name": "ObjectReplicationRules", + "x-ms-header-collection-prefix": "x-ms-or-", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed)." + }, + "Content-Length": { + "type": "integer", + "format": "int64", + "description": "The number of bytes present in the response body." + }, + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" + }, + "Content-Range": { + "type": "string", + "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "Content-Encoding": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Encoding request header" + }, + "Cache-Control": { + "type": "string", + "description": "This header is returned if it was previously specified for the blob." + }, + "Content-Disposition": { + "type": "string", + "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." + }, + "Content-Language": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Language request header." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-blob-type": { + "x-ms-client-name": "BlobType", + "description": "The blob's type.", + "type": "string", + "enum": [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + }, + "x-ms-content-crc64": { + "x-ms-client-name": "ContentCrc64", + "type": "string", + "format": "byte", + "description": "If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the request returns a crc64 for the range, as long as the range size is less than or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is specified in the same request, it will fail with 400(Bad Request)" + }, + "x-ms-copy-completion-time": { + "x-ms-client-name": "CopyCompletionTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status-description": { + "x-ms-client-name": "CopyStatusDescription", + "type": "string", + "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-progress": { + "x-ms-client-name": "CopyProgress", + "type": "string", + "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-source": { + "x-ms-client-name": "CopySource", + "type": "string", + "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + }, + "x-ms-lease-duration": { + "x-ms-client-name": "LeaseDuration", + "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "x-ms-lease-state": { + "x-ms-client-name": "LeaseState", + "description": "Lease state of the blob.", + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "x-ms-lease-status": { + "x-ms-client-name": "LeaseStatus", + "description": "The current lease status of the blob.", + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "x-ms-is-current-version": { + "x-ms-client-name": "IsCurrentVersion", + "type": "boolean", + "description": "The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header." + }, + "Accept-Ranges": { + "type": "string", + "description": "Indicates that the service supports requests for partial blob content." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-blob-content-md5": { + "x-ms-client-name": "BlobContentMD5", + "type": "string", + "format": "byte", + "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" + }, + "x-ms-tag-count": { + "x-ms-client-name": "TagCount", + "type": "integer", + "format": "int64", + "description": "The number of tags associated with the blob" + }, + "x-ms-blob-sealed": { + "x-ms-client-name": "IsSealed", + "type": "boolean", + "description": "If this blob has been sealed" + }, + "x-ms-last-access-time": { + "x-ms-client-name": "LastAccessed", + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the blob was last read or written to" + }, + "x-ms-immutability-policy-until-date": { + "x-ms-client-name": "ImmutabilityPolicyExpiresOn", + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire." + }, + "x-ms-immutability-policy-mode": { + "x-ms-client-name": "ImmutabilityPolicyMode", + "type": "string", + "description": "Indicates immutability policy mode." + }, + "x-ms-legal-hold": { + "x-ms-client-name": "LegalHold", + "type": "boolean", + "description": "Indicates if a legal hold is present on the blob." + }, + "x-ms-structured-body": { + "x-ms-client-name": "StructuredBodyType", + "type": "string", + "description": "Indicates the response body contains a structured message and specifies the message schema version and properties." + }, + "x-ms-structured-content-length": { + "x-ms-client-name": "StructuredContentLength", + "type": "integer", + "format": "int64", + "description": "The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length." + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "head": { + "tags": [ + "blob" + ], + "operationId": "Blob_GetProperties", + "description": "The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Returns the properties of the blob.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-creation-time": { + "x-ms-client-name": "CreationTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was created." + }, + "x-ms-meta": { + "type": "string", + "x-ms-client-name": "Metadata", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "x-ms-or-policy-id": { + "x-ms-client-name": "ObjectReplicationPolicyId", + "type": "string", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." + }, + "x-ms-or": { + "type": "string", + "x-ms-client-name": "ObjectReplicationRules", + "x-ms-header-collection-prefix": "x-ms-or-", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed)." + }, + "x-ms-blob-type": { + "x-ms-client-name": "BlobType", + "description": "The blob's type.", + "type": "string", + "enum": [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + }, + "x-ms-copy-completion-time": { + "x-ms-client-name": "CopyCompletionTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status-description": { + "x-ms-client-name": "CopyStatusDescription", + "type": "string", + "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-progress": { + "x-ms-client-name": "CopyProgress", + "type": "string", + "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-source": { + "x-ms-client-name": "CopySource", + "type": "string", + "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + }, + "x-ms-incremental-copy": { + "x-ms-client-name": "IsIncrementalCopy", + "type": "boolean", + "description": "Included if the blob is incremental copy blob." + }, + "x-ms-copy-destination-snapshot": { + "x-ms-client-name": "DestinationSnapshot", + "type": "string", + "description": "Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot for this blob." + }, + "x-ms-lease-duration": { + "x-ms-client-name": "LeaseDuration", + "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "x-ms-lease-state": { + "x-ms-client-name": "LeaseState", + "description": "Lease state of the blob.", + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "x-ms-lease-status": { + "x-ms-client-name": "LeaseStatus", + "description": "The current lease status of the blob.", + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "Content-Length": { + "type": "integer", + "format": "int64", + "description": "The number of bytes present in the response body." + }, + "Content-Type": { + "type": "string", + "description": "The content type specified for the blob. The default content type is 'application/octet-stream'" + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "Content-Encoding": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Encoding request header" + }, + "Content-Disposition": { + "type": "string", + "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." + }, + "Content-Language": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Language request header." + }, + "Cache-Control": { + "type": "string", + "description": "This header is returned if it was previously specified for the blob." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "Accept-Ranges": { + "type": "string", + "description": "Indicates that the service supports requests for partial blob content." + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the metadata was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-access-tier": { + "x-ms-client-name": "AccessTier", + "type": "string", + "description": "The tier of page blob on a premium storage account or tier of block blob on blob storage LRS accounts. For a list of allowed premium page blob tiers, see https://learn.microsoft.com/azure/virtual-machines/disks-types#premium-ssd. For blob storage LRS accounts, valid values are Hot/Cool/Archive." + }, + "x-ms-access-tier-inferred": { + "x-ms-client-name": "AccessTierInferred", + "type": "boolean", + "description": "For page blobs on a premium storage account only. If the access tier is not explicitly set on the blob, the tier is inferred based on its content length and this header will be returned with true value." + }, + "x-ms-archive-status": { + "x-ms-client-name": "ArchiveStatus", + "type": "string", + "description": "For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not complete then this header is returned indicating that rehydrate is pending and also tells the destination tier." + }, + "x-ms-access-tier-change-time": { + "x-ms-client-name": "AccessTierChangeTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "The time the tier was changed on the object. This is only returned if the tier on the block blob was ever set." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "x-ms-is-current-version": { + "x-ms-client-name": "IsCurrentVersion", + "type": "boolean", + "description": "The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header." + }, + "x-ms-tag-count": { + "x-ms-client-name": "TagCount", + "type": "integer", + "format": "int64", + "description": "The number of tags associated with the blob" + }, + "x-ms-expiry-time": { + "x-ms-client-name": "ExpiresOn", + "type": "string", + "format": "date-time-rfc1123", + "description": "The time this blob will expire." + }, + "x-ms-blob-sealed": { + "x-ms-client-name": "IsSealed", + "type": "boolean", + "description": "If this blob has been sealed" + }, + "x-ms-rehydrate-priority": { + "x-ms-client-name": "RehydratePriority", + "description": "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard.", + "type": "string" + }, + "x-ms-last-access-time": { + "x-ms-client-name": "LastAccessed", + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the blob was last read or written to" + }, + "x-ms-immutability-policy-until-date": { + "x-ms-client-name": "ImmutabilityPolicyExpiresOn", + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire." + }, + "x-ms-immutability-policy-mode": { + "x-ms-client-name": "ImmutabilityPolicyMode", + "type": "string", + "enum": [ + "Mutable", + "Unlocked", + "Locked" + ], + "x-ms-enum": { + "name": "BlobImmutabilityPolicyMode", + "modelAsString": false + }, + "description": "Indicates immutability policy mode." + }, + "x-ms-legal-hold": { + "x-ms-client-name": "LegalHold", + "type": "boolean", + "description": "Indicates if a legal hold is present on the blob." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "delete": { + "tags": [ + "blob" + ], + "operationId": "Blob_Delete", + "description": "If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the \"include=deleted\" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound).", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/DeleteSnapshots" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobDeleteType" + }, + { + "$ref": "#/parameters/AccessTierIfModifiedSince" + }, + { + "$ref": "#/parameters/AccessTierIfUnmodifiedSince" + } + ], + "responses": { + "202": { + "description": "The delete request was accepted and the blob will be deleted.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + } + ] + }, + "/{containerName}/{blob}?PageBlob": { + "put": { + "tags": [ + "blob" + ], + "operationId": "PageBlob_Create", + "description": "The Create operation creates a new page blob.", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/PremiumPageBlobAccessTierOptional" + }, + { + "$ref": "#/parameters/BlobContentType" + }, + { + "$ref": "#/parameters/BlobContentEncoding" + }, + { + "$ref": "#/parameters/BlobContentLanguage" + }, + { + "$ref": "#/parameters/BlobContentMD5" + }, + { + "$ref": "#/parameters/BlobCacheControl" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobContentDisposition" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/BlobContentLengthRequired" + }, + { + "$ref": "#/parameters/BlobSequenceNumber" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/LegalHoldOptional" + } + ], + "responses": { + "201": { + "description": "The blob was created.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "x-ms-blob-type", + "x-ms-client-name": "blobType", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", + "type": "string", + "enum": [ + "PageBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?AppendBlob": { + "put": { + "tags": [ + "blob" + ], + "operationId": "AppendBlob_Create", + "description": "The Create Append Blob operation creates a new append blob.", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/BlobContentType" + }, + { + "$ref": "#/parameters/BlobContentEncoding" + }, + { + "$ref": "#/parameters/BlobContentLanguage" + }, + { + "$ref": "#/parameters/BlobContentMD5" + }, + { + "$ref": "#/parameters/BlobCacheControl" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobContentDisposition" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/LegalHoldOptional" + } + ], + "responses": { + "201": { + "description": "The blob was created.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "x-ms-blob-type", + "x-ms-client-name": "blobType", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", + "type": "string", + "enum": [ + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?BlockBlob": { + "put": { + "tags": [ + "blob" + ], + "operationId": "BlockBlob_Upload", + "description": "The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation.", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/Body" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/BlobContentType" + }, + { + "$ref": "#/parameters/BlobContentEncoding" + }, + { + "$ref": "#/parameters/BlobContentLanguage" + }, + { + "$ref": "#/parameters/BlobContentMD5" + }, + { + "$ref": "#/parameters/BlobCacheControl" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobContentDisposition" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/AccessTierOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/LegalHoldOptional" + }, + { + "$ref": "#/parameters/ContentCrc64" + }, + { + "$ref": "#/parameters/StructuredBodyPut" + }, + { + "$ref": "#/parameters/StructuredContentLength" + } + ], + "responses": { + "201": { + "description": "The blob was updated.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-structured-body": { + "x-ms-client-name": "StructuredBodyType", + "type": "string", + "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "x-ms-blob-type", + "x-ms-client-name": "blobType", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", + "type": "string", + "enum": [ + "BlockBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?BlockBlob&fromUrl": { + "put": { + "tags": [ + "blob" + ], + "operationId": "BlockBlob_PutBlobFromUrl", + "description": "The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/BlobContentType" + }, + { + "$ref": "#/parameters/BlobContentEncoding" + }, + { + "$ref": "#/parameters/BlobContentLanguage" + }, + { + "$ref": "#/parameters/BlobContentMD5" + }, + { + "$ref": "#/parameters/BlobCacheControl" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobContentDisposition" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/AccessTierOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/SourceIfModifiedSince" + }, + { + "$ref": "#/parameters/SourceIfUnmodifiedSince" + }, + { + "$ref": "#/parameters/SourceIfMatch" + }, + { + "$ref": "#/parameters/SourceIfNoneMatch" + }, + { + "$ref": "#/parameters/SourceIfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/SourceContentMD5" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/CopySource" + }, + { + "$ref": "#/parameters/CopySourceBlobProperties" + }, + { + "$ref": "#/parameters/CopySourceAuthorization" + }, + { + "$ref": "#/parameters/CopySourceTags" + }, + { + "$ref": "#/parameters/FileRequestIntent" + }, + { + "$ref": "#/parameters/SourceEncryptionKey" + }, + { + "$ref": "#/parameters/SourceEncryptionKeySha256" + }, + { + "$ref": "#/parameters/SourceEncryptionAlgorithm" + } + ], + "responses": { + "201": { + "description": "The blob was updated.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + }, + "x-ms-copy-source-error-code": { + "x-ms-client-name": "CopySourceErrorCode", + "type": "string" + }, + "x-ms-copy-source-status-code": { + "x-ms-client-name": "CopySourceStatusCode", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "x-ms-blob-type", + "x-ms-client-name": "blobType", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", + "type": "string", + "enum": [ + "BlockBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?comp=undelete": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_Undelete", + "description": "Undelete a blob that was previously soft deleted", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The blob was undeleted successfully.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "undelete" + ] + } + ] + }, + "/{containerName}/{blob}?comp=expiry": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetExpiry", + "description": "Sets the time a blob will expire and be deleted.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobExpiryOptions" + }, + { + "$ref": "#/parameters/BlobExpiryTime" + } + ], + "responses": { + "200": { + "description": "The blob expiry was set successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "expiry" + ] + } + ] + }, + "/{containerName}/{blob}?comp=properties&SetHTTPHeaders": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetHTTPHeaders", + "description": "The Set HTTP Headers operation sets system properties on the blob", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/BlobCacheControl" + }, + { + "$ref": "#/parameters/BlobContentType" + }, + { + "$ref": "#/parameters/BlobContentMD5" + }, + { + "$ref": "#/parameters/BlobContentEncoding" + }, + { + "$ref": "#/parameters/BlobContentLanguage" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/BlobContentDisposition" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The properties were set successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/{containerName}/{blob}?comp=immutabilityPolicies": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetImmutabilityPolicy", + "description": "The Set Immutability Policy operation sets the immutability policy on the blob", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + } + ], + "responses": { + "200": { + "description": "The immutability policy was successfully set.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-immutability-policy-until-date": { + "x-ms-client-name": "ImmutabilityPolicyExpiry", + "type": "string", + "format": "date-time-rfc1123", + "description": "Indicates the time the immutability policy will expire." + }, + "x-ms-immutability-policy-mode": { + "x-ms-client-name": "ImmutabilityPolicyMode", + "type": "string", + "enum": [ + "Mutable", + "Unlocked", + "Locked" + ], + "x-ms-enum": { + "name": "BlobImmutabilityPolicyMode", + "modelAsString": false + }, + "description": "Indicates immutability policy mode." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "delete": { + "tags": [ + "blob" + ], + "operationId": "Blob_DeleteImmutabilityPolicy", + "description": "The Delete Immutability Policy operation deletes the immutability policy on the blob", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + } + ], + "responses": { + "200": { + "description": "The delete immutability policy request was accepted and the immutability policy will be deleted.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "immutabilityPolicies" + ] + } + ] + }, + "/{containerName}/{blob}?comp=legalhold": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetLegalHold", + "description": "The Set Legal Hold operation sets a legal hold on the blob.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/LegalHoldRequired" + }, + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + } + ], + "responses": { + "200": { + "description": "The legal hold was successfully set on the blob.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-legal-hold": { + "x-ms-client-name": "LegalHold", + "type": "boolean", + "description": "Indicates if the blob has a legal hold." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "legalhold" + ] + } + ] + }, + "/{containerName}/{blob}?comp=metadata": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetMetadata", + "description": "The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value pairs", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The metadata was set successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the metadata was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "metadata" + ] + } + ] + }, + "/{containerName}/{blob}?comp=lease&acquire": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_AcquireLease", + "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseDuration" + }, + { + "$ref": "#/parameters/ProposedLeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "201": { + "description": "The Acquire operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-id": { + "x-ms-client-name": "LeaseId", + "type": "string", + "description": "Uniquely identifies a blobs' lease" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "acquire" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}/{blob}?comp=lease&release": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_ReleaseLease", + "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdRequired" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Release operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "release" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}/{blob}?comp=lease&renew": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_RenewLease", + "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdRequired" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Renew operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-id": { + "x-ms-client-name": "LeaseId", + "type": "string", + "description": "Uniquely identifies a blobs' lease" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "renew" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}/{blob}?comp=lease&change": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_ChangeLease", + "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdRequired" + }, + { + "$ref": "#/parameters/ProposedLeaseIdRequired" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Change operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-lease-id": { + "x-ms-client-name": "LeaseId", + "type": "string", + "description": "Uniquely identifies a blobs' lease" + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "change" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}/{blob}?comp=lease&break": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_BreakLease", + "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseBreakPeriod" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "202": { + "description": "The Break operation completed successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-lease-time": { + "x-ms-client-name": "LeaseTime", + "type": "integer", + "description": "Approximate time remaining in the lease period, in seconds." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "lease" + ] + }, + { + "name": "x-ms-lease-action", + "x-ms-client-name": "action", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "break" + ], + "x-ms-enum": { + "name": "LeaseAction", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Describes what lease action to take." + } + ] + }, + "/{containerName}/{blob}?comp=snapshot": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_CreateSnapshot", + "description": "The Create Snapshot operation creates a read-only snapshot of a blob", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "201": { + "description": "The snaptshot was taken successfully.", + "headers": { + "x-ms-snapshot": { + "x-ms-client-name": "Snapshot", + "type": "string", + "description": "Uniquely identifies the snapshot and indicates the snapshot version. It may be used in subsequent requests to access the snapshot" + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "True if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. For a snapshot request, this header is set to true when metadata was provided in the request and encrypted with a customer-provided key." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "snapshot" + ] + } + ] + }, + "/{containerName}/{blob}?comp=copy": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_StartCopyFromURL", + "description": "The Start Copy From URL operation copies a blob or an internet resource to a new blob.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/AccessTierOptional" + }, + { + "$ref": "#/parameters/RehydratePriority" + }, + { + "$ref": "#/parameters/SourceIfModifiedSince" + }, + { + "$ref": "#/parameters/SourceIfUnmodifiedSince" + }, + { + "$ref": "#/parameters/SourceIfMatch" + }, + { + "$ref": "#/parameters/SourceIfNoneMatch" + }, + { + "$ref": "#/parameters/SourceIfTags" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/CopySource" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/SealBlob" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/LegalHoldOptional" + } + ], + "responses": { + "202": { + "description": "The copy blob has been accepted with the specified copy status.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + }, + "x-ms-copy-source-error-code": { + "x-ms-client-name": "CopySourceErrorCode", + "type": "string" + }, + "x-ms-copy-source-status-code": { + "x-ms-client-name": "CopySourceStatusCode", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + } + ] + }, + "/{containerName}/{blob}?comp=copy&sync": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_CopyFromURL", + "description": "The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response until the copy is complete.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/AccessTierOptional" + }, + { + "$ref": "#/parameters/SourceIfModifiedSince" + }, + { + "$ref": "#/parameters/SourceIfUnmodifiedSince" + }, + { + "$ref": "#/parameters/SourceIfMatch" + }, + { + "$ref": "#/parameters/SourceIfNoneMatch" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/CopySource" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/SourceContentMD5" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/LegalHoldOptional" + }, + { + "$ref": "#/parameters/CopySourceAuthorization" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/CopySourceTags" + }, + { + "$ref": "#/parameters/FileRequestIntent" + } + ], + "responses": { + "202": { + "description": "The copy has completed.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "success" + ], + "x-ms-enum": { + "name": "SyncCopyStatusType", + "modelAsString": false + } + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "This response header is returned so that the client can check for the integrity of the copied content. This header is only returned if the source content MD5 was specified." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This response header is returned so that the client can check for the integrity of the copied content." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + }, + "x-ms-copy-source-error-code": { + "x-ms-client-name": "CopySourceErrorCode", + "type": "string" + }, + "x-ms-copy-source-status-code": { + "x-ms-client-name": "CopySourceStatusCode", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "x-ms-requires-sync", + "description": "This header indicates that this is a synchronous Copy Blob From URL instead of a Asynchronous Copy Blob.", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "true" + ] + } + ] + }, + "/{containerName}/{blob}?comp=copy©id": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_AbortCopyFromURL", + "description": "The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with zero length and full metadata.", + "parameters": [ + { + "$ref": "#/parameters/CopyId" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "204": { + "description": "The delete request was accepted and the blob will be deleted.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "copy" + ] + }, + { + "name": "x-ms-copy-action", + "description": "Copy action.", + "x-ms-client-name": "copyActionAbortConstant", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "abort" + ], + "x-ms-parameter-location": "method" + } + ] + }, + "/{containerName}/{blob}?comp=tier": { + "put": { + "tags": [ + "blobs" + ], + "operationId": "Blob_SetTier", + "description": "The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag.", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/AccessTierRequired" + }, + { + "$ref": "#/parameters/RehydratePriority" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfTags" + } + ], + "responses": { + "200": { + "description": "The new tier will take effect immediately.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and newer." + } + } + }, + "202": { + "description": "The transition to the new tier is pending.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and newer." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "tier" + ] + } + ] + }, + "/{containerName}/{blob}?restype=account&comp=properties&blob": { + "get": { + "tags": [ + "blob" + ], + "operationId": "Blob_GetAccountInfo", + "description": "Returns the sku name and account kind ", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success (OK)", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-sku-name": { + "x-ms-client-name": "SkuName", + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + "Standard_GZRS", + "Premium_ZRS", + "Standard_RAGZRS" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": false + }, + "description": "Identifies the sku name of the account" + }, + "x-ms-account-kind": { + "x-ms-client-name": "AccountKind", + "type": "string", + "enum": [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ], + "x-ms-enum": { + "name": "AccountKind", + "modelAsString": false + }, + "description": "Identifies the account kind" + }, + "x-ms-is-hns-enabled": { + "x-ms-client-name": "IsHierarchicalNamespaceEnabled", + "type": "boolean", + "description": "Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "account" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/{containerName}/{blob}?comp=block": { + "put": { + "tags": [ + "blockblob" + ], + "operationId": "BlockBlob_StageBlock", + "description": "The Stage Block operation creates a new block to be committed as part of a blob", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/BlockId" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentCrc64" + }, + { + "$ref": "#/parameters/Body" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/StructuredBodyPut" + }, + { + "$ref": "#/parameters/StructuredContentLength" + } + ], + "responses": { + "201": { + "description": "The block was created.", + "headers": { + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-structured-body": { + "x-ms-client-name": "StructuredBodyType", + "type": "string", + "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "block" + ] + } + ] + }, + "/{containerName}/{blob}?comp=block&fromURL": { + "put": { + "tags": [ + "blockblob" + ], + "operationId": "BlockBlob_StageBlockFromURL", + "description": "The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from a URL.", + "parameters": [ + { + "$ref": "#/parameters/BlockId" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/SourceUrl" + }, + { + "$ref": "#/parameters/SourceRange" + }, + { + "$ref": "#/parameters/SourceContentMD5" + }, + { + "$ref": "#/parameters/SourceContentCRC64" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/SourceIfModifiedSince" + }, + { + "$ref": "#/parameters/SourceIfUnmodifiedSince" + }, + { + "$ref": "#/parameters/SourceIfMatch" + }, + { + "$ref": "#/parameters/SourceIfNoneMatch" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/CopySourceAuthorization" + }, + { + "$ref": "#/parameters/FileRequestIntent" + }, + { + "$ref": "#/parameters/SourceEncryptionKey" + }, + { + "$ref": "#/parameters/SourceEncryptionKeySha256" + }, + { + "$ref": "#/parameters/SourceEncryptionAlgorithm" + } + ], + "responses": { + "201": { + "description": "The block was created.", + "headers": { + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + }, + "x-ms-copy-source-error-code": { + "x-ms-client-name": "CopySourceErrorCode", + "type": "string" + }, + "x-ms-copy-source-status-code": { + "x-ms-client-name": "CopySourceStatusCode", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "block" + ] + } + ] + }, + "/{containerName}/{blob}?comp=blocklist": { + "put": { + "tags": [ + "blockblob" + ], + "operationId": "BlockBlob_CommitBlockList", + "description": "The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. You can do this by specifying whether to commit a block from the committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the block, whichever list it may belong to.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/BlobCacheControl" + }, + { + "$ref": "#/parameters/BlobContentType" + }, + { + "$ref": "#/parameters/BlobContentEncoding" + }, + { + "$ref": "#/parameters/BlobContentLanguage" + }, + { + "$ref": "#/parameters/BlobContentMD5" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentCrc64" + }, + { + "$ref": "#/parameters/Metadata" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobContentDisposition" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/AccessTierOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "name": "blocks", + "description": "Blob Blocks.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BlockLookupList" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobTagsHeader" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyExpiry" + }, + { + "$ref": "#/parameters/ImmutabilityPolicyMode" + }, + { + "$ref": "#/parameters/LegalHoldOptional" + } + ], + "responses": { + "201": { + "description": "The block list was recorded.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. This header refers to the content of the request, meaning, in this case, the list of blocks, and not the content of the blob itself." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. This header refers to the content of the request, meaning, in this case, the list of blocks, and not the content of the blob itself." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "x-ms-version-id": { + "x-ms-client-name": "VersionId", + "type": "string", + "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "get": { + "tags": [ + "blockblob" + ], + "operationId": "BlockBlob_GetBlockList", + "description": "The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/BlockListType" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The page range was written.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For Get Block List this is 'application/xml'" + }, + "x-ms-blob-content-length": { + "x-ms-client-name": "BlobContentLength", + "type": "integer", + "format": "int64", + "description": "The size of the blob in bytes." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/BlockList" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "blocklist" + ] + } + ] + }, + "/{containerName}/{blob}?comp=page&update": { + "put": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_UploadPages", + "description": "The Upload Pages operation writes a range of pages to a page blob", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/Body" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentCrc64" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Range" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfSequenceNumberLessThanOrEqualTo" + }, + { + "$ref": "#/parameters/IfSequenceNumberLessThan" + }, + { + "$ref": "#/parameters/IfSequenceNumberEqualTo" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/StructuredBodyPut" + }, + { + "$ref": "#/parameters/StructuredContentLength" + } + ], + "responses": { + "201": { + "description": "The page range was written.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for the page blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned when the pages were encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-structured-body": { + "x-ms-client-name": "StructuredBodyType", + "type": "string", + "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "page" + ] + }, + { + "name": "x-ms-page-write", + "x-ms-client-name": "pageWrite", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Required. You may specify one of the following options:\n - Update: Writes the bytes specified by the request body into the specified range. The Range and Content-Length headers must match to perform the update.\n - Clear: Clears the specified range and releases the space used in storage for that range. To clear a range, set the Content-Length header to zero, and the Range header to a value that indicates the range to clear, up to maximum blob size.", + "type": "string", + "enum": [ + "update" + ], + "x-ms-enum": { + "name": "PageWriteType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?comp=page&clear": { + "put": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_ClearPages", + "description": "The Clear Pages operation clears a set of pages from a page blob", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Range" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfSequenceNumberLessThanOrEqualTo" + }, + { + "$ref": "#/parameters/IfSequenceNumberLessThan" + }, + { + "$ref": "#/parameters/IfSequenceNumberEqualTo" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "201": { + "description": "The page range was cleared.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for the page blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "page" + ] + }, + { + "name": "x-ms-page-write", + "x-ms-client-name": "pageWrite", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Required. You may specify one of the following options:\n - Update: Writes the bytes specified by the request body into the specified range. The Range and Content-Length headers must match to perform the update.\n - Clear: Clears the specified range and releases the space used in storage for that range. To clear a range, set the Content-Length header to zero, and the Range header to a value that indicates the range to clear, up to maximum blob size.", + "type": "string", + "enum": [ + "clear" + ], + "x-ms-enum": { + "name": "PageWriteType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?comp=page&update&fromUrl": { + "put": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_UploadPagesFromURL", + "description": "The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/SourceUrl" + }, + { + "$ref": "#/parameters/SourceRangeRequiredPutPageFromUrl" + }, + { + "$ref": "#/parameters/SourceContentMD5" + }, + { + "$ref": "#/parameters/SourceContentCRC64" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/RangeRequiredPutPageFromUrl" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfSequenceNumberLessThanOrEqualTo" + }, + { + "$ref": "#/parameters/IfSequenceNumberLessThan" + }, + { + "$ref": "#/parameters/IfSequenceNumberEqualTo" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/SourceIfModifiedSince" + }, + { + "$ref": "#/parameters/SourceIfUnmodifiedSince" + }, + { + "$ref": "#/parameters/SourceIfMatch" + }, + { + "$ref": "#/parameters/SourceIfNoneMatch" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/CopySourceAuthorization" + }, + { + "$ref": "#/parameters/FileRequestIntent" + }, + { + "$ref": "#/parameters/SourceEncryptionKey" + }, + { + "$ref": "#/parameters/SourceEncryptionKeySha256" + }, + { + "$ref": "#/parameters/SourceEncryptionAlgorithm" + } + ], + "responses": { + "201": { + "description": "The page range was written.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for the page blob." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + }, + "x-ms-copy-source-error-code": { + "x-ms-client-name": "CopySourceErrorCode", + "type": "string" + }, + "x-ms-copy-source-status-code": { + "x-ms-client-name": "CopySourceStatusCode", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "page" + ] + }, + { + "name": "x-ms-page-write", + "x-ms-client-name": "pageWrite", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Required. You may specify one of the following options:\n - Update: Writes the bytes specified by the request body into the specified range. The Range and Content-Length headers must match to perform the update.\n - Clear: Clears the specified range and releases the space used in storage for that range. To clear a range, set the Content-Length header to zero, and the Range header to a value that indicates the range to clear, up to maximum blob size.", + "type": "string", + "enum": [ + "update" + ], + "x-ms-enum": { + "name": "PageWriteType", + "modelAsString": false + } + } + ] + }, + "/{containerName}/{blob}?comp=pagelist": { + "get": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_GetPageRanges", + "description": "The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/Range" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + } + ], + "responses": { + "200": { + "description": "Information on the page blob was found.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "x-ms-blob-content-length": { + "x-ms-client-name": "BlobContentLength", + "type": "integer", + "format": "int64", + "description": "The size of the blob in bytes." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/PageList" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "NextMarker" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "pagelist" + ] + } + ] + }, + "/{containerName}/{blob}?comp=pagelist&diff": { + "get": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_GetPageRangesDiff", + "description": "The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were changed between target blob and previous snapshot.", + "parameters": [ + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/PrevSnapshot" + }, + { + "$ref": "#/parameters/PrevSnapshotUrl" + }, + { + "$ref": "#/parameters/Range" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + } + ], + "responses": { + "200": { + "description": "Information on the page blob was found.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "x-ms-blob-content-length": { + "x-ms-client-name": "BlobContentLength", + "type": "integer", + "format": "int64", + "description": "The size of the blob in bytes." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/PageList" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "NextMarker" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "pagelist" + ] + } + ] + }, + "/{containerName}/{blob}?comp=properties&Resize": { + "put": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_Resize", + "description": "Resize the Blob", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/BlobContentLengthRequired" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The Blob was resized successfully", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/{containerName}/{blob}?comp=properties&UpdateSequenceNumber": { + "put": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_UpdateSequenceNumber", + "description": "Update the sequence number of the blob", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/SequenceNumberAction" + }, + { + "$ref": "#/parameters/BlobSequenceNumber" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "The sequence numbers were updated successfully.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "properties" + ] + } + ] + }, + "/{containerName}/{blob}?comp=incrementalcopy": { + "put": { + "tags": [ + "pageblob" + ], + "operationId": "PageBlob_CopyIncremental", + "description": "The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/CopySource" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "202": { + "description": "The blob was copied.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "incrementalcopy" + ] + } + ] + }, + "/{containerName}/{blob}?comp=appendblock": { + "put": { + "tags": [ + "appendblob" + ], + "consumes": [ + "application/octet-stream" + ], + "operationId": "AppendBlob_AppendBlock", + "description": "The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.", + "parameters": [ + { + "$ref": "#/parameters/Body" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentCrc64" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobConditionMaxSize" + }, + { + "$ref": "#/parameters/BlobConditionAppendPos" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/StructuredBodyPut" + }, + { + "$ref": "#/parameters/StructuredContentLength" + } + ], + "responses": { + "201": { + "description": "The block was created.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-append-offset": { + "x-ms-client-name": "BlobAppendOffset", + "type": "string", + "description": "This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes." + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-structured-body": { + "x-ms-client-name": "StructuredBodyType", + "type": "string", + "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "appendblock" + ] + } + ] + }, + "/{containerName}/{blob}?comp=appendblock&fromUrl": { + "put": { + "tags": [ + "appendblob" + ], + "operationId": "AppendBlob_AppendBlockFromUrl", + "description": "The Append Block operation commits a new block of data to the end of an existing append blob where the contents are read from a source url. The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.", + "parameters": [ + { + "$ref": "#/parameters/SourceUrl" + }, + { + "$ref": "#/parameters/SourceRange" + }, + { + "$ref": "#/parameters/SourceContentMD5" + }, + { + "$ref": "#/parameters/SourceContentCRC64" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ContentLength" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/EncryptionScope" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/BlobConditionMaxSize" + }, + { + "$ref": "#/parameters/BlobConditionAppendPos" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/SourceIfModifiedSince" + }, + { + "$ref": "#/parameters/SourceIfUnmodifiedSince" + }, + { + "$ref": "#/parameters/SourceIfMatch" + }, + { + "$ref": "#/parameters/SourceIfNoneMatch" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/CopySourceAuthorization" + }, + { + "$ref": "#/parameters/FileRequestIntent" + }, + { + "$ref": "#/parameters/SourceEncryptionKey" + }, + { + "$ref": "#/parameters/SourceEncryptionKeySha256" + }, + { + "$ref": "#/parameters/SourceEncryptionAlgorithm" + } + ], + "responses": { + "201": { + "description": "The block was created.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "x-ms-content-crc64": { + "type": "string", + "format": "byte", + "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-append-offset": { + "x-ms-client-name": "BlobAppendOffset", + "type": "string", + "description": "This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes." + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-request-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + }, + "x-ms-copy-source-error-code": { + "x-ms-client-name": "CopySourceErrorCode", + "type": "string" + }, + "x-ms-copy-source-status-code": { + "x-ms-client-name": "CopySourceStatusCode", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "appendblock" + ] + } + ] + }, + "/{containerName}/{blob}?comp=seal": { + "put": { + "tags": [ + "appendblob" + ], + "operationId": "AppendBlob_Seal", + "description": "The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 version or later.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/BlobConditionAppendPos" + } + ], + "responses": { + "200": { + "description": "The blob was sealed.", + "headers": { + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-sealed": { + "x-ms-client-name": "IsSealed", + "type": "boolean", + "description": "If this blob has been sealed" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "seal" + ] + } + ] + }, + "/{containerName}/{blob}?comp=query": { + "post": { + "tags": [ + "blob" + ], + "operationId": "Blob_Query", + "description": "The Query operation enables users to select/project on blob data by providing simple query expressions.", + "parameters": [ + { + "$ref": "#/parameters/QueryRequest" + }, + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/EncryptionKey" + }, + { + "$ref": "#/parameters/EncryptionKeySha256" + }, + { + "$ref": "#/parameters/EncryptionAlgorithm" + }, + { + "$ref": "#/parameters/IfModifiedSince" + }, + { + "$ref": "#/parameters/IfUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfMatch" + }, + { + "$ref": "#/parameters/IfNoneMatch" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Returns the content of the entire blob.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-meta": { + "type": "string", + "x-ms-client-name": "Metadata", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "Content-Length": { + "type": "integer", + "format": "int64", + "description": "The number of bytes present in the response body." + }, + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" + }, + "Content-Range": { + "type": "string", + "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "Content-Encoding": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Encoding request header" + }, + "Cache-Control": { + "type": "string", + "description": "This header is returned if it was previously specified for the blob." + }, + "Content-Disposition": { + "type": "string", + "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." + }, + "Content-Language": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Language request header." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-blob-type": { + "x-ms-client-name": "BlobType", + "description": "The blob's type.", + "type": "string", + "enum": [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + }, + "x-ms-copy-completion-time": { + "x-ms-client-name": "CopyCompletionTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status-description": { + "x-ms-client-name": "CopyStatusDescription", + "type": "string", + "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-progress": { + "x-ms-client-name": "CopyProgress", + "type": "string", + "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-source": { + "x-ms-client-name": "CopySource", + "type": "string", + "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + }, + "x-ms-lease-duration": { + "x-ms-client-name": "LeaseDuration", + "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "x-ms-lease-state": { + "x-ms-client-name": "LeaseState", + "description": "Lease state of the blob.", + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "x-ms-lease-status": { + "x-ms-client-name": "LeaseStatus", + "description": "The current lease status of the blob.", + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Accept-Ranges": { + "type": "string", + "description": "Indicates that the service supports requests for partial blob content." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-blob-content-md5": { + "x-ms-client-name": "BlobContentMD5", + "type": "string", + "format": "byte", + "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "206": { + "description": "Returns the content of a specified range of the blob.", + "headers": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, + "x-ms-meta": { + "type": "string", + "x-ms-client-name": "Metadata", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "Content-Length": { + "type": "integer", + "format": "int64", + "description": "The number of bytes present in the response body." + }, + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" + }, + "Content-Range": { + "type": "string", + "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." + }, + "ETag": { + "type": "string", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Content-MD5": { + "type": "string", + "format": "byte", + "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." + }, + "Content-Encoding": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Encoding request header" + }, + "Cache-Control": { + "type": "string", + "description": "This header is returned if it was previously specified for the blob." + }, + "Content-Disposition": { + "type": "string", + "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." + }, + "Content-Language": { + "type": "string", + "description": "This header returns the value that was specified for the Content-Language request header." + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "BlobSequenceNumber", + "type": "integer", + "format": "int64", + "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" + }, + "x-ms-blob-type": { + "x-ms-client-name": "BlobType", + "description": "The blob's type.", + "type": "string", + "enum": [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + }, + "x-ms-content-crc64": { + "x-ms-client-name": "ContentCrc64", + "type": "string", + "format": "byte", + "description": "If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the request returns a crc64 for the range, as long as the range size is less than or equal to 4 MB. If both x-ms-range-get-content-crc64 and x-ms-range-get-content-md5 is specified in the same request, it will fail with 400(Bad Request)" + }, + "x-ms-copy-completion-time": { + "x-ms-client-name": "CopyCompletionTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status-description": { + "x-ms-client-name": "CopyStatusDescription", + "type": "string", + "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-id": { + "x-ms-client-name": "CopyId", + "type": "string", + "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." + }, + "x-ms-copy-progress": { + "x-ms-client-name": "CopyProgress", + "type": "string", + "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" + }, + "x-ms-copy-source": { + "x-ms-client-name": "CopySource", + "type": "string", + "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." + }, + "x-ms-copy-status": { + "x-ms-client-name": "CopyStatus", + "description": "State of the copy operation identified by x-ms-copy-id.", + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + }, + "x-ms-lease-duration": { + "x-ms-client-name": "LeaseDuration", + "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "x-ms-lease-state": { + "x-ms-client-name": "LeaseState", + "description": "Lease state of the blob.", + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "x-ms-lease-status": { + "x-ms-client-name": "LeaseStatus", + "description": "The current lease status of the blob.", + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Accept-Ranges": { + "type": "string", + "description": "Indicates that the service supports requests for partial blob content." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + }, + "x-ms-blob-committed-block-count": { + "x-ms-client-name": "BlobCommittedBlockCount", + "type": "integer", + "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." + }, + "x-ms-server-encrypted": { + "x-ms-client-name": "IsServerEncrypted", + "type": "boolean", + "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." + }, + "x-ms-encryption-key-sha256": { + "x-ms-client-name": "EncryptionKeySha256", + "type": "string", + "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." + }, + "x-ms-encryption-scope": { + "x-ms-client-name": "EncryptionScope", + "type": "string", + "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." + }, + "x-ms-blob-content-md5": { + "x-ms-client-name": "BlobContentMD5", + "type": "string", + "format": "byte", + "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" + } + }, + "schema": { + "type": "object", + "format": "file" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "query" + ] + } + ] + }, + "/{containerName}/{blob}?comp=tags": { + "get": { + "tags": [ + "blob" + ], + "operationId": "Blob_GetTags", + "description": "The Get Tags operation enables users to get the tags associated with a blob.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/Snapshot" + }, + { + "$ref": "#/parameters/VersionId" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfBlobModifiedSince" + }, + { + "$ref": "#/parameters/IfBlobUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfBlobMatch" + }, + { + "$ref": "#/parameters/IfBlobNoneMatch" + } + ], + "responses": { + "200": { + "description": "Retrieved blob tags", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/BlobTags" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetTags", + "description": "The Set Tags operation enables users to set tags on a blob.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/VersionId" + }, + { + "$ref": "#/parameters/ContentMD5" + }, + { + "$ref": "#/parameters/ContentCrc64" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/IfTags" + }, + { + "$ref": "#/parameters/LeaseIdOptional" + }, + { + "$ref": "#/parameters/IfBlobModifiedSince" + }, + { + "$ref": "#/parameters/IfBlobUnmodifiedSince" + }, + { + "$ref": "#/parameters/IfBlobMatch" + }, + { + "$ref": "#/parameters/IfBlobNoneMatch" + }, + { + "$ref": "#/parameters/BlobTagsBody" + } + ], + "responses": { + "204": { + "description": "The tags were applied to the blob", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "#/parameters/Blob" + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "tags" + ] + } + ] + } + }, + "definitions": { + "KeyInfo": { + "type": "object", + "required": [ + "Start", + "Expiry" + ], + "description": "Key information", + "properties": { + "Start": { + "description": "The date-time the key is active in ISO 8601 UTC time", + "type": "string" + }, + "Expiry": { + "description": "The date-time the key expires in ISO 8601 UTC time", + "type": "string" + }, + "DelegatedUserTid": { + "description": "The delegated user tenant id in Azure AD", + "type": "string" + } + } + }, + "UserDelegationKey": { + "type": "object", + "required": [ + "SignedOid", + "SignedTid", + "SignedStart", + "SignedExpiry", + "SignedService", + "SignedVersion", + "Value" + ], + "description": "A user delegation key", + "properties": { + "SignedOid": { + "description": "The Azure Active Directory object ID in GUID format.", + "type": "string" + }, + "SignedTid": { + "description": "The Azure Active Directory tenant ID in GUID format", + "type": "string" + }, + "SignedStart": { + "description": "The date-time the key is active", + "type": "string", + "format": "date-time" + }, + "SignedExpiry": { + "description": "The date-time the key expires", + "type": "string", + "format": "date-time" + }, + "SignedService": { + "description": "Abbreviation of the Azure Storage service that accepts the key", + "type": "string" + }, + "SignedVersion": { + "description": "The service version that created the key", + "type": "string" + }, + "SignedDelegatedUserTid": { + "description": "The delegated user tenant id in Azure AD. Return if DelegatedUserTid is specified.", + "type": "string" + }, + "Value": { + "description": "The key as a base64 string", + "type": "string" + } + } + }, + "PublicAccessType": { + "type": "string", + "enum": [ + "container", + "blob" + ], + "x-ms-enum": { + "name": "PublicAccessType", + "modelAsString": true + } + }, + "CopyStatus": { + "type": "string", + "enum": [ + "pending", + "success", + "aborted", + "failed" + ], + "x-ms-enum": { + "name": "CopyStatusType", + "modelAsString": false + } + }, + "LeaseDuration": { + "type": "string", + "enum": [ + "infinite", + "fixed" + ], + "x-ms-enum": { + "name": "LeaseDurationType", + "modelAsString": false + } + }, + "LeaseState": { + "type": "string", + "enum": [ + "available", + "leased", + "expired", + "breaking", + "broken" + ], + "x-ms-enum": { + "name": "LeaseStateType", + "modelAsString": false + } + }, + "LeaseStatus": { + "type": "string", + "enum": [ + "locked", + "unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatusType", + "modelAsString": false + } + }, + "StorageError": { + "type": "object", + "properties": { + "Message": { + "type": "string" + }, + "CopySourceStatusCode": { + "type": "integer", + "format": "int32" + }, + "CopySourceErrorCode": { + "type": "string" + }, + "CopySourceErrorMessage": { + "type": "string" + } + } + }, + "AccessPolicy": { + "type": "object", + "description": "An Access policy", + "properties": { + "Start": { + "description": "the date-time the policy is active", + "type": "string", + "format": "date-time" + }, + "Expiry": { + "description": "the date-time the policy expires", + "type": "string", + "format": "date-time" + }, + "Permission": { + "description": "the permissions for the acl policy", + "type": "string" + } + } + }, + "AccessTier": { + "type": "string", + "enum": [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Premium", + "Cold" + ], + "x-ms-enum": { + "name": "AccessTier", + "modelAsString": true + } + }, + "ArchiveStatus": { + "type": "string", + "enum": [ + "rehydrate-pending-to-hot", + "rehydrate-pending-to-cool", + "rehydrate-pending-to-cold" + ], + "x-ms-enum": { + "name": "ArchiveStatus", + "modelAsString": true + } + }, + "BlobItemInternal": { + "xml": { + "name": "Blob" + }, + "description": "An Azure Storage blob", + "type": "object", + "required": [ + "Name", + "Deleted", + "Snapshot", + "Properties" + ], + "properties": { + "Name": { + "$ref": "#/definitions/BlobName" + }, + "Deleted": { + "type": "boolean" + }, + "Snapshot": { + "type": "string" + }, + "VersionId": { + "type": "string" + }, + "IsCurrentVersion": { + "type": "boolean" + }, + "Properties": { + "$ref": "#/definitions/BlobPropertiesInternal" + }, + "Metadata": { + "$ref": "#/definitions/BlobMetadata" + }, + "BlobTags": { + "$ref": "#/definitions/BlobTags" + }, + "ObjectReplicationMetadata": { + "$ref": "#/definitions/ObjectReplicationMetadata" + }, + "HasVersionsOnly": { + "type": "boolean" + } + } + }, + "BlobPropertiesInternal": { + "xml": { + "name": "Properties" + }, + "description": "Properties of a blob", + "type": "object", + "required": [ + "Etag", + "Last-Modified" + ], + "properties": { + "Creation-Time": { + "type": "string", + "format": "date-time-rfc1123" + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123" + }, + "Etag": { + "type": "string" + }, + "Content-Length": { + "type": "integer", + "format": "int64", + "description": "Size in bytes" + }, + "Content-Type": { + "type": "string" + }, + "Content-Encoding": { + "type": "string" + }, + "Content-Language": { + "type": "string" + }, + "Content-MD5": { + "type": "string", + "format": "byte" + }, + "Content-Disposition": { + "type": "string" + }, + "Cache-Control": { + "type": "string" + }, + "x-ms-blob-sequence-number": { + "x-ms-client-name": "blobSequenceNumber", + "type": "integer", + "format": "int64" + }, + "BlobType": { + "type": "string", + "enum": [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ], + "x-ms-enum": { + "name": "BlobType", + "modelAsString": false + } + }, + "LeaseStatus": { + "$ref": "#/definitions/LeaseStatus" + }, + "LeaseState": { + "$ref": "#/definitions/LeaseState" + }, + "LeaseDuration": { + "$ref": "#/definitions/LeaseDuration" + }, + "CopyId": { + "type": "string" + }, + "CopyStatus": { + "$ref": "#/definitions/CopyStatus" + }, + "CopySource": { + "type": "string" + }, + "CopyProgress": { + "type": "string" + }, + "CopyCompletionTime": { + "type": "string", + "format": "date-time-rfc1123" + }, + "CopyStatusDescription": { + "type": "string" + }, + "ServerEncrypted": { + "type": "boolean" + }, + "IncrementalCopy": { + "type": "boolean" + }, + "DestinationSnapshot": { + "type": "string" + }, + "DeletedTime": { + "type": "string", + "format": "date-time-rfc1123" + }, + "RemainingRetentionDays": { + "type": "integer" + }, + "AccessTier": { + "$ref": "#/definitions/AccessTier" + }, + "AccessTierInferred": { + "type": "boolean" + }, + "ArchiveStatus": { + "$ref": "#/definitions/ArchiveStatus" + }, + "CustomerProvidedKeySha256": { + "type": "string" + }, + "EncryptionScope": { + "type": "string", + "description": "The name of the encryption scope under which the blob is encrypted." + }, + "AccessTierChangeTime": { + "type": "string", + "format": "date-time-rfc1123" + }, + "TagCount": { + "type": "integer" + }, + "Expiry-Time": { + "x-ms-client-name": "ExpiresOn", + "type": "string", + "format": "date-time-rfc1123" + }, + "Sealed": { + "x-ms-client-name": "IsSealed", + "type": "boolean" + }, + "RehydratePriority": { + "$ref": "#/definitions/RehydratePriority" + }, + "LastAccessTime": { + "x-ms-client-name": "LastAccessedOn", + "type": "string", + "format": "date-time-rfc1123" + }, + "ImmutabilityPolicyUntilDate": { + "x-ms-client-name": "ImmutabilityPolicyExpiresOn", + "type": "string", + "format": "date-time-rfc1123" + }, + "ImmutabilityPolicyMode": { + "type": "string", + "enum": [ + "Mutable", + "Unlocked", + "Locked" + ], + "x-ms-enum": { + "name": "BlobImmutabilityPolicyMode", + "modelAsString": false + } + }, + "LegalHold": { + "type": "boolean" + } + } + }, + "ListBlobsFlatSegmentResponse": { + "xml": { + "name": "EnumerationResults" + }, + "description": "An enumeration of blobs", + "type": "object", + "required": [ + "ServiceEndpoint", + "ContainerName", + "Segment" + ], + "properties": { + "ServiceEndpoint": { + "type": "string", + "xml": { + "attribute": true + } + }, + "ContainerName": { + "type": "string", + "xml": { + "attribute": true + } + }, + "Prefix": { + "type": "string" + }, + "Marker": { + "type": "string" + }, + "MaxResults": { + "type": "integer" + }, + "Segment": { + "$ref": "#/definitions/BlobFlatListSegment" + }, + "NextMarker": { + "type": "string" + } + } + }, + "ListBlobsHierarchySegmentResponse": { + "xml": { + "name": "EnumerationResults" + }, + "description": "An enumeration of blobs", + "type": "object", + "required": [ + "ServiceEndpoint", + "ContainerName", + "Segment" + ], + "properties": { + "ServiceEndpoint": { + "type": "string", + "xml": { + "attribute": true + } + }, + "ContainerName": { + "type": "string", + "xml": { + "attribute": true + } + }, + "Prefix": { + "type": "string" + }, + "Marker": { + "type": "string" + }, + "MaxResults": { + "type": "integer" + }, + "Delimiter": { + "type": "string" + }, + "Segment": { + "$ref": "#/definitions/BlobHierarchyListSegment" + }, + "NextMarker": { + "type": "string" + } + } + }, + "BlobFlatListSegment": { + "xml": { + "name": "Blobs" + }, + "required": [ + "BlobItems" + ], + "type": "object", + "properties": { + "BlobItems": { + "type": "array", + "items": { + "$ref": "#/definitions/BlobItemInternal" + } + } + } + }, + "BlobHierarchyListSegment": { + "xml": { + "name": "Blobs" + }, + "type": "object", + "required": [ + "BlobItems" + ], + "properties": { + "BlobPrefixes": { + "type": "array", + "items": { + "$ref": "#/definitions/BlobPrefix" + } + }, + "BlobItems": { + "type": "array", + "items": { + "$ref": "#/definitions/BlobItemInternal" + } + } + } + }, + "BlobPrefix": { + "type": "object", + "required": [ + "Name" + ], + "properties": { + "Name": { + "$ref": "#/definitions/BlobName" + } + } + }, + "BlobName": { + "type": "object", + "properties": { + "Encoded": { + "xml": { + "attribute": true, + "name": "Encoded" + }, + "type": "boolean", + "description": "Indicates if the blob name is encoded." + }, + "content": { + "xml": { + "x-ms-text": true + }, + "type": "string", + "description": "The name of the blob." + } + } + }, + "BlobTag": { + "xml": { + "name": "Tag" + }, + "type": "object", + "required": [ + "Key", + "Value" + ], + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + } + }, + "BlobTags": { + "type": "object", + "xml": { + "name": "Tags" + }, + "description": "Blob tags", + "required": [ + "BlobTagSet" + ], + "properties": { + "BlobTagSet": { + "xml": { + "wrapped": true, + "name": "TagSet" + }, + "type": "array", + "items": { + "$ref": "#/definitions/BlobTag" + } + } + } + }, + "Block": { + "type": "object", + "required": [ + "Name", + "Size" + ], + "description": "Represents a single block in a block blob. It describes the block's ID and size.", + "properties": { + "Name": { + "description": "The base64 encoded block ID.", + "type": "string" + }, + "Size": { + "description": "The block size in bytes.", + "type": "integer", + "format": "int64" + } + } + }, + "BlockList": { + "type": "object", + "properties": { + "CommittedBlocks": { + "xml": { + "wrapped": true + }, + "type": "array", + "items": { + "$ref": "#/definitions/Block" + } + }, + "UncommittedBlocks": { + "xml": { + "wrapped": true + }, + "type": "array", + "items": { + "$ref": "#/definitions/Block" + } + } + } + }, + "BlockLookupList": { + "type": "object", + "properties": { + "Committed": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "Committed" + } + } + }, + "Uncommitted": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "Uncommitted" + } + } + }, + "Latest": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "Latest" + } + } + } + }, + "xml": { + "name": "BlockList" + } + }, + "ContainerItem": { + "xml": { + "name": "Container" + }, + "type": "object", + "required": [ + "Name", + "Properties" + ], + "description": "An Azure Storage container", + "properties": { + "Name": { + "type": "string" + }, + "Deleted": { + "type": "boolean" + }, + "Version": { + "type": "string" + }, + "Properties": { + "$ref": "#/definitions/ContainerProperties" + }, + "Metadata": { + "$ref": "#/definitions/ContainerMetadata" + } + } + }, + "ContainerProperties": { + "type": "object", + "required": [ + "Last-Modified", + "Etag" + ], + "description": "Properties of a container", + "properties": { + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123" + }, + "Etag": { + "type": "string" + }, + "LeaseStatus": { + "$ref": "#/definitions/LeaseStatus" + }, + "LeaseState": { + "$ref": "#/definitions/LeaseState" + }, + "LeaseDuration": { + "$ref": "#/definitions/LeaseDuration" + }, + "PublicAccess": { + "$ref": "#/definitions/PublicAccessType" + }, + "HasImmutabilityPolicy": { + "type": "boolean" + }, + "HasLegalHold": { + "type": "boolean" + }, + "DefaultEncryptionScope": { + "type": "string" + }, + "DenyEncryptionScopeOverride": { + "type": "boolean", + "x-ms-client-name": "PreventEncryptionScopeOverride" + }, + "DeletedTime": { + "type": "string", + "format": "date-time-rfc1123" + }, + "RemainingRetentionDays": { + "type": "integer" + }, + "ImmutableStorageWithVersioningEnabled": { + "x-ms-client-name": "IsImmutableStorageWithVersioningEnabled", + "type": "boolean", + "description": "Indicates if version level worm is enabled on this container." + } + } + }, + "DelimitedTextConfiguration": { + "xml": { + "name": "DelimitedTextConfiguration" + }, + "description": "Groups the settings used for interpreting the blob data if the blob is delimited text formatted.", + "type": "object", + "properties": { + "ColumnSeparator": { + "type": "string", + "description": "The string used to separate columns.", + "xml": { + "name": "ColumnSeparator" + } + }, + "FieldQuote": { + "type": "string", + "description": "The string used to quote a specific field.", + "xml": { + "name": "FieldQuote" + } + }, + "RecordSeparator": { + "type": "string", + "description": "The string used to separate records.", + "xml": { + "name": "RecordSeparator" + } + }, + "EscapeChar": { + "type": "string", + "description": "The string used as an escape character.", + "xml": { + "name": "EscapeChar" + } + }, + "HeadersPresent": { + "type": "boolean", + "description": "Represents whether the data has headers.", + "xml": { + "name": "HasHeaders" + } + } + } + }, + "JsonTextConfiguration": { + "xml": { + "name": "JsonTextConfiguration" + }, + "description": "json text configuration", + "type": "object", + "properties": { + "RecordSeparator": { + "type": "string", + "description": "The string used to separate records.", + "xml": { + "name": "RecordSeparator" + } + } + } + }, + "ArrowConfiguration": { + "xml": { + "name": "ArrowConfiguration" + }, + "description": "Groups the settings used for formatting the response if the response should be Arrow formatted.", + "type": "object", + "required": [ + "Schema" + ], + "properties": { + "Schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ArrowField" + }, + "xml": { + "wrapped": true, + "name": "Schema" + } + } + } + }, + "ParquetConfiguration": { + "xml": { + "name": "ParquetTextConfiguration" + }, + "description": "parquet configuration", + "type": "object" + }, + "ArrowField": { + "xml": { + "name": "Field" + }, + "description": "Groups settings regarding specific field of an arrow schema", + "type": "object", + "required": [ + "Type" + ], + "properties": { + "Type": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Precision": { + "type": "integer" + }, + "Scale": { + "type": "integer" + } + } + }, + "ListContainersSegmentResponse": { + "xml": { + "name": "EnumerationResults" + }, + "description": "An enumeration of containers", + "type": "object", + "required": [ + "ServiceEndpoint", + "ContainerItems" + ], + "properties": { + "ServiceEndpoint": { + "type": "string", + "xml": { + "attribute": true + } + }, + "Prefix": { + "type": "string" + }, + "Marker": { + "type": "string" + }, + "MaxResults": { + "type": "integer" + }, + "ContainerItems": { + "xml": { + "wrapped": true, + "name": "Containers" + }, + "type": "array", + "items": { + "$ref": "#/definitions/ContainerItem" + } + }, + "NextMarker": { + "type": "string" + } + } + }, + "CorsRule": { + "description": "CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain", + "type": "object", + "required": [ + "AllowedOrigins", + "AllowedMethods", + "AllowedHeaders", + "ExposedHeaders", + "MaxAgeInSeconds" + ], + "properties": { + "AllowedOrigins": { + "description": "The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.", + "type": "string" + }, + "AllowedMethods": { + "description": "The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)", + "type": "string" + }, + "AllowedHeaders": { + "description": "the request headers that the origin domain may specify on the CORS request.", + "type": "string" + }, + "ExposedHeaders": { + "description": "The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer", + "type": "string" + }, + "MaxAgeInSeconds": { + "description": "The maximum amount time that a browser should cache the preflight OPTIONS request.", + "type": "integer", + "minimum": 0 + } + } + }, + "ErrorCode": { + "description": "Error codes returned by the service", + "type": "string", + "enum": [ + "AccountAlreadyExists", + "AccountBeingCreated", + "AccountIsDisabled", + "AuthenticationFailed", + "AuthorizationFailure", + "ConditionHeadersNotSupported", + "ConditionNotMet", + "EmptyMetadataKey", + "InsufficientAccountPermissions", + "InternalError", + "InvalidAuthenticationInfo", + "InvalidHeaderValue", + "InvalidHttpVerb", + "InvalidInput", + "InvalidMd5", + "InvalidMetadata", + "InvalidQueryParameterValue", + "InvalidRange", + "InvalidResourceName", + "InvalidUri", + "InvalidXmlDocument", + "InvalidXmlNodeValue", + "Md5Mismatch", + "MetadataTooLarge", + "MissingContentLengthHeader", + "MissingRequiredQueryParameter", + "MissingRequiredHeader", + "MissingRequiredXmlNode", + "MultipleConditionHeadersNotSupported", + "OperationTimedOut", + "OutOfRangeInput", + "OutOfRangeQueryParameterValue", + "RequestBodyTooLarge", + "ResourceTypeMismatch", + "RequestUrlFailedToParse", + "ResourceAlreadyExists", + "ResourceNotFound", + "ServerBusy", + "UnsupportedHeader", + "UnsupportedXmlNode", + "UnsupportedQueryParameter", + "UnsupportedHttpVerb", + "AppendPositionConditionNotMet", + "BlobAlreadyExists", + "BlobImmutableDueToPolicy", + "BlobNotFound", + "BlobOverwritten", + "BlobTierInadequateForContentLength", + "BlobUsesCustomerSpecifiedEncryption", + "BlockCountExceedsLimit", + "BlockListTooLong", + "CannotChangeToLowerTier", + "CannotVerifyCopySource", + "ContainerAlreadyExists", + "ContainerBeingDeleted", + "ContainerDisabled", + "ContainerNotFound", + "ContentLengthLargerThanTierLimit", + "CopyAcrossAccountsNotSupported", + "CopyIdMismatch", + "FeatureVersionMismatch", + "IncrementalCopyBlobMismatch", + "IncrementalCopyOfEarlierSnapshotNotAllowed", + "IncrementalCopySourceMustBeSnapshot", + "InfiniteLeaseDurationRequired", + "InvalidBlobOrBlock", + "InvalidBlobTier", + "InvalidBlobType", + "InvalidBlockId", + "InvalidBlockList", + "InvalidOperation", + "InvalidPageRange", + "InvalidSourceBlobType", + "InvalidSourceBlobUrl", + "InvalidVersionForPageBlobOperation", + "LeaseAlreadyPresent", + "LeaseAlreadyBroken", + "LeaseIdMismatchWithBlobOperation", + "LeaseIdMismatchWithContainerOperation", + "LeaseIdMismatchWithLeaseOperation", + "LeaseIdMissing", + "LeaseIsBreakingAndCannotBeAcquired", + "LeaseIsBreakingAndCannotBeChanged", + "LeaseIsBrokenAndCannotBeRenewed", + "LeaseLost", + "LeaseNotPresentWithBlobOperation", + "LeaseNotPresentWithContainerOperation", + "LeaseNotPresentWithLeaseOperation", + "MaxBlobSizeConditionNotMet", + "NoAuthenticationInformation", + "NoPendingCopyOperation", + "OperationNotAllowedOnIncrementalCopyBlob", + "PendingCopyOperation", + "PreviousSnapshotCannotBeNewer", + "PreviousSnapshotNotFound", + "PreviousSnapshotOperationNotSupported", + "SequenceNumberConditionNotMet", + "SequenceNumberIncrementTooLarge", + "SnapshotCountExceeded", + "SnapshotOperationRateExceeded", + "SnapshotsPresent", + "SourceConditionNotMet", + "SystemInUse", + "TargetConditionNotMet", + "UnauthorizedBlobOverwrite", + "BlobBeingRehydrated", + "BlobArchived", + "BlobNotArchived", + "AuthorizationSourceIPMismatch", + "AuthorizationProtocolMismatch", + "AuthorizationPermissionMismatch", + "AuthorizationServiceMismatch", + "AuthorizationResourceTypeMismatch", + "BlobAccessTierNotSupportedForAccountType" + ], + "x-ms-enum": { + "name": "StorageErrorCode", + "modelAsString": true + } + }, + "FilterBlobItem": { + "xml": { + "name": "Blob" + }, + "description": "Blob info from a Filter Blobs API call", + "type": "object", + "required": [ + "Name", + "ContainerName" + ], + "properties": { + "Name": { + "type": "string" + }, + "ContainerName": { + "type": "string" + }, + "Tags": { + "$ref": "#/definitions/BlobTags" + }, + "VersionId": { + "type": "string" + }, + "IsCurrentVersion": { + "type": "boolean" + } + } + }, + "FilterBlobSegment": { + "description": "The result of a Filter Blobs API call", + "xml": { + "name": "EnumerationResults" + }, + "type": "object", + "required": [ + "ServiceEndpoint", + "Where", + "Blobs" + ], + "properties": { + "ServiceEndpoint": { + "type": "string", + "xml": { + "attribute": true + } + }, + "Where": { + "type": "string" + }, + "Blobs": { + "xml": { + "name": "Blobs", + "wrapped": true + }, + "type": "array", + "items": { + "$ref": "#/definitions/FilterBlobItem" + } + }, + "NextMarker": { + "type": "string" + } + } + }, + "GeoReplication": { + "description": "Geo-Replication information for the Secondary Storage Service", + "type": "object", + "required": [ + "Status", + "LastSyncTime" + ], + "properties": { + "Status": { + "description": "The status of the secondary location", + "type": "string", + "enum": [ + "live", + "bootstrap", + "unavailable" + ], + "x-ms-enum": { + "name": "GeoReplicationStatusType", + "modelAsString": true + } + }, + "LastSyncTime": { + "description": "A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads.", + "type": "string", + "format": "date-time-rfc1123" + } + } + }, + "Logging": { + "description": "Azure Analytics Logging settings.", + "type": "object", + "required": [ + "Version", + "Delete", + "Read", + "Write", + "RetentionPolicy" + ], + "properties": { + "Version": { + "description": "The version of Storage Analytics to configure.", + "type": "string" + }, + "Delete": { + "description": "Indicates whether all delete requests should be logged.", + "type": "boolean" + }, + "Read": { + "description": "Indicates whether all read requests should be logged.", + "type": "boolean" + }, + "Write": { + "description": "Indicates whether all write requests should be logged.", + "type": "boolean" + }, + "RetentionPolicy": { + "$ref": "#/definitions/RetentionPolicy" + } + } + }, + "ContainerMetadata": { + "type": "object", + "xml": { + "name": "Metadata" + }, + "additionalProperties": { + "type": "string" + } + }, + "BlobMetadata": { + "type": "object", + "xml": { + "name": "Metadata" + }, + "properties": { + "Encrypted": { + "type": "string", + "xml": { + "attribute": true + } + } + }, + "additionalProperties": { + "type": "string" + } + }, + "ObjectReplicationMetadata": { + "type": "object", + "xml": { + "name": "OrMetadata" + }, + "additionalProperties": { + "type": "string" + } + }, + "Metrics": { + "description": "a summary of request statistics grouped by API in hour or minute aggregates for blobs", + "required": [ + "Enabled" + ], + "properties": { + "Version": { + "description": "The version of Storage Analytics to configure.", + "type": "string" + }, + "Enabled": { + "description": "Indicates whether metrics are enabled for the Blob service.", + "type": "boolean" + }, + "IncludeAPIs": { + "description": "Indicates whether metrics should generate summary statistics for called API operations.", + "type": "boolean" + }, + "RetentionPolicy": { + "$ref": "#/definitions/RetentionPolicy" + } + } + }, + "PageList": { + "description": "the list of pages", + "type": "object", + "properties": { + "PageRange": { + "type": "array", + "items": { + "$ref": "#/definitions/PageRange" + } + }, + "ClearRange": { + "type": "array", + "items": { + "$ref": "#/definitions/ClearRange" + } + }, + "NextMarker": { + "type": "string" + } + } + }, + "PageRange": { + "type": "object", + "required": [ + "Start", + "End" + ], + "properties": { + "Start": { + "type": "integer", + "format": "int64", + "xml": { + "name": "Start" + } + }, + "End": { + "type": "integer", + "format": "int64", + "xml": { + "name": "End" + } + } + }, + "xml": { + "name": "PageRange" + } + }, + "ClearRange": { + "type": "object", + "required": [ + "Start", + "End" + ], + "properties": { + "Start": { + "type": "integer", + "format": "int64", + "xml": { + "name": "Start" + } + }, + "End": { + "type": "integer", + "format": "int64", + "xml": { + "name": "End" + } + } + }, + "xml": { + "name": "ClearRange" + } + }, + "QueryRequest": { + "description": "Groups the set of query request settings.", + "type": "object", + "required": [ + "QueryType", + "Expression" + ], + "properties": { + "QueryType": { + "type": "string", + "description": "Required. The type of the provided query expression.", + "xml": { + "name": "QueryType" + }, + "enum": [ + "SQL" + ] + }, + "Expression": { + "type": "string", + "description": "The query expression in SQL. The maximum size of the query expression is 256KiB.", + "xml": { + "name": "Expression" + } + }, + "InputSerialization": { + "$ref": "#/definitions/QuerySerialization", + "xml": { + "name": "InputSerialization" + } + }, + "OutputSerialization": { + "$ref": "#/definitions/QuerySerialization", + "xml": { + "name": "OutputSerialization" + } + } + }, + "xml": { + "name": "QueryRequest" + } + }, + "QueryFormat": { + "type": "object", + "required": [ + "Type" + ], + "properties": { + "Type": { + "$ref": "#/definitions/QueryType" + }, + "DelimitedTextConfiguration": { + "$ref": "#/definitions/DelimitedTextConfiguration" + }, + "JsonTextConfiguration": { + "$ref": "#/definitions/JsonTextConfiguration" + }, + "ArrowConfiguration": { + "$ref": "#/definitions/ArrowConfiguration" + }, + "ParquetTextConfiguration": { + "$ref": "#/definitions/ParquetConfiguration" + } + } + }, + "QuerySerialization": { + "type": "object", + "required": [ + "Format" + ], + "properties": { + "Format": { + "$ref": "#/definitions/QueryFormat", + "xml": { + "name": "Format" + } + } + } + }, + "QueryType": { + "type": "string", + "description": "The quick query format type.", + "enum": [ + "delimited", + "json", + "arrow", + "parquet" + ], + "x-ms-enum": { + "name": "QueryFormatType", + "modelAsString": false + }, + "xml": { + "name": "Type" + } + }, + "RehydratePriority": { + "description": "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard.", + "type": "string", + "enum": [ + "High", + "Standard" + ], + "x-ms-enum": { + "name": "RehydratePriority", + "modelAsString": true + }, + "xml": { + "name": "RehydratePriority" + } + }, + "RetentionPolicy": { + "description": "the retention policy which determines how long the associated data should persist", + "type": "object", + "required": [ + "Enabled" + ], + "properties": { + "Enabled": { + "description": "Indicates whether a retention policy is enabled for the storage service", + "type": "boolean" + }, + "Days": { + "description": "Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted", + "type": "integer", + "minimum": 1 + }, + "AllowPermanentDelete": { + "description": "Indicates whether permanent delete is allowed on this storage account.", + "type": "boolean" + } + } + }, + "SignedIdentifier": { + "xml": { + "name": "SignedIdentifier" + }, + "description": "signed identifier", + "type": "object", + "required": [ + "Id", + "AccessPolicy" + ], + "properties": { + "Id": { + "type": "string", + "description": "a unique id" + }, + "AccessPolicy": { + "$ref": "#/definitions/AccessPolicy" + } + } + }, + "SignedIdentifiers": { + "description": "a collection of signed identifiers", + "type": "array", + "items": { + "$ref": "#/definitions/SignedIdentifier" + }, + "xml": { + "wrapped": true, + "name": "SignedIdentifiers" + } + }, + "StaticWebsite": { + "description": "The properties that enable an account to host a static website", + "type": "object", + "required": [ + "Enabled" + ], + "properties": { + "Enabled": { + "description": "Indicates whether this account is hosting a static website", + "type": "boolean" + }, + "IndexDocument": { + "description": "The default name of the index page under each directory", + "type": "string" + }, + "ErrorDocument404Path": { + "description": "The absolute path of the custom 404 page", + "type": "string" + }, + "DefaultIndexDocumentPath": { + "description": "Absolute path of the default index page", + "type": "string" + } + } + }, + "StorageServiceProperties": { + "description": "Storage Service Properties.", + "type": "object", + "properties": { + "Logging": { + "$ref": "#/definitions/Logging" + }, + "HourMetrics": { + "$ref": "#/definitions/Metrics" + }, + "MinuteMetrics": { + "$ref": "#/definitions/Metrics" + }, + "Cors": { + "description": "The set of CORS rules.", + "type": "array", + "items": { + "$ref": "#/definitions/CorsRule" + }, + "xml": { + "wrapped": true + } + }, + "DefaultServiceVersion": { + "description": "The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions", + "type": "string" + }, + "DeleteRetentionPolicy": { + "$ref": "#/definitions/RetentionPolicy" + }, + "StaticWebsite": { + "$ref": "#/definitions/StaticWebsite" + } + } + }, + "StorageServiceStats": { + "description": "Stats for the storage service.", + "type": "object", + "properties": { + "GeoReplication": { + "$ref": "#/definitions/GeoReplication" + } + } + } + }, + "parameters": { + "Url": { + "name": "url", + "description": "The URL of the service account, container, or blob that is the target of the desired operation.", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + "AccessTierIfModifiedSince": { + "name": "x-ms-access-tier-if-modified-since", + "x-ms-client-name": "accessTierIfModifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "description": "Specify this header value to operate only on a blob if the access-tier has been modified since the specified date/time." + }, + "AccessTierIfUnmodifiedSince": { + "name": "x-ms-access-tier-if-unmodified-since", + "x-ms-client-name": "accessTierIfUnmodifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "description": "Specify this header value to operate only on a blob if the access-tier has not been modified since the specified date/time." + }, + "ApiVersionParameter": { + "name": "x-ms-version", + "x-ms-parameter-location": "client", + "x-ms-client-name": "version", + "in": "header", + "required": true, + "type": "string", + "description": "Specifies the version of the operation to use for this request." + }, + "Blob": { + "name": "blob", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+)*(?:\\.[a-zA-Z0-9]+){0,1}$", + "minLength": 1, + "maxLength": 1024, + "x-ms-parameter-location": "method", + "description": "The blob name." + }, + "BlobCacheControl": { + "name": "x-ms-blob-cache-control", + "x-ms-client-name": "blobCacheControl", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-HTTP-headers" + }, + "description": "Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request." + }, + "BlobConditionAppendPos": { + "name": "x-ms-blob-condition-appendpos", + "x-ms-client-name": "appendPosition", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "append-position-access-conditions" + }, + "description": "Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed)." + }, + "BlobConditionMaxSize": { + "name": "x-ms-blob-condition-maxsize", + "x-ms-client-name": "maxSize", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "append-position-access-conditions" + }, + "description": "Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed)." + }, + "BlobPublicAccess": { + "name": "x-ms-blob-public-access", + "x-ms-client-name": "access", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "description": "Specifies whether data in the container may be accessed publicly and the level of access", + "type": "string", + "enum": [ + "container", + "blob" + ], + "x-ms-enum": { + "name": "PublicAccessType", + "modelAsString": true + } + }, + "BlobTagsBody": { + "name": "Tags", + "in": "body", + "schema": { + "$ref": "#/definitions/BlobTags" + }, + "x-ms-parameter-location": "method", + "description": "Blob tags" + }, + "BlobTagsHeader": { + "name": "x-ms-tags", + "x-ms-client-name": "BlobTagsString", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Optional. Used to set blob tags in various blob operations." + }, + "AccessTierRequired": { + "name": "x-ms-access-tier", + "x-ms-client-name": "tier", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold" + ], + "x-ms-enum": { + "name": "AccessTier", + "modelAsString": true + }, + "x-ms-parameter-location": "method", + "description": "Indicates the tier to be set on the blob." + }, + "AccessTierOptional": { + "name": "x-ms-access-tier", + "x-ms-client-name": "tier", + "in": "header", + "required": false, + "type": "string", + "enum": [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold" + ], + "x-ms-enum": { + "name": "AccessTier", + "modelAsString": true + }, + "x-ms-parameter-location": "method", + "description": "Optional. Indicates the tier to be set on the blob." + }, + "PremiumPageBlobAccessTierOptional": { + "name": "x-ms-access-tier", + "x-ms-client-name": "tier", + "in": "header", + "required": false, + "type": "string", + "enum": [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80" + ], + "x-ms-enum": { + "name": "PremiumPageBlobAccessTier", + "modelAsString": true + }, + "x-ms-parameter-location": "method", + "description": "Optional. Indicates the tier to be set on the page blob." + }, + "RehydratePriority": { + "name": "x-ms-rehydrate-priority", + "x-ms-client-name": "rehydratePriority", + "in": "header", + "required": false, + "type": "string", + "enum": [ + "High", + "Standard" + ], + "x-ms-enum": { + "name": "RehydratePriority", + "modelAsString": true + }, + "x-ms-parameter-location": "method", + "description": "Optional: Indicates the priority with which to rehydrate an archived blob." + }, + "BlobContentDisposition": { + "name": "x-ms-blob-content-disposition", + "x-ms-client-name": "blobContentDisposition", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-HTTP-headers" + }, + "description": "Optional. Sets the blob's Content-Disposition header." + }, + "BlobContentEncoding": { + "name": "x-ms-blob-content-encoding", + "x-ms-client-name": "blobContentEncoding", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-HTTP-headers" + }, + "description": "Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request." + }, + "BlobContentLanguage": { + "name": "x-ms-blob-content-language", + "x-ms-client-name": "blobContentLanguage", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-HTTP-headers" + }, + "description": "Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request." + }, + "BlobContentLengthOptional": { + "name": "x-ms-blob-content-length", + "x-ms-client-name": "blobContentLength", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "description": "This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary." + }, + "BlobContentLengthRequired": { + "name": "x-ms-blob-content-length", + "x-ms-client-name": "blobContentLength", + "in": "header", + "required": true, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "description": "This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary." + }, + "BlobContentMD5": { + "name": "x-ms-blob-content-md5", + "x-ms-client-name": "blobContentMD5", + "in": "header", + "required": false, + "type": "string", + "format": "byte", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-HTTP-headers" + }, + "description": "Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded." + }, + "BlobContentType": { + "name": "x-ms-blob-content-type", + "x-ms-client-name": "blobContentType", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-HTTP-headers" + }, + "description": "Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request." + }, + "BlobDeleteType": { + "name": "deletetype", + "x-ms-client-name": "blobDeleteType", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "Permanent" + ], + "x-ms-enum": { + "name": "BlobDeleteType", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Optional. Only possible value is 'permanent', which specifies to permanently delete a blob if blob soft delete is enabled." + }, + "BlobExpiryOptions": { + "name": "x-ms-expiry-option", + "x-ms-client-name": "ExpiryOptions", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "NeverExpire", + "RelativeToCreation", + "RelativeToNow", + "Absolute" + ], + "x-ms-enum": { + "name": "BlobExpiryOptions", + "modelAsString": true + }, + "x-ms-parameter-location": "method", + "description": "Required. Indicates mode of the expiry time" + }, + "BlobExpiryTime": { + "name": "x-ms-expiry-time", + "x-ms-client-name": "ExpiresOn", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The time to set the blob to expiry" + }, + "BlobSequenceNumber": { + "name": "x-ms-blob-sequence-number", + "x-ms-client-name": "blobSequenceNumber", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "default": 0, + "x-ms-parameter-location": "method", + "description": "Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1." + }, + "BlockId": { + "name": "blockid", + "x-ms-client-name": "blockId", + "in": "query", + "type": "string", + "required": true, + "x-ms-parameter-location": "method", + "description": "A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block." + }, + "BlockListType": { + "name": "blocklisttype", + "x-ms-client-name": "listType", + "in": "query", + "required": true, + "default": "committed", + "x-ms-parameter-location": "method", + "description": "Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together.", + "type": "string", + "enum": [ + "committed", + "uncommitted", + "all" + ], + "x-ms-enum": { + "name": "BlockListType", + "modelAsString": false + } + }, + "Body": { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "format": "file" + }, + "x-ms-parameter-location": "method", + "description": "Initial data" + }, + "ContainerAcl": { + "name": "containerAcl", + "in": "body", + "schema": { + "$ref": "#/definitions/SignedIdentifiers" + }, + "x-ms-parameter-location": "method", + "description": "the acls for the container" + }, + "CopyId": { + "name": "copyid", + "x-ms-client-name": "copyId", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation." + }, + "ClientRequestId": { + "name": "x-ms-client-request-id", + "x-ms-client-name": "requestId", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "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." + }, + "ContainerName": { + "name": "containerName", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The container name." + }, + "ContentCrc64": { + "name": "x-ms-content-crc64", + "x-ms-client-name": "transactionalContentCrc64", + "in": "header", + "required": false, + "type": "string", + "format": "byte", + "x-ms-parameter-location": "method", + "description": "Specify the transactional crc64 for the body, to be validated by the service." + }, + "ContentLength": { + "name": "Content-Length", + "in": "header", + "required": true, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "description": "The length of the request." + }, + "ContentMD5": { + "name": "Content-MD5", + "x-ms-client-name": "transactionalContentMD5", + "in": "header", + "required": false, + "type": "string", + "format": "byte", + "x-ms-parameter-location": "method", + "description": "Specify the transactional md5 for the body, to be validated by the service." + }, + "CopySource": { + "name": "x-ms-copy-source", + "x-ms-client-name": "copySource", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature." + }, + "CopySourceAuthorization": { + "name": "x-ms-copy-source-authorization", + "x-ms-client-name": "copySourceAuthorization", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source." + }, + "CopySourceBlobProperties": { + "name": "x-ms-copy-source-blob-properties", + "x-ms-client-name": "copySourceBlobProperties", + "in": "header", + "required": false, + "type": "boolean", + "x-ms-parameter-location": "method", + "description": "Optional, default is true. Indicates if properties from the source blob should be copied." + }, + "CopySourceTags": { + "name": "x-ms-copy-source-tag-option", + "x-ms-client-name": "copySourceTags", + "in": "header", + "required": false, + "type": "string", + "enum": [ + "REPLACE", + "COPY" + ], + "x-ms-enum": { + "name": "BlobCopySourceTags", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by x-ms-tags." + }, + "DeleteSnapshots": { + "name": "x-ms-delete-snapshots", + "x-ms-client-name": "deleteSnapshots", + "description": "Required if the blob has associated snapshots. Specify one of the following two options: include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob itself", + "x-ms-parameter-location": "method", + "in": "header", + "required": false, + "type": "string", + "enum": [ + "include", + "only" + ], + "x-ms-enum": { + "name": "DeleteSnapshotsOptionType", + "modelAsString": false + } + }, + "Delimiter": { + "name": "delimiter", + "description": "When the request includes this parameter, the operation returns a BlobPrefix element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string.", + "type": "string", + "x-ms-parameter-location": "method", + "in": "query", + "required": true + }, + "EncryptionKey": { + "name": "x-ms-encryption-key", + "x-ms-client-name": "encryptionKey", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "cpk-info" + }, + "description": "Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, encryption is performed with the root account encryption key. For more information, see Encryption at Rest for Azure Storage Services." + }, + "EncryptionKeySha256": { + "name": "x-ms-encryption-key-sha256", + "x-ms-client-name": "encryptionKeySha256", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "cpk-info" + }, + "description": "The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key header is provided." + }, + "EncryptionAlgorithm": { + "name": "x-ms-encryption-algorithm", + "x-ms-client-name": "encryptionAlgorithm", + "type": "string", + "in": "header", + "required": false, + "enum": [ + "AES256" + ], + "x-ms-enum": { + "name": "EncryptionAlgorithmType", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "cpk-info" + }, + "description": "The algorithm used to produce the encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided if the x-ms-encryption-key header is provided." + }, + "EncryptionScope": { + "name": "x-ms-encryption-scope", + "x-ms-client-name": "encryptionScope", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "cpk-scope-info" + }, + "description": "Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services." + }, + "DefaultEncryptionScope": { + "name": "x-ms-default-encryption-scope", + "x-ms-client-name": "DefaultEncryptionScope", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "container-cpk-scope-info" + }, + "description": "Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use for all future writes." + }, + "DeletedContainerName": { + "name": "x-ms-deleted-container-name", + "x-ms-client-name": "DeletedContainerName", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "description": "Optional. Version 2019-12-12 and later. Specifies the name of the deleted container to restore." + }, + "DeletedContainerVersion": { + "name": "x-ms-deleted-container-version", + "x-ms-client-name": "DeletedContainerVersion", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "description": "Optional. Version 2019-12-12 and later. Specifies the version of the deleted container to restore." + }, + "DenyEncryptionScopeOverride": { + "name": "x-ms-deny-encryption-scope-override", + "x-ms-client-name": "PreventEncryptionScopeOverride", + "type": "boolean", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "container-cpk-scope-info" + }, + "description": "Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption scope than the scope set on the container." + }, + "FileRequestIntent": { + "name": "x-ms-file-request-intent", + "x-ms-client-name": "fileRequestIntent", + "in": "header", + "description": "Valid value is backup", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "enum": [ + "backup" + ], + "x-ms-enum": { + "name": "FileShareTokenIntent", + "modelAsString": true + } + }, + "FilterBlobsInclude": { + "name": "include", + "in": "query", + "required": false, + "type": "array", + "collectionFormat": "csv", + "items": { + "type": "string", + "enum": [ + "none", + "versions" + ], + "x-ms-enum": { + "name": "FilterBlobsIncludeItem", + "modelAsString": false + } + }, + "x-ms-parameter-location": "method", + "description": "Include this parameter to specify one or more datasets to include in the response." + }, + "FilterBlobsWhere": { + "name": "where", + "in": "query", + "required": false, + "type": "string", + "description": "Filters the results to return only to return only blobs whose tags match the specified expression.", + "x-ms-parameter-location": "method" + }, + "GetRangeContentMD5": { + "name": "x-ms-range-get-content-md5", + "x-ms-client-name": "rangeGetContentMD5", + "in": "header", + "required": false, + "type": "boolean", + "x-ms-parameter-location": "method", + "description": "When set to true and specified together with the Range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size." + }, + "GetRangeContentCRC64": { + "name": "x-ms-range-get-content-crc64", + "x-ms-client-name": "rangeGetContentCRC64", + "in": "header", + "required": false, + "type": "boolean", + "x-ms-parameter-location": "method", + "description": "When set to true and specified together with the Range, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 MB in size." + }, + "StructuredBodyGet": { + "name": "x-ms-structured-body", + "x-ms-client-name": "StructuredBodyType", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Specifies the response content should be returned as a structured message and specifies the message schema version and properties." + }, + "StructuredBodyPut": { + "name": "x-ms-structured-body", + "x-ms-client-name": "StructuredBodyType", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Required if the request body is a structured message. Specifies the message schema version and properties." + }, + "StructuredContentLength": { + "name": "x-ms-structured-content-length", + "x-ms-client-name": "StructuredContentLength", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "description": "Required if the request body is a structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller than Content-Length." + }, + "IfMatch": { + "name": "If-Match", + "x-ms-client-name": "ifMatch", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "modified-access-conditions" + }, + "description": "Specify an ETag value to operate only on blobs with a matching value." + }, + "IfModifiedSince": { + "name": "If-Modified-Since", + "x-ms-client-name": "ifModifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "modified-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has been modified since the specified date/time." + }, + "IfNoneMatch": { + "name": "If-None-Match", + "x-ms-client-name": "ifNoneMatch", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "modified-access-conditions" + }, + "description": "Specify an ETag value to operate only on blobs without a matching value." + }, + "IfUnmodifiedSince": { + "name": "If-Unmodified-Since", + "x-ms-client-name": "ifUnmodifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "modified-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has not been modified since the specified date/time." + }, + "IfSequenceNumberEqualTo": { + "name": "x-ms-if-sequence-number-eq", + "x-ms-client-name": "ifSequenceNumberEqualTo", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "sequence-number-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has the specified sequence number." + }, + "IfSequenceNumberLessThan": { + "name": "x-ms-if-sequence-number-lt", + "x-ms-client-name": "ifSequenceNumberLessThan", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "sequence-number-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has a sequence number less than the specified." + }, + "IfSequenceNumberLessThanOrEqualTo": { + "name": "x-ms-if-sequence-number-le", + "x-ms-client-name": "ifSequenceNumberLessThanOrEqualTo", + "in": "header", + "required": false, + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "sequence-number-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified." + }, + "IfTags": { + "name": "x-ms-if-tags", + "x-ms-client-name": "ifTags", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "modified-access-conditions" + }, + "description": "Specify a SQL where clause on blob tags to operate only on blobs with a matching value." + }, + "IfBlobMatch": { + "name": "x-ms-blob-if-match", + "x-ms-client-name": "ifMatch", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-modified-access-conditions" + }, + "description": "Specify an ETag value to operate only on blobs with a matching value." + }, + "IfBlobModifiedSince": { + "name": "x-ms-blob-if-modified-since", + "x-ms-client-name": "ifModifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-modified-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has been modified since the specified date/time." + }, + "IfBlobNoneMatch": { + "name": "x-ms-blob-if-none-match", + "x-ms-client-name": "ifNoneMatch", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-modified-access-conditions" + }, + "description": "Specify an ETag value to operate only on blobs without a matching value." + }, + "IfBlobUnmodifiedSince": { + "name": "x-ms-blob-if-unmodified-since", + "x-ms-client-name": "ifUnmodifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "blob-modified-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has not been modified since the specified date/time." + }, + "ImmutabilityPolicyExpiry": { + "name": "x-ms-immutability-policy-until-date", + "x-ms-client-name": "immutabilityPolicyExpiry", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "description": "Specifies the date time when the blobs immutability policy is set to expire." + }, + "ImmutabilityPolicyMode": { + "name": "x-ms-immutability-policy-mode", + "x-ms-client-name": "immutabilityPolicyMode", + "in": "header", + "required": false, + "type": "string", + "enum": [ + "Unlocked", + "Locked" + ], + "x-ms-enum": { + "name": "BlobImmutabilityPolicyMode", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "description": "Specifies the immutability policy mode to set on the blob." + }, + "KeyInfo": { + "description": "Key information", + "name": "KeyInfo", + "in": "body", + "x-ms-parameter-location": "method", + "required": true, + "schema": { + "$ref": "#/definitions/KeyInfo" + } + }, + "ListBlobsInclude": { + "name": "include", + "in": "query", + "required": false, + "type": "array", + "collectionFormat": "csv", + "items": { + "type": "string", + "enum": [ + "copy", + "deleted", + "metadata", + "snapshots", + "uncommittedblobs", + "versions", + "tags", + "immutabilitypolicy", + "legalhold", + "deletedwithversions" + ], + "x-ms-enum": { + "name": "ListBlobsIncludeItem", + "modelAsString": false + } + }, + "x-ms-parameter-location": "method", + "description": "Include this parameter to specify one or more datasets to include in the response." + }, + "ListBlobsStartFrom": { + "name": "startFrom", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Specifies the relative path to list paths from. For non-recursive list, only one entity level is supported; For recursive list, multiple entity levels are supported. (Inclusive)" + }, + "ListBlobsEndBefore": { + "name": "endBefore", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Specifies the relative path to end before list paths. (Exclusive)" + }, + "ListContainersInclude": { + "name": "include", + "in": "query", + "required": false, + "type": "array", + "collectionFormat": "csv", + "items": { + "type": "string", + "enum": [ + "metadata", + "deleted", + "system" + ], + "x-ms-enum": { + "name": "ListContainersIncludeType", + "modelAsString": false + } + }, + "x-ms-parameter-location": "method", + "description": "Include this parameter to specify that the container's metadata be returned as part of the response body." + }, + "LeaseBreakPeriod": { + "name": "x-ms-lease-break-period", + "x-ms-client-name": "breakPeriod", + "in": "header", + "required": false, + "type": "integer", + "x-ms-parameter-location": "method", + "description": "For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately." + }, + "LeaseDuration": { + "name": "x-ms-lease-duration", + "x-ms-client-name": "duration", + "in": "header", + "required": false, + "type": "integer", + "x-ms-parameter-location": "method", + "description": "Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change." + }, + "LeaseIdOptional": { + "name": "x-ms-lease-id", + "x-ms-client-name": "leaseId", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "lease-access-conditions" + }, + "description": "If specified, the operation only succeeds if the resource's lease is active and matches this ID." + }, + "LeaseIdRequired": { + "name": "x-ms-lease-id", + "x-ms-client-name": "leaseId", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Specifies the current lease ID on the resource." + }, + "LegalHoldOptional": { + "name": "x-ms-legal-hold", + "x-ms-client-name": "legalHold", + "in": "header", + "required": false, + "type": "boolean", + "x-ms-parameter-location": "method", + "description": "Specified if a legal hold should be set on the blob." + }, + "LegalHoldRequired": { + "name": "x-ms-legal-hold", + "x-ms-client-name": "legalHold", + "in": "header", + "required": true, + "type": "boolean", + "x-ms-parameter-location": "method", + "description": "Specified if a legal hold should be set on the blob." + }, + "Marker": { + "name": "marker", + "in": "query", + "required": false, + "type": "string", + "description": "A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client.", + "x-ms-parameter-location": "method" + }, + "MaxResults": { + "name": "maxresults", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "x-ms-parameter-location": "method", + "description": "Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder of the results. For this reason, it is possible that the service will return fewer results than specified by maxresults, or than the default of 5000." + }, + "Metadata": { + "name": "x-ms-meta", + "x-ms-client-name": "metadata", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.", + "x-ms-header-collection-prefix": "x-ms-meta-" + }, + "MultipartContentType": { + "name": "Content-Type", + "x-ms-client-name": "multipartContentType", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Required. The value of this header must be multipart/mixed with a batch boundary. Example header value: multipart/mixed; boundary=batch_" + }, + "ObjectReplicationPolicyId": { + "name": "x-ms-or-policy-id", + "x-ms-client-name": "objectReplicationPolicyId", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." + }, + "ObjectReplicationRules": { + "name": "x-ms-or", + "x-ms-client-name": "ObjectReplicationRules", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed).", + "x-ms-header-collection-prefix": "x-ms-or-" + }, + "Prefix": { + "name": "prefix", + "in": "query", + "required": false, + "type": "string", + "description": "Filters the results to return only containers whose name begins with the specified prefix.", + "x-ms-parameter-location": "method" + }, + "PrevSnapshot": { + "name": "prevsnapshot", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016." + }, + "PrevSnapshotUrl": { + "name": "x-ms-previous-snapshot-url", + "x-ms-client-name": "prevSnapshotUrl", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Optional. This header is only supported in service versions 2019-04-19 and after and specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were changed between the target blob and its previous snapshot." + }, + "ProposedLeaseIdOptional": { + "name": "x-ms-proposed-lease-id", + "x-ms-client-name": "proposedLeaseId", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats." + }, + "ProposedLeaseIdRequired": { + "name": "x-ms-proposed-lease-id", + "x-ms-client-name": "proposedLeaseId", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats." + }, + "QueryRequest": { + "name": "queryRequest", + "in": "body", + "x-ms-parameter-location": "client", + "schema": { + "$ref": "#/definitions/QueryRequest" + }, + "description": "the query request" + }, + "Range": { + "name": "x-ms-range", + "x-ms-client-name": "range", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Return only the bytes of the blob in the specified range." + }, + "RangeRequiredPutPageFromUrl": { + "name": "x-ms-range", + "x-ms-client-name": "range", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The range of bytes to which the source range would be written. The range should be 512 aligned and range-end is required." + }, + "SequenceNumberAction": { + "name": "x-ms-sequence-number-action", + "x-ms-client-name": "sequenceNumberAction", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number", + "type": "string", + "enum": [ + "max", + "update", + "increment" + ], + "x-ms-enum": { + "name": "SequenceNumberActionType", + "modelAsString": false + } + }, + "Snapshot": { + "name": "snapshot", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob." + }, + "SourceEncryptionKey": { + "name": "x-ms-source-encryption-key", + "x-ms-client-name": "sourceEncryptionKey", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-cpk-info" + }, + "description": "Optional. Specifies the source encryption key to use to encrypt the source data provided in the request." + }, + "SourceEncryptionKeySha256": { + "name": "x-ms-source-encryption-key-sha256", + "x-ms-client-name": "sourceEncryptionKeySha256", + "type": "string", + "in": "header", + "required": false, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-cpk-info" + }, + "description": "The SHA-256 hash of the provided source encryption key. Must be provided if the x-ms-source-encryption-key header is provided." + }, + "SourceEncryptionAlgorithm": { + "name": "x-ms-source-encryption-algorithm", + "x-ms-client-name": "sourceEncryptionAlgorithm", + "type": "string", + "in": "header", + "required": false, + "enum": [ + "AES256" + ], + "x-ms-enum": { + "name": "EncryptionAlgorithmType", + "modelAsString": false + }, + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-cpk-info" + }, + "description": "The algorithm used to produce the source encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided if the x-ms-source-encryption-key is provided." + }, + "VersionId": { + "name": "versionid", + "x-ms-client-name": "versionId", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer." + }, + "SealBlob": { + "name": "x-ms-seal-blob", + "x-ms-client-name": "SealBlob", + "in": "header", + "required": false, + "type": "boolean", + "x-ms-parameter-location": "method", + "description": "Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer." + }, + "SourceContainerName": { + "name": "x-ms-source-container-name", + "x-ms-client-name": "SourceContainerName", + "type": "string", + "in": "header", + "required": true, + "x-ms-parameter-location": "method", + "description": "Required. Specifies the name of the container to rename." + }, + "SourceContentMD5": { + "name": "x-ms-source-content-md5", + "x-ms-client-name": "sourceContentMD5", + "in": "header", + "required": false, + "type": "string", + "format": "byte", + "x-ms-parameter-location": "method", + "description": "Specify the md5 calculated for the range of bytes that must be read from the copy source." + }, + "SourceContentCRC64": { + "name": "x-ms-source-content-crc64", + "x-ms-client-name": "sourceContentcrc64", + "in": "header", + "required": false, + "type": "string", + "format": "byte", + "x-ms-parameter-location": "method", + "description": "Specify the crc64 calculated for the range of bytes that must be read from the copy source." + }, + "SourceRange": { + "name": "x-ms-source-range", + "x-ms-client-name": "sourceRange", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Bytes of source data in the specified range." + }, + "SourceRangeRequiredPutPageFromUrl": { + "name": "x-ms-source-range", + "x-ms-client-name": "sourceRange", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header." + }, + "SourceIfMatch": { + "name": "x-ms-source-if-match", + "x-ms-client-name": "sourceIfMatch", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-modified-access-conditions" + }, + "description": "Specify an ETag value to operate only on blobs with a matching value." + }, + "SourceIfModifiedSince": { + "name": "x-ms-source-if-modified-since", + "x-ms-client-name": "sourceIfModifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-modified-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has been modified since the specified date/time." + }, + "SourceIfNoneMatch": { + "name": "x-ms-source-if-none-match", + "x-ms-client-name": "sourceIfNoneMatch", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-modified-access-conditions" + }, + "description": "Specify an ETag value to operate only on blobs without a matching value." + }, + "SourceIfUnmodifiedSince": { + "name": "x-ms-source-if-unmodified-since", + "x-ms-client-name": "sourceIfUnmodifiedSince", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-modified-access-conditions" + }, + "description": "Specify this header value to operate only on a blob if it has not been modified since the specified date/time." + }, + "SourceLeaseId": { + "name": "x-ms-source-lease-id", + "x-ms-client-name": "sourceLeaseId", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match." + }, + "SourceIfTags": { + "name": "x-ms-source-if-tags", + "x-ms-client-name": "sourceIfTags", + "in": "header", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "source-modified-access-conditions" + }, + "description": "Specify a SQL where clause on blob tags to operate only on blobs with a matching value." + }, + "SourceUrl": { + "name": "x-ms-copy-source", + "x-ms-client-name": "sourceUrl", + "in": "header", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Specify a URL to the copy source." + }, + "StorageServiceProperties": { + "name": "StorageServiceProperties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/StorageServiceProperties" + }, + "x-ms-parameter-location": "method", + "description": "The StorageService properties." + }, + "Timeout": { + "name": "timeout", + "in": "query", + "required": false, + "type": "integer", + "minimum": 0, + "x-ms-parameter-location": "method", + "description": "The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations." + } + } +} From ab93774c0c1ab1cc7a314b35a9ede5cfb6ecb959 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 23 Mar 2026 19:31:59 -0400 Subject: [PATCH 02/65] generate code to maintain current xml without arrow --- .../storage/blob/BlobContainerClient.java | 55 ++++++++++++------- .../storage/blob/models/ListBlobsOptions.java | 20 +++++++ 2 files changed, 55 insertions(+), 20 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 64de81617f9c..40235dc3b4d6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -25,6 +25,7 @@ import com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders; import com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; @@ -57,6 +58,7 @@ import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; +import java.io.InputStream; import java.net.URI; import java.time.Duration; import java.time.OffsetDateTime; @@ -1029,6 +1031,10 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin .setStartFrom(options.getStartFrom()) .setDetails(options.getDetails()); + if (options.getUseArrow()) { + finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + } + } /* If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. @@ -1040,26 +1046,35 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin ArrayList include = finalOptions.getDetails().toList().isEmpty() ? null : finalOptions.getDetails().toList(); - Callable> operation - = () -> this.azureBlobStorage.getContainers() - .listBlobFlatSegmentWithResponse(containerName, finalOptions.getPrefix(), nextMarker, - finalOptions.getMaxResultsPerPage(), include, finalOptions.getStartFrom(), null, null, - Context.NONE); - - ResponseBase response - = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - - List value = response.getValue().getSegment() == null - ? Collections.emptyList() - : response.getValue() - .getSegment() - .getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); - - return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), - value, response.getValue().getNextMarker(), response.getDeserializedHeaders()); + if (finalOptions.getUseArrow()) { + // Potential implementation for returning Apache Arrow format. +// Callable> operation +// = () -> this.azureBlobStorage.getContainers() +// .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, finalOptions.getPrefix(), +// nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), +// finalOptions.getEndBefore(), null, Context.NONE); + return null; + } else { + Callable> operation + = () -> this.azureBlobStorage.getContainers() + .listBlobFlatSegmentWithResponse(containerName, finalOptions.getPrefix(), nextMarker, + finalOptions.getMaxResultsPerPage(), include, finalOptions.getStartFrom(), null, null, + Context.NONE); + ResponseBase response + = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + + List value = response.getValue().getSegment() == null + ? Collections.emptyList() + : response.getValue() + .getSegment() + .getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + value, response.getValue().getNextMarker(), response.getDeserializedHeaders()); + } }; return new PagedIterable<>(pageSize -> retriever.apply(continuationToken, pageSize), retriever); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index 47f29c2ab2b3..cb940c940639 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -19,6 +19,8 @@ public final class ListBlobsOptions { private String prefix; private String startFrom; private Integer maxResultsPerPage; + private Boolean useArrow = false; + private String endBefore; /** * Constructs an unpopulated {@link ListBlobsOptions}. @@ -92,6 +94,24 @@ public ListBlobsOptions setStartFrom(String startFrom) { return this; } + public String getEndBefore() { + return endBefore; + } + + public ListBlobsOptions setEndBefore(String endBefore) { + this.endBefore = endBefore; + return this; + } + + public Boolean getUseArrow() { + return useArrow; + } + + public ListBlobsOptions setUseArrow(Boolean useArrow) { + this.useArrow = useArrow; + return this; + } + /** * Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the request does not * specify maxResultsPerPage or specifies a value greater than 5,000, the server will return up to 5,000 items. From f30233afc85063ba797f2cdb0afbe7f07fb463cb Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 24 Mar 2026 17:32:52 -0400 Subject: [PATCH 03/65] add apache arrow dep 19.0.0 --- sdk/storage/azure-storage-blob/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 0971e45577a2..6694af2b0ae1 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -138,6 +138,11 @@ 1.17.7 test + + org.apache.arrow + arrow-java-root + 19.0.0 + From 18b70933b748a3960fc55991fcd8090cae43b519 Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 24 Mar 2026 18:37:40 -0400 Subject: [PATCH 04/65] fix pom dependencies --- sdk/storage/azure-storage-blob/pom.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 6694af2b0ae1..a0acf824ebb5 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -138,11 +138,20 @@ 1.17.7 test + + + + org.apache.arrow + arrow-vector + 19.0.0 + org.apache.arrow - arrow-java-root + arrow-memory-unsafe 19.0.0 + runtime + From 3e664dead749eefb371dc8abbc0743e2bf892972 Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 24 Mar 2026 19:09:44 -0400 Subject: [PATCH 05/65] change pom to bom 18.1.0 --- sdk/storage/azure-storage-blob/pom.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index a0acf824ebb5..e3025a5a8322 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -143,17 +143,26 @@ org.apache.arrow arrow-vector - 19.0.0 org.apache.arrow arrow-memory-unsafe - 19.0.0 - runtime + + + + org.apache.arrow + arrow-bom + 18.1.0 + pom + import + + + + inject-sas-service-version From 12c6019143975e0eb5e95fcd30d9c800fd7ab5c1 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 11:25:48 -0400 Subject: [PATCH 06/65] test direct call to arrow endpoint --- sdk/storage/azure-storage-blob/pom.xml | 5 ++ .../storage/blob/BlobContainerClient.java | 10 +-- .../azure/storage/blob/ContainerApiTests.java | 85 +++++++++++++++++++ 3 files changed, 95 insertions(+), 5 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index e3025a5a8322..7bff4749f0bd 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -148,6 +148,11 @@ org.apache.arrow arrow-memory-unsafe + + org.checkerframework + checker-qual + 3.42.0 + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 40235dc3b4d6..8bbf4aefcf27 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1048,11 +1048,11 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin if (finalOptions.getUseArrow()) { // Potential implementation for returning Apache Arrow format. -// Callable> operation -// = () -> this.azureBlobStorage.getContainers() -// .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, finalOptions.getPrefix(), -// nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), -// finalOptions.getEndBefore(), null, Context.NONE); + // Callable> operation + // = () -> this.azureBlobStorage.getContainers() + // .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, finalOptions.getPrefix(), + // nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), + // finalOptions.getEndBefore(), null, Context.NONE); return null; } else { Callable> operation diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index f46116acdbb5..0e5cb4d3afcb 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -50,6 +50,10 @@ import com.azure.storage.common.test.shared.extensions.PlaybackOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.common.test.shared.policy.InvalidServiceVersionPipelinePolicy; +import org.apache.arrow.memory.BufferAllocator; +import org.apache.arrow.memory.RootAllocator; +import org.apache.arrow.vector.ipc.ArrowStreamReader; +import org.apache.arrow.vector.VectorSchemaRoot; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -58,7 +62,16 @@ import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; +import com.azure.core.http.HttpPipeline; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; +import com.azure.storage.blob.models.ListBlobsIncludeItem; +import com.azure.core.http.rest.ResponseBase; + import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.ArrayList; import java.net.URL; import java.time.OffsetDateTime; import java.util.Arrays; @@ -2128,4 +2141,76 @@ public void getBlobContainerUrlEncodesContainerName() { // then: // assertThrows(BlobStorageException.class, () -> // } + + @LiveOnly + @Test + public void listBlobsArrowSchemaDiscovery() throws Exception { + // Upload a test blob with metadata + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + cc.getBlobClient(blobName) + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); + + // Construct AzureBlobStorageImpl directly to call generated Arrow methods + HttpPipeline pipeline = cc.getHttpPipeline(); + AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(pipeline) + .url(cc.getAccountUrl()) + .version(BlobServiceVersion.V2026_06_06.getVersion()) + .buildClient(); + + // Call the Arrow endpoint directly + ArrayList include = new ArrayList<>(); + include.add(ListBlobsIncludeItem.METADATA); + + ResponseBase response = impl.getContainers() + .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, null, include, null, null, + null, null, com.azure.core.util.Context.NONE); + + // Verify Content-Type header + String contentType = response.getDeserializedHeaders().getContentType(); + System.out.println("Content-Type: " + contentType); + // On Photon-enabled accounts this should be arrow; on non-Photon it will be XML + assertNotNull(contentType); + + // Read the Arrow IPC stream + try (InputStream inputStream = response.getValue(); + BufferAllocator allocator = new RootAllocator(); + ArrowStreamReader reader = new ArrowStreamReader(inputStream, allocator)) { + + VectorSchemaRoot root = reader.getVectorSchemaRoot(); + + // Print schema fields + System.out.println("=== Arrow Schema Fields ==="); + root.getSchema() + .getFields() + .forEach(field -> System.out.println(" " + field.getName() + " : " + field.getType())); + + // Print custom metadata + System.out.println("=== Schema Custom Metadata ==="); + Map schemaMetadata = root.getSchema().getCustomMetadata(); + if (schemaMetadata != null) { + schemaMetadata.forEach((k, v) -> System.out.println(" " + k + " = " + v)); + } + + // Read first batch and print row values + assertTrue(reader.loadNextBatch(), "Expected at least one batch"); + int rowCount = root.getRowCount(); + System.out.println("=== Row Count: " + rowCount + " ==="); + assertTrue(rowCount >= 1, "Expected at least one row"); + + // Print all field values for the first row + System.out.println("=== First Row Values ==="); + for (int fieldIdx = 0; fieldIdx < root.getSchema().getFields().size(); fieldIdx++) { + org.apache.arrow.vector.FieldVector vec = root.getVector(fieldIdx); + Object value = vec.isNull(0) ? null : vec.getObject(0); + System.out.println(" " + vec.getName() + " = " + value); + } + + // Basic assertions on the blob we uploaded + org.apache.arrow.vector.FieldVector nameVec = root.getVector("Name"); + assertNotNull(nameVec, "Expected 'Name' column in Arrow schema"); + } + } } From b41a60cedacf91900a032e75cca0727ee836088c Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 11:26:32 -0400 Subject: [PATCH 07/65] hard code "preprod." into blob endpoint --- .../com/azure/storage/common/test/shared/TestEnvironment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java index 5d9bc1c9dfac..af665ec51534 100644 --- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java +++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java @@ -107,8 +107,8 @@ private static TestAccount readTestAccountFromEnvironment(String prefix, TestMod + "AccountKey=%s;EndpointSuffix=core.windows.net", name, key); } } - String blobEndpoint = String.format(SCHEME + "://%s.blob.core.windows.net", name); - String blobEndpointSecondary = String.format(SCHEME + "://%s-secondary.blob.core.windows.net", name); + String blobEndpoint = String.format(SCHEME + "://%s." + "preprod." + "blob.core.windows.net", name); + String blobEndpointSecondary = String.format(SCHEME + "://%s-secondary." + "preprod." + "blob.core.windows.net", name); String dataLakeEndpoint = String.format(SCHEME + "://%s.dfs.core.windows.net", name); String queueEndpoint = String.format(SCHEME + "://%s.queue.core.windows.net", name); String fileEndpoint = String.format(SCHEME + "://%s.file.core.windows.net", name); From 6d5749f5a70071fdb3899629e77adeb31875cd88 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 12:59:01 -0400 Subject: [PATCH 08/65] fix preprod endpoint --- .../com/azure/storage/common/test/shared/TestEnvironment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java index af665ec51534..6134a8dbf9ee 100644 --- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java +++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java @@ -107,8 +107,8 @@ private static TestAccount readTestAccountFromEnvironment(String prefix, TestMod + "AccountKey=%s;EndpointSuffix=core.windows.net", name, key); } } - String blobEndpoint = String.format(SCHEME + "://%s." + "preprod." + "blob.core.windows.net", name); - String blobEndpointSecondary = String.format(SCHEME + "://%s-secondary." + "preprod." + "blob.core.windows.net", name); + String blobEndpoint = String.format(SCHEME + "://%s." + "blob."+ "preprod." +"core.windows.net", name); + String blobEndpointSecondary = String.format(SCHEME + "://%s-secondary." + "preprod." +"core.windows.net", name); String dataLakeEndpoint = String.format(SCHEME + "://%s.dfs.core.windows.net", name); String queueEndpoint = String.format(SCHEME + "://%s.queue.core.windows.net", name); String fileEndpoint = String.format(SCHEME + "://%s.file.core.windows.net", name); From 3da9e23d79762800058fcf7ce65c1004cf952269 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 14:35:15 -0400 Subject: [PATCH 09/65] add java.nio=ALL-UNNAMED to blob pom Apache Arrow uses off-heap memory via DirectByteBuffer and needs reflective access to internal NIO classes (like sun.misc.Unsafe or DirectByteBuffer.cleaner()) for memory management. Without this flag, you'll get InaccessibleObjectException at runtime. --- sdk/storage/azure-storage-blob/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 7bff4749f0bd..247843d6c087 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -47,6 +47,7 @@ --add-opens com.azure.storage.blob/com.azure.storage.blob.specialized=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob.changefeed=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob.implementation.models=ALL-UNNAMED + --add-opens java.base/java.nio=ALL-UNNAMED --add-reads com.azure.core=ALL-UNNAMED --add-reads com.azure.core.test=ALL-UNNAMED --add-reads com.azure.core.amqp=ALL-UNNAMED From d11b56fe918008c192b902f8d4f3dc42d4a259a9 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Thu, 26 Mar 2026 13:11:38 -0700 Subject: [PATCH 10/65] addressing illegal dependencies --- eng/versioning/external_dependencies.txt | 3 +++ sdk/parents/azure-client-sdk-parent/pom.xml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index d23f3b1c80d3..d82b85619c7b 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -162,6 +162,8 @@ commons-io:commons-io;2.17.0 net.java.dev.jna:jna-platform;5.17.0 net.oneandone.reflections8:reflections8;0.11.7 net.jonathangiles.tools:dependencyChecker-maven-plugin;1.0.6 +org.apache.arrow:arrow-memory-unsafe;18.1.0 +org.apache.arrow:arrow-vector;18.1.0 org.apache.commons:commons-collections4;4.4 org.apache.commons:commons-text;1.10.0 org.apache.maven:maven-plugin-api;3.9.11 @@ -186,6 +188,7 @@ org.apache.maven.plugins:maven-shade-plugin;3.6.0 org.apache.maven.plugins:maven-site-plugin;3.21.0 org.apache.maven.plugins:maven-source-plugin;3.3.1 org.apache.maven.plugins:maven-surefire-plugin;3.5.3 +org.checkerframework:checker-qual;3.42.0 org.codehaus.mojo:animal-sniffer-maven-plugin;1.24 org.codehaus.mojo:build-helper-maven-plugin;3.6.1 org.codehaus.mojo:exec-maven-plugin;3.5.1 diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index 7e329e6b1002..40b8592694c3 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -602,6 +602,10 @@ com.google.code.findbugs:jsr305:[3.0.2] + + org.apache.arrow:arrow-memory-unsafe:[18.1.0] + org.apache.arrow:arrow-vector:[18.1.0] + org.checkerframework:checker-qual:[3.42.0] From cdbb8437ecfd42c1751c3d384676351fb6696869 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 17:39:16 -0400 Subject: [PATCH 11/65] add ArrowBlobListDeserializer and diagnostic tests for Arrow ListBlobs - Add ArrowBlobListDeserializer that parses Arrow IPC streams into BlobItemInternal objects with safe null-checking helpers - Add diagnostic test to verify Arrow schema from live service - Add deserializer test to validate end-to-end parsing of Arrow response - Add Arrow module requires to module-info.java - Add checker-qual dependency for Arrow annotation compatibility - Add --add-opens java.base/java.nio=ALL-UNNAMED for Arrow memory --- sdk/storage/azure-storage-blob/pom.xml | 3 +- .../util/ArrowBlobListDeserializer.java | 331 ++++++++++++++++++ .../src/main/java/module-info.java | 3 + .../azure/storage/blob/ContainerApiTests.java | 73 ++++ 4 files changed, 409 insertions(+), 1 deletion(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 247843d6c087..25343a0f8bde 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -47,7 +47,6 @@ --add-opens com.azure.storage.blob/com.azure.storage.blob.specialized=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob.changefeed=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob.implementation.models=ALL-UNNAMED - --add-opens java.base/java.nio=ALL-UNNAMED --add-reads com.azure.core=ALL-UNNAMED --add-reads com.azure.core.test=ALL-UNNAMED --add-reads com.azure.core.amqp=ALL-UNNAMED @@ -57,6 +56,8 @@ --add-reads com.azure.storage.blob=com.azure.core.http.okhttp --add-reads com.azure.storage.blob=com.azure.core.http.jdk.httpclient --add-reads com.azure.storage.blob=com.azure.core.http.vertx + --add-opens java.base/java.nio=ALL-UNNAMED + --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED concurrent diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java new file mode 100644 index 000000000000..5548a8f48903 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.models.BlobItemInternal; +import com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal; +import com.azure.storage.blob.implementation.models.BlobName; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.ArchiveStatus; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.BlobType; +import com.azure.storage.blob.models.CopyStatusType; +import com.azure.storage.blob.models.LeaseDurationType; +import com.azure.storage.blob.models.LeaseStateType; +import com.azure.storage.blob.models.LeaseStatusType; +import com.azure.storage.blob.models.RehydratePriority; +import org.apache.arrow.memory.BufferAllocator; +import org.apache.arrow.memory.RootAllocator; +import org.apache.arrow.vector.BitVector; +import org.apache.arrow.vector.BigIntVector; +import org.apache.arrow.vector.FieldVector; +import org.apache.arrow.vector.TimeStampSecVector; +import org.apache.arrow.vector.UInt8Vector; +import org.apache.arrow.vector.VarCharVector; +import org.apache.arrow.vector.VectorSchemaRoot; +import org.apache.arrow.vector.complex.MapVector; +import org.apache.arrow.vector.complex.impl.UnionMapReader; +import org.apache.arrow.vector.ipc.ArrowStreamReader; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.ArrayList; +import java.util.Base64; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Deserializes an Apache Arrow IPC stream from the ListBlobs response into a list of {@link BlobItemInternal} objects. + */ +public final class ArrowBlobListDeserializer { + + /** + * Result of deserializing an Arrow ListBlobs response. + */ + static final class ArrowListBlobsResult { + private final List blobItems; + private final String nextMarker; + + /** + * Creates an ArrowListBlobsResult. + * + * @param blobItems the deserialized blob items + * @param nextMarker the continuation token for the next page, or null if this is the last page + */ + public ArrowListBlobsResult(List blobItems, String nextMarker) { + this.blobItems = blobItems; + this.nextMarker = nextMarker; + } + + /** + * @return the deserialized blob items + */ + public List getBlobItems() { + return blobItems; + } + + /** + * @return the continuation token for the next page, or null if this is the last page + */ + public String getNextMarker() { + return nextMarker; + } + } + + private ArrowBlobListDeserializer() { + } + + /** + * Deserializes an Arrow IPC stream into blob items and pagination metadata. + * + * @param arrowStream the Arrow IPC input stream from the service response + * @return the deserialized result containing blob items and next marker + * @throws RuntimeException if deserialization fails + */ + public static ArrowListBlobsResult deserialize(InputStream arrowStream) { + List results = new ArrayList<>(); + String nextMarker = null; + + try (BufferAllocator allocator = new RootAllocator(); + ArrowStreamReader reader = new ArrowStreamReader(arrowStream, allocator)) { + + VectorSchemaRoot root = reader.getVectorSchemaRoot(); + + // Extract pagination metadata from schema + Map schemaMetadata = root.getSchema().getCustomMetadata(); + if (schemaMetadata != null) { + nextMarker = schemaMetadata.get("NextMarker"); + if (nextMarker != null && nextMarker.isEmpty()) { + nextMarker = null; + } + } + + // Read all batches + while (reader.loadNextBatch()) { + int rowCount = root.getRowCount(); + for (int i = 0; i < rowCount; i++) { + results.add(readRow(root, i)); + } + } + } catch (IOException e) { + throw new RuntimeException("Failed to deserialize Arrow IPC response", e); + } + + return new ArrowListBlobsResult(results, nextMarker); + } + + private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { + BlobItemInternal item = new BlobItemInternal(); + BlobItemPropertiesInternal properties = new BlobItemPropertiesInternal(); + + // Name + String name = getVarChar(root, "Name", index); + if (name != null) { + item.setName(new BlobName().setContent(name)); + } + + // Deleted + Boolean deleted = getBit(root, "Deleted", index); + if (deleted != null) { + item.setDeleted(deleted); + } + + // Snapshot + item.setSnapshot(getVarChar(root, "Snapshot", index)); + + // VersionId + item.setVersionId(getVarChar(root, "VersionId", index)); + + // IsCurrentVersion + item.setIsCurrentVersion(getBit(root, "IsCurrentVersion", index)); + + // HasVersionsOnly + item.setHasVersionsOnly(getBit(root, "HasVersionsOnly", index)); + + // Metadata + Map metadata = getMap(root, "Metadata", index); + if (metadata != null) { + item.setMetadata(metadata); + } + + // OrMetadata + Map orMetadata = getMap(root, "OrMetadata", index); + if (orMetadata != null) { + item.setObjectReplicationMetadata(orMetadata); + } + + // --- Properties --- + + properties.setCreationTime(getTimestamp(root, "Creation-Time", index)); + properties.setLastModified(getTimestamp(root, "Last-Modified", index)); + properties.setETag(getVarChar(root, "Etag", index)); + properties.setContentLength(getUInt64(root, "Content-Length", index)); + properties.setContentType(getVarChar(root, "Content-Type", index)); + properties.setContentEncoding(getVarChar(root, "Content-Encoding", index)); + properties.setContentLanguage(getVarChar(root, "Content-Language", index)); + properties.setContentDisposition(getVarChar(root, "Content-Disposition", index)); + properties.setCacheControl(getVarChar(root, "Cache-Control", index)); + + // Content-MD5: service returns Base64 string, property expects byte[] + String contentMd5 = getVarChar(root, "Content-MD5", index); + if (contentMd5 != null) { + properties.setContentMd5(Base64.getDecoder().decode(contentMd5)); + } + + // BlobType + String blobType = getVarChar(root, "BlobType", index); + if (blobType != null) { + properties.setBlobType(BlobType.fromString(blobType)); + } + + // AccessTier + String accessTier = getVarChar(root, "AccessTier", index); + if (accessTier != null) { + properties.setAccessTier(AccessTier.fromString(accessTier)); + } + properties.setAccessTierInferred(getBit(root, "AccessTierInferred", index)); + properties.setAccessTierChangeTime(getTimestamp(root, "AccessTierChangeTime", index)); + + // Lease + String leaseStatus = getVarChar(root, "LeaseStatus", index); + if (leaseStatus != null) { + properties.setLeaseStatus(LeaseStatusType.fromString(leaseStatus)); + } + String leaseState = getVarChar(root, "LeaseState", index); + if (leaseState != null) { + properties.setLeaseState(LeaseStateType.fromString(leaseState)); + } + String leaseDuration = getVarChar(root, "LeaseDuration", index); + if (leaseDuration != null) { + properties.setLeaseDuration(LeaseDurationType.fromString(leaseDuration)); + } + + // Encryption + properties.setServerEncrypted(getBit(root, "ServerEncrypted", index)); + properties.setCustomerProvidedKeySha256(getVarChar(root, "CustomerProvidedKeySha256", index)); + properties.setEncryptionScope(getVarChar(root, "EncryptionScope", index)); + properties.setIncrementalCopy(getBit(root, "IncrementalCopy", index)); + + // Copy fields + properties.setCopyId(getVarChar(root, "CopyId", index)); + String copyStatus = getVarChar(root, "CopyStatus", index); + if (copyStatus != null) { + properties.setCopyStatus(CopyStatusType.fromString(copyStatus)); + } + properties.setCopySource(getVarChar(root, "CopySource", index)); + properties.setCopyProgress(getVarChar(root, "CopyProgress", index)); + properties.setCopyCompletionTime(getTimestamp(root, "CopyCompletionTime", index)); + properties.setCopyStatusDescription(getVarChar(root, "CopyStatusDescription", index)); + properties.setDestinationSnapshot(getVarChar(root, "CopyDestinationSnapshot", index)); + + // Sequence number + properties.setBlobSequenceNumber(getUInt64(root, "x-ms-blob-sequence-number", index)); + + // Misc properties + properties.setIsSealed(getBit(root, "Sealed", index)); + properties.setLegalHold(getBit(root, "LegalHold", index)); + properties.setDeletedTime(getTimestamp(root, "DeletedTime", index)); + properties.setLastAccessedOn(getTimestamp(root, "LastAccessTime", index)); + properties.setImmutabilityPolicyExpiresOn(getTimestamp(root, "ImmutabilityPolicyUntilDate", index)); + + String immutabilityMode = getVarChar(root, "ImmutabilityPolicyMode", index); + if (immutabilityMode != null) { + properties.setImmutabilityPolicyMode(BlobImmutabilityPolicyMode.fromString(immutabilityMode)); + } + + String archiveStatus = getVarChar(root, "ArchiveStatus", index); + if (archiveStatus != null) { + properties.setArchiveStatus(ArchiveStatus.fromString(archiveStatus)); + } + + String rehydratePriority = getVarChar(root, "RehydratePriority", index); + if (rehydratePriority != null) { + properties.setRehydratePriority(RehydratePriority.fromString(rehydratePriority)); + } + + // TagCount and RemainingRetentionDays — service uses uint64 but property is Integer + Long tagCount = getUInt64(root, "TagCount", index); + if (tagCount != null) { + properties.setTagCount(tagCount.intValue()); + } + Long remainingRetentionDays = getUInt64(root, "RemainingRetentionDays", index); + if (remainingRetentionDays != null) { + properties.setRemainingRetentionDays(remainingRetentionDays.intValue()); + } + + item.setProperties(properties); + return item; + } + + // --- Safe vector read helpers --- + // Each returns null if the column is absent from the schema or the value is null at the given row. + + private static String getVarChar(VectorSchemaRoot root, String name, int index) { + FieldVector vec = root.getVector(name); + if (vec == null || vec.isNull(index)) { + return null; + } + return new String(((VarCharVector) vec).get(index), StandardCharsets.UTF_8); + } + + private static Long getUInt64(VectorSchemaRoot root, String name, int index) { + FieldVector vec = root.getVector(name); + if (vec == null || vec.isNull(index)) { + return null; + } + // Arrow may represent uint64 as BigIntVector (signed 64-bit) or UInt8Vector + if (vec instanceof BigIntVector) { + return ((BigIntVector) vec).get(index); + } else if (vec instanceof UInt8Vector) { + return ((UInt8Vector) vec).get(index); + } + return null; + } + + private static Boolean getBit(VectorSchemaRoot root, String name, int index) { + FieldVector vec = root.getVector(name); + if (vec == null || vec.isNull(index)) { + return null; + } + return ((BitVector) vec).get(index) == 1; + } + + private static OffsetDateTime getTimestamp(VectorSchemaRoot root, String name, int index) { + FieldVector vec = root.getVector(name); + if (vec == null || vec.isNull(index)) { + return null; + } + // Service returns Timestamp(SECOND, null) — epoch seconds without timezone, treat as UTC + if (vec instanceof TimeStampSecVector) { + long epochSeconds = ((TimeStampSecVector) vec).get(index); + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(epochSeconds), ZoneOffset.UTC); + } + return null; + } + + private static Map getMap(VectorSchemaRoot root, String name, int index) { + FieldVector vec = root.getVector(name); + if (vec == null || vec.isNull(index)) { + return null; + } + if (vec instanceof MapVector) { + MapVector mapVec = (MapVector) vec; + UnionMapReader reader = mapVec.getReader(); + reader.setPosition(index); + Map map = new HashMap<>(); + while (reader.next()) { + String key = reader.key().readText().toString(); + String value = reader.value().readText().toString(); + map.put(key, value); + } + return map.isEmpty() ? null : map; + } + return null; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/module-info.java b/sdk/storage/azure-storage-blob/src/main/java/module-info.java index 597a417add7f..e622d0aa2e95 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/module-info.java @@ -5,6 +5,9 @@ requires transitive com.azure.storage.common; requires com.azure.storage.internal.avro; + requires org.apache.arrow.vector; + requires org.apache.arrow.memory.core; + requires org.apache.arrow.format; exports com.azure.storage.blob; exports com.azure.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 0e5cb4d3afcb..5be9ee6d8728 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -66,6 +66,8 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; +import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.ListBlobsIncludeItem; import com.azure.core.http.rest.ResponseBase; @@ -2213,4 +2215,75 @@ public void listBlobsArrowSchemaDiscovery() throws Exception { assertNotNull(nameVec, "Expected 'Name' column in Arrow schema"); } } + + @LiveOnly + @Test + public void listBlobsArrowDeserializer() throws Exception { + // Upload a test blob with metadata + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + cc.getBlobClient(blobName) + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); + + // Construct AzureBlobStorageImpl directly + AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(cc.getHttpPipeline()) + .url(cc.getAccountUrl()) + .version(BlobServiceVersion.V2026_06_06.getVersion()) + .buildClient(); + + // Call the Arrow endpoint + ArrayList include = new ArrayList<>(); + include.add(ListBlobsIncludeItem.METADATA); + + ResponseBase response = impl.getContainers() + .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, null, include, null, null, + null, null, com.azure.core.util.Context.NONE); + + // Verify Content-Type is Arrow + String contentType = response.getDeserializedHeaders().getContentType(); + assertTrue(contentType.contains("application/vnd.apache.arrow.stream"), + "Expected Arrow content type but got: " + contentType); + + // Deserialize using ArrowBlobListDeserializer + ArrowBlobListDeserializer.ArrowListBlobsResult result + = ArrowBlobListDeserializer.deserialize(response.getValue()); + + // Verify pagination — single blob, no next page + assertNull(result.getNextMarker()); + + // Verify we got exactly one blob + assertEquals(1, result.getBlobItems().size()); + + com.azure.storage.blob.implementation.models.BlobItemInternal item = result.getBlobItems().get(0); + + // Name + assertNotNull(item.getName()); + assertEquals(blobName, item.getName().getContent()); + + // Properties + assertNotNull(item.getProperties()); + assertEquals(7L, (long) item.getProperties().getContentLength()); + assertEquals("application/octet-stream", item.getProperties().getContentType()); + assertNotNull(item.getProperties().getETag()); + assertNotNull(item.getProperties().getLastModified()); + assertNotNull(item.getProperties().getCreationTime()); + assertEquals(BlobType.BLOCK_BLOB, item.getProperties().getBlobType()); + assertEquals(AccessTier.HOT, item.getProperties().getAccessTier()); + assertTrue(item.getProperties().isAccessTierInferred()); + assertTrue(item.getProperties().isServerEncrypted()); + assertEquals(LeaseStateType.AVAILABLE, item.getProperties().getLeaseState()); + assertEquals(LeaseStatusType.UNLOCKED, item.getProperties().getLeaseStatus()); + assertNotNull(item.getProperties().getContentMd5()); + + // Metadata + assertNotNull(item.getMetadata()); + assertEquals("testvalue", item.getMetadata().get("testkey")); + + // Verify ModelHelper can convert to public BlobItem + BlobItem publicItem = ModelHelper.populateBlobItem(item); + assertEquals(blobName, publicItem.getName()); + assertEquals(7L, (long) publicItem.getProperties().getContentLength()); + } } From d47fad1d8bc91b2941fd7cc833d3577b5245081d Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 19:37:02 -0400 Subject: [PATCH 12/65] wire Arrow path in BlobContainerClient.listBlobs with XML fallback --- .../storage/blob/BlobContainerClient.java | 59 ++++++++++++++++--- .../util/ArrowBlobListDeserializer.java | 2 +- .../storage/blob/models/ListBlobsOptions.java | 2 +- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 8bbf4aefcf27..1729be1893fe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -32,6 +32,7 @@ import com.azure.storage.blob.implementation.models.FilterBlobSegment; import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ModelHelper; @@ -58,7 +59,10 @@ import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.xml.XmlReader; + import java.io.InputStream; +import javax.xml.stream.XMLStreamException; import java.net.URI; import java.time.Duration; import java.time.OffsetDateTime; @@ -1031,7 +1035,7 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin .setStartFrom(options.getStartFrom()) .setDetails(options.getDetails()); - if (options.getUseArrow()) { + if (Boolean.TRUE.equals(options.getUseArrow())) { finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); } @@ -1046,14 +1050,51 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin ArrayList include = finalOptions.getDetails().toList().isEmpty() ? null : finalOptions.getDetails().toList(); - if (finalOptions.getUseArrow()) { - // Potential implementation for returning Apache Arrow format. - // Callable> operation - // = () -> this.azureBlobStorage.getContainers() - // .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, finalOptions.getPrefix(), - // nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), - // finalOptions.getEndBefore(), null, Context.NONE); - return null; + // Using Boolean.TRUE.equals to avoid NPE because default for useArrow is null, not false. We want to treat null as false, but if user explicitly set it to true, then we use Arrow. + if (Boolean.TRUE.equals(finalOptions.getUseArrow())) { + Callable> operation + = () -> this.azureBlobStorage.getContainers() + .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, finalOptions.getPrefix(), + nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), + finalOptions.getEndBefore(), null, Context.NONE); + ResponseBase response + = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + + String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); + + if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + // Arrow response — parse with Arrow deserializer + ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult + = ArrowBlobListDeserializer.deserialize(response.getValue()); + + List value = arrowResult.getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), value, arrowResult.getNextMarker(), response.getDeserializedHeaders()); + } else { + // XML fallback — service returned XML instead of Arrow + try { + ListBlobsFlatSegmentResponse xmlResponse + = ListBlobsFlatSegmentResponse.fromXml(XmlReader.fromStream(response.getValue())); + + List value = xmlResponse.getSegment() == null + ? Collections.emptyList() + : xmlResponse.getSegment() + .getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), value, xmlResponse.getNextMarker(), null); + } catch (XMLStreamException e) { + throw LOGGER + .logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + } + } } else { Callable> operation = () -> this.azureBlobStorage.getContainers() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 5548a8f48903..66108aceb74c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -48,7 +48,7 @@ public final class ArrowBlobListDeserializer { /** * Result of deserializing an Arrow ListBlobs response. */ - static final class ArrowListBlobsResult { + public static final class ArrowListBlobsResult { private final List blobItems; private final String nextMarker; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index cb940c940639..89c32c972b0a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -19,7 +19,7 @@ public final class ListBlobsOptions { private String prefix; private String startFrom; private Integer maxResultsPerPage; - private Boolean useArrow = false; + private Boolean useArrow; private String endBefore; /** From fa0cc502e0f7d47a0493d081589e8271d5615ef5 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 26 Mar 2026 19:52:29 -0400 Subject: [PATCH 13/65] add Arrow listBlobs integration tests with recordings --- .../azure/storage/blob/ContainerApiTests.java | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 5be9ee6d8728..19d29ceefeac 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2144,6 +2144,123 @@ public void getBlobContainerUrlEncodesContainerName() { // assertThrows(BlobStorageException.class, () -> // } + @Test + public void listBlobsArrowBasic() { + // Upload a test blob + String blobName = generateBlobName(); + cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); + + assertEquals(1, blobs.size()); + assertEquals(blobName, blobs.get(0).getName()); + assertNotNull(blobs.get(0).getProperties()); + assertEquals(DATA.getDefaultDataSize(), blobs.get(0).getProperties().getContentLength()); + assertEquals(BlobType.BLOCK_BLOB, blobs.get(0).getProperties().getBlobType()); + assertNotNull(blobs.get(0).getProperties().getLastModified()); + assertNotNull(blobs.get(0).getProperties().getETag()); + } + + @Test + public void listBlobsArrowWithMetadata() { + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + cc.getBlobClient(blobName) + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), DATA.getDefaultDataSize(), null, metadata, null, null, + null, null, null); + + ListBlobsOptions options + = new ListBlobsOptions().setUseArrow(true).setDetails(new BlobListDetails().setRetrieveMetadata(true)); + List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); + + assertEquals(1, blobs.size()); + assertNotNull(blobs.get(0).getMetadata()); + assertEquals("testvalue", blobs.get(0).getMetadata().get("testkey")); + } + + @Test + public void listBlobsArrowPagination() { + // Upload 3 blobs + for (int i = 0; i < 3; i++) { + cc.getBlobClient("blob" + i) + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + } + + ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true).setMaxResultsPerPage(1); + List allBlobs = new ArrayList<>(); + for (PagedResponse page : cc.listBlobs(options, null).iterableByPage()) { + assertTrue(page.getValue().size() <= 1); + allBlobs.addAll(page.getValue()); + } + + assertEquals(3, allBlobs.size()); + } + + @Test + public void listBlobsArrowNullUseArrowUsesXml() { + // Default useArrow is null — should use XML path without error + String blobName = generateBlobName(); + cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + ListBlobsOptions options = new ListBlobsOptions(); + assertNull(options.getUseArrow()); + + List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); + assertEquals(1, blobs.size()); + assertEquals(blobName, blobs.get(0).getName()); + } + + // TODO: listBlobsArrowXmlFallback — needs a non-Photon account without the preprod endpoint hack. + // Currently all test accounts use preprod.blob.core.windows.net which only resolves for the Photon account. + // @LiveOnly + // @Test + // public void listBlobsArrowXmlFallback() { + // // Use a non-Photon account — service should return XML even though Arrow was requested + // String altContainerName = generateContainerName(); + // BlobContainerClient altCc = premiumBlobServiceClient.getBlobContainerClient(altContainerName); + // altCc.create(); + // + // try { + // String blobName = generateBlobName(); + // altCc.getBlobClient(blobName) + // .getBlockBlobClient() + // .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + // + // ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + // List blobs = altCc.listBlobs(options, null).stream().collect(Collectors.toList()); + // + // // Should still work via XML fallback + // assertEquals(1, blobs.size()); + // assertEquals(blobName, blobs.get(0).getName()); + // } finally { + // altCc.delete(); + // } + // } + + @LiveOnly + @Test + public void listBlobsArrowEncryptedBlob() { + // Upload a blob with CPK (customer-provided key) + String blobName = generateBlobName(); + CustomerProvidedKey cpk = new CustomerProvidedKey(Base64.getEncoder().encodeToString(getRandomKey())); + BlobClient cpkClient = cc.getBlobClient(blobName).getCustomerProvidedKeyClient(cpk); + cpkClient.getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); + + assertEquals(1, blobs.size()); + assertEquals(blobName, blobs.get(0).getName()); + // CPK blob should have server-encrypted = true + assertTrue(blobs.get(0).getProperties().isServerEncrypted()); + // Metadata should be null (no metadata was set) + assertNull(blobs.get(0).getMetadata()); + } + @LiveOnly @Test public void listBlobsArrowSchemaDiscovery() throws Exception { From e3a26b8a074d202b260ed42a3732d9cf39366c76 Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 27 Mar 2026 15:18:59 -0400 Subject: [PATCH 14/65] update based on new swagger file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Needed to update the README based on the following: adding custom endpoints (the Arrow variants) that deviate from the standard pattern — the swagger defines them as pageable (likely copied from the original list blobs operations), but the response format doesn't match what autorest expects for pageable ops. So the directive is needed to patch the swaggeat codegen time. - This is a common pattern in the Azure SDK — the README.md swagger config files are full of directive blocks that fixup mismatches between what the swagger says and what the generated code actually needs. It's the standard escape hatch when the swagger doesn't perfectly represent the desired codegen behavior. --- .../blob/implementation/ContainersImpl.java | 1015 ++++++++++++----- ...ListBlobFlatSegmentApacheArrowHeaders.java | 102 +- ...lobHierarchySegmentApacheArrowHeaders.java | 186 +++ .../azure-storage-blob/swagger/README.md | 18 + .../azure-storage-blob/swagger/blob.json | 177 ++- 5 files changed, 1151 insertions(+), 347 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index bbd54152b2b4..6bfa32ac060d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -39,6 +39,7 @@ import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; import com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders; import com.azure.storage.blob.implementation.models.ContainersRenameHeaders; @@ -808,57 +809,6 @@ Response changeLeaseNoCustomHeadersSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, Context context); - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono>> - listBlobFlatSegmentApacheArrow(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, - @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - Context context); - - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono listBlobFlatSegmentApacheArrowNoCustomHeaders(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, - @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, Context context); - - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase listBlobFlatSegmentApacheArrowSync( - @HostParam("url") String url, @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, @QueryParam("comp") String comp, - @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, - @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, Context context); - - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response listBlobFlatSegmentApacheArrowNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, - @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, Context context); - @Get("/{containerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) @@ -905,6 +855,56 @@ Response listBlobFlatSegmentNoCustomHeadersSync(@H @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, Context context); + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Mono>> + listBlobFlatSegmentApacheArrow(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, + @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, + @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Mono listBlobFlatSegmentApacheArrowNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + ResponseBase listBlobFlatSegmentApacheArrowSync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Response listBlobFlatSegmentApacheArrowNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + @Get("/{containerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) @@ -955,6 +955,58 @@ Response listBlobHierarchySegmentNoCustomHead @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, Context context); + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Mono>> + listBlobHierarchySegmentApacheArrow(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, + @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Mono listBlobHierarchySegmentApacheArrowNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, + @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + ResponseBase + listBlobHierarchySegmentApacheArrowSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, + @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) + Response listBlobHierarchySegmentApacheArrowNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, + @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, + @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @Get("/{containerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) @@ -5741,13 +5793,9 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -5760,38 +5808,32 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return an enumeration of blobs along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId) { + public Mono> + listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, + List include, String startFrom, Integer timeout, String requestId) { return FluxUtil - .withContext(context -> listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, - marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) + .withContext(context -> listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, + include, startFrom, timeout, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -5804,48 +5846,41 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return an enumeration of blobs along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId, Context context) { + public Mono> + listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, + List include, String startFrom, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/xml"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service - .listBlobFlatSegmentApacheArrow(this.client.getUrl(), containerName, restype, comp, accept, prefix, - delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context) + .listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, maxresults, + includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -5858,37 +5893,31 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return an enumeration of blobs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux listBlobFlatSegmentApacheArrowAsync(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId) { - return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, - include, timeout, startFrom, endBefore, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Mono listBlobFlatSegmentAsync(String containerName, String prefix, + String marker, Integer maxresults, List include, String startFrom, Integer timeout, + String requestId) { + return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, + timeout, requestId).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -5901,38 +5930,33 @@ public Flux listBlobFlatSegmentApacheArrowAsync(String containerName * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return an enumeration of blobs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux listBlobFlatSegmentApacheArrowAsync(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId, Context context) { - return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, - include, timeout, startFrom, endBefore, requestId, context) + public Mono listBlobFlatSegmentAsync(String containerName, String prefix, + String marker, Integer maxresults, List include, String startFrom, Integer timeout, + String requestId, Context context) { + return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, + timeout, requestId, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -5945,37 +5969,32 @@ public Flux listBlobFlatSegmentApacheArrowAsync(String containerName * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return an enumeration of blobs along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, - String delimiter, String prefix, String marker, Integer maxresults, List include, - Integer timeout, String startFrom, String endBefore, String requestId) { + public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( + String containerName, String prefix, String marker, Integer maxresults, List include, + String startFrom, Integer timeout, String requestId) { return FluxUtil - .withContext(context -> listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(containerName, - delimiter, prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) + .withContext(context -> listBlobFlatSegmentNoCustomHeadersWithResponseAsync(containerName, prefix, marker, + maxresults, include, startFrom, timeout, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -5988,47 +6007,41 @@ public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithRes * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return an enumeration of blobs along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, - String delimiter, String prefix, String marker, Integer maxresults, List include, - Integer timeout, String startFrom, String endBefore, String requestId, Context context) { + public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( + String containerName, String prefix, String marker, Integer maxresults, List include, + String startFrom, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/xml"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service - .listBlobFlatSegmentApacheArrowNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, accept, - prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context) + .listBlobFlatSegmentNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -6041,50 +6054,43 @@ public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithRes * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase}. + * @return an enumeration of blobs along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - listBlobFlatSegmentApacheArrowWithResponse(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId, Context context) { + public ResponseBase + listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, + List include, String startFrom, Integer timeout, String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/xml"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentApacheArrowSync(this.client.getUrl(), containerName, restype, comp, - accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context); + return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -6097,39 +6103,33 @@ public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithRes * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return an enumeration of blobs. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InputStream listBlobFlatSegmentApacheArrow(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId) { + public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, + Integer maxresults, List include, String startFrom, Integer timeout, String requestId) { try { - return listBlobFlatSegmentApacheArrowWithResponse(containerName, delimiter, prefix, marker, maxresults, - include, timeout, startFrom, endBefore, requestId, Context.NONE).getValue(); + return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, startFrom, + timeout, requestId, Context.NONE).getValue(); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. + * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -6142,43 +6142,43 @@ public InputStream listBlobFlatSegmentApacheArrow(String containerName, String d * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return an enumeration of blobs along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponse(String containerName, - String delimiter, String prefix, String marker, Integer maxresults, List include, - Integer timeout, String startFrom, String endBefore, String requestId, Context context) { + public Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, + String prefix, String marker, Integer maxresults, List include, String startFrom, + Integer timeout, String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/xml"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentApacheArrowNoCustomHeadersSync(this.client.getUrl(), containerName, - restype, comp, accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, - endBefore, this.client.getVersion(), requestId, context); + return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + prefix, marker, maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, + accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6193,30 +6193,33 @@ public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithRe * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, - List include, String startFrom, Integer timeout, String requestId) { + public Mono>> + listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, + String requestId) { return FluxUtil - .withContext(context -> listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, - include, startFrom, timeout, requestId, context)) + .withContext(context -> listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, prefix, marker, + maxresults, include, timeout, startFrom, endBefore, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6231,39 +6234,43 @@ public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithRe * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, - List include, String startFrom, Integer timeout, String requestId, Context context) { + public Mono>> + listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, + String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/xml"; + final String accept = "application/vnd.apache.arrow.stream"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service - .listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, maxresults, - includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) + .listBlobFlatSegmentApacheArrow(this.client.getUrl(), containerName, restype, comp, accept, prefix, marker, + maxresults, includeConverted, timeout, startFrom, endBefore, this.client.getVersion(), requestId, + context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6278,29 +6285,32 @@ public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithRe * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobFlatSegmentAsync(String containerName, String prefix, - String marker, Integer maxresults, List include, String startFrom, Integer timeout, + public Flux listBlobFlatSegmentApacheArrowAsync(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, String requestId) { - return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, - timeout, requestId).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, prefix, marker, maxresults, include, + timeout, startFrom, endBefore, requestId) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6315,31 +6325,33 @@ public Mono listBlobFlatSegmentAsync(String contai * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobFlatSegmentAsync(String containerName, String prefix, - String marker, Integer maxresults, List include, String startFrom, Integer timeout, + public Flux listBlobFlatSegmentApacheArrowAsync(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, String requestId, Context context) { - return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, - timeout, requestId, context) + return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, prefix, marker, maxresults, include, + timeout, startFrom, endBefore, requestId, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6354,30 +6366,32 @@ public Mono listBlobFlatSegmentAsync(String contai * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link Response} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( - String containerName, String prefix, String marker, Integer maxresults, List include, - String startFrom, Integer timeout, String requestId) { + public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String startFrom, String endBefore, String requestId) { return FluxUtil - .withContext(context -> listBlobFlatSegmentNoCustomHeadersWithResponseAsync(containerName, prefix, marker, - maxresults, include, startFrom, timeout, requestId, context)) + .withContext(context -> listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(containerName, + prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6392,39 +6406,42 @@ public Mono> listBlobFlatSegmentNoCustomH * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link Response} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( - String containerName, String prefix, String marker, Integer maxresults, List include, - String startFrom, Integer timeout, String requestId, Context context) { + public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String startFrom, String endBefore, String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/xml"; + final String accept = "application/vnd.apache.arrow.stream"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service - .listBlobFlatSegmentNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, prefix, marker, - maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) + .listBlobFlatSegmentApacheArrowNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, accept, + prefix, marker, maxresults, includeConverted, timeout, startFrom, endBefore, this.client.getVersion(), + requestId, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6439,41 +6456,45 @@ public Mono> listBlobFlatSegmentNoCustomH * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link ResponseBase}. + * @return the response body along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, - List include, String startFrom, Integer timeout, String requestId, Context context) { + public ResponseBase + listBlobFlatSegmentApacheArrowWithResponse(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, + String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; - final String accept = "application/xml"; + final String accept = "application/vnd.apache.arrow.stream"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, - maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context); + return service.listBlobFlatSegmentApacheArrowSync(this.client.getUrl(), containerName, restype, comp, + accept, prefix, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6488,31 +6509,34 @@ public Mono> listBlobFlatSegmentNoCustomH * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, - Integer maxresults, List include, String startFrom, Integer timeout, String requestId) { + public InputStream listBlobFlatSegmentApacheArrow(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, + String requestId) { try { - return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, startFrom, - timeout, requestId, Context.NONE).getValue(); + return listBlobFlatSegmentApacheArrowWithResponse(containerName, prefix, marker, maxresults, include, + timeout, startFrom, endBefore, requestId, Context.NONE).getValue(); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache + * Arrow use case so response is returned as raw to be deserialized by the client. * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. @@ -6527,35 +6551,36 @@ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, St * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, - String prefix, String marker, Integer maxresults, List include, String startFrom, - Integer timeout, String requestId, Context context) { + public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponse(String containerName, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String startFrom, String endBefore, String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; - final String accept = "application/xml"; + final String accept = "application/vnd.apache.arrow.stream"; String includeConverted = (include == null) ? null : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, marker, maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, - accept, context); + return service.listBlobFlatSegmentApacheArrowNoCustomHeadersSync(this.client.getUrl(), containerName, + restype, comp, accept, prefix, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -6979,6 +7004,444 @@ public Response listBlobHierarchySegmentNoCus } } + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> + listBlobHierarchySegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId) { + return FluxUtil + .withContext(context -> listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, + prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> + listBlobHierarchySegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .listBlobHierarchySegmentApacheArrow(this.client.getUrl(), containerName, restype, comp, accept, prefix, + delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Flux listBlobHierarchySegmentApacheArrowAsync(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String startFrom, String endBefore, String requestId) { + return listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, + maxresults, include, timeout, startFrom, endBefore, requestId) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Flux listBlobHierarchySegmentApacheArrowAsync(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String startFrom, String endBefore, String requestId, Context context) { + return listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, + maxresults, include, timeout, startFrom, endBefore, requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponseAsync( + String containerName, String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom, String endBefore, String requestId) { + return FluxUtil + .withContext(context -> listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponseAsync(containerName, + delimiter, prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponseAsync( + String containerName, String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom, String endBefore, String requestId, + Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .listBlobHierarchySegmentApacheArrowNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, + accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobHierarchySegmentApacheArrowWithResponse(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId, Context context) { + try { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentApacheArrowSync(this.client.getUrl(), containerName, restype, comp, + accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, + this.client.getVersion(), requestId, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream listBlobHierarchySegmentApacheArrow(String containerName, String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom, + String endBefore, String requestId) { + try { + return listBlobHierarchySegmentApacheArrowWithResponse(containerName, delimiter, prefix, marker, maxresults, + include, timeout, startFrom, endBefore, requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is + * for Apache Arrow use case so response is returned as raw to be deserialized by the client. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). + * @param endBefore Specifies the relative path to end before list paths. (Exclusive). + * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponse(String containerName, + String delimiter, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String startFrom, String endBefore, String requestId, Context context) { + try { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/vnd.apache.arrow.stream"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentApacheArrowNoCustomHeadersSync(this.client.getUrl(), containerName, + restype, comp, accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, + endBefore, this.client.getVersion(), requestId, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * Returns the sku name and account kind. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java index 64ebc8f7c997..d137f165b8de 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java @@ -17,34 +17,34 @@ @Fluent public final class ContainersListBlobFlatSegmentApacheArrowHeaders { /* - * The x-ms-version property. + * The Content-Type property. */ @Generated - private String xMsVersion; + private String contentType; /* - * The x-ms-request-id property. + * The x-ms-client-request-id property. */ @Generated - private String xMsRequestId; + private String xMsClientRequestId; /* - * The x-ms-client-request-id property. + * The x-ms-request-id property. */ @Generated - private String xMsClientRequestId; + private String xMsRequestId; /* - * The Date property. + * The x-ms-version property. */ @Generated - private DateTimeRfc1123 date; + private String xMsVersion; /* - * The Content-Type property. + * The Date property. */ @Generated - private String contentType; + private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -55,37 +55,59 @@ public final class ContainersListBlobFlatSegmentApacheArrowHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobFlatSegmentApacheArrowHeaders(HttpHeaders rawHeaders) { - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the contentType property: The Content-Type property. * - * @return the xMsVersion value. + * @return the contentType value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getContentType() { + return this.contentType; } /** - * Set the xMsVersion property: The x-ms-version property. + * Set the contentType property: The Content-Type property. * - * @param xMsVersion the xMsVersion value to set. + * @param contentType the contentType value to set. * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. */ @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; + public ContainersListBlobFlatSegmentApacheArrowHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + @Generated + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; return this; } @@ -112,24 +134,24 @@ public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsRequestId(String xM } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the xMsVersion property: The x-ms-version property. * - * @return the xMsClientRequestId value. + * @return the xMsVersion value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public String getXMsVersion() { + return this.xMsVersion; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Set the xMsVersion property: The x-ms-version property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. + * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. */ @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; + public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; return this; } @@ -161,26 +183,4 @@ public ContainersListBlobFlatSegmentApacheArrowHeaders setDate(OffsetDateTime da } return this; } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java new file mode 100644 index 000000000000..8c18650a8be5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The ContainersListBlobHierarchySegmentApacheArrowHeaders model. + */ +@Fluent +public final class ContainersListBlobHierarchySegmentApacheArrowHeaders { + /* + * The Content-Type property. + */ + @Generated + private String contentType; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private String xMsClientRequestId; + + /* + * The x-ms-request-id property. + */ + @Generated + private String xMsRequestId; + + /* + * The x-ms-version property. + */ + @Generated + private String xMsVersion; + + /* + * The Date property. + */ + @Generated + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersListBlobHierarchySegmentApacheArrowHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersListBlobHierarchySegmentApacheArrowHeaders(HttpHeaders rawHeaders) { + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobHierarchySegmentApacheArrowHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + @Generated + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobHierarchySegmentApacheArrowHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + @Generated + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobHierarchySegmentApacheArrowHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + @Generated + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobHierarchySegmentApacheArrowHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Set the date property: The Date property. + * + * @param date the date value to set. + * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. + */ + @Generated + public ContainersListBlobHierarchySegmentApacheArrowHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index fb0cf0d039b1..e9f2fb14d90f 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -591,6 +591,24 @@ directive: delete $["x-ms-pageable"]; ``` +### Delete Container_ListBlobFlatSegment_ApacheArrow x-ms-pageable as response is raw Arrow stream +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&flat&arrow"].get + transform: > + delete $["x-ms-pageable"]; +``` + +### Delete Container_ListBlobHierarchySegment_ApacheArrow x-ms-pageable as response is raw Arrow stream +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&hierarchy&arrow"].get + transform: > + delete $["x-ms-pageable"]; +``` + ### BlobDeleteType expandable string enum ``` yaml directive: diff --git a/sdk/storage/azure-storage-blob/swagger/blob.json b/sdk/storage/azure-storage-blob/swagger/blob.json index 969dd7f67f0a..5d82862ca687 100644 --- a/sdk/storage/azure-storage-blob/swagger/blob.json +++ b/sdk/storage/azure-storage-blob/swagger/blob.json @@ -2299,6 +2299,115 @@ } ] }, + "/{containerName}?restype=container&comp=list&flat": { + "get": { + "tags": [ + "containers" + ], + "operationId": "Container_ListBlobFlatSegment", + "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", + "parameters": [ + { + "$ref": "#/parameters/Prefix" + }, + { + "$ref": "#/parameters/Marker" + }, + { + "$ref": "#/parameters/MaxResults" + }, + { + "$ref": "#/parameters/ListBlobsInclude" + }, + { + "$ref": "#/parameters/ListBlobsStartFrom" + }, + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + } + ], + "responses": { + "200": { + "description": "Success.", + "headers": { + "Content-Type": { + "type": "string", + "description": "The media type of the body of the response. For List Blobs this is 'application/xml'" + }, + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" + } + }, + "schema": { + "$ref": "#/definitions/ListBlobsFlatSegmentResponse" + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "NextMarker" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ContainerName" + }, + { + "name": "restype", + "description": "restype", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "container" + ] + }, + { + "name": "comp", + "description": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "list" + ] + } + ] + }, "/{containerName}?restype=container&comp=list&flat&arrow": { "get": { "tags": [ @@ -2320,14 +2429,11 @@ "application/vnd.apache.arrow.stream" ], "default": "application/vnd.apache.arrow.stream", - "description": "Must be set to 'application/vnd.apache.arrow.stream' to request Apache Arrow format. The service may still return XML if Arrow is not enabled for the account — clients must check the Content-Type response header." + "description": "Must be set to 'application/vnd.apache.arrow.stream' to request Apache Arrow format. The service may still return XML if Arrow is not enabled for the account \u00e2\u20ac\u201d clients must check the Content-Type response header." }, { "$ref": "#/parameters/Prefix" }, - { - "$ref": "#/parameters/Delimiter" - }, { "$ref": "#/parameters/Marker" }, @@ -2427,17 +2533,20 @@ } ] }, - "/{containerName}?restype=container&comp=list&flat": { + "/{containerName}?restype=container&comp=list&hierarchy": { "get": { "tags": [ "containers" ], - "operationId": "Container_ListBlobFlatSegment", + "operationId": "Container_ListBlobHierarchySegment", "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", "parameters": [ { "$ref": "#/parameters/Prefix" }, + { + "$ref": "#/parameters/Delimiter" + }, { "$ref": "#/parameters/Marker" }, @@ -2490,7 +2599,7 @@ } }, "schema": { - "$ref": "#/definitions/ListBlobsFlatSegmentResponse" + "$ref": "#/definitions/ListBlobsHierarchySegmentResponse" } }, "default": { @@ -2536,14 +2645,29 @@ } ] }, - "/{containerName}?restype=container&comp=list&hierarchy": { + "/{containerName}?restype=container&comp=list&hierarchy&arrow": { "get": { "tags": [ "containers" ], - "operationId": "Container_ListBlobHierarchySegment", - "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", + "operationId": "Container_ListBlobHierarchySegment_ApacheArrow", + "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache Arrow use case so response is returned as raw to be deserialized by the client.", + "produces": [ + "application/vnd.apache.arrow.stream", + "application/xml" + ], "parameters": [ + { + "name": "Accept", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "application/vnd.apache.arrow.stream" + ], + "default": "application/vnd.apache.arrow.stream", + "description": "Must be set to 'application/vnd.apache.arrow.stream' to request Apache Arrow format. The service may still return XML if Arrow is not enabled for the account \u00e2\u20ac\u201d clients must check the Content-Type response header." + }, { "$ref": "#/parameters/Prefix" }, @@ -2559,11 +2683,14 @@ { "$ref": "#/parameters/ListBlobsInclude" }, + { + "$ref": "#/parameters/Timeout" + }, { "$ref": "#/parameters/ListBlobsStartFrom" }, { - "$ref": "#/parameters/Timeout" + "$ref": "#/parameters/ListBlobsEndBefore" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -2602,7 +2729,8 @@ } }, "schema": { - "$ref": "#/definitions/ListBlobsHierarchySegmentResponse" + "type": "object", + "format": "file" } }, "default": { @@ -2617,9 +2745,6 @@ "$ref": "#/definitions/StorageError" } } - }, - "x-ms-pageable": { - "nextLinkName": "NextMarker" } }, "parameters": [ @@ -3720,6 +3845,11 @@ "format": "date-time-rfc1123", "description": "The time the tier was changed on the object. This is only returned if the tier on the block blob was ever set." }, + "x-ms-smart-access-tier": { + "x-ms-client-name": "SmartAccessTier", + "type": "string", + "description": "The underlying tier of a smart tier blob. Only returned if the blob is in Smart tier." + }, "x-ms-version-id": { "x-ms-client-name": "VersionId", "type": "string", @@ -4497,7 +4627,7 @@ "blob" ], "operationId": "BlockBlob_PutBlobFromUrl", - "description": "The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.", + "description": "The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob\u00e2\u20ac\u2122s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.", "consumes": [ "application/octet-stream" ], @@ -10099,7 +10229,8 @@ "Cool", "Archive", "Premium", - "Cold" + "Cold", + "Smart" ], "x-ms-enum": { "name": "AccessTier", @@ -10111,7 +10242,8 @@ "enum": [ "rehydrate-pending-to-hot", "rehydrate-pending-to-cool", - "rehydrate-pending-to-cold" + "rehydrate-pending-to-cold", + "rehydrate-pending-to-smart" ], "x-ms-enum": { "name": "ArchiveStatus", @@ -10279,6 +10411,9 @@ "ArchiveStatus": { "$ref": "#/definitions/ArchiveStatus" }, + "SmartAccessTier": { + "$ref": "#/definitions/AccessTier" + }, "CustomerProvidedKeySha256": { "type": "string" }, @@ -11632,7 +11767,8 @@ "Hot", "Cool", "Archive", - "Cold" + "Cold", + "Smart" ], "x-ms-enum": { "name": "AccessTier", @@ -11662,7 +11798,8 @@ "Hot", "Cool", "Archive", - "Cold" + "Cold", + "Smart" ], "x-ms-enum": { "name": "AccessTier", From 12e5ec2a1133e3f5e1ae6e42c190615047620dfe Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 27 Mar 2026 16:31:49 -0400 Subject: [PATCH 15/65] change method signatures based on updates from swagger --- .../azure/storage/blob/BlobContainerClient.java | 4 ++-- .../storage/blob/models/BlobRetentionPolicy.java | 14 +++++++------- .../com/azure/storage/blob/ContainerApiTests.java | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 1729be1893fe..2bf71da08c91 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1054,8 +1054,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin if (Boolean.TRUE.equals(finalOptions.getUseArrow())) { Callable> operation = () -> this.azureBlobStorage.getContainers() - .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, finalOptions.getPrefix(), - nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), + .listBlobFlatSegmentApacheArrowWithResponse(containerName, finalOptions.getPrefix(), nextMarker, + finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), finalOptions.getEndBefore(), null, Context.NONE); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java index 6b4042dbc0d9..c0af296985d4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java @@ -17,7 +17,7 @@ * the retention policy which determines how long the associated data should persist. */ @Fluent -public final class BlobRetentionPolicy implements XmlSerializable { +public class BlobRetentionPolicy implements XmlSerializable { /* * Indicates whether a retention policy is enabled for the storage service */ @@ -40,7 +40,7 @@ public BlobRetentionPolicy() { /** * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @return the enabled value. */ @Generated @@ -50,7 +50,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @param enabled the enabled value to set. * @return the BlobRetentionPolicy object itself. */ @@ -63,7 +63,7 @@ public BlobRetentionPolicy setEnabled(boolean enabled) { /** * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @return the days value. */ @Generated @@ -74,7 +74,7 @@ public Integer getDays() { /** * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @param days the days value to set. * @return the BlobRetentionPolicy object itself. */ @@ -103,7 +103,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobRetentionPolicy from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -116,7 +116,7 @@ public static BlobRetentionPolicy fromXml(XmlReader xmlReader) throws XMLStreamE /** * Reads an instance of BlobRetentionPolicy from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 19d29ceefeac..ec07e59d16ef 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2284,8 +2284,8 @@ public void listBlobsArrowSchemaDiscovery() throws Exception { include.add(ListBlobsIncludeItem.METADATA); ResponseBase response = impl.getContainers() - .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, null, include, null, null, - null, null, com.azure.core.util.Context.NONE); + .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, include, null, null, null, + null, com.azure.core.util.Context.NONE); // Verify Content-Type header String contentType = response.getDeserializedHeaders().getContentType(); @@ -2355,8 +2355,8 @@ public void listBlobsArrowDeserializer() throws Exception { include.add(ListBlobsIncludeItem.METADATA); ResponseBase response = impl.getContainers() - .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, null, include, null, null, - null, null, com.azure.core.util.Context.NONE); + .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, include, null, null, null, + null, com.azure.core.util.Context.NONE); // Verify Content-Type is Arrow String contentType = response.getDeserializedHeaders().getContentType(); From d5dec10dd1168744ef545166a68ce8a5161de50f Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 27 Mar 2026 18:39:33 -0400 Subject: [PATCH 16/65] add Arrow hierarchy schema discovery test --- .../azure/storage/blob/ContainerApiTests.java | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index ec07e59d16ef..9e858aa5589b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -66,6 +66,7 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.ListBlobsIncludeItem; @@ -2333,6 +2334,84 @@ public void listBlobsArrowSchemaDiscovery() throws Exception { } } + @LiveOnly + @Test + public void listBlobsArrowHierarchySchemaDiscovery() throws Exception { + // Upload blobs with directory structure and metadata + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + cc.getBlobClient("dir/blob1") + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); + cc.getBlobClient("dir/blob2") + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); + cc.getBlobClient("topblob") + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); + + // Construct AzureBlobStorageImpl directly to call generated Arrow methods + HttpPipeline pipeline = cc.getHttpPipeline(); + AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(pipeline) + .url(cc.getAccountUrl()) + .version(BlobServiceVersion.V2026_06_06.getVersion()) + .buildClient(); + + // Call the Arrow hierarchy endpoint directly with delimiter "/" + ArrayList include = new ArrayList<>(); + include.add(ListBlobsIncludeItem.METADATA); + + ResponseBase response = impl.getContainers() + .listBlobHierarchySegmentApacheArrowWithResponse(containerName, "/", null, null, null, include, null, null, + null, null, com.azure.core.util.Context.NONE); + + // Verify Content-Type header + String contentType = response.getDeserializedHeaders().getContentType(); + System.out.println("Content-Type: " + contentType); + assertNotNull(contentType); + + // Read the Arrow IPC stream + try (InputStream inputStream = response.getValue(); + BufferAllocator allocator = new RootAllocator(); + ArrowStreamReader reader = new ArrowStreamReader(inputStream, allocator)) { + + VectorSchemaRoot root = reader.getVectorSchemaRoot(); + + // Print schema fields + System.out.println("=== Arrow Hierarchy Schema Fields ==="); + root.getSchema() + .getFields() + .forEach(field -> System.out.println(" " + field.getName() + " : " + field.getType())); + + // Print custom metadata + System.out.println("=== Schema Custom Metadata ==="); + Map schemaMetadata = root.getSchema().getCustomMetadata(); + if (schemaMetadata != null) { + schemaMetadata.forEach((k, v) -> System.out.println(" " + k + " = " + v)); + } + + // Read all batches and print all row values + while (reader.loadNextBatch()) { + int rowCount = root.getRowCount(); + System.out.println("=== Batch Row Count: " + rowCount + " ==="); + assertTrue(rowCount >= 1, "Expected at least one row"); + + for (int rowIdx = 0; rowIdx < rowCount; rowIdx++) { + System.out.println("--- Row " + rowIdx + " ---"); + for (int fieldIdx = 0; fieldIdx < root.getSchema().getFields().size(); fieldIdx++) { + org.apache.arrow.vector.FieldVector vec = root.getVector(fieldIdx); + Object value = vec.isNull(rowIdx) ? null : vec.getObject(rowIdx); + System.out.println(" " + vec.getName() + " = " + value); + } + } + } + + // Basic assertions — we expect at least a Name column + org.apache.arrow.vector.FieldVector nameVec = root.getVector("Name"); + assertNotNull(nameVec, "Expected 'Name' column in Arrow schema"); + } + } + @LiveOnly @Test public void listBlobsArrowDeserializer() throws Exception { From d98fc3627f9334b060728370c5de19d0c95897e4 Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 27 Mar 2026 20:46:42 -0400 Subject: [PATCH 17/65] wire Arrow path in listBlobsByHierarchy with integration tests --- .../storage/blob/BlobContainerClient.java | 82 ++++++++++++++---- .../util/ArrowBlobListDeserializer.java | 10 ++- .../azure/storage/blob/ContainerApiTests.java | 83 +++++++++++++++++++ 3 files changed, 158 insertions(+), 17 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 2bf71da08c91..57f8be9017e0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -27,6 +27,7 @@ import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.FilterBlobSegment; @@ -1220,6 +1221,9 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO .setPrefix(options.getPrefix()) .setDetails(options.getDetails()) .setStartFrom(options.getStartFrom()); + if (Boolean.TRUE.equals(options.getUseArrow())) { + finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + } } /* If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. @@ -1242,25 +1246,71 @@ private PagedResponse listBlobsHierarchySegment(String marker, String ArrayList include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - Callable> operation - = () -> azureBlobStorage.getContainers() - .listBlobHierarchySegmentWithResponse(containerName, delimiter, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE); + if (Boolean.TRUE.equals(options.getUseArrow())) { + Callable> operation + = () -> azureBlobStorage.getContainers() + .listBlobHierarchySegmentApacheArrowWithResponse(containerName, delimiter, options.getPrefix(), + marker, options.getMaxResultsPerPage(), include, null, options.getStartFrom(), + options.getEndBefore(), null, Context.NONE); + ResponseBase response + = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - ResponseBase response - = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - BlobHierarchyListSegment segment = response.getValue().getSegment(); - List value = new ArrayList<>(); - if (segment != null) { - segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); - segment.getBlobPrefixes() - .forEach(prefix -> value - .add(new BlobItem().setName(ModelHelper.toBlobNameString(prefix.getName())).setIsPrefix(true))); - } + if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult + = ArrowBlobListDeserializer.deserialize(response.getValue()); - return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), value, - response.getValue().getNextMarker(), response.getDeserializedHeaders()); + List value = arrowResult.getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + value, arrowResult.getNextMarker(), response.getDeserializedHeaders()); + } else { + // XML fallback — service returned XML instead of Arrow + try { + ListBlobsHierarchySegmentResponse xmlResponse + = ListBlobsHierarchySegmentResponse.fromXml(XmlReader.fromStream(response.getValue())); + + BlobHierarchyListSegment segment = xmlResponse.getSegment(); + List value = new ArrayList<>(); + if (segment != null) { + segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); + segment.getBlobPrefixes() + .forEach(prefix -> value + .add(new BlobItem().setName(ModelHelper.toBlobNameString(prefix.getName())) + .setIsPrefix(true))); + } + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), value, xmlResponse.getNextMarker(), null); + } catch (XMLStreamException e) { + throw LOGGER.logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + } + } + } else { + Callable> operation + = () -> azureBlobStorage.getContainers() + .listBlobHierarchySegmentWithResponse(containerName, delimiter, options.getPrefix(), marker, + options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE); + + ResponseBase response + = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + + BlobHierarchyListSegment segment = response.getValue().getSegment(); + List value = new ArrayList<>(); + if (segment != null) { + segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); + segment.getBlobPrefixes() + .forEach(prefix -> value + .add(new BlobItem().setName(ModelHelper.toBlobNameString(prefix.getName())).setIsPrefix(true))); + } + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + value, response.getValue().getNextMarker(), response.getDeserializedHeaders()); + } } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 66108aceb74c..e9149a197661 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -122,7 +122,6 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { BlobItemInternal item = new BlobItemInternal(); - BlobItemPropertiesInternal properties = new BlobItemPropertiesInternal(); // Name String name = getVarChar(root, "Name", index); @@ -130,6 +129,15 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { item.setName(new BlobName().setContent(name)); } + // ResourceType — hierarchy listings use "blobprefix" for virtual directory rows + String resourceType = getVarChar(root, "ResourceType", index); + if ("blobprefix".equals(resourceType)) { + item.setIsPrefix(true); + return item; + } + + BlobItemPropertiesInternal properties = new BlobItemPropertiesInternal(); + // Deleted Boolean deleted = getBit(root, "Deleted", index); if (deleted != null) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 9e858aa5589b..ab87154bd01b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2482,4 +2482,87 @@ public void listBlobsArrowDeserializer() throws Exception { assertEquals(blobName, publicItem.getName()); assertEquals(7L, (long) publicItem.getProperties().getContentLength()); } + + @Test + public void listBlobsByHierarchyArrowBasic() { + // Upload blobs in a directory structure + cc.getBlobClient("dir/blob1") + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + cc.getBlobClient("dir/blob2") + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + cc.getBlobClient("topblob") + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + List items = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); + + // Root level: one prefix "dir/" and one blob "topblob" + assertEquals(2, items.size()); + + BlobItem prefixItem = items.stream().filter(BlobItem::isPrefix).findFirst().orElse(null); + BlobItem blobItem = items.stream().filter(i -> !i.isPrefix()).findFirst().orElse(null); + + assertNotNull(prefixItem); + assertEquals("dir/", prefixItem.getName()); + assertTrue(prefixItem.isPrefix()); + + assertNotNull(blobItem); + assertEquals("topblob", blobItem.getName()); + assertFalse(blobItem.isPrefix()); + assertNotNull(blobItem.getProperties()); + assertEquals(DATA.getDefaultDataSize(), blobItem.getProperties().getContentLength()); + assertEquals(BlobType.BLOCK_BLOB, blobItem.getProperties().getBlobType()); + assertNotNull(blobItem.getProperties().getLastModified()); + assertNotNull(blobItem.getProperties().getETag()); + } + + @Test + public void listBlobsByHierarchyArrowWithMetadata() { + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + cc.getBlobClient("dir/" + blobName) + .getBlockBlobClient() + .uploadWithResponse(DATA.getDefaultInputStream(), DATA.getDefaultDataSize(), null, metadata, null, null, + null, null, null); + cc.getBlobClient("topblob") + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true) + .setPrefix("dir/") + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + List blobs = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); + + assertEquals(1, blobs.size()); + assertFalse(blobs.get(0).isPrefix()); + assertNotNull(blobs.get(0).getMetadata()); + assertEquals("testvalue", blobs.get(0).getMetadata().get("testkey")); + } + + @Test + public void listBlobsByHierarchyArrowPagination() { + // Upload blobs across multiple directories + for (int i = 0; i < 3; i++) { + cc.getBlobClient("dir" + i + "/blob") + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + } + cc.getBlobClient("topblob") + .getBlockBlobClient() + .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true).setMaxResultsPerPage(1); + List allItems = new ArrayList<>(); + for (PagedResponse page : cc.listBlobsByHierarchy("/", options, null).iterableByPage()) { + assertTrue(page.getValue().size() <= 1); + allItems.addAll(page.getValue()); + } + + // 3 prefixes + 1 blob = 4 items + assertEquals(4, allItems.size()); + } } From 24eb7f1f7ad5905536cb8ca50444e4e77970a05f Mon Sep 17 00:00:00 2001 From: browndav Date: Sat, 28 Mar 2026 11:40:46 -0400 Subject: [PATCH 18/65] complete Arrow ListBlobs gap remediation: missing fields, NumberOfRecords, and async client Add 6 missing schema field mappings to ArrowBlobListDeserializer (Content-CRC64, Encrypted, OrsPolicySourceBlob, AffinityId, SmartAccessTier, Tags) with supporting model fields and public delegates. Expose NumberOfRecords from Arrow schema metadata. Wire Arrow path into BlobContainerAsyncClient for both flat and hierarchy listings with XML content-type fallback. Add listBlobsArrowWithTags integration test. --- .../blob/BlobContainerAsyncClient.java | 137 ++++++++++++++++++ .../models/BlobItemInternal.java | 27 ++++ .../models/BlobItemPropertiesInternal.java | 84 +++++++++++ .../util/ArrowBlobListDeserializer.java | 47 +++++- .../azure/storage/blob/models/BlobItem.java | 10 ++ .../blob/models/BlobItemProperties.java | 27 ++++ .../azure/storage/blob/ContainerApiTests.java | 22 +++ 7 files changed, 352 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index b86fe4e76b2f..5a650f169ade 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -28,6 +28,7 @@ import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ModelHelper; @@ -1125,11 +1126,18 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize) .setPrefix(options.getPrefix()) .setDetails(options.getDetails()); + if (Boolean.TRUE.equals(options.getUseArrow())) { + finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + } } } else { finalOptions = options; } + if (finalOptions != null && Boolean.TRUE.equals(finalOptions.getUseArrow())) { + return listBlobsFlatSegmentArrow(marker, finalOptions, timeout); + } + return listBlobsFlatSegment(marker, finalOptions, timeout).map(response -> { List value = response.getValue().getSegment() == null ? Collections.emptyList() @@ -1177,6 +1185,62 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S timeout); } + private Mono> listBlobsFlatSegmentArrow(String marker, ListBlobsOptions options, + Duration timeout) { + options = options == null ? new ListBlobsOptions() : options; + + ArrayList include + = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); + + ListBlobsOptions finalOptions = options; + return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getContainers() + .listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, finalOptions.getPrefix(), marker, + finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), + finalOptions.getEndBefore(), null, Context.NONE), + timeout).flatMap(response -> { + String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); + + return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { + java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(bytes); + + if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult + = ArrowBlobListDeserializer.deserialize(bais); + + List value = arrowResult.getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return (PagedResponse) new PagedResponseBase<>(response.getRequest(), + response.getStatusCode(), response.getHeaders(), value, arrowResult.getNextMarker(), + response.getDeserializedHeaders()); + } else { + // XML fallback + try { + ListBlobsFlatSegmentResponse xmlResponse + = ListBlobsFlatSegmentResponse.fromXml(com.azure.xml.XmlReader.fromStream(bais)); + + List value = xmlResponse.getSegment() == null + ? Collections.emptyList() + : xmlResponse.getSegment() + .getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return (PagedResponse) new PagedResponseBase<>(response.getRequest(), + response.getStatusCode(), response.getHeaders(), value, xmlResponse.getNextMarker(), + null); + } catch (javax.xml.stream.XMLStreamException e) { + throw LOGGER + .logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + } + } + }); + }); + } + /** * Returns a reactive Publisher emitting all the blobs and directories (prefixes) under the given directory * (prefix). Directories will have {@link BlobItem#isPrefix()} set to true. @@ -1302,10 +1366,18 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List .setPrefix(options.getPrefix()) .setDetails(options.getDetails()) .setStartFrom(options.getStartFrom()); + if (Boolean.TRUE.equals(options.getUseArrow())) { + finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + } } } else { finalOptions = options; } + + if (finalOptions != null && Boolean.TRUE.equals(finalOptions.getUseArrow())) { + return listBlobsHierarchySegmentArrow(marker, delimiter, finalOptions, timeout); + } + return listBlobsHierarchySegment(marker, delimiter, finalOptions, timeout).map(response -> { BlobHierarchyListSegment segment = response.getValue().getSegment(); List value; @@ -1344,6 +1416,71 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List timeout); } + private Mono> listBlobsHierarchySegmentArrow(String marker, String delimiter, + ListBlobsOptions options, Duration timeout) { + options = options == null ? new ListBlobsOptions() : options; + if (options.getDetails().getRetrieveSnapshots()) { + throw LOGGER.logExceptionAsError( + new UnsupportedOperationException("Including snapshots in a hierarchical listing is not supported.")); + } + + ArrayList include + = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); + + ListBlobsOptions finalOptions = options; + return StorageImplUtils + .applyOptionalTimeout(this.azureBlobStorage.getContainers() + .listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, + finalOptions.getPrefix(), marker, finalOptions.getMaxResultsPerPage(), include, null, + finalOptions.getStartFrom(), finalOptions.getEndBefore(), null, Context.NONE), + timeout) + .flatMap(response -> { + String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); + + return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { + java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(bytes); + + if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult + = ArrowBlobListDeserializer.deserialize(bais); + + List value = arrowResult.getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return (PagedResponse) new PagedResponseBase<>(response.getRequest(), + response.getStatusCode(), response.getHeaders(), value, arrowResult.getNextMarker(), + response.getDeserializedHeaders()); + } else { + // XML fallback + try { + ListBlobsHierarchySegmentResponse xmlResponse + = ListBlobsHierarchySegmentResponse.fromXml(com.azure.xml.XmlReader.fromStream(bais)); + + BlobHierarchyListSegment segment = xmlResponse.getSegment(); + List value = new ArrayList<>(); + if (segment != null) { + segment.getBlobItems() + .forEach(item -> value.add(BlobItemConstructorProxy.create(item))); + segment.getBlobPrefixes() + .forEach(prefix -> value + .add(new BlobItem().setName(ModelHelper.toBlobNameString(prefix.getName())) + .setIsPrefix(true))); + } + + return (PagedResponse) new PagedResponseBase<>(response.getRequest(), + response.getStatusCode(), response.getHeaders(), value, xmlResponse.getNextMarker(), + null); + } catch (javax.xml.stream.XMLStreamException e) { + throw LOGGER + .logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + } + } + }); + }); + } + /** * Returns a reactive Publisher emitting the blobs in this container whose tags match the query expression. For more * information, including information on the query syntax, see the Azure Docs. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java index ff98bcc2dbc5..b4206292da11 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java @@ -80,6 +80,12 @@ public final class BlobItemInternal implements XmlSerializable @Generated private Boolean hasVersionsOnly; + /* + * When a blob is encrypted with a customer provided key and has application metadata, + * the Encrypted field will be set to true and the metadata will be null. + */ + private Boolean metadataEncrypted; + /* * The IsPrefix property. */ @@ -335,6 +341,27 @@ public BlobItemInternal setIsPrefix(Boolean isPrefix) { return this; } + /** + * Get the metadataEncrypted property: When a blob is encrypted with a customer provided key and has application + * metadata, the Encrypted field will be set to true and the metadata will be null. + * + * @return the metadataEncrypted value. + */ + public Boolean isMetadataEncrypted() { + return this.metadataEncrypted; + } + + /** + * Set the metadataEncrypted property. + * + * @param metadataEncrypted the metadataEncrypted value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setMetadataEncrypted(Boolean metadataEncrypted) { + this.metadataEncrypted = metadataEncrypted; + return this; + } + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java index 909005607d59..7dc441380236 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java @@ -272,6 +272,21 @@ public final class BlobItemPropertiesInternal implements XmlSerializable blobItems; private final String nextMarker; + private final Integer numberOfRecords; /** * Creates an ArrowListBlobsResult. * * @param blobItems the deserialized blob items * @param nextMarker the continuation token for the next page, or null if this is the last page + * @param numberOfRecords the total number of records reported by the service, or null if not present */ - public ArrowListBlobsResult(List blobItems, String nextMarker) { + public ArrowListBlobsResult(List blobItems, String nextMarker, Integer numberOfRecords) { this.blobItems = blobItems; this.nextMarker = nextMarker; + this.numberOfRecords = numberOfRecords; } /** @@ -76,6 +79,13 @@ public List getBlobItems() { public String getNextMarker() { return nextMarker; } + + /** + * @return the total number of records reported by the service, or null if not present + */ + public Integer getNumberOfRecords() { + return numberOfRecords; + } } private ArrowBlobListDeserializer() { @@ -91,6 +101,7 @@ private ArrowBlobListDeserializer() { public static ArrowListBlobsResult deserialize(InputStream arrowStream) { List results = new ArrayList<>(); String nextMarker = null; + Integer numberOfRecords = null; try (BufferAllocator allocator = new RootAllocator(); ArrowStreamReader reader = new ArrowStreamReader(arrowStream, allocator)) { @@ -104,6 +115,11 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { if (nextMarker != null && nextMarker.isEmpty()) { nextMarker = null; } + + String numberOfRecordsStr = schemaMetadata.get("NumberOfRecords"); + if (numberOfRecordsStr != null && !numberOfRecordsStr.isEmpty()) { + numberOfRecords = Integer.parseInt(numberOfRecordsStr); + } } // Read all batches @@ -117,7 +133,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { throw new RuntimeException("Failed to deserialize Arrow IPC response", e); } - return new ArrowListBlobsResult(results, nextMarker); + return new ArrowListBlobsResult(results, nextMarker, numberOfRecords); } private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { @@ -168,6 +184,15 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { item.setObjectReplicationMetadata(orMetadata); } + // Tags + Map tags = getMap(root, "Tags", index); + if (tags != null) { + item.setBlobTags(ModelHelper.toBlobTags(tags)); + } + + // Encrypted — indicates metadata is encrypted with customer-provided key + item.setMetadataEncrypted(getBit(root, "Encrypted", index)); + // --- Properties --- properties.setCreationTime(getTimestamp(root, "Creation-Time", index)); @@ -186,6 +211,12 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { properties.setContentMd5(Base64.getDecoder().decode(contentMd5)); } + // Content-CRC64: same encoding as Content-MD5 + String contentCrc64 = getVarChar(root, "Content-CRC64", index); + if (contentCrc64 != null) { + properties.setContentCrc64(Base64.getDecoder().decode(contentCrc64)); + } + // BlobType String blobType = getVarChar(root, "BlobType", index); if (blobType != null) { @@ -200,6 +231,12 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { properties.setAccessTierInferred(getBit(root, "AccessTierInferred", index)); properties.setAccessTierChangeTime(getTimestamp(root, "AccessTierChangeTime", index)); + // SmartAccessTier + String smartAccessTier = getVarChar(root, "SmartAccessTier", index); + if (smartAccessTier != null) { + properties.setSmartAccessTier(AccessTier.fromString(smartAccessTier)); + } + // Lease String leaseStatus = getVarChar(root, "LeaseStatus", index); if (leaseStatus != null) { @@ -220,6 +257,12 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { properties.setEncryptionScope(getVarChar(root, "EncryptionScope", index)); properties.setIncrementalCopy(getBit(root, "IncrementalCopy", index)); + // OrsPolicySourceBlob + properties.setOrsPolicySourceBlob(getVarChar(root, "OrsPolicySourceBlob", index)); + + // AffinityId + properties.setAffinityId(getVarChar(root, "AffinityId", index)); + // Copy fields properties.setCopyId(getVarChar(root, "CopyId", index)); String copyStatus = getVarChar(root, "CopyStatus", index); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java index 7b3558005a5e..049762502c29 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java @@ -274,6 +274,16 @@ public BlobItem setHasVersionsOnly(Boolean hasVersionsOnly) { return this; } + /** + * Get the metadataEncrypted property: When a blob is encrypted with a customer provided key and has application + * metadata, the Encrypted field will be set to true and the metadata will be null. + * + * @return the metadataEncrypted value. + */ + public Boolean isMetadataEncrypted() { + return blobItemInternal.isMetadataEncrypted(); + } + /** * Get the isPrefix property: If blobs are named to mimic a directory hierarchy (i.e. path elements separated by a * delimiter), this property may be used to determine if the {@code BlobItem} is a virtual directory. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java index ccd3b89a3f5b..9f0dc5c3b3f9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java @@ -845,6 +845,33 @@ public BlobItemProperties setImmutabilityPolicy(BlobImmutabilityPolicy immutabil return this; } + /** + * Get the contentCrc64 property: The Content-CRC64 property. + * + * @return the contentCrc64 value. + */ + public byte[] getContentCrc64() { + return internalProperties.getContentCrc64(); + } + + /** + * Get the orsPolicySourceBlob property: The OrsPolicySourceBlob property. + * + * @return the orsPolicySourceBlob value. + */ + public String getOrsPolicySourceBlob() { + return internalProperties.getOrsPolicySourceBlob(); + } + + /** + * Get the affinityId property: The AffinityId property. + * + * @return the affinityId value. + */ + public String getAffinityId() { + return internalProperties.getAffinityId(); + } + /** * Get the hasLegalHold property: The LegalHold property. * diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index ab87154bd01b..43da252e2757 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2565,4 +2565,26 @@ public void listBlobsByHierarchyArrowPagination() { // 3 prefixes + 1 blob = 4 items assertEquals(4, allItems.size()); } + + @LiveOnly + @Test + public void listBlobsArrowWithTags() { + // Upload a blob and set tags + String blobName = generateBlobName(); + cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + Map tags = new HashMap<>(); + tags.put("tagkey", "tagvalue"); + cc.getBlobClient(blobName).setTags(tags); + + // List with Arrow + retrieveTags + ListBlobsOptions options + = new ListBlobsOptions().setUseArrow(true).setDetails(new BlobListDetails().setRetrieveTags(true)); + List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); + + assertEquals(1, blobs.size()); + assertEquals(blobName, blobs.get(0).getName()); + assertNotNull(blobs.get(0).getTags()); + assertEquals("tagvalue", blobs.get(0).getTags().get("tagkey")); + } } From 343492af45400610aa55572159e38914444b1dfc Mon Sep 17 00:00:00 2001 From: browndav Date: Sat, 28 Mar 2026 12:10:34 -0400 Subject: [PATCH 19/65] add javadocs to new methods in listblobsoptions --- .../storage/blob/models/ListBlobsOptions.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index 89c32c972b0a..5f34dd80f223 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -76,7 +76,7 @@ public ListBlobsOptions setPrefix(String prefix) { * This parameter is similar to the prefix filter: it allows listing blobs starting from the specified path, rather than from the beginning of the container. * For non-recursive lists, only one entity level is supported. * - * @return the marker indicating where to start listing blobs + * @return the marker indicating where to start listing blobs (inclusive) */ public String getStartFrom() { return startFrom; @@ -86,7 +86,7 @@ public String getStartFrom() { * Sets an optional parameter that specifies an absolute path within the container. This parameter is similar to the prefix filter: it allows listing blobs starting from the specified path, rather than from the beginning of the container. * For non-recursive lists, only one entity level is supported. * - * @param startFrom The marker indicating where to start listing blobs + * @param startFrom The marker indicating where to start listing blobs (inclusive) * @return the updated ListBlobsOptions object */ public ListBlobsOptions setStartFrom(String startFrom) { @@ -94,19 +94,42 @@ public ListBlobsOptions setStartFrom(String startFrom) { return this; } + /** + * Gets the endBefore value. Only supported with Arrow listings. The listing will end before this path (exclusive). + * + * @return the endBefore value. + */ public String getEndBefore() { return endBefore; } + /** + * Sets the endBefore value. Only supported with Arrow listings. The listing will end before this path (exclusive). + * + * @param endBefore the endBefore value to set. + * @return the updated ListBlobsOptions object. + */ public ListBlobsOptions setEndBefore(String endBefore) { this.endBefore = endBefore; return this; } + /** + * Gets whether to use the Apache Arrow response format for listing. + * + * @return whether Arrow format is enabled. + */ public Boolean getUseArrow() { return useArrow; } + /** + * Sets whether to use the Apache Arrow response format for listing. When enabled, the service returns an Arrow IPC + * stream instead of XML, which can provide latency and scale improvements. + * + * @param useArrow whether to use Arrow format. + * @return the updated ListBlobsOptions object. + */ public ListBlobsOptions setUseArrow(Boolean useArrow) { this.useArrow = useArrow; return this; From 10fad8bded1e32d68d43baa95708606b4a0a6cd8 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 30 Mar 2026 13:57:43 -0400 Subject: [PATCH 20/65] changed liveonly tests to recorded tests, minus cpk --- .../test/java/com/azure/storage/blob/ContainerApiTests.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 43da252e2757..2e81525962db 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2262,7 +2262,6 @@ public void listBlobsArrowEncryptedBlob() { assertNull(blobs.get(0).getMetadata()); } - @LiveOnly @Test public void listBlobsArrowSchemaDiscovery() throws Exception { // Upload a test blob with metadata @@ -2334,7 +2333,6 @@ public void listBlobsArrowSchemaDiscovery() throws Exception { } } - @LiveOnly @Test public void listBlobsArrowHierarchySchemaDiscovery() throws Exception { // Upload blobs with directory structure and metadata @@ -2412,7 +2410,6 @@ public void listBlobsArrowHierarchySchemaDiscovery() throws Exception { } } - @LiveOnly @Test public void listBlobsArrowDeserializer() throws Exception { // Upload a test blob with metadata @@ -2566,7 +2563,6 @@ public void listBlobsByHierarchyArrowPagination() { assertEquals(4, allItems.size()); } - @LiveOnly @Test public void listBlobsArrowWithTags() { // Upload a blob and set tags From d283f7f747862ea1b44c2c6e522dbadd1a8c0800 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 30 Mar 2026 14:29:44 -0400 Subject: [PATCH 21/65] remove local blob file and redirect to Nick's repo --- .../azure-storage-blob/swagger/README.md | 2 +- .../azure-storage-blob/swagger/blob.json | 13018 ---------------- 2 files changed, 1 insertion(+), 13019 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/swagger/blob.json diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index e9f2fb14d90f..a69eb1ee871b 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.63' -input-file: C:\repos\azure-sdk-for-java\sdk\storage\azure-storage-blob\swagger\blob.json +input-file: https://raw.githubusercontent.com/nickliu-msft/azure-rest-api-specs/ab1ec63862fdf4506cfb1cdd4c8105281b5de3f0/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-10-06/blob.json java: true output-folder: ../ namespace: com.azure.storage.blob diff --git a/sdk/storage/azure-storage-blob/swagger/blob.json b/sdk/storage/azure-storage-blob/swagger/blob.json deleted file mode 100644 index 5d82862ca687..000000000000 --- a/sdk/storage/azure-storage-blob/swagger/blob.json +++ /dev/null @@ -1,13018 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Blob Storage", - "version": "2026-10-06", - "x-ms-code-generation-settings": { - "header": "MIT", - "strictSpecAdherence": false - } - }, - "x-ms-parameterized-host": { - "hostTemplate": "{url}", - "useSchemePrefix": false, - "positionInOperation": "first", - "parameters": [ - { - "$ref": "#/parameters/Url" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [ - "application/xml" - ], - "produces": [ - "application/xml" - ], - "paths": {}, - "x-ms-paths": { - "/?restype=service&comp=properties": { - "put": { - "tags": [ - "service" - ], - "operationId": "Service_SetProperties", - "description": "Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules", - "parameters": [ - { - "$ref": "#/parameters/StorageServiceProperties" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "202": { - "description": "Success (Accepted)", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "get": { - "tags": [ - "service" - ], - "operationId": "Service_GetProperties", - "description": "gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - } - }, - "schema": { - "$ref": "#/definitions/StorageServiceProperties" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "service" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/?restype=service&comp=stats": { - "get": { - "tags": [ - "service" - ], - "operationId": "Service_GetStatistics", - "description": "Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/StorageServiceStats" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "service" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "stats" - ] - } - ] - }, - "/?comp=list": { - "get": { - "tags": [ - "service" - ], - "operationId": "Service_ListContainersSegment", - "description": "The List Containers Segment operation returns a list of the containers under the specified account", - "parameters": [ - { - "$ref": "#/parameters/Prefix" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/ListContainersInclude" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - } - }, - "schema": { - "$ref": "#/definitions/ListContainersSegmentResponse" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "NextMarker" - } - }, - "parameters": [ - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "list" - ] - } - ] - }, - "/?restype=service&comp=userdelegationkey": { - "post": { - "tags": [ - "service" - ], - "operationId": "Service_GetUserDelegationKey", - "description": "Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication.", - "parameters": [ - { - "$ref": "#/parameters/KeyInfo" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/UserDelegationKey" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "service" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "userdelegationkey" - ] - } - ] - }, - "/?restype=account&comp=properties": { - "get": { - "tags": [ - "service" - ], - "operationId": "Service_GetAccountInfo", - "description": "Returns the sku name and account kind ", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success (OK)", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-sku-name": { - "x-ms-client-name": "SkuName", - "type": "string", - "enum": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - "Standard_GZRS", - "Premium_ZRS", - "Standard_RAGZRS" - ], - "x-ms-enum": { - "name": "SkuName", - "modelAsString": false - }, - "description": "Identifies the sku name of the account" - }, - "x-ms-account-kind": { - "x-ms-client-name": "AccountKind", - "type": "string", - "enum": [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage" - ], - "x-ms-enum": { - "name": "AccountKind", - "modelAsString": false - }, - "description": "Identifies the account kind" - }, - "x-ms-is-hns-enabled": { - "x-ms-client-name": "IsHierarchicalNamespaceEnabled", - "type": "boolean", - "description": "Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "account" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/?comp=batch": { - "post": { - "tags": [ - "service" - ], - "operationId": "Service_SubmitBatch", - "description": "The Batch operation allows multiple API calls to be embedded into a single HTTP request.", - "parameters": [ - { - "$ref": "#/parameters/Body" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/MultipartContentType" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchresponse_GUID" - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "batch" - ] - } - ] - }, - "/?comp=blobs": { - "get": { - "tags": [ - "service" - ], - "operationId": "Service_FilterBlobs", - "description": "The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/FilterBlobsWhere" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/FilterBlobsInclude" - } - ], - "responses": { - "200": { - "description": "Success", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/FilterBlobSegment" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "blobs" - ] - } - ] - }, - "/{containerName}?restype=container": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_Create", - "description": "creates a new container under the specified account. If the container with the same name already exists, the operation fails", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/BlobPublicAccess" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/DefaultEncryptionScope" - }, - { - "$ref": "#/parameters/DenyEncryptionScopeOverride" - } - ], - "responses": { - "201": { - "description": "Success, Container created.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "get": { - "tags": [ - "container" - ], - "operationId": "Container_GetProperties", - "description": "returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success", - "headers": { - "x-ms-meta": { - "type": "string", - "x-ms-client-name": "Metadata", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-duration": { - "x-ms-client-name": "LeaseDuration", - "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "x-ms-lease-state": { - "x-ms-client-name": "LeaseState", - "description": "Lease state of the blob.", - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "x-ms-lease-status": { - "x-ms-client-name": "LeaseStatus", - "description": "The current lease status of the blob.", - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-public-access": { - "x-ms-client-name": "BlobPublicAccess", - "description": "Indicated whether data in the container may be accessed publicly and the level of access", - "type": "string", - "enum": [ - "container", - "blob" - ], - "x-ms-enum": { - "name": "PublicAccessType", - "modelAsString": true - } - }, - "x-ms-has-immutability-policy": { - "x-ms-client-name": "HasImmutabilityPolicy", - "description": "Indicates whether the container has an immutability policy set on it.", - "type": "boolean" - }, - "x-ms-has-legal-hold": { - "x-ms-client-name": "HasLegalHold", - "description": "Indicates whether the container has a legal hold.", - "type": "boolean" - }, - "x-ms-default-encryption-scope": { - "x-ms-client-name": "DefaultEncryptionScope", - "description": "The default encryption scope for the container.", - "type": "string" - }, - "x-ms-deny-encryption-scope-override": { - "x-ms-client-name": "DenyEncryptionScopeOverride", - "description": "Indicates whether the container's default encryption scope can be overriden.", - "type": "boolean" - }, - "x-ms-immutable-storage-with-versioning-enabled": { - "x-ms-client-name": "IsImmutableStorageWithVersioningEnabled", - "description": "Indicates whether version level worm is enabled on a container.", - "type": "boolean" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "delete": { - "tags": [ - "container" - ], - "operationId": "Container_Delete", - "description": "operation marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "202": { - "description": "Accepted", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - } - ] - }, - "/{containerName}?restype=container&comp=metadata": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_SetMetadata", - "description": "operation sets one or more user-defined name-value pairs for the specified container.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "metadata" - ] - } - ] - }, - "/{containerName}?restype=container&comp=acl": { - "get": { - "tags": [ - "container" - ], - "operationId": "Container_GetAccessPolicy", - "description": "gets the permissions for the specified container. The permissions indicate whether container data may be accessed publicly.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success", - "headers": { - "x-ms-blob-public-access": { - "x-ms-client-name": "BlobPublicAccess", - "description": "Indicated whether data in the container may be accessed publicly and the level of access", - "type": "string", - "enum": [ - "container", - "blob" - ], - "x-ms-enum": { - "name": "PublicAccessType", - "modelAsString": true - } - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/SignedIdentifiers" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "put": { - "tags": [ - "container" - ], - "operationId": "Container_SetAccessPolicy", - "description": "sets the permissions for the specified container. The permissions indicate whether blobs in a container may be accessed publicly.", - "parameters": [ - { - "$ref": "#/parameters/ContainerAcl" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobPublicAccess" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "acl" - ] - } - ] - }, - "/{containerName}?restype=container&comp=undelete": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_Restore", - "description": "Restores a previously-deleted container.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/DeletedContainerName" - }, - { - "$ref": "#/parameters/DeletedContainerVersion" - } - ], - "responses": { - "201": { - "description": "Created.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "undelete" - ] - } - ] - }, - "/{containerName}?restype=container&comp=rename": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_Rename", - "description": "Renames an existing container.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/SourceContainerName" - }, - { - "$ref": "#/parameters/SourceLeaseId" - } - ], - "responses": { - "200": { - "description": "Created.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "rename" - ] - } - ] - }, - "/{containerName}?restype=container&comp=batch": { - "post": { - "tags": [ - "container" - ], - "operationId": "Container_SubmitBatch", - "description": "The Batch operation allows multiple API calls to be embedded into a single HTTP request.", - "parameters": [ - { - "$ref": "#/parameters/Body" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/MultipartContentType" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "202": { - "description": "Success.", - "headers": { - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchresponse_GUID" - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "batch" - ] - } - ] - }, - "/{containerName}?restype=container&comp=blobs": { - "get": { - "tags": [ - "container" - ], - "operationId": "Container_FilterBlobs", - "description": "The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search expression. Filter blobs searches within the given container.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/FilterBlobsWhere" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/FilterBlobsInclude" - } - ], - "responses": { - "200": { - "description": "Success", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/FilterBlobSegment" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "blobs" - ] - } - ] - }, - "/{containerName}?comp=lease&restype=container&acquire": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_AcquireLease", - "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseDuration" - }, - { - "$ref": "#/parameters/ProposedLeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "201": { - "description": "The Acquire operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-id": { - "x-ms-client-name": "LeaseId", - "type": "string", - "description": "Uniquely identifies a container's lease" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "acquire" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}?comp=lease&restype=container&release": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_ReleaseLease", - "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdRequired" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Release operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "release" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}?comp=lease&restype=container&renew": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_RenewLease", - "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdRequired" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Renew operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-id": { - "x-ms-client-name": "LeaseId", - "type": "string", - "description": "Uniquely identifies a container's lease" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "renew" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}?comp=lease&restype=container&break": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_BreakLease", - "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseBreakPeriod" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "202": { - "description": "The Break operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-time": { - "x-ms-client-name": "LeaseTime", - "type": "integer", - "description": "Approximate time remaining in the lease period, in seconds." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "break" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}?comp=lease&restype=container&change": { - "put": { - "tags": [ - "container" - ], - "operationId": "Container_ChangeLease", - "description": "[Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdRequired" - }, - { - "$ref": "#/parameters/ProposedLeaseIdRequired" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Change operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-id": { - "x-ms-client-name": "LeaseId", - "type": "string", - "description": "Uniquely identifies a container's lease" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "change" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}?restype=container&comp=list&flat": { - "get": { - "tags": [ - "containers" - ], - "operationId": "Container_ListBlobFlatSegment", - "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", - "parameters": [ - { - "$ref": "#/parameters/Prefix" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/ListBlobsInclude" - }, - { - "$ref": "#/parameters/ListBlobsStartFrom" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For List Blobs this is 'application/xml'" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/ListBlobsFlatSegmentResponse" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "NextMarker" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "list" - ] - } - ] - }, - "/{containerName}?restype=container&comp=list&flat&arrow": { - "get": { - "tags": [ - "containers" - ], - "operationId": "Container_ListBlobFlatSegment_ApacheArrow", - "description": "The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache Arrow use case so response is returned as raw to be deserialized by the client.", - "produces": [ - "application/vnd.apache.arrow.stream", - "application/xml" - ], - "parameters": [ - { - "name": "Accept", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "application/vnd.apache.arrow.stream" - ], - "default": "application/vnd.apache.arrow.stream", - "description": "Must be set to 'application/vnd.apache.arrow.stream' to request Apache Arrow format. The service may still return XML if Arrow is not enabled for the account \u00e2\u20ac\u201d clients must check the Content-Type response header." - }, - { - "$ref": "#/parameters/Prefix" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/ListBlobsInclude" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ListBlobsStartFrom" - }, - { - "$ref": "#/parameters/ListBlobsEndBefore" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success. Response body is an Apache Arrow IPC stream (application/vnd.apache.arrow.stream) or XML (application/xml) if Arrow is not enabled for the account. Check the Content-Type response header to determine format. Arrow responses carry NextMarker and NumberOfRecords in the Arrow schema metadata, not in HTTP headers.", - "headers": { - "Content-Type": { - "type": "string", - "description": "The media type of the response body. Either 'application/vnd.apache.arrow.stream' if Arrow is enabled for the account, or 'application/xml' as a fallback. Clients must check this header to determine how to deserialize the response." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Failure. Error responses are always returned in XML regardless of the Accept header.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "list" - ] - } - ] - }, - "/{containerName}?restype=container&comp=list&hierarchy": { - "get": { - "tags": [ - "containers" - ], - "operationId": "Container_ListBlobHierarchySegment", - "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container", - "parameters": [ - { - "$ref": "#/parameters/Prefix" - }, - { - "$ref": "#/parameters/Delimiter" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/ListBlobsInclude" - }, - { - "$ref": "#/parameters/ListBlobsStartFrom" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For List Blobs this is 'application/xml'" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/ListBlobsHierarchySegmentResponse" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "NextMarker" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "list" - ] - } - ] - }, - "/{containerName}?restype=container&comp=list&hierarchy&arrow": { - "get": { - "tags": [ - "containers" - ], - "operationId": "Container_ListBlobHierarchySegment_ApacheArrow", - "description": "[Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache Arrow use case so response is returned as raw to be deserialized by the client.", - "produces": [ - "application/vnd.apache.arrow.stream", - "application/xml" - ], - "parameters": [ - { - "name": "Accept", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "application/vnd.apache.arrow.stream" - ], - "default": "application/vnd.apache.arrow.stream", - "description": "Must be set to 'application/vnd.apache.arrow.stream' to request Apache Arrow format. The service may still return XML if Arrow is not enabled for the account \u00e2\u20ac\u201d clients must check the Content-Type response header." - }, - { - "$ref": "#/parameters/Prefix" - }, - { - "$ref": "#/parameters/Delimiter" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - }, - { - "$ref": "#/parameters/ListBlobsInclude" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ListBlobsStartFrom" - }, - { - "$ref": "#/parameters/ListBlobsEndBefore" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success.", - "headers": { - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For List Blobs this is 'application/xml'" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "container" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "list" - ] - } - ] - }, - "/{containerName}?restype=account&comp=properties": { - "get": { - "tags": [ - "container" - ], - "operationId": "Container_GetAccountInfo", - "description": "Returns the sku name and account kind ", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success (OK)", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-sku-name": { - "x-ms-client-name": "SkuName", - "type": "string", - "enum": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - "Standard_GZRS", - "Premium_ZRS", - "Standard_RAGZRS" - ], - "x-ms-enum": { - "name": "SkuName", - "modelAsString": false - }, - "description": "Identifies the sku name of the account" - }, - "x-ms-account-kind": { - "x-ms-client-name": "AccountKind", - "type": "string", - "enum": [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage" - ], - "x-ms-enum": { - "name": "AccountKind", - "modelAsString": false - }, - "description": "Identifies the account kind" - }, - "x-ms-is-hns-enabled": { - "x-ms-client-name": "IsHierarchicalNamespaceEnabled", - "type": "boolean", - "description": "Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "account" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/{containerName}/{blob}": { - "get": { - "tags": [ - "blob" - ], - "operationId": "Blob_Download", - "description": "The Download operation reads or downloads a blob from the system, including its metadata and properties. You can also call Download to read a snapshot.", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Range" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/GetRangeContentMD5" - }, - { - "$ref": "#/parameters/GetRangeContentCRC64" - }, - { - "$ref": "#/parameters/StructuredBodyGet" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Returns the content of the entire blob.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-creation-time": { - "x-ms-client-name": "CreationTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was created." - }, - "x-ms-meta": { - "type": "string", - "x-ms-client-name": "Metadata", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "x-ms-or-policy-id": { - "x-ms-client-name": "ObjectReplicationPolicyId", - "type": "string", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." - }, - "x-ms-or": { - "type": "string", - "x-ms-client-name": "ObjectReplicationRules", - "x-ms-header-collection-prefix": "x-ms-or-", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed)." - }, - "Content-Length": { - "type": "integer", - "format": "int64", - "description": "The number of bytes present in the response body." - }, - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" - }, - "Content-Range": { - "type": "string", - "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "Content-Encoding": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Encoding request header" - }, - "Cache-Control": { - "type": "string", - "description": "This header is returned if it was previously specified for the blob." - }, - "Content-Disposition": { - "type": "string", - "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." - }, - "Content-Language": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Language request header." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-blob-type": { - "x-ms-client-name": "BlobType", - "description": "The blob's type.", - "type": "string", - "enum": [ - "BlockBlob", - "PageBlob", - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - }, - "x-ms-copy-completion-time": { - "x-ms-client-name": "CopyCompletionTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status-description": { - "x-ms-client-name": "CopyStatusDescription", - "type": "string", - "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-progress": { - "x-ms-client-name": "CopyProgress", - "type": "string", - "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-source": { - "x-ms-client-name": "CopySource", - "type": "string", - "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - }, - "x-ms-lease-duration": { - "x-ms-client-name": "LeaseDuration", - "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "x-ms-lease-state": { - "x-ms-client-name": "LeaseState", - "description": "Lease state of the blob.", - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "x-ms-lease-status": { - "x-ms-client-name": "LeaseStatus", - "description": "The current lease status of the blob.", - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "x-ms-is-current-version": { - "x-ms-client-name": "IsCurrentVersion", - "type": "boolean", - "description": "The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header." - }, - "Accept-Ranges": { - "type": "string", - "description": "Indicates that the service supports requests for partial blob content." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-blob-content-md5": { - "x-ms-client-name": "BlobContentMD5", - "type": "string", - "format": "byte", - "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" - }, - "x-ms-tag-count": { - "x-ms-client-name": "TagCount", - "type": "integer", - "format": "int64", - "description": "The number of tags associated with the blob" - }, - "x-ms-blob-sealed": { - "x-ms-client-name": "IsSealed", - "type": "boolean", - "description": "If this blob has been sealed" - }, - "x-ms-last-access-time": { - "x-ms-client-name": "LastAccessed", - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the blob was last read or written to" - }, - "x-ms-immutability-policy-until-date": { - "x-ms-client-name": "ImmutabilityPolicyExpiresOn", - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire." - }, - "x-ms-immutability-policy-mode": { - "x-ms-client-name": "ImmutabilityPolicyMode", - "type": "string", - "enum": [ - "Mutable", - "Unlocked", - "Locked" - ], - "x-ms-enum": { - "name": "BlobImmutabilityPolicyMode", - "modelAsString": false - }, - "description": "Indicates immutability policy mode." - }, - "x-ms-legal-hold": { - "x-ms-client-name": "LegalHold", - "type": "boolean", - "description": "Indicates if a legal hold is present on the blob." - }, - "x-ms-structured-body": { - "x-ms-client-name": "StructuredBodyType", - "type": "string", - "description": "Indicates the response body contains a structured message and specifies the message schema version and properties." - }, - "x-ms-structured-content-length": { - "x-ms-client-name": "StructuredContentLength", - "type": "integer", - "format": "int64", - "description": "The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length." - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "206": { - "description": "Returns the content of a specified range of the blob.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-creation-time": { - "x-ms-client-name": "CreationTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was created." - }, - "x-ms-meta": { - "type": "string", - "x-ms-client-name": "Metadata", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "x-ms-or-policy-id": { - "x-ms-client-name": "ObjectReplicationPolicyId", - "type": "string", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." - }, - "x-ms-or": { - "type": "string", - "x-ms-client-name": "ObjectReplicationRules", - "x-ms-header-collection-prefix": "x-ms-or-", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed)." - }, - "Content-Length": { - "type": "integer", - "format": "int64", - "description": "The number of bytes present in the response body." - }, - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" - }, - "Content-Range": { - "type": "string", - "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "Content-Encoding": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Encoding request header" - }, - "Cache-Control": { - "type": "string", - "description": "This header is returned if it was previously specified for the blob." - }, - "Content-Disposition": { - "type": "string", - "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." - }, - "Content-Language": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Language request header." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-blob-type": { - "x-ms-client-name": "BlobType", - "description": "The blob's type.", - "type": "string", - "enum": [ - "BlockBlob", - "PageBlob", - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - }, - "x-ms-content-crc64": { - "x-ms-client-name": "ContentCrc64", - "type": "string", - "format": "byte", - "description": "If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the request returns a crc64 for the range, as long as the range size is less than or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is specified in the same request, it will fail with 400(Bad Request)" - }, - "x-ms-copy-completion-time": { - "x-ms-client-name": "CopyCompletionTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status-description": { - "x-ms-client-name": "CopyStatusDescription", - "type": "string", - "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-progress": { - "x-ms-client-name": "CopyProgress", - "type": "string", - "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-source": { - "x-ms-client-name": "CopySource", - "type": "string", - "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - }, - "x-ms-lease-duration": { - "x-ms-client-name": "LeaseDuration", - "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "x-ms-lease-state": { - "x-ms-client-name": "LeaseState", - "description": "Lease state of the blob.", - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "x-ms-lease-status": { - "x-ms-client-name": "LeaseStatus", - "description": "The current lease status of the blob.", - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "x-ms-is-current-version": { - "x-ms-client-name": "IsCurrentVersion", - "type": "boolean", - "description": "The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header." - }, - "Accept-Ranges": { - "type": "string", - "description": "Indicates that the service supports requests for partial blob content." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-blob-content-md5": { - "x-ms-client-name": "BlobContentMD5", - "type": "string", - "format": "byte", - "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" - }, - "x-ms-tag-count": { - "x-ms-client-name": "TagCount", - "type": "integer", - "format": "int64", - "description": "The number of tags associated with the blob" - }, - "x-ms-blob-sealed": { - "x-ms-client-name": "IsSealed", - "type": "boolean", - "description": "If this blob has been sealed" - }, - "x-ms-last-access-time": { - "x-ms-client-name": "LastAccessed", - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the blob was last read or written to" - }, - "x-ms-immutability-policy-until-date": { - "x-ms-client-name": "ImmutabilityPolicyExpiresOn", - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire." - }, - "x-ms-immutability-policy-mode": { - "x-ms-client-name": "ImmutabilityPolicyMode", - "type": "string", - "description": "Indicates immutability policy mode." - }, - "x-ms-legal-hold": { - "x-ms-client-name": "LegalHold", - "type": "boolean", - "description": "Indicates if a legal hold is present on the blob." - }, - "x-ms-structured-body": { - "x-ms-client-name": "StructuredBodyType", - "type": "string", - "description": "Indicates the response body contains a structured message and specifies the message schema version and properties." - }, - "x-ms-structured-content-length": { - "x-ms-client-name": "StructuredContentLength", - "type": "integer", - "format": "int64", - "description": "The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length." - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "head": { - "tags": [ - "blob" - ], - "operationId": "Blob_GetProperties", - "description": "The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Returns the properties of the blob.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-creation-time": { - "x-ms-client-name": "CreationTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was created." - }, - "x-ms-meta": { - "type": "string", - "x-ms-client-name": "Metadata", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "x-ms-or-policy-id": { - "x-ms-client-name": "ObjectReplicationPolicyId", - "type": "string", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." - }, - "x-ms-or": { - "type": "string", - "x-ms-client-name": "ObjectReplicationRules", - "x-ms-header-collection-prefix": "x-ms-or-", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed)." - }, - "x-ms-blob-type": { - "x-ms-client-name": "BlobType", - "description": "The blob's type.", - "type": "string", - "enum": [ - "BlockBlob", - "PageBlob", - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - }, - "x-ms-copy-completion-time": { - "x-ms-client-name": "CopyCompletionTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status-description": { - "x-ms-client-name": "CopyStatusDescription", - "type": "string", - "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-progress": { - "x-ms-client-name": "CopyProgress", - "type": "string", - "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-source": { - "x-ms-client-name": "CopySource", - "type": "string", - "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - }, - "x-ms-incremental-copy": { - "x-ms-client-name": "IsIncrementalCopy", - "type": "boolean", - "description": "Included if the blob is incremental copy blob." - }, - "x-ms-copy-destination-snapshot": { - "x-ms-client-name": "DestinationSnapshot", - "type": "string", - "description": "Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot for this blob." - }, - "x-ms-lease-duration": { - "x-ms-client-name": "LeaseDuration", - "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "x-ms-lease-state": { - "x-ms-client-name": "LeaseState", - "description": "Lease state of the blob.", - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "x-ms-lease-status": { - "x-ms-client-name": "LeaseStatus", - "description": "The current lease status of the blob.", - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "Content-Length": { - "type": "integer", - "format": "int64", - "description": "The number of bytes present in the response body." - }, - "Content-Type": { - "type": "string", - "description": "The content type specified for the blob. The default content type is 'application/octet-stream'" - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "Content-Encoding": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Encoding request header" - }, - "Content-Disposition": { - "type": "string", - "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." - }, - "Content-Language": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Language request header." - }, - "Cache-Control": { - "type": "string", - "description": "This header is returned if it was previously specified for the blob." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "Accept-Ranges": { - "type": "string", - "description": "Indicates that the service supports requests for partial blob content." - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the metadata was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-access-tier": { - "x-ms-client-name": "AccessTier", - "type": "string", - "description": "The tier of page blob on a premium storage account or tier of block blob on blob storage LRS accounts. For a list of allowed premium page blob tiers, see https://learn.microsoft.com/azure/virtual-machines/disks-types#premium-ssd. For blob storage LRS accounts, valid values are Hot/Cool/Archive." - }, - "x-ms-access-tier-inferred": { - "x-ms-client-name": "AccessTierInferred", - "type": "boolean", - "description": "For page blobs on a premium storage account only. If the access tier is not explicitly set on the blob, the tier is inferred based on its content length and this header will be returned with true value." - }, - "x-ms-archive-status": { - "x-ms-client-name": "ArchiveStatus", - "type": "string", - "description": "For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not complete then this header is returned indicating that rehydrate is pending and also tells the destination tier." - }, - "x-ms-access-tier-change-time": { - "x-ms-client-name": "AccessTierChangeTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "The time the tier was changed on the object. This is only returned if the tier on the block blob was ever set." - }, - "x-ms-smart-access-tier": { - "x-ms-client-name": "SmartAccessTier", - "type": "string", - "description": "The underlying tier of a smart tier blob. Only returned if the blob is in Smart tier." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "x-ms-is-current-version": { - "x-ms-client-name": "IsCurrentVersion", - "type": "boolean", - "description": "The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header." - }, - "x-ms-tag-count": { - "x-ms-client-name": "TagCount", - "type": "integer", - "format": "int64", - "description": "The number of tags associated with the blob" - }, - "x-ms-expiry-time": { - "x-ms-client-name": "ExpiresOn", - "type": "string", - "format": "date-time-rfc1123", - "description": "The time this blob will expire." - }, - "x-ms-blob-sealed": { - "x-ms-client-name": "IsSealed", - "type": "boolean", - "description": "If this blob has been sealed" - }, - "x-ms-rehydrate-priority": { - "x-ms-client-name": "RehydratePriority", - "description": "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard.", - "type": "string" - }, - "x-ms-last-access-time": { - "x-ms-client-name": "LastAccessed", - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the blob was last read or written to" - }, - "x-ms-immutability-policy-until-date": { - "x-ms-client-name": "ImmutabilityPolicyExpiresOn", - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire." - }, - "x-ms-immutability-policy-mode": { - "x-ms-client-name": "ImmutabilityPolicyMode", - "type": "string", - "enum": [ - "Mutable", - "Unlocked", - "Locked" - ], - "x-ms-enum": { - "name": "BlobImmutabilityPolicyMode", - "modelAsString": false - }, - "description": "Indicates immutability policy mode." - }, - "x-ms-legal-hold": { - "x-ms-client-name": "LegalHold", - "type": "boolean", - "description": "Indicates if a legal hold is present on the blob." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "delete": { - "tags": [ - "blob" - ], - "operationId": "Blob_Delete", - "description": "If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the \"include=deleted\" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound).", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/DeleteSnapshots" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobDeleteType" - }, - { - "$ref": "#/parameters/AccessTierIfModifiedSince" - }, - { - "$ref": "#/parameters/AccessTierIfUnmodifiedSince" - } - ], - "responses": { - "202": { - "description": "The delete request was accepted and the blob will be deleted.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - } - ] - }, - "/{containerName}/{blob}?PageBlob": { - "put": { - "tags": [ - "blob" - ], - "operationId": "PageBlob_Create", - "description": "The Create operation creates a new page blob.", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/PremiumPageBlobAccessTierOptional" - }, - { - "$ref": "#/parameters/BlobContentType" - }, - { - "$ref": "#/parameters/BlobContentEncoding" - }, - { - "$ref": "#/parameters/BlobContentLanguage" - }, - { - "$ref": "#/parameters/BlobContentMD5" - }, - { - "$ref": "#/parameters/BlobCacheControl" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobContentDisposition" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/BlobContentLengthRequired" - }, - { - "$ref": "#/parameters/BlobSequenceNumber" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/LegalHoldOptional" - } - ], - "responses": { - "201": { - "description": "The blob was created.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "x-ms-blob-type", - "x-ms-client-name": "blobType", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", - "type": "string", - "enum": [ - "PageBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?AppendBlob": { - "put": { - "tags": [ - "blob" - ], - "operationId": "AppendBlob_Create", - "description": "The Create Append Blob operation creates a new append blob.", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/BlobContentType" - }, - { - "$ref": "#/parameters/BlobContentEncoding" - }, - { - "$ref": "#/parameters/BlobContentLanguage" - }, - { - "$ref": "#/parameters/BlobContentMD5" - }, - { - "$ref": "#/parameters/BlobCacheControl" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobContentDisposition" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/LegalHoldOptional" - } - ], - "responses": { - "201": { - "description": "The blob was created.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "x-ms-blob-type", - "x-ms-client-name": "blobType", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", - "type": "string", - "enum": [ - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?BlockBlob": { - "put": { - "tags": [ - "blob" - ], - "operationId": "BlockBlob_Upload", - "description": "The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation.", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/Body" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/BlobContentType" - }, - { - "$ref": "#/parameters/BlobContentEncoding" - }, - { - "$ref": "#/parameters/BlobContentLanguage" - }, - { - "$ref": "#/parameters/BlobContentMD5" - }, - { - "$ref": "#/parameters/BlobCacheControl" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobContentDisposition" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/AccessTierOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/LegalHoldOptional" - }, - { - "$ref": "#/parameters/ContentCrc64" - }, - { - "$ref": "#/parameters/StructuredBodyPut" - }, - { - "$ref": "#/parameters/StructuredContentLength" - } - ], - "responses": { - "201": { - "description": "The blob was updated.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-structured-body": { - "x-ms-client-name": "StructuredBodyType", - "type": "string", - "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "x-ms-blob-type", - "x-ms-client-name": "blobType", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", - "type": "string", - "enum": [ - "BlockBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?BlockBlob&fromUrl": { - "put": { - "tags": [ - "blob" - ], - "operationId": "BlockBlob_PutBlobFromUrl", - "description": "The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob\u00e2\u20ac\u2122s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/BlobContentType" - }, - { - "$ref": "#/parameters/BlobContentEncoding" - }, - { - "$ref": "#/parameters/BlobContentLanguage" - }, - { - "$ref": "#/parameters/BlobContentMD5" - }, - { - "$ref": "#/parameters/BlobCacheControl" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobContentDisposition" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/AccessTierOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/SourceIfModifiedSince" - }, - { - "$ref": "#/parameters/SourceIfUnmodifiedSince" - }, - { - "$ref": "#/parameters/SourceIfMatch" - }, - { - "$ref": "#/parameters/SourceIfNoneMatch" - }, - { - "$ref": "#/parameters/SourceIfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/SourceContentMD5" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/CopySource" - }, - { - "$ref": "#/parameters/CopySourceBlobProperties" - }, - { - "$ref": "#/parameters/CopySourceAuthorization" - }, - { - "$ref": "#/parameters/CopySourceTags" - }, - { - "$ref": "#/parameters/FileRequestIntent" - }, - { - "$ref": "#/parameters/SourceEncryptionKey" - }, - { - "$ref": "#/parameters/SourceEncryptionKeySha256" - }, - { - "$ref": "#/parameters/SourceEncryptionAlgorithm" - } - ], - "responses": { - "201": { - "description": "The blob was updated.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - }, - "x-ms-copy-source-error-code": { - "x-ms-client-name": "CopySourceErrorCode", - "type": "string" - }, - "x-ms-copy-source-status-code": { - "x-ms-client-name": "CopySourceStatusCode", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "x-ms-blob-type", - "x-ms-client-name": "blobType", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Specifies the type of blob to create: block blob, page blob, or append blob.", - "type": "string", - "enum": [ - "BlockBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?comp=undelete": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_Undelete", - "description": "Undelete a blob that was previously soft deleted", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The blob was undeleted successfully.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "undelete" - ] - } - ] - }, - "/{containerName}/{blob}?comp=expiry": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_SetExpiry", - "description": "Sets the time a blob will expire and be deleted.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobExpiryOptions" - }, - { - "$ref": "#/parameters/BlobExpiryTime" - } - ], - "responses": { - "200": { - "description": "The blob expiry was set successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "expiry" - ] - } - ] - }, - "/{containerName}/{blob}?comp=properties&SetHTTPHeaders": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_SetHTTPHeaders", - "description": "The Set HTTP Headers operation sets system properties on the blob", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/BlobCacheControl" - }, - { - "$ref": "#/parameters/BlobContentType" - }, - { - "$ref": "#/parameters/BlobContentMD5" - }, - { - "$ref": "#/parameters/BlobContentEncoding" - }, - { - "$ref": "#/parameters/BlobContentLanguage" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/BlobContentDisposition" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The properties were set successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/{containerName}/{blob}?comp=immutabilityPolicies": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_SetImmutabilityPolicy", - "description": "The Set Immutability Policy operation sets the immutability policy on the blob", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - } - ], - "responses": { - "200": { - "description": "The immutability policy was successfully set.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-immutability-policy-until-date": { - "x-ms-client-name": "ImmutabilityPolicyExpiry", - "type": "string", - "format": "date-time-rfc1123", - "description": "Indicates the time the immutability policy will expire." - }, - "x-ms-immutability-policy-mode": { - "x-ms-client-name": "ImmutabilityPolicyMode", - "type": "string", - "enum": [ - "Mutable", - "Unlocked", - "Locked" - ], - "x-ms-enum": { - "name": "BlobImmutabilityPolicyMode", - "modelAsString": false - }, - "description": "Indicates immutability policy mode." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "delete": { - "tags": [ - "blob" - ], - "operationId": "Blob_DeleteImmutabilityPolicy", - "description": "The Delete Immutability Policy operation deletes the immutability policy on the blob", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - } - ], - "responses": { - "200": { - "description": "The delete immutability policy request was accepted and the immutability policy will be deleted.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "immutabilityPolicies" - ] - } - ] - }, - "/{containerName}/{blob}?comp=legalhold": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_SetLegalHold", - "description": "The Set Legal Hold operation sets a legal hold on the blob.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/LegalHoldRequired" - }, - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - } - ], - "responses": { - "200": { - "description": "The legal hold was successfully set on the blob.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-legal-hold": { - "x-ms-client-name": "LegalHold", - "type": "boolean", - "description": "Indicates if the blob has a legal hold." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "legalhold" - ] - } - ] - }, - "/{containerName}/{blob}?comp=metadata": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_SetMetadata", - "description": "The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value pairs", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The metadata was set successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the metadata was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "metadata" - ] - } - ] - }, - "/{containerName}/{blob}?comp=lease&acquire": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_AcquireLease", - "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseDuration" - }, - { - "$ref": "#/parameters/ProposedLeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "201": { - "description": "The Acquire operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-id": { - "x-ms-client-name": "LeaseId", - "type": "string", - "description": "Uniquely identifies a blobs' lease" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "acquire" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}/{blob}?comp=lease&release": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_ReleaseLease", - "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdRequired" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Release operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "release" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}/{blob}?comp=lease&renew": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_RenewLease", - "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdRequired" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Renew operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-id": { - "x-ms-client-name": "LeaseId", - "type": "string", - "description": "Uniquely identifies a blobs' lease" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "renew" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}/{blob}?comp=lease&change": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_ChangeLease", - "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdRequired" - }, - { - "$ref": "#/parameters/ProposedLeaseIdRequired" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Change operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-lease-id": { - "x-ms-client-name": "LeaseId", - "type": "string", - "description": "Uniquely identifies a blobs' lease" - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "change" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}/{blob}?comp=lease&break": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_BreakLease", - "description": "[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseBreakPeriod" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "202": { - "description": "The Break operation completed successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-lease-time": { - "x-ms-client-name": "LeaseTime", - "type": "integer", - "description": "Approximate time remaining in the lease period, in seconds." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "lease" - ] - }, - { - "name": "x-ms-lease-action", - "x-ms-client-name": "action", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "break" - ], - "x-ms-enum": { - "name": "LeaseAction", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Describes what lease action to take." - } - ] - }, - "/{containerName}/{blob}?comp=snapshot": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_CreateSnapshot", - "description": "The Create Snapshot operation creates a read-only snapshot of a blob", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "201": { - "description": "The snaptshot was taken successfully.", - "headers": { - "x-ms-snapshot": { - "x-ms-client-name": "Snapshot", - "type": "string", - "description": "Uniquely identifies the snapshot and indicates the snapshot version. It may be used in subsequent requests to access the snapshot" - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "True if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. For a snapshot request, this header is set to true when metadata was provided in the request and encrypted with a customer-provided key." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "snapshot" - ] - } - ] - }, - "/{containerName}/{blob}?comp=copy": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_StartCopyFromURL", - "description": "The Start Copy From URL operation copies a blob or an internet resource to a new blob.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/AccessTierOptional" - }, - { - "$ref": "#/parameters/RehydratePriority" - }, - { - "$ref": "#/parameters/SourceIfModifiedSince" - }, - { - "$ref": "#/parameters/SourceIfUnmodifiedSince" - }, - { - "$ref": "#/parameters/SourceIfMatch" - }, - { - "$ref": "#/parameters/SourceIfNoneMatch" - }, - { - "$ref": "#/parameters/SourceIfTags" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/CopySource" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/SealBlob" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/LegalHoldOptional" - } - ], - "responses": { - "202": { - "description": "The copy blob has been accepted with the specified copy status.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - }, - "x-ms-copy-source-error-code": { - "x-ms-client-name": "CopySourceErrorCode", - "type": "string" - }, - "x-ms-copy-source-status-code": { - "x-ms-client-name": "CopySourceStatusCode", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - } - ] - }, - "/{containerName}/{blob}?comp=copy&sync": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_CopyFromURL", - "description": "The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response until the copy is complete.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/AccessTierOptional" - }, - { - "$ref": "#/parameters/SourceIfModifiedSince" - }, - { - "$ref": "#/parameters/SourceIfUnmodifiedSince" - }, - { - "$ref": "#/parameters/SourceIfMatch" - }, - { - "$ref": "#/parameters/SourceIfNoneMatch" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/CopySource" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/SourceContentMD5" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/LegalHoldOptional" - }, - { - "$ref": "#/parameters/CopySourceAuthorization" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/CopySourceTags" - }, - { - "$ref": "#/parameters/FileRequestIntent" - } - ], - "responses": { - "202": { - "description": "The copy has completed.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "success" - ], - "x-ms-enum": { - "name": "SyncCopyStatusType", - "modelAsString": false - } - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "This response header is returned so that the client can check for the integrity of the copied content. This header is only returned if the source content MD5 was specified." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This response header is returned so that the client can check for the integrity of the copied content." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - }, - "x-ms-copy-source-error-code": { - "x-ms-client-name": "CopySourceErrorCode", - "type": "string" - }, - "x-ms-copy-source-status-code": { - "x-ms-client-name": "CopySourceStatusCode", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "x-ms-requires-sync", - "description": "This header indicates that this is a synchronous Copy Blob From URL instead of a Asynchronous Copy Blob.", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "true" - ] - } - ] - }, - "/{containerName}/{blob}?comp=copy©id": { - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_AbortCopyFromURL", - "description": "The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with zero length and full metadata.", - "parameters": [ - { - "$ref": "#/parameters/CopyId" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "204": { - "description": "The delete request was accepted and the blob will be deleted.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "copy" - ] - }, - { - "name": "x-ms-copy-action", - "description": "Copy action.", - "x-ms-client-name": "copyActionAbortConstant", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "abort" - ], - "x-ms-parameter-location": "method" - } - ] - }, - "/{containerName}/{blob}?comp=tier": { - "put": { - "tags": [ - "blobs" - ], - "operationId": "Blob_SetTier", - "description": "The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag.", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/AccessTierRequired" - }, - { - "$ref": "#/parameters/RehydratePriority" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfTags" - } - ], - "responses": { - "200": { - "description": "The new tier will take effect immediately.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and newer." - } - } - }, - "202": { - "description": "The transition to the new tier is pending.", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and newer." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "tier" - ] - } - ] - }, - "/{containerName}/{blob}?restype=account&comp=properties&blob": { - "get": { - "tags": [ - "blob" - ], - "operationId": "Blob_GetAccountInfo", - "description": "Returns the sku name and account kind ", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Success (OK)", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-sku-name": { - "x-ms-client-name": "SkuName", - "type": "string", - "enum": [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - "Standard_GZRS", - "Premium_ZRS", - "Standard_RAGZRS" - ], - "x-ms-enum": { - "name": "SkuName", - "modelAsString": false - }, - "description": "Identifies the sku name of the account" - }, - "x-ms-account-kind": { - "x-ms-client-name": "AccountKind", - "type": "string", - "enum": [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage" - ], - "x-ms-enum": { - "name": "AccountKind", - "modelAsString": false - }, - "description": "Identifies the account kind" - }, - "x-ms-is-hns-enabled": { - "x-ms-client-name": "IsHierarchicalNamespaceEnabled", - "type": "boolean", - "description": "Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "restype", - "description": "restype", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "account" - ] - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/{containerName}/{blob}?comp=block": { - "put": { - "tags": [ - "blockblob" - ], - "operationId": "BlockBlob_StageBlock", - "description": "The Stage Block operation creates a new block to be committed as part of a blob", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/BlockId" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentCrc64" - }, - { - "$ref": "#/parameters/Body" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/StructuredBodyPut" - }, - { - "$ref": "#/parameters/StructuredContentLength" - } - ], - "responses": { - "201": { - "description": "The block was created.", - "headers": { - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-structured-body": { - "x-ms-client-name": "StructuredBodyType", - "type": "string", - "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "block" - ] - } - ] - }, - "/{containerName}/{blob}?comp=block&fromURL": { - "put": { - "tags": [ - "blockblob" - ], - "operationId": "BlockBlob_StageBlockFromURL", - "description": "The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from a URL.", - "parameters": [ - { - "$ref": "#/parameters/BlockId" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/SourceUrl" - }, - { - "$ref": "#/parameters/SourceRange" - }, - { - "$ref": "#/parameters/SourceContentMD5" - }, - { - "$ref": "#/parameters/SourceContentCRC64" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/SourceIfModifiedSince" - }, - { - "$ref": "#/parameters/SourceIfUnmodifiedSince" - }, - { - "$ref": "#/parameters/SourceIfMatch" - }, - { - "$ref": "#/parameters/SourceIfNoneMatch" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/CopySourceAuthorization" - }, - { - "$ref": "#/parameters/FileRequestIntent" - }, - { - "$ref": "#/parameters/SourceEncryptionKey" - }, - { - "$ref": "#/parameters/SourceEncryptionKeySha256" - }, - { - "$ref": "#/parameters/SourceEncryptionAlgorithm" - } - ], - "responses": { - "201": { - "description": "The block was created.", - "headers": { - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - }, - "x-ms-copy-source-error-code": { - "x-ms-client-name": "CopySourceErrorCode", - "type": "string" - }, - "x-ms-copy-source-status-code": { - "x-ms-client-name": "CopySourceStatusCode", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "block" - ] - } - ] - }, - "/{containerName}/{blob}?comp=blocklist": { - "put": { - "tags": [ - "blockblob" - ], - "operationId": "BlockBlob_CommitBlockList", - "description": "The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. You can do this by specifying whether to commit a block from the committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the block, whichever list it may belong to.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/BlobCacheControl" - }, - { - "$ref": "#/parameters/BlobContentType" - }, - { - "$ref": "#/parameters/BlobContentEncoding" - }, - { - "$ref": "#/parameters/BlobContentLanguage" - }, - { - "$ref": "#/parameters/BlobContentMD5" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentCrc64" - }, - { - "$ref": "#/parameters/Metadata" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobContentDisposition" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/AccessTierOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "name": "blocks", - "description": "Blob Blocks.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/BlockLookupList" - } - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/BlobTagsHeader" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyExpiry" - }, - { - "$ref": "#/parameters/ImmutabilityPolicyMode" - }, - { - "$ref": "#/parameters/LegalHoldOptional" - } - ], - "responses": { - "201": { - "description": "The block list was recorded.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. This header refers to the content of the request, meaning, in this case, the list of blocks, and not the content of the blob itself." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. This header refers to the content of the request, meaning, in this case, the list of blocks, and not the content of the blob itself." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "x-ms-version-id": { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "get": { - "tags": [ - "blockblob" - ], - "operationId": "BlockBlob_GetBlockList", - "description": "The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/BlockListType" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The page range was written.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For Get Block List this is 'application/xml'" - }, - "x-ms-blob-content-length": { - "x-ms-client-name": "BlobContentLength", - "type": "integer", - "format": "int64", - "description": "The size of the blob in bytes." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/BlockList" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "blocklist" - ] - } - ] - }, - "/{containerName}/{blob}?comp=page&update": { - "put": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_UploadPages", - "description": "The Upload Pages operation writes a range of pages to a page blob", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/Body" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentCrc64" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Range" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfSequenceNumberLessThanOrEqualTo" - }, - { - "$ref": "#/parameters/IfSequenceNumberLessThan" - }, - { - "$ref": "#/parameters/IfSequenceNumberEqualTo" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/StructuredBodyPut" - }, - { - "$ref": "#/parameters/StructuredContentLength" - } - ], - "responses": { - "201": { - "description": "The page range was written.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for the page blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned when the pages were encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-structured-body": { - "x-ms-client-name": "StructuredBodyType", - "type": "string", - "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "page" - ] - }, - { - "name": "x-ms-page-write", - "x-ms-client-name": "pageWrite", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Required. You may specify one of the following options:\n - Update: Writes the bytes specified by the request body into the specified range. The Range and Content-Length headers must match to perform the update.\n - Clear: Clears the specified range and releases the space used in storage for that range. To clear a range, set the Content-Length header to zero, and the Range header to a value that indicates the range to clear, up to maximum blob size.", - "type": "string", - "enum": [ - "update" - ], - "x-ms-enum": { - "name": "PageWriteType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?comp=page&clear": { - "put": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_ClearPages", - "description": "The Clear Pages operation clears a set of pages from a page blob", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Range" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfSequenceNumberLessThanOrEqualTo" - }, - { - "$ref": "#/parameters/IfSequenceNumberLessThan" - }, - { - "$ref": "#/parameters/IfSequenceNumberEqualTo" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "201": { - "description": "The page range was cleared.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for the page blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "page" - ] - }, - { - "name": "x-ms-page-write", - "x-ms-client-name": "pageWrite", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Required. You may specify one of the following options:\n - Update: Writes the bytes specified by the request body into the specified range. The Range and Content-Length headers must match to perform the update.\n - Clear: Clears the specified range and releases the space used in storage for that range. To clear a range, set the Content-Length header to zero, and the Range header to a value that indicates the range to clear, up to maximum blob size.", - "type": "string", - "enum": [ - "clear" - ], - "x-ms-enum": { - "name": "PageWriteType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?comp=page&update&fromUrl": { - "put": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_UploadPagesFromURL", - "description": "The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL", - "consumes": [ - "application/octet-stream" - ], - "parameters": [ - { - "$ref": "#/parameters/SourceUrl" - }, - { - "$ref": "#/parameters/SourceRangeRequiredPutPageFromUrl" - }, - { - "$ref": "#/parameters/SourceContentMD5" - }, - { - "$ref": "#/parameters/SourceContentCRC64" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/RangeRequiredPutPageFromUrl" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfSequenceNumberLessThanOrEqualTo" - }, - { - "$ref": "#/parameters/IfSequenceNumberLessThan" - }, - { - "$ref": "#/parameters/IfSequenceNumberEqualTo" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/SourceIfModifiedSince" - }, - { - "$ref": "#/parameters/SourceIfUnmodifiedSince" - }, - { - "$ref": "#/parameters/SourceIfMatch" - }, - { - "$ref": "#/parameters/SourceIfNoneMatch" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/CopySourceAuthorization" - }, - { - "$ref": "#/parameters/FileRequestIntent" - }, - { - "$ref": "#/parameters/SourceEncryptionKey" - }, - { - "$ref": "#/parameters/SourceEncryptionKeySha256" - }, - { - "$ref": "#/parameters/SourceEncryptionAlgorithm" - } - ], - "responses": { - "201": { - "description": "The page range was written.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for the page blob." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - }, - "x-ms-copy-source-error-code": { - "x-ms-client-name": "CopySourceErrorCode", - "type": "string" - }, - "x-ms-copy-source-status-code": { - "x-ms-client-name": "CopySourceStatusCode", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "page" - ] - }, - { - "name": "x-ms-page-write", - "x-ms-client-name": "pageWrite", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Required. You may specify one of the following options:\n - Update: Writes the bytes specified by the request body into the specified range. The Range and Content-Length headers must match to perform the update.\n - Clear: Clears the specified range and releases the space used in storage for that range. To clear a range, set the Content-Length header to zero, and the Range header to a value that indicates the range to clear, up to maximum blob size.", - "type": "string", - "enum": [ - "update" - ], - "x-ms-enum": { - "name": "PageWriteType", - "modelAsString": false - } - } - ] - }, - "/{containerName}/{blob}?comp=pagelist": { - "get": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_GetPageRanges", - "description": "The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/Range" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - } - ], - "responses": { - "200": { - "description": "Information on the page blob was found.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "x-ms-blob-content-length": { - "x-ms-client-name": "BlobContentLength", - "type": "integer", - "format": "int64", - "description": "The size of the blob in bytes." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/PageList" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "NextMarker" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "pagelist" - ] - } - ] - }, - "/{containerName}/{blob}?comp=pagelist&diff": { - "get": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_GetPageRangesDiff", - "description": "The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were changed between target blob and previous snapshot.", - "parameters": [ - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/PrevSnapshot" - }, - { - "$ref": "#/parameters/PrevSnapshotUrl" - }, - { - "$ref": "#/parameters/Range" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/Marker" - }, - { - "$ref": "#/parameters/MaxResults" - } - ], - "responses": { - "200": { - "description": "Information on the page blob was found.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "x-ms-blob-content-length": { - "x-ms-client-name": "BlobContentLength", - "type": "integer", - "format": "int64", - "description": "The size of the blob in bytes." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/PageList" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "NextMarker" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "pagelist" - ] - } - ] - }, - "/{containerName}/{blob}?comp=properties&Resize": { - "put": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_Resize", - "description": "Resize the Blob", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/BlobContentLengthRequired" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The Blob was resized successfully", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/{containerName}/{blob}?comp=properties&UpdateSequenceNumber": { - "put": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_UpdateSequenceNumber", - "description": "Update the sequence number of the blob", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/SequenceNumberAction" - }, - { - "$ref": "#/parameters/BlobSequenceNumber" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "The sequence numbers were updated successfully.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "properties" - ] - } - ] - }, - "/{containerName}/{blob}?comp=incrementalcopy": { - "put": { - "tags": [ - "pageblob" - ], - "operationId": "PageBlob_CopyIncremental", - "description": "The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/CopySource" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "202": { - "description": "The blob was copied.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "incrementalcopy" - ] - } - ] - }, - "/{containerName}/{blob}?comp=appendblock": { - "put": { - "tags": [ - "appendblob" - ], - "consumes": [ - "application/octet-stream" - ], - "operationId": "AppendBlob_AppendBlock", - "description": "The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.", - "parameters": [ - { - "$ref": "#/parameters/Body" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentCrc64" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobConditionMaxSize" - }, - { - "$ref": "#/parameters/BlobConditionAppendPos" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/StructuredBodyPut" - }, - { - "$ref": "#/parameters/StructuredContentLength" - } - ], - "responses": { - "201": { - "description": "The block was created.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-append-offset": { - "x-ms-client-name": "BlobAppendOffset", - "type": "string", - "description": "This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes." - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-structured-body": { - "x-ms-client-name": "StructuredBodyType", - "type": "string", - "description": "Indicates the structured message body was accepted and mirrors back the message schema version and properties." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "appendblock" - ] - } - ] - }, - "/{containerName}/{blob}?comp=appendblock&fromUrl": { - "put": { - "tags": [ - "appendblob" - ], - "operationId": "AppendBlob_AppendBlockFromUrl", - "description": "The Append Block operation commits a new block of data to the end of an existing append blob where the contents are read from a source url. The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.", - "parameters": [ - { - "$ref": "#/parameters/SourceUrl" - }, - { - "$ref": "#/parameters/SourceRange" - }, - { - "$ref": "#/parameters/SourceContentMD5" - }, - { - "$ref": "#/parameters/SourceContentCRC64" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ContentLength" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/EncryptionScope" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/BlobConditionMaxSize" - }, - { - "$ref": "#/parameters/BlobConditionAppendPos" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/SourceIfModifiedSince" - }, - { - "$ref": "#/parameters/SourceIfUnmodifiedSince" - }, - { - "$ref": "#/parameters/SourceIfMatch" - }, - { - "$ref": "#/parameters/SourceIfNoneMatch" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/CopySourceAuthorization" - }, - { - "$ref": "#/parameters/FileRequestIntent" - }, - { - "$ref": "#/parameters/SourceEncryptionKey" - }, - { - "$ref": "#/parameters/SourceEncryptionKeySha256" - }, - { - "$ref": "#/parameters/SourceEncryptionAlgorithm" - } - ], - "responses": { - "201": { - "description": "The block was created.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "x-ms-content-crc64": { - "type": "string", - "format": "byte", - "description": "This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-append-offset": { - "x-ms-client-name": "BlobAppendOffset", - "type": "string", - "description": "This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes." - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-request-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - }, - "x-ms-copy-source-error-code": { - "x-ms-client-name": "CopySourceErrorCode", - "type": "string" - }, - "x-ms-copy-source-status-code": { - "x-ms-client-name": "CopySourceStatusCode", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "appendblock" - ] - } - ] - }, - "/{containerName}/{blob}?comp=seal": { - "put": { - "tags": [ - "appendblob" - ], - "operationId": "AppendBlob_Seal", - "description": "The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 version or later.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/BlobConditionAppendPos" - } - ], - "responses": { - "200": { - "description": "The blob was sealed.", - "headers": { - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-sealed": { - "x-ms-client-name": "IsSealed", - "type": "boolean", - "description": "If this blob has been sealed" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "seal" - ] - } - ] - }, - "/{containerName}/{blob}?comp=query": { - "post": { - "tags": [ - "blob" - ], - "operationId": "Blob_Query", - "description": "The Query operation enables users to select/project on blob data by providing simple query expressions.", - "parameters": [ - { - "$ref": "#/parameters/QueryRequest" - }, - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/EncryptionKey" - }, - { - "$ref": "#/parameters/EncryptionKeySha256" - }, - { - "$ref": "#/parameters/EncryptionAlgorithm" - }, - { - "$ref": "#/parameters/IfModifiedSince" - }, - { - "$ref": "#/parameters/IfUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfMatch" - }, - { - "$ref": "#/parameters/IfNoneMatch" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - } - ], - "responses": { - "200": { - "description": "Returns the content of the entire blob.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-meta": { - "type": "string", - "x-ms-client-name": "Metadata", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "Content-Length": { - "type": "integer", - "format": "int64", - "description": "The number of bytes present in the response body." - }, - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" - }, - "Content-Range": { - "type": "string", - "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "Content-Encoding": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Encoding request header" - }, - "Cache-Control": { - "type": "string", - "description": "This header is returned if it was previously specified for the blob." - }, - "Content-Disposition": { - "type": "string", - "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." - }, - "Content-Language": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Language request header." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-blob-type": { - "x-ms-client-name": "BlobType", - "description": "The blob's type.", - "type": "string", - "enum": [ - "BlockBlob", - "PageBlob", - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - }, - "x-ms-copy-completion-time": { - "x-ms-client-name": "CopyCompletionTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status-description": { - "x-ms-client-name": "CopyStatusDescription", - "type": "string", - "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-progress": { - "x-ms-client-name": "CopyProgress", - "type": "string", - "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-source": { - "x-ms-client-name": "CopySource", - "type": "string", - "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - }, - "x-ms-lease-duration": { - "x-ms-client-name": "LeaseDuration", - "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "x-ms-lease-state": { - "x-ms-client-name": "LeaseState", - "description": "Lease state of the blob.", - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "x-ms-lease-status": { - "x-ms-client-name": "LeaseStatus", - "description": "The current lease status of the blob.", - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Accept-Ranges": { - "type": "string", - "description": "Indicates that the service supports requests for partial blob content." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-blob-content-md5": { - "x-ms-client-name": "BlobContentMD5", - "type": "string", - "format": "byte", - "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "206": { - "description": "Returns the content of a specified range of the blob.", - "headers": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123", - "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." - }, - "x-ms-meta": { - "type": "string", - "x-ms-client-name": "Metadata", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "Content-Length": { - "type": "integer", - "format": "int64", - "description": "The number of bytes present in the response body." - }, - "Content-Type": { - "type": "string", - "description": "The media type of the body of the response. For Download Blob this is 'application/octet-stream'" - }, - "Content-Range": { - "type": "string", - "description": "Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header." - }, - "ETag": { - "type": "string", - "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." - }, - "Content-MD5": { - "type": "string", - "format": "byte", - "description": "If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity." - }, - "Content-Encoding": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Encoding request header" - }, - "Cache-Control": { - "type": "string", - "description": "This header is returned if it was previously specified for the blob." - }, - "Content-Disposition": { - "type": "string", - "description": "This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified." - }, - "Content-Language": { - "type": "string", - "description": "This header returns the value that was specified for the Content-Language request header." - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "BlobSequenceNumber", - "type": "integer", - "format": "int64", - "description": "The current sequence number for a page blob. This header is not returned for block blobs or append blobs" - }, - "x-ms-blob-type": { - "x-ms-client-name": "BlobType", - "description": "The blob's type.", - "type": "string", - "enum": [ - "BlockBlob", - "PageBlob", - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - }, - "x-ms-content-crc64": { - "x-ms-client-name": "ContentCrc64", - "type": "string", - "format": "byte", - "description": "If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the request returns a crc64 for the range, as long as the range size is less than or equal to 4 MB. If both x-ms-range-get-content-crc64 and x-ms-range-get-content-md5 is specified in the same request, it will fail with 400(Bad Request)" - }, - "x-ms-copy-completion-time": { - "x-ms-client-name": "CopyCompletionTime", - "type": "string", - "format": "date-time-rfc1123", - "description": "Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status-description": { - "x-ms-client-name": "CopyStatusDescription", - "type": "string", - "description": "Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-id": { - "x-ms-client-name": "CopyId", - "type": "string", - "description": "String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy." - }, - "x-ms-copy-progress": { - "x-ms-client-name": "CopyProgress", - "type": "string", - "description": "Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List" - }, - "x-ms-copy-source": { - "x-ms-client-name": "CopySource", - "type": "string", - "description": "URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List." - }, - "x-ms-copy-status": { - "x-ms-client-name": "CopyStatus", - "description": "State of the copy operation identified by x-ms-copy-id.", - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - }, - "x-ms-lease-duration": { - "x-ms-client-name": "LeaseDuration", - "description": "When a blob is leased, specifies whether the lease is of infinite or fixed duration.", - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "x-ms-lease-state": { - "x-ms-client-name": "LeaseState", - "description": "Lease state of the blob.", - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "x-ms-lease-status": { - "x-ms-client-name": "LeaseStatus", - "description": "The current lease status of the blob.", - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Accept-Ranges": { - "type": "string", - "description": "Indicates that the service supports requests for partial blob content." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - }, - "x-ms-blob-committed-block-count": { - "x-ms-client-name": "BlobCommittedBlockCount", - "type": "integer", - "description": "The number of committed blocks present in the blob. This header is returned only for append blobs." - }, - "x-ms-server-encrypted": { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted)." - }, - "x-ms-encryption-key-sha256": { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key." - }, - "x-ms-encryption-scope": { - "x-ms-client-name": "EncryptionScope", - "type": "string", - "description": "Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope." - }, - "x-ms-blob-content-md5": { - "x-ms-client-name": "BlobContentMD5", - "type": "string", - "format": "byte", - "description": "If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range" - } - }, - "schema": { - "type": "object", - "format": "file" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "query" - ] - } - ] - }, - "/{containerName}/{blob}?comp=tags": { - "get": { - "tags": [ - "blob" - ], - "operationId": "Blob_GetTags", - "description": "The Get Tags operation enables users to get the tags associated with a blob.", - "parameters": [ - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/Snapshot" - }, - { - "$ref": "#/parameters/VersionId" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfBlobModifiedSince" - }, - { - "$ref": "#/parameters/IfBlobUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfBlobMatch" - }, - { - "$ref": "#/parameters/IfBlobNoneMatch" - } - ], - "responses": { - "200": { - "description": "Retrieved blob tags", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - }, - "schema": { - "$ref": "#/definitions/BlobTags" - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "put": { - "tags": [ - "blob" - ], - "operationId": "Blob_SetTags", - "description": "The Set Tags operation enables users to set tags on a blob.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/Timeout" - }, - { - "$ref": "#/parameters/VersionId" - }, - { - "$ref": "#/parameters/ContentMD5" - }, - { - "$ref": "#/parameters/ContentCrc64" - }, - { - "$ref": "#/parameters/ClientRequestId" - }, - { - "$ref": "#/parameters/IfTags" - }, - { - "$ref": "#/parameters/LeaseIdOptional" - }, - { - "$ref": "#/parameters/IfBlobModifiedSince" - }, - { - "$ref": "#/parameters/IfBlobUnmodifiedSince" - }, - { - "$ref": "#/parameters/IfBlobMatch" - }, - { - "$ref": "#/parameters/IfBlobNoneMatch" - }, - { - "$ref": "#/parameters/BlobTagsBody" - } - ], - "responses": { - "204": { - "description": "The tags were applied to the blob", - "headers": { - "x-ms-client-request-id": { - "x-ms-client-name": "ClientRequestId", - "type": "string", - "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." - }, - "x-ms-request-id": { - "x-ms-client-name": "RequestId", - "type": "string", - "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." - }, - "x-ms-version": { - "x-ms-client-name": "Version", - "type": "string", - "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." - }, - "Date": { - "type": "string", - "format": "date-time-rfc1123", - "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated" - } - } - }, - "default": { - "description": "Failure", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - }, - "schema": { - "$ref": "#/definitions/StorageError" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/ContainerName" - }, - { - "$ref": "#/parameters/Blob" - }, - { - "name": "comp", - "description": "comp", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "tags" - ] - } - ] - } - }, - "definitions": { - "KeyInfo": { - "type": "object", - "required": [ - "Start", - "Expiry" - ], - "description": "Key information", - "properties": { - "Start": { - "description": "The date-time the key is active in ISO 8601 UTC time", - "type": "string" - }, - "Expiry": { - "description": "The date-time the key expires in ISO 8601 UTC time", - "type": "string" - }, - "DelegatedUserTid": { - "description": "The delegated user tenant id in Azure AD", - "type": "string" - } - } - }, - "UserDelegationKey": { - "type": "object", - "required": [ - "SignedOid", - "SignedTid", - "SignedStart", - "SignedExpiry", - "SignedService", - "SignedVersion", - "Value" - ], - "description": "A user delegation key", - "properties": { - "SignedOid": { - "description": "The Azure Active Directory object ID in GUID format.", - "type": "string" - }, - "SignedTid": { - "description": "The Azure Active Directory tenant ID in GUID format", - "type": "string" - }, - "SignedStart": { - "description": "The date-time the key is active", - "type": "string", - "format": "date-time" - }, - "SignedExpiry": { - "description": "The date-time the key expires", - "type": "string", - "format": "date-time" - }, - "SignedService": { - "description": "Abbreviation of the Azure Storage service that accepts the key", - "type": "string" - }, - "SignedVersion": { - "description": "The service version that created the key", - "type": "string" - }, - "SignedDelegatedUserTid": { - "description": "The delegated user tenant id in Azure AD. Return if DelegatedUserTid is specified.", - "type": "string" - }, - "Value": { - "description": "The key as a base64 string", - "type": "string" - } - } - }, - "PublicAccessType": { - "type": "string", - "enum": [ - "container", - "blob" - ], - "x-ms-enum": { - "name": "PublicAccessType", - "modelAsString": true - } - }, - "CopyStatus": { - "type": "string", - "enum": [ - "pending", - "success", - "aborted", - "failed" - ], - "x-ms-enum": { - "name": "CopyStatusType", - "modelAsString": false - } - }, - "LeaseDuration": { - "type": "string", - "enum": [ - "infinite", - "fixed" - ], - "x-ms-enum": { - "name": "LeaseDurationType", - "modelAsString": false - } - }, - "LeaseState": { - "type": "string", - "enum": [ - "available", - "leased", - "expired", - "breaking", - "broken" - ], - "x-ms-enum": { - "name": "LeaseStateType", - "modelAsString": false - } - }, - "LeaseStatus": { - "type": "string", - "enum": [ - "locked", - "unlocked" - ], - "x-ms-enum": { - "name": "LeaseStatusType", - "modelAsString": false - } - }, - "StorageError": { - "type": "object", - "properties": { - "Message": { - "type": "string" - }, - "CopySourceStatusCode": { - "type": "integer", - "format": "int32" - }, - "CopySourceErrorCode": { - "type": "string" - }, - "CopySourceErrorMessage": { - "type": "string" - } - } - }, - "AccessPolicy": { - "type": "object", - "description": "An Access policy", - "properties": { - "Start": { - "description": "the date-time the policy is active", - "type": "string", - "format": "date-time" - }, - "Expiry": { - "description": "the date-time the policy expires", - "type": "string", - "format": "date-time" - }, - "Permission": { - "description": "the permissions for the acl policy", - "type": "string" - } - } - }, - "AccessTier": { - "type": "string", - "enum": [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Premium", - "Cold", - "Smart" - ], - "x-ms-enum": { - "name": "AccessTier", - "modelAsString": true - } - }, - "ArchiveStatus": { - "type": "string", - "enum": [ - "rehydrate-pending-to-hot", - "rehydrate-pending-to-cool", - "rehydrate-pending-to-cold", - "rehydrate-pending-to-smart" - ], - "x-ms-enum": { - "name": "ArchiveStatus", - "modelAsString": true - } - }, - "BlobItemInternal": { - "xml": { - "name": "Blob" - }, - "description": "An Azure Storage blob", - "type": "object", - "required": [ - "Name", - "Deleted", - "Snapshot", - "Properties" - ], - "properties": { - "Name": { - "$ref": "#/definitions/BlobName" - }, - "Deleted": { - "type": "boolean" - }, - "Snapshot": { - "type": "string" - }, - "VersionId": { - "type": "string" - }, - "IsCurrentVersion": { - "type": "boolean" - }, - "Properties": { - "$ref": "#/definitions/BlobPropertiesInternal" - }, - "Metadata": { - "$ref": "#/definitions/BlobMetadata" - }, - "BlobTags": { - "$ref": "#/definitions/BlobTags" - }, - "ObjectReplicationMetadata": { - "$ref": "#/definitions/ObjectReplicationMetadata" - }, - "HasVersionsOnly": { - "type": "boolean" - } - } - }, - "BlobPropertiesInternal": { - "xml": { - "name": "Properties" - }, - "description": "Properties of a blob", - "type": "object", - "required": [ - "Etag", - "Last-Modified" - ], - "properties": { - "Creation-Time": { - "type": "string", - "format": "date-time-rfc1123" - }, - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123" - }, - "Etag": { - "type": "string" - }, - "Content-Length": { - "type": "integer", - "format": "int64", - "description": "Size in bytes" - }, - "Content-Type": { - "type": "string" - }, - "Content-Encoding": { - "type": "string" - }, - "Content-Language": { - "type": "string" - }, - "Content-MD5": { - "type": "string", - "format": "byte" - }, - "Content-Disposition": { - "type": "string" - }, - "Cache-Control": { - "type": "string" - }, - "x-ms-blob-sequence-number": { - "x-ms-client-name": "blobSequenceNumber", - "type": "integer", - "format": "int64" - }, - "BlobType": { - "type": "string", - "enum": [ - "BlockBlob", - "PageBlob", - "AppendBlob" - ], - "x-ms-enum": { - "name": "BlobType", - "modelAsString": false - } - }, - "LeaseStatus": { - "$ref": "#/definitions/LeaseStatus" - }, - "LeaseState": { - "$ref": "#/definitions/LeaseState" - }, - "LeaseDuration": { - "$ref": "#/definitions/LeaseDuration" - }, - "CopyId": { - "type": "string" - }, - "CopyStatus": { - "$ref": "#/definitions/CopyStatus" - }, - "CopySource": { - "type": "string" - }, - "CopyProgress": { - "type": "string" - }, - "CopyCompletionTime": { - "type": "string", - "format": "date-time-rfc1123" - }, - "CopyStatusDescription": { - "type": "string" - }, - "ServerEncrypted": { - "type": "boolean" - }, - "IncrementalCopy": { - "type": "boolean" - }, - "DestinationSnapshot": { - "type": "string" - }, - "DeletedTime": { - "type": "string", - "format": "date-time-rfc1123" - }, - "RemainingRetentionDays": { - "type": "integer" - }, - "AccessTier": { - "$ref": "#/definitions/AccessTier" - }, - "AccessTierInferred": { - "type": "boolean" - }, - "ArchiveStatus": { - "$ref": "#/definitions/ArchiveStatus" - }, - "SmartAccessTier": { - "$ref": "#/definitions/AccessTier" - }, - "CustomerProvidedKeySha256": { - "type": "string" - }, - "EncryptionScope": { - "type": "string", - "description": "The name of the encryption scope under which the blob is encrypted." - }, - "AccessTierChangeTime": { - "type": "string", - "format": "date-time-rfc1123" - }, - "TagCount": { - "type": "integer" - }, - "Expiry-Time": { - "x-ms-client-name": "ExpiresOn", - "type": "string", - "format": "date-time-rfc1123" - }, - "Sealed": { - "x-ms-client-name": "IsSealed", - "type": "boolean" - }, - "RehydratePriority": { - "$ref": "#/definitions/RehydratePriority" - }, - "LastAccessTime": { - "x-ms-client-name": "LastAccessedOn", - "type": "string", - "format": "date-time-rfc1123" - }, - "ImmutabilityPolicyUntilDate": { - "x-ms-client-name": "ImmutabilityPolicyExpiresOn", - "type": "string", - "format": "date-time-rfc1123" - }, - "ImmutabilityPolicyMode": { - "type": "string", - "enum": [ - "Mutable", - "Unlocked", - "Locked" - ], - "x-ms-enum": { - "name": "BlobImmutabilityPolicyMode", - "modelAsString": false - } - }, - "LegalHold": { - "type": "boolean" - } - } - }, - "ListBlobsFlatSegmentResponse": { - "xml": { - "name": "EnumerationResults" - }, - "description": "An enumeration of blobs", - "type": "object", - "required": [ - "ServiceEndpoint", - "ContainerName", - "Segment" - ], - "properties": { - "ServiceEndpoint": { - "type": "string", - "xml": { - "attribute": true - } - }, - "ContainerName": { - "type": "string", - "xml": { - "attribute": true - } - }, - "Prefix": { - "type": "string" - }, - "Marker": { - "type": "string" - }, - "MaxResults": { - "type": "integer" - }, - "Segment": { - "$ref": "#/definitions/BlobFlatListSegment" - }, - "NextMarker": { - "type": "string" - } - } - }, - "ListBlobsHierarchySegmentResponse": { - "xml": { - "name": "EnumerationResults" - }, - "description": "An enumeration of blobs", - "type": "object", - "required": [ - "ServiceEndpoint", - "ContainerName", - "Segment" - ], - "properties": { - "ServiceEndpoint": { - "type": "string", - "xml": { - "attribute": true - } - }, - "ContainerName": { - "type": "string", - "xml": { - "attribute": true - } - }, - "Prefix": { - "type": "string" - }, - "Marker": { - "type": "string" - }, - "MaxResults": { - "type": "integer" - }, - "Delimiter": { - "type": "string" - }, - "Segment": { - "$ref": "#/definitions/BlobHierarchyListSegment" - }, - "NextMarker": { - "type": "string" - } - } - }, - "BlobFlatListSegment": { - "xml": { - "name": "Blobs" - }, - "required": [ - "BlobItems" - ], - "type": "object", - "properties": { - "BlobItems": { - "type": "array", - "items": { - "$ref": "#/definitions/BlobItemInternal" - } - } - } - }, - "BlobHierarchyListSegment": { - "xml": { - "name": "Blobs" - }, - "type": "object", - "required": [ - "BlobItems" - ], - "properties": { - "BlobPrefixes": { - "type": "array", - "items": { - "$ref": "#/definitions/BlobPrefix" - } - }, - "BlobItems": { - "type": "array", - "items": { - "$ref": "#/definitions/BlobItemInternal" - } - } - } - }, - "BlobPrefix": { - "type": "object", - "required": [ - "Name" - ], - "properties": { - "Name": { - "$ref": "#/definitions/BlobName" - } - } - }, - "BlobName": { - "type": "object", - "properties": { - "Encoded": { - "xml": { - "attribute": true, - "name": "Encoded" - }, - "type": "boolean", - "description": "Indicates if the blob name is encoded." - }, - "content": { - "xml": { - "x-ms-text": true - }, - "type": "string", - "description": "The name of the blob." - } - } - }, - "BlobTag": { - "xml": { - "name": "Tag" - }, - "type": "object", - "required": [ - "Key", - "Value" - ], - "properties": { - "Key": { - "type": "string" - }, - "Value": { - "type": "string" - } - } - }, - "BlobTags": { - "type": "object", - "xml": { - "name": "Tags" - }, - "description": "Blob tags", - "required": [ - "BlobTagSet" - ], - "properties": { - "BlobTagSet": { - "xml": { - "wrapped": true, - "name": "TagSet" - }, - "type": "array", - "items": { - "$ref": "#/definitions/BlobTag" - } - } - } - }, - "Block": { - "type": "object", - "required": [ - "Name", - "Size" - ], - "description": "Represents a single block in a block blob. It describes the block's ID and size.", - "properties": { - "Name": { - "description": "The base64 encoded block ID.", - "type": "string" - }, - "Size": { - "description": "The block size in bytes.", - "type": "integer", - "format": "int64" - } - } - }, - "BlockList": { - "type": "object", - "properties": { - "CommittedBlocks": { - "xml": { - "wrapped": true - }, - "type": "array", - "items": { - "$ref": "#/definitions/Block" - } - }, - "UncommittedBlocks": { - "xml": { - "wrapped": true - }, - "type": "array", - "items": { - "$ref": "#/definitions/Block" - } - } - } - }, - "BlockLookupList": { - "type": "object", - "properties": { - "Committed": { - "type": "array", - "items": { - "type": "string", - "xml": { - "name": "Committed" - } - } - }, - "Uncommitted": { - "type": "array", - "items": { - "type": "string", - "xml": { - "name": "Uncommitted" - } - } - }, - "Latest": { - "type": "array", - "items": { - "type": "string", - "xml": { - "name": "Latest" - } - } - } - }, - "xml": { - "name": "BlockList" - } - }, - "ContainerItem": { - "xml": { - "name": "Container" - }, - "type": "object", - "required": [ - "Name", - "Properties" - ], - "description": "An Azure Storage container", - "properties": { - "Name": { - "type": "string" - }, - "Deleted": { - "type": "boolean" - }, - "Version": { - "type": "string" - }, - "Properties": { - "$ref": "#/definitions/ContainerProperties" - }, - "Metadata": { - "$ref": "#/definitions/ContainerMetadata" - } - } - }, - "ContainerProperties": { - "type": "object", - "required": [ - "Last-Modified", - "Etag" - ], - "description": "Properties of a container", - "properties": { - "Last-Modified": { - "type": "string", - "format": "date-time-rfc1123" - }, - "Etag": { - "type": "string" - }, - "LeaseStatus": { - "$ref": "#/definitions/LeaseStatus" - }, - "LeaseState": { - "$ref": "#/definitions/LeaseState" - }, - "LeaseDuration": { - "$ref": "#/definitions/LeaseDuration" - }, - "PublicAccess": { - "$ref": "#/definitions/PublicAccessType" - }, - "HasImmutabilityPolicy": { - "type": "boolean" - }, - "HasLegalHold": { - "type": "boolean" - }, - "DefaultEncryptionScope": { - "type": "string" - }, - "DenyEncryptionScopeOverride": { - "type": "boolean", - "x-ms-client-name": "PreventEncryptionScopeOverride" - }, - "DeletedTime": { - "type": "string", - "format": "date-time-rfc1123" - }, - "RemainingRetentionDays": { - "type": "integer" - }, - "ImmutableStorageWithVersioningEnabled": { - "x-ms-client-name": "IsImmutableStorageWithVersioningEnabled", - "type": "boolean", - "description": "Indicates if version level worm is enabled on this container." - } - } - }, - "DelimitedTextConfiguration": { - "xml": { - "name": "DelimitedTextConfiguration" - }, - "description": "Groups the settings used for interpreting the blob data if the blob is delimited text formatted.", - "type": "object", - "properties": { - "ColumnSeparator": { - "type": "string", - "description": "The string used to separate columns.", - "xml": { - "name": "ColumnSeparator" - } - }, - "FieldQuote": { - "type": "string", - "description": "The string used to quote a specific field.", - "xml": { - "name": "FieldQuote" - } - }, - "RecordSeparator": { - "type": "string", - "description": "The string used to separate records.", - "xml": { - "name": "RecordSeparator" - } - }, - "EscapeChar": { - "type": "string", - "description": "The string used as an escape character.", - "xml": { - "name": "EscapeChar" - } - }, - "HeadersPresent": { - "type": "boolean", - "description": "Represents whether the data has headers.", - "xml": { - "name": "HasHeaders" - } - } - } - }, - "JsonTextConfiguration": { - "xml": { - "name": "JsonTextConfiguration" - }, - "description": "json text configuration", - "type": "object", - "properties": { - "RecordSeparator": { - "type": "string", - "description": "The string used to separate records.", - "xml": { - "name": "RecordSeparator" - } - } - } - }, - "ArrowConfiguration": { - "xml": { - "name": "ArrowConfiguration" - }, - "description": "Groups the settings used for formatting the response if the response should be Arrow formatted.", - "type": "object", - "required": [ - "Schema" - ], - "properties": { - "Schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ArrowField" - }, - "xml": { - "wrapped": true, - "name": "Schema" - } - } - } - }, - "ParquetConfiguration": { - "xml": { - "name": "ParquetTextConfiguration" - }, - "description": "parquet configuration", - "type": "object" - }, - "ArrowField": { - "xml": { - "name": "Field" - }, - "description": "Groups settings regarding specific field of an arrow schema", - "type": "object", - "required": [ - "Type" - ], - "properties": { - "Type": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Precision": { - "type": "integer" - }, - "Scale": { - "type": "integer" - } - } - }, - "ListContainersSegmentResponse": { - "xml": { - "name": "EnumerationResults" - }, - "description": "An enumeration of containers", - "type": "object", - "required": [ - "ServiceEndpoint", - "ContainerItems" - ], - "properties": { - "ServiceEndpoint": { - "type": "string", - "xml": { - "attribute": true - } - }, - "Prefix": { - "type": "string" - }, - "Marker": { - "type": "string" - }, - "MaxResults": { - "type": "integer" - }, - "ContainerItems": { - "xml": { - "wrapped": true, - "name": "Containers" - }, - "type": "array", - "items": { - "$ref": "#/definitions/ContainerItem" - } - }, - "NextMarker": { - "type": "string" - } - } - }, - "CorsRule": { - "description": "CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain", - "type": "object", - "required": [ - "AllowedOrigins", - "AllowedMethods", - "AllowedHeaders", - "ExposedHeaders", - "MaxAgeInSeconds" - ], - "properties": { - "AllowedOrigins": { - "description": "The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.", - "type": "string" - }, - "AllowedMethods": { - "description": "The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)", - "type": "string" - }, - "AllowedHeaders": { - "description": "the request headers that the origin domain may specify on the CORS request.", - "type": "string" - }, - "ExposedHeaders": { - "description": "The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer", - "type": "string" - }, - "MaxAgeInSeconds": { - "description": "The maximum amount time that a browser should cache the preflight OPTIONS request.", - "type": "integer", - "minimum": 0 - } - } - }, - "ErrorCode": { - "description": "Error codes returned by the service", - "type": "string", - "enum": [ - "AccountAlreadyExists", - "AccountBeingCreated", - "AccountIsDisabled", - "AuthenticationFailed", - "AuthorizationFailure", - "ConditionHeadersNotSupported", - "ConditionNotMet", - "EmptyMetadataKey", - "InsufficientAccountPermissions", - "InternalError", - "InvalidAuthenticationInfo", - "InvalidHeaderValue", - "InvalidHttpVerb", - "InvalidInput", - "InvalidMd5", - "InvalidMetadata", - "InvalidQueryParameterValue", - "InvalidRange", - "InvalidResourceName", - "InvalidUri", - "InvalidXmlDocument", - "InvalidXmlNodeValue", - "Md5Mismatch", - "MetadataTooLarge", - "MissingContentLengthHeader", - "MissingRequiredQueryParameter", - "MissingRequiredHeader", - "MissingRequiredXmlNode", - "MultipleConditionHeadersNotSupported", - "OperationTimedOut", - "OutOfRangeInput", - "OutOfRangeQueryParameterValue", - "RequestBodyTooLarge", - "ResourceTypeMismatch", - "RequestUrlFailedToParse", - "ResourceAlreadyExists", - "ResourceNotFound", - "ServerBusy", - "UnsupportedHeader", - "UnsupportedXmlNode", - "UnsupportedQueryParameter", - "UnsupportedHttpVerb", - "AppendPositionConditionNotMet", - "BlobAlreadyExists", - "BlobImmutableDueToPolicy", - "BlobNotFound", - "BlobOverwritten", - "BlobTierInadequateForContentLength", - "BlobUsesCustomerSpecifiedEncryption", - "BlockCountExceedsLimit", - "BlockListTooLong", - "CannotChangeToLowerTier", - "CannotVerifyCopySource", - "ContainerAlreadyExists", - "ContainerBeingDeleted", - "ContainerDisabled", - "ContainerNotFound", - "ContentLengthLargerThanTierLimit", - "CopyAcrossAccountsNotSupported", - "CopyIdMismatch", - "FeatureVersionMismatch", - "IncrementalCopyBlobMismatch", - "IncrementalCopyOfEarlierSnapshotNotAllowed", - "IncrementalCopySourceMustBeSnapshot", - "InfiniteLeaseDurationRequired", - "InvalidBlobOrBlock", - "InvalidBlobTier", - "InvalidBlobType", - "InvalidBlockId", - "InvalidBlockList", - "InvalidOperation", - "InvalidPageRange", - "InvalidSourceBlobType", - "InvalidSourceBlobUrl", - "InvalidVersionForPageBlobOperation", - "LeaseAlreadyPresent", - "LeaseAlreadyBroken", - "LeaseIdMismatchWithBlobOperation", - "LeaseIdMismatchWithContainerOperation", - "LeaseIdMismatchWithLeaseOperation", - "LeaseIdMissing", - "LeaseIsBreakingAndCannotBeAcquired", - "LeaseIsBreakingAndCannotBeChanged", - "LeaseIsBrokenAndCannotBeRenewed", - "LeaseLost", - "LeaseNotPresentWithBlobOperation", - "LeaseNotPresentWithContainerOperation", - "LeaseNotPresentWithLeaseOperation", - "MaxBlobSizeConditionNotMet", - "NoAuthenticationInformation", - "NoPendingCopyOperation", - "OperationNotAllowedOnIncrementalCopyBlob", - "PendingCopyOperation", - "PreviousSnapshotCannotBeNewer", - "PreviousSnapshotNotFound", - "PreviousSnapshotOperationNotSupported", - "SequenceNumberConditionNotMet", - "SequenceNumberIncrementTooLarge", - "SnapshotCountExceeded", - "SnapshotOperationRateExceeded", - "SnapshotsPresent", - "SourceConditionNotMet", - "SystemInUse", - "TargetConditionNotMet", - "UnauthorizedBlobOverwrite", - "BlobBeingRehydrated", - "BlobArchived", - "BlobNotArchived", - "AuthorizationSourceIPMismatch", - "AuthorizationProtocolMismatch", - "AuthorizationPermissionMismatch", - "AuthorizationServiceMismatch", - "AuthorizationResourceTypeMismatch", - "BlobAccessTierNotSupportedForAccountType" - ], - "x-ms-enum": { - "name": "StorageErrorCode", - "modelAsString": true - } - }, - "FilterBlobItem": { - "xml": { - "name": "Blob" - }, - "description": "Blob info from a Filter Blobs API call", - "type": "object", - "required": [ - "Name", - "ContainerName" - ], - "properties": { - "Name": { - "type": "string" - }, - "ContainerName": { - "type": "string" - }, - "Tags": { - "$ref": "#/definitions/BlobTags" - }, - "VersionId": { - "type": "string" - }, - "IsCurrentVersion": { - "type": "boolean" - } - } - }, - "FilterBlobSegment": { - "description": "The result of a Filter Blobs API call", - "xml": { - "name": "EnumerationResults" - }, - "type": "object", - "required": [ - "ServiceEndpoint", - "Where", - "Blobs" - ], - "properties": { - "ServiceEndpoint": { - "type": "string", - "xml": { - "attribute": true - } - }, - "Where": { - "type": "string" - }, - "Blobs": { - "xml": { - "name": "Blobs", - "wrapped": true - }, - "type": "array", - "items": { - "$ref": "#/definitions/FilterBlobItem" - } - }, - "NextMarker": { - "type": "string" - } - } - }, - "GeoReplication": { - "description": "Geo-Replication information for the Secondary Storage Service", - "type": "object", - "required": [ - "Status", - "LastSyncTime" - ], - "properties": { - "Status": { - "description": "The status of the secondary location", - "type": "string", - "enum": [ - "live", - "bootstrap", - "unavailable" - ], - "x-ms-enum": { - "name": "GeoReplicationStatusType", - "modelAsString": true - } - }, - "LastSyncTime": { - "description": "A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads.", - "type": "string", - "format": "date-time-rfc1123" - } - } - }, - "Logging": { - "description": "Azure Analytics Logging settings.", - "type": "object", - "required": [ - "Version", - "Delete", - "Read", - "Write", - "RetentionPolicy" - ], - "properties": { - "Version": { - "description": "The version of Storage Analytics to configure.", - "type": "string" - }, - "Delete": { - "description": "Indicates whether all delete requests should be logged.", - "type": "boolean" - }, - "Read": { - "description": "Indicates whether all read requests should be logged.", - "type": "boolean" - }, - "Write": { - "description": "Indicates whether all write requests should be logged.", - "type": "boolean" - }, - "RetentionPolicy": { - "$ref": "#/definitions/RetentionPolicy" - } - } - }, - "ContainerMetadata": { - "type": "object", - "xml": { - "name": "Metadata" - }, - "additionalProperties": { - "type": "string" - } - }, - "BlobMetadata": { - "type": "object", - "xml": { - "name": "Metadata" - }, - "properties": { - "Encrypted": { - "type": "string", - "xml": { - "attribute": true - } - } - }, - "additionalProperties": { - "type": "string" - } - }, - "ObjectReplicationMetadata": { - "type": "object", - "xml": { - "name": "OrMetadata" - }, - "additionalProperties": { - "type": "string" - } - }, - "Metrics": { - "description": "a summary of request statistics grouped by API in hour or minute aggregates for blobs", - "required": [ - "Enabled" - ], - "properties": { - "Version": { - "description": "The version of Storage Analytics to configure.", - "type": "string" - }, - "Enabled": { - "description": "Indicates whether metrics are enabled for the Blob service.", - "type": "boolean" - }, - "IncludeAPIs": { - "description": "Indicates whether metrics should generate summary statistics for called API operations.", - "type": "boolean" - }, - "RetentionPolicy": { - "$ref": "#/definitions/RetentionPolicy" - } - } - }, - "PageList": { - "description": "the list of pages", - "type": "object", - "properties": { - "PageRange": { - "type": "array", - "items": { - "$ref": "#/definitions/PageRange" - } - }, - "ClearRange": { - "type": "array", - "items": { - "$ref": "#/definitions/ClearRange" - } - }, - "NextMarker": { - "type": "string" - } - } - }, - "PageRange": { - "type": "object", - "required": [ - "Start", - "End" - ], - "properties": { - "Start": { - "type": "integer", - "format": "int64", - "xml": { - "name": "Start" - } - }, - "End": { - "type": "integer", - "format": "int64", - "xml": { - "name": "End" - } - } - }, - "xml": { - "name": "PageRange" - } - }, - "ClearRange": { - "type": "object", - "required": [ - "Start", - "End" - ], - "properties": { - "Start": { - "type": "integer", - "format": "int64", - "xml": { - "name": "Start" - } - }, - "End": { - "type": "integer", - "format": "int64", - "xml": { - "name": "End" - } - } - }, - "xml": { - "name": "ClearRange" - } - }, - "QueryRequest": { - "description": "Groups the set of query request settings.", - "type": "object", - "required": [ - "QueryType", - "Expression" - ], - "properties": { - "QueryType": { - "type": "string", - "description": "Required. The type of the provided query expression.", - "xml": { - "name": "QueryType" - }, - "enum": [ - "SQL" - ] - }, - "Expression": { - "type": "string", - "description": "The query expression in SQL. The maximum size of the query expression is 256KiB.", - "xml": { - "name": "Expression" - } - }, - "InputSerialization": { - "$ref": "#/definitions/QuerySerialization", - "xml": { - "name": "InputSerialization" - } - }, - "OutputSerialization": { - "$ref": "#/definitions/QuerySerialization", - "xml": { - "name": "OutputSerialization" - } - } - }, - "xml": { - "name": "QueryRequest" - } - }, - "QueryFormat": { - "type": "object", - "required": [ - "Type" - ], - "properties": { - "Type": { - "$ref": "#/definitions/QueryType" - }, - "DelimitedTextConfiguration": { - "$ref": "#/definitions/DelimitedTextConfiguration" - }, - "JsonTextConfiguration": { - "$ref": "#/definitions/JsonTextConfiguration" - }, - "ArrowConfiguration": { - "$ref": "#/definitions/ArrowConfiguration" - }, - "ParquetTextConfiguration": { - "$ref": "#/definitions/ParquetConfiguration" - } - } - }, - "QuerySerialization": { - "type": "object", - "required": [ - "Format" - ], - "properties": { - "Format": { - "$ref": "#/definitions/QueryFormat", - "xml": { - "name": "Format" - } - } - } - }, - "QueryType": { - "type": "string", - "description": "The quick query format type.", - "enum": [ - "delimited", - "json", - "arrow", - "parquet" - ], - "x-ms-enum": { - "name": "QueryFormatType", - "modelAsString": false - }, - "xml": { - "name": "Type" - } - }, - "RehydratePriority": { - "description": "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard.", - "type": "string", - "enum": [ - "High", - "Standard" - ], - "x-ms-enum": { - "name": "RehydratePriority", - "modelAsString": true - }, - "xml": { - "name": "RehydratePriority" - } - }, - "RetentionPolicy": { - "description": "the retention policy which determines how long the associated data should persist", - "type": "object", - "required": [ - "Enabled" - ], - "properties": { - "Enabled": { - "description": "Indicates whether a retention policy is enabled for the storage service", - "type": "boolean" - }, - "Days": { - "description": "Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted", - "type": "integer", - "minimum": 1 - }, - "AllowPermanentDelete": { - "description": "Indicates whether permanent delete is allowed on this storage account.", - "type": "boolean" - } - } - }, - "SignedIdentifier": { - "xml": { - "name": "SignedIdentifier" - }, - "description": "signed identifier", - "type": "object", - "required": [ - "Id", - "AccessPolicy" - ], - "properties": { - "Id": { - "type": "string", - "description": "a unique id" - }, - "AccessPolicy": { - "$ref": "#/definitions/AccessPolicy" - } - } - }, - "SignedIdentifiers": { - "description": "a collection of signed identifiers", - "type": "array", - "items": { - "$ref": "#/definitions/SignedIdentifier" - }, - "xml": { - "wrapped": true, - "name": "SignedIdentifiers" - } - }, - "StaticWebsite": { - "description": "The properties that enable an account to host a static website", - "type": "object", - "required": [ - "Enabled" - ], - "properties": { - "Enabled": { - "description": "Indicates whether this account is hosting a static website", - "type": "boolean" - }, - "IndexDocument": { - "description": "The default name of the index page under each directory", - "type": "string" - }, - "ErrorDocument404Path": { - "description": "The absolute path of the custom 404 page", - "type": "string" - }, - "DefaultIndexDocumentPath": { - "description": "Absolute path of the default index page", - "type": "string" - } - } - }, - "StorageServiceProperties": { - "description": "Storage Service Properties.", - "type": "object", - "properties": { - "Logging": { - "$ref": "#/definitions/Logging" - }, - "HourMetrics": { - "$ref": "#/definitions/Metrics" - }, - "MinuteMetrics": { - "$ref": "#/definitions/Metrics" - }, - "Cors": { - "description": "The set of CORS rules.", - "type": "array", - "items": { - "$ref": "#/definitions/CorsRule" - }, - "xml": { - "wrapped": true - } - }, - "DefaultServiceVersion": { - "description": "The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions", - "type": "string" - }, - "DeleteRetentionPolicy": { - "$ref": "#/definitions/RetentionPolicy" - }, - "StaticWebsite": { - "$ref": "#/definitions/StaticWebsite" - } - } - }, - "StorageServiceStats": { - "description": "Stats for the storage service.", - "type": "object", - "properties": { - "GeoReplication": { - "$ref": "#/definitions/GeoReplication" - } - } - } - }, - "parameters": { - "Url": { - "name": "url", - "description": "The URL of the service account, container, or blob that is the target of the desired operation.", - "x-ms-parameter-location": "client", - "required": true, - "type": "string", - "in": "path", - "x-ms-skip-url-encoding": true - }, - "AccessTierIfModifiedSince": { - "name": "x-ms-access-tier-if-modified-since", - "x-ms-client-name": "accessTierIfModifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "description": "Specify this header value to operate only on a blob if the access-tier has been modified since the specified date/time." - }, - "AccessTierIfUnmodifiedSince": { - "name": "x-ms-access-tier-if-unmodified-since", - "x-ms-client-name": "accessTierIfUnmodifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "description": "Specify this header value to operate only on a blob if the access-tier has not been modified since the specified date/time." - }, - "ApiVersionParameter": { - "name": "x-ms-version", - "x-ms-parameter-location": "client", - "x-ms-client-name": "version", - "in": "header", - "required": true, - "type": "string", - "description": "Specifies the version of the operation to use for this request." - }, - "Blob": { - "name": "blob", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+)*(?:\\.[a-zA-Z0-9]+){0,1}$", - "minLength": 1, - "maxLength": 1024, - "x-ms-parameter-location": "method", - "description": "The blob name." - }, - "BlobCacheControl": { - "name": "x-ms-blob-cache-control", - "x-ms-client-name": "blobCacheControl", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-HTTP-headers" - }, - "description": "Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request." - }, - "BlobConditionAppendPos": { - "name": "x-ms-blob-condition-appendpos", - "x-ms-client-name": "appendPosition", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "append-position-access-conditions" - }, - "description": "Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed)." - }, - "BlobConditionMaxSize": { - "name": "x-ms-blob-condition-maxsize", - "x-ms-client-name": "maxSize", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "append-position-access-conditions" - }, - "description": "Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed)." - }, - "BlobPublicAccess": { - "name": "x-ms-blob-public-access", - "x-ms-client-name": "access", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "description": "Specifies whether data in the container may be accessed publicly and the level of access", - "type": "string", - "enum": [ - "container", - "blob" - ], - "x-ms-enum": { - "name": "PublicAccessType", - "modelAsString": true - } - }, - "BlobTagsBody": { - "name": "Tags", - "in": "body", - "schema": { - "$ref": "#/definitions/BlobTags" - }, - "x-ms-parameter-location": "method", - "description": "Blob tags" - }, - "BlobTagsHeader": { - "name": "x-ms-tags", - "x-ms-client-name": "BlobTagsString", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Optional. Used to set blob tags in various blob operations." - }, - "AccessTierRequired": { - "name": "x-ms-access-tier", - "x-ms-client-name": "tier", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - "Smart" - ], - "x-ms-enum": { - "name": "AccessTier", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "Indicates the tier to be set on the blob." - }, - "AccessTierOptional": { - "name": "x-ms-access-tier", - "x-ms-client-name": "tier", - "in": "header", - "required": false, - "type": "string", - "enum": [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - "Smart" - ], - "x-ms-enum": { - "name": "AccessTier", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "Optional. Indicates the tier to be set on the blob." - }, - "PremiumPageBlobAccessTierOptional": { - "name": "x-ms-access-tier", - "x-ms-client-name": "tier", - "in": "header", - "required": false, - "type": "string", - "enum": [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80" - ], - "x-ms-enum": { - "name": "PremiumPageBlobAccessTier", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "Optional. Indicates the tier to be set on the page blob." - }, - "RehydratePriority": { - "name": "x-ms-rehydrate-priority", - "x-ms-client-name": "rehydratePriority", - "in": "header", - "required": false, - "type": "string", - "enum": [ - "High", - "Standard" - ], - "x-ms-enum": { - "name": "RehydratePriority", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "Optional: Indicates the priority with which to rehydrate an archived blob." - }, - "BlobContentDisposition": { - "name": "x-ms-blob-content-disposition", - "x-ms-client-name": "blobContentDisposition", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-HTTP-headers" - }, - "description": "Optional. Sets the blob's Content-Disposition header." - }, - "BlobContentEncoding": { - "name": "x-ms-blob-content-encoding", - "x-ms-client-name": "blobContentEncoding", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-HTTP-headers" - }, - "description": "Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request." - }, - "BlobContentLanguage": { - "name": "x-ms-blob-content-language", - "x-ms-client-name": "blobContentLanguage", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-HTTP-headers" - }, - "description": "Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request." - }, - "BlobContentLengthOptional": { - "name": "x-ms-blob-content-length", - "x-ms-client-name": "blobContentLength", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "description": "This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary." - }, - "BlobContentLengthRequired": { - "name": "x-ms-blob-content-length", - "x-ms-client-name": "blobContentLength", - "in": "header", - "required": true, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "description": "This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary." - }, - "BlobContentMD5": { - "name": "x-ms-blob-content-md5", - "x-ms-client-name": "blobContentMD5", - "in": "header", - "required": false, - "type": "string", - "format": "byte", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-HTTP-headers" - }, - "description": "Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded." - }, - "BlobContentType": { - "name": "x-ms-blob-content-type", - "x-ms-client-name": "blobContentType", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-HTTP-headers" - }, - "description": "Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request." - }, - "BlobDeleteType": { - "name": "deletetype", - "x-ms-client-name": "blobDeleteType", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "Permanent" - ], - "x-ms-enum": { - "name": "BlobDeleteType", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Optional. Only possible value is 'permanent', which specifies to permanently delete a blob if blob soft delete is enabled." - }, - "BlobExpiryOptions": { - "name": "x-ms-expiry-option", - "x-ms-client-name": "ExpiryOptions", - "in": "header", - "required": true, - "type": "string", - "enum": [ - "NeverExpire", - "RelativeToCreation", - "RelativeToNow", - "Absolute" - ], - "x-ms-enum": { - "name": "BlobExpiryOptions", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "Required. Indicates mode of the expiry time" - }, - "BlobExpiryTime": { - "name": "x-ms-expiry-time", - "x-ms-client-name": "ExpiresOn", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The time to set the blob to expiry" - }, - "BlobSequenceNumber": { - "name": "x-ms-blob-sequence-number", - "x-ms-client-name": "blobSequenceNumber", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "default": 0, - "x-ms-parameter-location": "method", - "description": "Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1." - }, - "BlockId": { - "name": "blockid", - "x-ms-client-name": "blockId", - "in": "query", - "type": "string", - "required": true, - "x-ms-parameter-location": "method", - "description": "A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block." - }, - "BlockListType": { - "name": "blocklisttype", - "x-ms-client-name": "listType", - "in": "query", - "required": true, - "default": "committed", - "x-ms-parameter-location": "method", - "description": "Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together.", - "type": "string", - "enum": [ - "committed", - "uncommitted", - "all" - ], - "x-ms-enum": { - "name": "BlockListType", - "modelAsString": false - } - }, - "Body": { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "format": "file" - }, - "x-ms-parameter-location": "method", - "description": "Initial data" - }, - "ContainerAcl": { - "name": "containerAcl", - "in": "body", - "schema": { - "$ref": "#/definitions/SignedIdentifiers" - }, - "x-ms-parameter-location": "method", - "description": "the acls for the container" - }, - "CopyId": { - "name": "copyid", - "x-ms-client-name": "copyId", - "in": "query", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation." - }, - "ClientRequestId": { - "name": "x-ms-client-request-id", - "x-ms-client-name": "requestId", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "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." - }, - "ContainerName": { - "name": "containerName", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The container name." - }, - "ContentCrc64": { - "name": "x-ms-content-crc64", - "x-ms-client-name": "transactionalContentCrc64", - "in": "header", - "required": false, - "type": "string", - "format": "byte", - "x-ms-parameter-location": "method", - "description": "Specify the transactional crc64 for the body, to be validated by the service." - }, - "ContentLength": { - "name": "Content-Length", - "in": "header", - "required": true, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "description": "The length of the request." - }, - "ContentMD5": { - "name": "Content-MD5", - "x-ms-client-name": "transactionalContentMD5", - "in": "header", - "required": false, - "type": "string", - "format": "byte", - "x-ms-parameter-location": "method", - "description": "Specify the transactional md5 for the body, to be validated by the service." - }, - "CopySource": { - "name": "x-ms-copy-source", - "x-ms-client-name": "copySource", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature." - }, - "CopySourceAuthorization": { - "name": "x-ms-copy-source-authorization", - "x-ms-client-name": "copySourceAuthorization", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source." - }, - "CopySourceBlobProperties": { - "name": "x-ms-copy-source-blob-properties", - "x-ms-client-name": "copySourceBlobProperties", - "in": "header", - "required": false, - "type": "boolean", - "x-ms-parameter-location": "method", - "description": "Optional, default is true. Indicates if properties from the source blob should be copied." - }, - "CopySourceTags": { - "name": "x-ms-copy-source-tag-option", - "x-ms-client-name": "copySourceTags", - "in": "header", - "required": false, - "type": "string", - "enum": [ - "REPLACE", - "COPY" - ], - "x-ms-enum": { - "name": "BlobCopySourceTags", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by x-ms-tags." - }, - "DeleteSnapshots": { - "name": "x-ms-delete-snapshots", - "x-ms-client-name": "deleteSnapshots", - "description": "Required if the blob has associated snapshots. Specify one of the following two options: include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob itself", - "x-ms-parameter-location": "method", - "in": "header", - "required": false, - "type": "string", - "enum": [ - "include", - "only" - ], - "x-ms-enum": { - "name": "DeleteSnapshotsOptionType", - "modelAsString": false - } - }, - "Delimiter": { - "name": "delimiter", - "description": "When the request includes this parameter, the operation returns a BlobPrefix element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string.", - "type": "string", - "x-ms-parameter-location": "method", - "in": "query", - "required": true - }, - "EncryptionKey": { - "name": "x-ms-encryption-key", - "x-ms-client-name": "encryptionKey", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "cpk-info" - }, - "description": "Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, encryption is performed with the root account encryption key. For more information, see Encryption at Rest for Azure Storage Services." - }, - "EncryptionKeySha256": { - "name": "x-ms-encryption-key-sha256", - "x-ms-client-name": "encryptionKeySha256", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "cpk-info" - }, - "description": "The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key header is provided." - }, - "EncryptionAlgorithm": { - "name": "x-ms-encryption-algorithm", - "x-ms-client-name": "encryptionAlgorithm", - "type": "string", - "in": "header", - "required": false, - "enum": [ - "AES256" - ], - "x-ms-enum": { - "name": "EncryptionAlgorithmType", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "cpk-info" - }, - "description": "The algorithm used to produce the encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided if the x-ms-encryption-key header is provided." - }, - "EncryptionScope": { - "name": "x-ms-encryption-scope", - "x-ms-client-name": "encryptionScope", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "cpk-scope-info" - }, - "description": "Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services." - }, - "DefaultEncryptionScope": { - "name": "x-ms-default-encryption-scope", - "x-ms-client-name": "DefaultEncryptionScope", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "container-cpk-scope-info" - }, - "description": "Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use for all future writes." - }, - "DeletedContainerName": { - "name": "x-ms-deleted-container-name", - "x-ms-client-name": "DeletedContainerName", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "description": "Optional. Version 2019-12-12 and later. Specifies the name of the deleted container to restore." - }, - "DeletedContainerVersion": { - "name": "x-ms-deleted-container-version", - "x-ms-client-name": "DeletedContainerVersion", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "description": "Optional. Version 2019-12-12 and later. Specifies the version of the deleted container to restore." - }, - "DenyEncryptionScopeOverride": { - "name": "x-ms-deny-encryption-scope-override", - "x-ms-client-name": "PreventEncryptionScopeOverride", - "type": "boolean", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "container-cpk-scope-info" - }, - "description": "Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption scope than the scope set on the container." - }, - "FileRequestIntent": { - "name": "x-ms-file-request-intent", - "x-ms-client-name": "fileRequestIntent", - "in": "header", - "description": "Valid value is backup", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "enum": [ - "backup" - ], - "x-ms-enum": { - "name": "FileShareTokenIntent", - "modelAsString": true - } - }, - "FilterBlobsInclude": { - "name": "include", - "in": "query", - "required": false, - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "none", - "versions" - ], - "x-ms-enum": { - "name": "FilterBlobsIncludeItem", - "modelAsString": false - } - }, - "x-ms-parameter-location": "method", - "description": "Include this parameter to specify one or more datasets to include in the response." - }, - "FilterBlobsWhere": { - "name": "where", - "in": "query", - "required": false, - "type": "string", - "description": "Filters the results to return only to return only blobs whose tags match the specified expression.", - "x-ms-parameter-location": "method" - }, - "GetRangeContentMD5": { - "name": "x-ms-range-get-content-md5", - "x-ms-client-name": "rangeGetContentMD5", - "in": "header", - "required": false, - "type": "boolean", - "x-ms-parameter-location": "method", - "description": "When set to true and specified together with the Range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size." - }, - "GetRangeContentCRC64": { - "name": "x-ms-range-get-content-crc64", - "x-ms-client-name": "rangeGetContentCRC64", - "in": "header", - "required": false, - "type": "boolean", - "x-ms-parameter-location": "method", - "description": "When set to true and specified together with the Range, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 MB in size." - }, - "StructuredBodyGet": { - "name": "x-ms-structured-body", - "x-ms-client-name": "StructuredBodyType", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Specifies the response content should be returned as a structured message and specifies the message schema version and properties." - }, - "StructuredBodyPut": { - "name": "x-ms-structured-body", - "x-ms-client-name": "StructuredBodyType", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Required if the request body is a structured message. Specifies the message schema version and properties." - }, - "StructuredContentLength": { - "name": "x-ms-structured-content-length", - "x-ms-client-name": "StructuredContentLength", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "description": "Required if the request body is a structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller than Content-Length." - }, - "IfMatch": { - "name": "If-Match", - "x-ms-client-name": "ifMatch", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "modified-access-conditions" - }, - "description": "Specify an ETag value to operate only on blobs with a matching value." - }, - "IfModifiedSince": { - "name": "If-Modified-Since", - "x-ms-client-name": "ifModifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "modified-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has been modified since the specified date/time." - }, - "IfNoneMatch": { - "name": "If-None-Match", - "x-ms-client-name": "ifNoneMatch", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "modified-access-conditions" - }, - "description": "Specify an ETag value to operate only on blobs without a matching value." - }, - "IfUnmodifiedSince": { - "name": "If-Unmodified-Since", - "x-ms-client-name": "ifUnmodifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "modified-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has not been modified since the specified date/time." - }, - "IfSequenceNumberEqualTo": { - "name": "x-ms-if-sequence-number-eq", - "x-ms-client-name": "ifSequenceNumberEqualTo", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "sequence-number-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has the specified sequence number." - }, - "IfSequenceNumberLessThan": { - "name": "x-ms-if-sequence-number-lt", - "x-ms-client-name": "ifSequenceNumberLessThan", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "sequence-number-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has a sequence number less than the specified." - }, - "IfSequenceNumberLessThanOrEqualTo": { - "name": "x-ms-if-sequence-number-le", - "x-ms-client-name": "ifSequenceNumberLessThanOrEqualTo", - "in": "header", - "required": false, - "type": "integer", - "format": "int64", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "sequence-number-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified." - }, - "IfTags": { - "name": "x-ms-if-tags", - "x-ms-client-name": "ifTags", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "modified-access-conditions" - }, - "description": "Specify a SQL where clause on blob tags to operate only on blobs with a matching value." - }, - "IfBlobMatch": { - "name": "x-ms-blob-if-match", - "x-ms-client-name": "ifMatch", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-modified-access-conditions" - }, - "description": "Specify an ETag value to operate only on blobs with a matching value." - }, - "IfBlobModifiedSince": { - "name": "x-ms-blob-if-modified-since", - "x-ms-client-name": "ifModifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-modified-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has been modified since the specified date/time." - }, - "IfBlobNoneMatch": { - "name": "x-ms-blob-if-none-match", - "x-ms-client-name": "ifNoneMatch", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-modified-access-conditions" - }, - "description": "Specify an ETag value to operate only on blobs without a matching value." - }, - "IfBlobUnmodifiedSince": { - "name": "x-ms-blob-if-unmodified-since", - "x-ms-client-name": "ifUnmodifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "blob-modified-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has not been modified since the specified date/time." - }, - "ImmutabilityPolicyExpiry": { - "name": "x-ms-immutability-policy-until-date", - "x-ms-client-name": "immutabilityPolicyExpiry", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "description": "Specifies the date time when the blobs immutability policy is set to expire." - }, - "ImmutabilityPolicyMode": { - "name": "x-ms-immutability-policy-mode", - "x-ms-client-name": "immutabilityPolicyMode", - "in": "header", - "required": false, - "type": "string", - "enum": [ - "Unlocked", - "Locked" - ], - "x-ms-enum": { - "name": "BlobImmutabilityPolicyMode", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "description": "Specifies the immutability policy mode to set on the blob." - }, - "KeyInfo": { - "description": "Key information", - "name": "KeyInfo", - "in": "body", - "x-ms-parameter-location": "method", - "required": true, - "schema": { - "$ref": "#/definitions/KeyInfo" - } - }, - "ListBlobsInclude": { - "name": "include", - "in": "query", - "required": false, - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "copy", - "deleted", - "metadata", - "snapshots", - "uncommittedblobs", - "versions", - "tags", - "immutabilitypolicy", - "legalhold", - "deletedwithversions" - ], - "x-ms-enum": { - "name": "ListBlobsIncludeItem", - "modelAsString": false - } - }, - "x-ms-parameter-location": "method", - "description": "Include this parameter to specify one or more datasets to include in the response." - }, - "ListBlobsStartFrom": { - "name": "startFrom", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Specifies the relative path to list paths from. For non-recursive list, only one entity level is supported; For recursive list, multiple entity levels are supported. (Inclusive)" - }, - "ListBlobsEndBefore": { - "name": "endBefore", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Specifies the relative path to end before list paths. (Exclusive)" - }, - "ListContainersInclude": { - "name": "include", - "in": "query", - "required": false, - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "metadata", - "deleted", - "system" - ], - "x-ms-enum": { - "name": "ListContainersIncludeType", - "modelAsString": false - } - }, - "x-ms-parameter-location": "method", - "description": "Include this parameter to specify that the container's metadata be returned as part of the response body." - }, - "LeaseBreakPeriod": { - "name": "x-ms-lease-break-period", - "x-ms-client-name": "breakPeriod", - "in": "header", - "required": false, - "type": "integer", - "x-ms-parameter-location": "method", - "description": "For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately." - }, - "LeaseDuration": { - "name": "x-ms-lease-duration", - "x-ms-client-name": "duration", - "in": "header", - "required": false, - "type": "integer", - "x-ms-parameter-location": "method", - "description": "Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change." - }, - "LeaseIdOptional": { - "name": "x-ms-lease-id", - "x-ms-client-name": "leaseId", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "lease-access-conditions" - }, - "description": "If specified, the operation only succeeds if the resource's lease is active and matches this ID." - }, - "LeaseIdRequired": { - "name": "x-ms-lease-id", - "x-ms-client-name": "leaseId", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Specifies the current lease ID on the resource." - }, - "LegalHoldOptional": { - "name": "x-ms-legal-hold", - "x-ms-client-name": "legalHold", - "in": "header", - "required": false, - "type": "boolean", - "x-ms-parameter-location": "method", - "description": "Specified if a legal hold should be set on the blob." - }, - "LegalHoldRequired": { - "name": "x-ms-legal-hold", - "x-ms-client-name": "legalHold", - "in": "header", - "required": true, - "type": "boolean", - "x-ms-parameter-location": "method", - "description": "Specified if a legal hold should be set on the blob." - }, - "Marker": { - "name": "marker", - "in": "query", - "required": false, - "type": "string", - "description": "A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client.", - "x-ms-parameter-location": "method" - }, - "MaxResults": { - "name": "maxresults", - "in": "query", - "required": false, - "type": "integer", - "minimum": 1, - "x-ms-parameter-location": "method", - "description": "Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder of the results. For this reason, it is possible that the service will return fewer results than specified by maxresults, or than the default of 5000." - }, - "Metadata": { - "name": "x-ms-meta", - "x-ms-client-name": "metadata", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.", - "x-ms-header-collection-prefix": "x-ms-meta-" - }, - "MultipartContentType": { - "name": "Content-Type", - "x-ms-client-name": "multipartContentType", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Required. The value of this header must be multipart/mixed with a batch boundary. Example header value: multipart/mixed; boundary=batch_" - }, - "ObjectReplicationPolicyId": { - "name": "x-ms-or-policy-id", - "x-ms-client-name": "objectReplicationPolicyId", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication." - }, - "ObjectReplicationRules": { - "name": "x-ms-or", - "x-ms-client-name": "ObjectReplicationRules", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed).", - "x-ms-header-collection-prefix": "x-ms-or-" - }, - "Prefix": { - "name": "prefix", - "in": "query", - "required": false, - "type": "string", - "description": "Filters the results to return only containers whose name begins with the specified prefix.", - "x-ms-parameter-location": "method" - }, - "PrevSnapshot": { - "name": "prevsnapshot", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016." - }, - "PrevSnapshotUrl": { - "name": "x-ms-previous-snapshot-url", - "x-ms-client-name": "prevSnapshotUrl", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Optional. This header is only supported in service versions 2019-04-19 and after and specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were changed between the target blob and its previous snapshot." - }, - "ProposedLeaseIdOptional": { - "name": "x-ms-proposed-lease-id", - "x-ms-client-name": "proposedLeaseId", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats." - }, - "ProposedLeaseIdRequired": { - "name": "x-ms-proposed-lease-id", - "x-ms-client-name": "proposedLeaseId", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats." - }, - "QueryRequest": { - "name": "queryRequest", - "in": "body", - "x-ms-parameter-location": "client", - "schema": { - "$ref": "#/definitions/QueryRequest" - }, - "description": "the query request" - }, - "Range": { - "name": "x-ms-range", - "x-ms-client-name": "range", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Return only the bytes of the blob in the specified range." - }, - "RangeRequiredPutPageFromUrl": { - "name": "x-ms-range", - "x-ms-client-name": "range", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The range of bytes to which the source range would be written. The range should be 512 aligned and range-end is required." - }, - "SequenceNumberAction": { - "name": "x-ms-sequence-number-action", - "x-ms-client-name": "sequenceNumberAction", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number", - "type": "string", - "enum": [ - "max", - "update", - "increment" - ], - "x-ms-enum": { - "name": "SequenceNumberActionType", - "modelAsString": false - } - }, - "Snapshot": { - "name": "snapshot", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob." - }, - "SourceEncryptionKey": { - "name": "x-ms-source-encryption-key", - "x-ms-client-name": "sourceEncryptionKey", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-cpk-info" - }, - "description": "Optional. Specifies the source encryption key to use to encrypt the source data provided in the request." - }, - "SourceEncryptionKeySha256": { - "name": "x-ms-source-encryption-key-sha256", - "x-ms-client-name": "sourceEncryptionKeySha256", - "type": "string", - "in": "header", - "required": false, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-cpk-info" - }, - "description": "The SHA-256 hash of the provided source encryption key. Must be provided if the x-ms-source-encryption-key header is provided." - }, - "SourceEncryptionAlgorithm": { - "name": "x-ms-source-encryption-algorithm", - "x-ms-client-name": "sourceEncryptionAlgorithm", - "type": "string", - "in": "header", - "required": false, - "enum": [ - "AES256" - ], - "x-ms-enum": { - "name": "EncryptionAlgorithmType", - "modelAsString": false - }, - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-cpk-info" - }, - "description": "The algorithm used to produce the source encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided if the x-ms-source-encryption-key is provided." - }, - "VersionId": { - "name": "versionid", - "x-ms-client-name": "versionId", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer." - }, - "SealBlob": { - "name": "x-ms-seal-blob", - "x-ms-client-name": "SealBlob", - "in": "header", - "required": false, - "type": "boolean", - "x-ms-parameter-location": "method", - "description": "Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer." - }, - "SourceContainerName": { - "name": "x-ms-source-container-name", - "x-ms-client-name": "SourceContainerName", - "type": "string", - "in": "header", - "required": true, - "x-ms-parameter-location": "method", - "description": "Required. Specifies the name of the container to rename." - }, - "SourceContentMD5": { - "name": "x-ms-source-content-md5", - "x-ms-client-name": "sourceContentMD5", - "in": "header", - "required": false, - "type": "string", - "format": "byte", - "x-ms-parameter-location": "method", - "description": "Specify the md5 calculated for the range of bytes that must be read from the copy source." - }, - "SourceContentCRC64": { - "name": "x-ms-source-content-crc64", - "x-ms-client-name": "sourceContentcrc64", - "in": "header", - "required": false, - "type": "string", - "format": "byte", - "x-ms-parameter-location": "method", - "description": "Specify the crc64 calculated for the range of bytes that must be read from the copy source." - }, - "SourceRange": { - "name": "x-ms-source-range", - "x-ms-client-name": "sourceRange", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Bytes of source data in the specified range." - }, - "SourceRangeRequiredPutPageFromUrl": { - "name": "x-ms-source-range", - "x-ms-client-name": "sourceRange", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header." - }, - "SourceIfMatch": { - "name": "x-ms-source-if-match", - "x-ms-client-name": "sourceIfMatch", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-modified-access-conditions" - }, - "description": "Specify an ETag value to operate only on blobs with a matching value." - }, - "SourceIfModifiedSince": { - "name": "x-ms-source-if-modified-since", - "x-ms-client-name": "sourceIfModifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-modified-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has been modified since the specified date/time." - }, - "SourceIfNoneMatch": { - "name": "x-ms-source-if-none-match", - "x-ms-client-name": "sourceIfNoneMatch", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-modified-access-conditions" - }, - "description": "Specify an ETag value to operate only on blobs without a matching value." - }, - "SourceIfUnmodifiedSince": { - "name": "x-ms-source-if-unmodified-since", - "x-ms-client-name": "sourceIfUnmodifiedSince", - "in": "header", - "required": false, - "type": "string", - "format": "date-time-rfc1123", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-modified-access-conditions" - }, - "description": "Specify this header value to operate only on a blob if it has not been modified since the specified date/time." - }, - "SourceLeaseId": { - "name": "x-ms-source-lease-id", - "x-ms-client-name": "sourceLeaseId", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match." - }, - "SourceIfTags": { - "name": "x-ms-source-if-tags", - "x-ms-client-name": "sourceIfTags", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "name": "source-modified-access-conditions" - }, - "description": "Specify a SQL where clause on blob tags to operate only on blobs with a matching value." - }, - "SourceUrl": { - "name": "x-ms-copy-source", - "x-ms-client-name": "sourceUrl", - "in": "header", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Specify a URL to the copy source." - }, - "StorageServiceProperties": { - "name": "StorageServiceProperties", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/StorageServiceProperties" - }, - "x-ms-parameter-location": "method", - "description": "The StorageService properties." - }, - "Timeout": { - "name": "timeout", - "in": "query", - "required": false, - "type": "integer", - "minimum": 0, - "x-ms-parameter-location": "method", - "description": "The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations." - } - } -} From da9d407501fc49c01fa8e29f125e365ac70e2991 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 30 Mar 2026 16:09:47 -0400 Subject: [PATCH 22/65] rename useArrow to isApacheArrowEnabled --- .../blob/BlobContainerAsyncClient.java | 12 ++++----- .../storage/blob/BlobContainerClient.java | 14 +++++----- .../storage/blob/models/ListBlobsOptions.java | 17 ++++++------ .../azure/storage/blob/ContainerApiTests.java | 26 +++++++++---------- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 5a650f169ade..cd8880068ec3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -1126,15 +1126,15 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize) .setPrefix(options.getPrefix()) .setDetails(options.getDetails()); - if (Boolean.TRUE.equals(options.getUseArrow())) { - finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { + finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); } } } else { finalOptions = options; } - if (finalOptions != null && Boolean.TRUE.equals(finalOptions.getUseArrow())) { + if (finalOptions != null && Boolean.TRUE.equals(finalOptions.isApacheArrowEnabled())) { return listBlobsFlatSegmentArrow(marker, finalOptions, timeout); } @@ -1366,15 +1366,15 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List .setPrefix(options.getPrefix()) .setDetails(options.getDetails()) .setStartFrom(options.getStartFrom()); - if (Boolean.TRUE.equals(options.getUseArrow())) { - finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { + finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); } } } else { finalOptions = options; } - if (finalOptions != null && Boolean.TRUE.equals(finalOptions.getUseArrow())) { + if (finalOptions != null && Boolean.TRUE.equals(finalOptions.isApacheArrowEnabled())) { return listBlobsHierarchySegmentArrow(marker, delimiter, finalOptions, timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 57f8be9017e0..a7221b49b658 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1036,8 +1036,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin .setStartFrom(options.getStartFrom()) .setDetails(options.getDetails()); - if (Boolean.TRUE.equals(options.getUseArrow())) { - finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { + finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); } } @@ -1051,8 +1051,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin ArrayList include = finalOptions.getDetails().toList().isEmpty() ? null : finalOptions.getDetails().toList(); - // Using Boolean.TRUE.equals to avoid NPE because default for useArrow is null, not false. We want to treat null as false, but if user explicitly set it to true, then we use Arrow. - if (Boolean.TRUE.equals(finalOptions.getUseArrow())) { + // Using Boolean.TRUE.equals to avoid NPE because default for apacheArrowEnabled is null, not false. We want to treat null as false, but if user explicitly set it to true, then we use Arrow. + if (Boolean.TRUE.equals(finalOptions.isApacheArrowEnabled())) { Callable> operation = () -> this.azureBlobStorage.getContainers() .listBlobFlatSegmentApacheArrowWithResponse(containerName, finalOptions.getPrefix(), nextMarker, @@ -1221,8 +1221,8 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO .setPrefix(options.getPrefix()) .setDetails(options.getDetails()) .setStartFrom(options.getStartFrom()); - if (Boolean.TRUE.equals(options.getUseArrow())) { - finalOptions.setUseArrow(true).setEndBefore(options.getEndBefore()); + if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { + finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); } } /* @@ -1246,7 +1246,7 @@ private PagedResponse listBlobsHierarchySegment(String marker, String ArrayList include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - if (Boolean.TRUE.equals(options.getUseArrow())) { + if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { Callable> operation = () -> azureBlobStorage.getContainers() .listBlobHierarchySegmentApacheArrowWithResponse(containerName, delimiter, options.getPrefix(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index 5f34dd80f223..34bba18cddd5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -19,7 +19,7 @@ public final class ListBlobsOptions { private String prefix; private String startFrom; private Integer maxResultsPerPage; - private Boolean useArrow; + private Boolean apacheArrowEnabled; private String endBefore; /** @@ -115,23 +115,24 @@ public ListBlobsOptions setEndBefore(String endBefore) { } /** - * Gets whether to use the Apache Arrow response format for listing. + * Gets whether the Apache Arrow response format is enabled for listing. * - * @return whether Arrow format is enabled. + * @return null by default, otherwise returns a Boolean indicating whether the Apache Arrow response format is + * enabled. */ - public Boolean getUseArrow() { - return useArrow; + public Boolean isApacheArrowEnabled() { + return apacheArrowEnabled; } /** * Sets whether to use the Apache Arrow response format for listing. When enabled, the service returns an Arrow IPC * stream instead of XML, which can provide latency and scale improvements. * - * @param useArrow whether to use Arrow format. + * @param apacheArrowEnabled whether to use Arrow format. * @return the updated ListBlobsOptions object. */ - public ListBlobsOptions setUseArrow(Boolean useArrow) { - this.useArrow = useArrow; + public ListBlobsOptions setApacheArrowEnabled(Boolean apacheArrowEnabled) { + this.apacheArrowEnabled = apacheArrowEnabled; return this; } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 2e81525962db..671676faad92 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2151,7 +2151,7 @@ public void listBlobsArrowBasic() { String blobName = generateBlobName(); cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2173,8 +2173,8 @@ public void listBlobsArrowWithMetadata() { .uploadWithResponse(DATA.getDefaultInputStream(), DATA.getDefaultDataSize(), null, metadata, null, null, null, null, null); - ListBlobsOptions options - = new ListBlobsOptions().setUseArrow(true).setDetails(new BlobListDetails().setRetrieveMetadata(true)); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2191,7 +2191,7 @@ public void listBlobsArrowPagination() { .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); } - ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true).setMaxResultsPerPage(1); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); List allBlobs = new ArrayList<>(); for (PagedResponse page : cc.listBlobs(options, null).iterableByPage()) { assertTrue(page.getValue().size() <= 1); @@ -2203,12 +2203,12 @@ public void listBlobsArrowPagination() { @Test public void listBlobsArrowNullUseArrowUsesXml() { - // Default useArrow is null — should use XML path without error + // Default apacheArrowEnabled is null — should use XML path without error String blobName = generateBlobName(); cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); ListBlobsOptions options = new ListBlobsOptions(); - assertNull(options.getUseArrow()); + assertNull(options.isApacheArrowEnabled()); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2231,7 +2231,7 @@ public void listBlobsArrowNullUseArrowUsesXml() { // .getBlockBlobClient() // .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); // - // ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + // ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); // List blobs = altCc.listBlobs(options, null).stream().collect(Collectors.toList()); // // // Should still work via XML fallback @@ -2251,7 +2251,7 @@ public void listBlobsArrowEncryptedBlob() { BlobClient cpkClient = cc.getBlobClient(blobName).getCustomerProvidedKeyClient(cpk); cpkClient.getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2493,7 +2493,7 @@ public void listBlobsByHierarchyArrowBasic() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); List items = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); // Root level: one prefix "dir/" and one blob "topblob" @@ -2529,7 +2529,7 @@ public void listBlobsByHierarchyArrowWithMetadata() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true) + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) .setPrefix("dir/") .setDetails(new BlobListDetails().setRetrieveMetadata(true)); List blobs = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); @@ -2552,7 +2552,7 @@ public void listBlobsByHierarchyArrowPagination() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setUseArrow(true).setMaxResultsPerPage(1); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); List allItems = new ArrayList<>(); for (PagedResponse page : cc.listBlobsByHierarchy("/", options, null).iterableByPage()) { assertTrue(page.getValue().size() <= 1); @@ -2574,8 +2574,8 @@ public void listBlobsArrowWithTags() { cc.getBlobClient(blobName).setTags(tags); // List with Arrow + retrieveTags - ListBlobsOptions options - = new ListBlobsOptions().setUseArrow(true).setDetails(new BlobListDetails().setRetrieveTags(true)); + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + .setDetails(new BlobListDetails().setRetrieveTags(true)); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); From 2701e63b868f6603502f4b544026899184a92a2f Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 24 Apr 2026 17:25:46 -0400 Subject: [PATCH 23/65] update dependency files --- eng/versioning/external_dependencies.txt | 2 ++ sdk/parents/azure-client-sdk-parent/pom.xml | 1 + sdk/storage/azure-storage-blob/pom.xml | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index d82b85619c7b..b87325d7f361 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -162,6 +162,8 @@ commons-io:commons-io;2.17.0 net.java.dev.jna:jna-platform;5.17.0 net.oneandone.reflections8:reflections8;0.11.7 net.jonathangiles.tools:dependencyChecker-maven-plugin;1.0.6 +org.apache.arrow:arrow-format;18.1.0 +org.apache.arrow:arrow-memory-core;18.1.0 org.apache.arrow:arrow-memory-unsafe;18.1.0 org.apache.arrow:arrow-vector;18.1.0 org.apache.commons:commons-collections4;4.4 diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index 40b8592694c3..9e7a897b26a9 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -603,6 +603,7 @@ com.google.code.findbugs:jsr305:[3.0.2] + org.apache.arrow:arrow-memory-core:[18.1.0] org.apache.arrow:arrow-memory-unsafe:[18.1.0] org.apache.arrow:arrow-vector:[18.1.0] org.checkerframework:checker-qual:[3.42.0] diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 25343a0f8bde..bf10037aec77 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -146,6 +146,10 @@ org.apache.arrow arrow-vector + + org.apache.arrow + arrow-memory-core + org.apache.arrow arrow-memory-unsafe From e4c6e58395063fc6c6694f48abf6192e9774a128 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 4 Jun 2026 13:00:40 -0400 Subject: [PATCH 24/65] add service minimums for tests --- .../com/azure/storage/blob/ContainerApiTests.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 671676faad92..ed8315e50c4a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2146,6 +2146,7 @@ public void getBlobContainerUrlEncodesContainerName() { // } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowBasic() { // Upload a test blob String blobName = generateBlobName(); @@ -2164,6 +2165,7 @@ public void listBlobsArrowBasic() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowWithMetadata() { String blobName = generateBlobName(); Map metadata = new HashMap<>(); @@ -2183,6 +2185,7 @@ public void listBlobsArrowWithMetadata() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowPagination() { // Upload 3 blobs for (int i = 0; i < 3; i++) { @@ -2202,6 +2205,7 @@ public void listBlobsArrowPagination() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowNullUseArrowUsesXml() { // Default apacheArrowEnabled is null — should use XML path without error String blobName = generateBlobName(); @@ -2244,6 +2248,7 @@ public void listBlobsArrowNullUseArrowUsesXml() { @LiveOnly @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowEncryptedBlob() { // Upload a blob with CPK (customer-provided key) String blobName = generateBlobName(); @@ -2411,8 +2416,8 @@ public void listBlobsArrowHierarchySchemaDiscovery() throws Exception { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowDeserializer() throws Exception { - // Upload a test blob with metadata String blobName = generateBlobName(); Map metadata = new HashMap<>(); metadata.put("testkey", "testvalue"); @@ -2420,7 +2425,6 @@ public void listBlobsArrowDeserializer() throws Exception { .getBlockBlobClient() .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); - // Construct AzureBlobStorageImpl directly AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(cc.getHttpPipeline()) .url(cc.getAccountUrl()) .version(BlobServiceVersion.V2026_06_06.getVersion()) @@ -2481,6 +2485,7 @@ public void listBlobsArrowDeserializer() throws Exception { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsByHierarchyArrowBasic() { // Upload blobs in a directory structure cc.getBlobClient("dir/blob1") @@ -2517,6 +2522,7 @@ public void listBlobsByHierarchyArrowBasic() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsByHierarchyArrowWithMetadata() { String blobName = generateBlobName(); Map metadata = new HashMap<>(); @@ -2541,6 +2547,7 @@ public void listBlobsByHierarchyArrowWithMetadata() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsByHierarchyArrowPagination() { // Upload blobs across multiple directories for (int i = 0; i < 3; i++) { @@ -2564,6 +2571,7 @@ public void listBlobsByHierarchyArrowPagination() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowWithTags() { // Upload a blob and set tags String blobName = generateBlobName(); From c30efa754797f126df9182169787b4c717007fc2 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 4 Jun 2026 13:02:58 -0400 Subject: [PATCH 25/65] remove tests for schema discovery --- sdk/storage/azure-storage-blob/assets.json | 2 +- .../azure/storage/blob/ContainerApiTests.java | 148 ------------------ 2 files changed, 1 insertion(+), 149 deletions(-) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 7f5e5b611d0c..b61d3f2ec01b 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_1da9542ee2" + "Tag": "java/storage/azure-storage-blob_c8be0fe858" } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index ed8315e50c4a..8898825872b2 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2267,154 +2267,6 @@ public void listBlobsArrowEncryptedBlob() { assertNull(blobs.get(0).getMetadata()); } - @Test - public void listBlobsArrowSchemaDiscovery() throws Exception { - // Upload a test blob with metadata - String blobName = generateBlobName(); - Map metadata = new HashMap<>(); - metadata.put("testkey", "testvalue"); - cc.getBlobClient(blobName) - .getBlockBlobClient() - .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); - - // Construct AzureBlobStorageImpl directly to call generated Arrow methods - HttpPipeline pipeline = cc.getHttpPipeline(); - AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(pipeline) - .url(cc.getAccountUrl()) - .version(BlobServiceVersion.V2026_06_06.getVersion()) - .buildClient(); - - // Call the Arrow endpoint directly - ArrayList include = new ArrayList<>(); - include.add(ListBlobsIncludeItem.METADATA); - - ResponseBase response = impl.getContainers() - .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, include, null, null, null, - null, com.azure.core.util.Context.NONE); - - // Verify Content-Type header - String contentType = response.getDeserializedHeaders().getContentType(); - System.out.println("Content-Type: " + contentType); - // On Photon-enabled accounts this should be arrow; on non-Photon it will be XML - assertNotNull(contentType); - - // Read the Arrow IPC stream - try (InputStream inputStream = response.getValue(); - BufferAllocator allocator = new RootAllocator(); - ArrowStreamReader reader = new ArrowStreamReader(inputStream, allocator)) { - - VectorSchemaRoot root = reader.getVectorSchemaRoot(); - - // Print schema fields - System.out.println("=== Arrow Schema Fields ==="); - root.getSchema() - .getFields() - .forEach(field -> System.out.println(" " + field.getName() + " : " + field.getType())); - - // Print custom metadata - System.out.println("=== Schema Custom Metadata ==="); - Map schemaMetadata = root.getSchema().getCustomMetadata(); - if (schemaMetadata != null) { - schemaMetadata.forEach((k, v) -> System.out.println(" " + k + " = " + v)); - } - - // Read first batch and print row values - assertTrue(reader.loadNextBatch(), "Expected at least one batch"); - int rowCount = root.getRowCount(); - System.out.println("=== Row Count: " + rowCount + " ==="); - assertTrue(rowCount >= 1, "Expected at least one row"); - - // Print all field values for the first row - System.out.println("=== First Row Values ==="); - for (int fieldIdx = 0; fieldIdx < root.getSchema().getFields().size(); fieldIdx++) { - org.apache.arrow.vector.FieldVector vec = root.getVector(fieldIdx); - Object value = vec.isNull(0) ? null : vec.getObject(0); - System.out.println(" " + vec.getName() + " = " + value); - } - - // Basic assertions on the blob we uploaded - org.apache.arrow.vector.FieldVector nameVec = root.getVector("Name"); - assertNotNull(nameVec, "Expected 'Name' column in Arrow schema"); - } - } - - @Test - public void listBlobsArrowHierarchySchemaDiscovery() throws Exception { - // Upload blobs with directory structure and metadata - Map metadata = new HashMap<>(); - metadata.put("testkey", "testvalue"); - cc.getBlobClient("dir/blob1") - .getBlockBlobClient() - .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); - cc.getBlobClient("dir/blob2") - .getBlockBlobClient() - .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); - cc.getBlobClient("topblob") - .getBlockBlobClient() - .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); - - // Construct AzureBlobStorageImpl directly to call generated Arrow methods - HttpPipeline pipeline = cc.getHttpPipeline(); - AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(pipeline) - .url(cc.getAccountUrl()) - .version(BlobServiceVersion.V2026_06_06.getVersion()) - .buildClient(); - - // Call the Arrow hierarchy endpoint directly with delimiter "/" - ArrayList include = new ArrayList<>(); - include.add(ListBlobsIncludeItem.METADATA); - - ResponseBase response = impl.getContainers() - .listBlobHierarchySegmentApacheArrowWithResponse(containerName, "/", null, null, null, include, null, null, - null, null, com.azure.core.util.Context.NONE); - - // Verify Content-Type header - String contentType = response.getDeserializedHeaders().getContentType(); - System.out.println("Content-Type: " + contentType); - assertNotNull(contentType); - - // Read the Arrow IPC stream - try (InputStream inputStream = response.getValue(); - BufferAllocator allocator = new RootAllocator(); - ArrowStreamReader reader = new ArrowStreamReader(inputStream, allocator)) { - - VectorSchemaRoot root = reader.getVectorSchemaRoot(); - - // Print schema fields - System.out.println("=== Arrow Hierarchy Schema Fields ==="); - root.getSchema() - .getFields() - .forEach(field -> System.out.println(" " + field.getName() + " : " + field.getType())); - - // Print custom metadata - System.out.println("=== Schema Custom Metadata ==="); - Map schemaMetadata = root.getSchema().getCustomMetadata(); - if (schemaMetadata != null) { - schemaMetadata.forEach((k, v) -> System.out.println(" " + k + " = " + v)); - } - - // Read all batches and print all row values - while (reader.loadNextBatch()) { - int rowCount = root.getRowCount(); - System.out.println("=== Batch Row Count: " + rowCount + " ==="); - assertTrue(rowCount >= 1, "Expected at least one row"); - - for (int rowIdx = 0; rowIdx < rowCount; rowIdx++) { - System.out.println("--- Row " + rowIdx + " ---"); - for (int fieldIdx = 0; fieldIdx < root.getSchema().getFields().size(); fieldIdx++) { - org.apache.arrow.vector.FieldVector vec = root.getVector(fieldIdx); - Object value = vec.isNull(rowIdx) ? null : vec.getObject(rowIdx); - System.out.println(" " + vec.getName() + " = " + value); - } - } - } - - // Basic assertions — we expect at least a Name column - org.apache.arrow.vector.FieldVector nameVec = root.getVector("Name"); - assertNotNull(nameVec, "Expected 'Name' column in Arrow schema"); - } - } - @Test @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowDeserializer() throws Exception { From 754aa5155c627a36300ea66cae8e8fb85b79b96c Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 4 Jun 2026 13:03:48 -0400 Subject: [PATCH 26/65] remove todo for nonphoton account --- .../azure/storage/blob/ContainerApiTests.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 8898825872b2..b408b29dddac 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2219,33 +2219,6 @@ public void listBlobsArrowNullUseArrowUsesXml() { assertEquals(blobName, blobs.get(0).getName()); } - // TODO: listBlobsArrowXmlFallback — needs a non-Photon account without the preprod endpoint hack. - // Currently all test accounts use preprod.blob.core.windows.net which only resolves for the Photon account. - // @LiveOnly - // @Test - // public void listBlobsArrowXmlFallback() { - // // Use a non-Photon account — service should return XML even though Arrow was requested - // String altContainerName = generateContainerName(); - // BlobContainerClient altCc = premiumBlobServiceClient.getBlobContainerClient(altContainerName); - // altCc.create(); - // - // try { - // String blobName = generateBlobName(); - // altCc.getBlobClient(blobName) - // .getBlockBlobClient() - // .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - // - // ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); - // List blobs = altCc.listBlobs(options, null).stream().collect(Collectors.toList()); - // - // // Should still work via XML fallback - // assertEquals(1, blobs.size()); - // assertEquals(blobName, blobs.get(0).getName()); - // } finally { - // altCc.delete(); - // } - // } - @LiveOnly @Test @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") From b3afa479f793be998fb4463ee15ff7ffeed73c15 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 4 Jun 2026 14:27:13 -0400 Subject: [PATCH 27/65] add rehydrate tests with recordings --- sdk/storage/azure-storage-blob/assets.json | 2 +- .../azure/storage/blob/ContainerApiTests.java | 64 +++++++++++++------ 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index b61d3f2ec01b..2e0e6ca4c9d0 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_c8be0fe858" + "Tag": "java/storage/azure-storage-blob_446be74201" } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index b408b29dddac..e86fe706c7d1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2164,6 +2164,49 @@ public void listBlobsArrowBasic() { assertNotNull(blobs.get(0).getProperties().getETag()); } + @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") + public void listBlobsArrowWithTags() { + // Upload a blob and set tags + String blobName = generateBlobName(); + cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); + + Map tags = new HashMap<>(); + tags.put("tagkey", "tagvalue"); + cc.getBlobClient(blobName).setTags(tags); + + // List with Arrow + retrieveTags + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + .setDetails(new BlobListDetails().setRetrieveTags(true)); + List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); + + assertEquals(1, blobs.size()); + assertEquals(blobName, blobs.get(0).getName()); + assertNotNull(blobs.get(0).getTags()); + assertEquals("tagvalue", blobs.get(0).getTags().get("tagkey")); + } + + @ParameterizedTest + @MethodSource("listBlobsFlatRehydratePrioritySupplier") + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") + public void listBlobsArrowRehydratePriority(RehydratePriority rehydratePriority) { + String name = generateBlobName(); + BlockBlobClient bc = cc.getBlobClient(name).getBlockBlobClient(); + + bc.upload(DATA.getDefaultInputStream(), 7); + + if (rehydratePriority != null) { + bc.setAccessTier(AccessTier.ARCHIVE); + bc.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority), + null, null); + } + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + BlobItem item = cc.listBlobs(options, null).iterator().next(); + + assertEquals(rehydratePriority, item.getProperties().getRehydratePriority()); + } + @Test @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowWithMetadata() { @@ -2395,25 +2438,4 @@ public void listBlobsByHierarchyArrowPagination() { assertEquals(4, allItems.size()); } - @Test - @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") - public void listBlobsArrowWithTags() { - // Upload a blob and set tags - String blobName = generateBlobName(); - cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - - Map tags = new HashMap<>(); - tags.put("tagkey", "tagvalue"); - cc.getBlobClient(blobName).setTags(tags); - - // List with Arrow + retrieveTags - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) - .setDetails(new BlobListDetails().setRetrieveTags(true)); - List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); - - assertEquals(1, blobs.size()); - assertEquals(blobName, blobs.get(0).getName()); - assertNotNull(blobs.get(0).getTags()); - assertEquals("tagvalue", blobs.get(0).getTags().get("tagkey")); - } } From e3c89d96ffbfc48c1d957a2a17c51a015bd90d3f Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 4 Jun 2026 15:02:27 -0400 Subject: [PATCH 28/65] update listblowsarrow pagination test to include calling specific page sizes --- .../java/com/azure/storage/blob/ContainerApiTests.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index e86fe706c7d1..5119b6af8f89 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2231,7 +2231,7 @@ public void listBlobsArrowWithMetadata() { @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowPagination() { // Upload 3 blobs - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 4; i++) { cc.getBlobClient("blob" + i) .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); @@ -2244,7 +2244,11 @@ public void listBlobsArrowPagination() { allBlobs.addAll(page.getValue()); } - assertEquals(3, allBlobs.size()); + cc.listBlobs().iterableByPage(2).forEach(page -> { + assertEquals(2, page.getValue().size()); + }); + + assertEquals(4, allBlobs.size()); } @Test From f800f8baa229cd97e410aa0e8ffd0897e19b094e Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 10 Jun 2026 12:50:44 -0400 Subject: [PATCH 29/65] add async Arrow listBlobs tests for Photon Mirror the sync Arrow ListBlobs tests from ContainerApiTests.java into ContainerAsyncApiTests.java so CI exercises both code paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../storage/blob/ContainerAsyncApiTests.java | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 04ebc06dc2b6..caab550917f8 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2142,4 +2142,210 @@ public void getBlobContainerUrlEncodesContainerName() { assertTrue(containerClient.getBlobContainerUrl().contains("my%20container")); } + + @Test + public void listBlobsArrowBasic() { + // Upload a test blob + String blobName = generateBlobName(); + BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + + StepVerifier + .create( + bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()).thenMany(ccAsync.listBlobs(options, null))) + .assertNext(item -> { + assertEquals(blobName, item.getName()); + assertNotNull(item.getProperties()); + assertEquals(DATA.getDefaultDataSize(), item.getProperties().getContentLength()); + assertEquals(BlobType.BLOCK_BLOB, item.getProperties().getBlobType()); + assertNotNull(item.getProperties().getLastModified()); + assertNotNull(item.getProperties().getETag()); + }) + .verifyComplete(); + } + + @Test + public void listBlobsArrowWithMetadata() { + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + + StepVerifier.create( + bc.uploadWithResponse(DATA.getDefaultFlux(), DATA.getDefaultDataSize(), null, metadata, null, null, null) + .thenMany(ccAsync.listBlobs(options, null))) + .assertNext(item -> { + assertNotNull(item.getMetadata()); + assertEquals("testvalue", item.getMetadata().get("testkey")); + }) + .verifyComplete(); + } + + @Test + public void listBlobsArrowPagination() { + // Upload 3 blobs + Flux uploads = Flux.range(0, 3) + .flatMap(i -> ccAsync.getBlobAsyncClient("blob" + i) + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); + + Mono> result = uploads.then(ccAsync.listBlobs(options, null).byPage().doOnNext(page -> { + assertTrue(page.getValue().size() <= 1); + }).flatMap(page -> Flux.fromIterable(page.getValue())).collectList()); + + StepVerifier.create(result).assertNext(allBlobs -> assertEquals(3, allBlobs.size())).verifyComplete(); + } + + @Test + public void listBlobsArrowNullUseArrowUsesXml() { + // Default apacheArrowEnabled is null — should use XML path without error + String blobName = generateBlobName(); + BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); + + ListBlobsOptions options = new ListBlobsOptions(); + assertNull(options.isApacheArrowEnabled()); + + StepVerifier + .create( + bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()).thenMany(ccAsync.listBlobs(options, null))) + .assertNext(item -> assertEquals(blobName, item.getName())) + .verifyComplete(); + } + + @LiveOnly + @Test + public void listBlobsArrowEncryptedBlob() { + // Upload a blob with CPK (customer-provided key) + String blobName = generateBlobName(); + CustomerProvidedKey cpk = new CustomerProvidedKey(Base64.getEncoder().encodeToString(getRandomKey())); + BlockBlobAsyncClient cpkClient + = ccAsync.getBlobAsyncClient(blobName).getCustomerProvidedKeyAsyncClient(cpk).getBlockBlobAsyncClient(); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + + StepVerifier.create(cpkClient.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) + .thenMany(ccAsync.listBlobs(options, null))).assertNext(item -> { + assertEquals(blobName, item.getName()); + // CPK blob should have server-encrypted = true + assertTrue(item.getProperties().isServerEncrypted()); + // Metadata should be null (no metadata was set) + assertNull(item.getMetadata()); + }).verifyComplete(); + } + + @Test + public void listBlobsByHierarchyArrowBasic() { + // Upload blobs in a directory structure + Flux uploads = Flux.concat( + ccAsync.getBlobAsyncClient("dir/blob1") + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()), + ccAsync.getBlobAsyncClient("dir/blob2") + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()), + ccAsync.getBlobAsyncClient("topblob") + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + + Mono> items + = uploads.then(ccAsync.listBlobsByHierarchy("/", options).collect(Collectors.toList())); + + StepVerifier.create(items).assertNext(list -> { + // Root level: one prefix "dir/" and one blob "topblob" + assertEquals(2, list.size()); + + BlobItem prefixItem = list.stream().filter(BlobItem::isPrefix).findFirst().orElse(null); + BlobItem blobItem = list.stream().filter(i -> !i.isPrefix()).findFirst().orElse(null); + + assertNotNull(prefixItem); + assertEquals("dir/", prefixItem.getName()); + assertTrue(prefixItem.isPrefix()); + + assertNotNull(blobItem); + assertEquals("topblob", blobItem.getName()); + assertFalse(blobItem.isPrefix()); + assertNotNull(blobItem.getProperties()); + assertEquals(DATA.getDefaultDataSize(), blobItem.getProperties().getContentLength()); + assertEquals(BlobType.BLOCK_BLOB, blobItem.getProperties().getBlobType()); + assertNotNull(blobItem.getProperties().getLastModified()); + assertNotNull(blobItem.getProperties().getETag()); + }).verifyComplete(); + } + + @Test + public void listBlobsByHierarchyArrowWithMetadata() { + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + + Mono uploads = ccAsync.getBlobAsyncClient("dir/" + blobName) + .getBlockBlobAsyncClient() + .uploadWithResponse(DATA.getDefaultFlux(), DATA.getDefaultDataSize(), null, metadata, null, null, null) + .then(ccAsync.getBlobAsyncClient("topblob") + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + .setPrefix("dir/") + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + + StepVerifier.create(uploads.thenMany(ccAsync.listBlobsByHierarchy("/", options))).assertNext(item -> { + assertFalse(item.isPrefix()); + assertNotNull(item.getMetadata()); + assertEquals("testvalue", item.getMetadata().get("testkey")); + }).verifyComplete(); + } + + @Test + public void listBlobsByHierarchyArrowPagination() { + // Upload blobs across multiple directories + Flux uploads = Flux.concat( + Flux.range(0, 3) + .flatMap(i -> ccAsync.getBlobAsyncClient("dir" + i + "/blob") + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())), + ccAsync.getBlobAsyncClient("topblob") + .getBlockBlobAsyncClient() + .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); + + Mono> result + = uploads.then(ccAsync.listBlobsByHierarchy("/", options).byPage().doOnNext(page -> { + assertTrue(page.getValue().size() <= 1); + }).flatMap(page -> Flux.fromIterable(page.getValue())).collectList()); + + // 3 prefixes + 1 blob = 4 items + StepVerifier.create(result).assertNext(allItems -> assertEquals(4, allItems.size())).verifyComplete(); + } + + @Test + public void listBlobsArrowWithTags() { + // Upload a blob and set tags + String blobName = generateBlobName(); + BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); + + Map tags = new HashMap<>(); + tags.put("tagkey", "tagvalue"); + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + .setDetails(new BlobListDetails().setRetrieveTags(true)); + + Mono upload = bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) + .then(ccAsync.getBlobAsyncClient(blobName).setTags(tags)); + + StepVerifier.create(upload.thenMany(ccAsync.listBlobs(options, null))).assertNext(item -> { + assertEquals(blobName, item.getName()); + assertNotNull(item.getTags()); + assertEquals("tagvalue", item.getTags().get("tagkey")); + }).verifyComplete(); + } } From 509ebc705c9616904ee77173835bb15a1311eb1e Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 15 Jun 2026 12:03:59 -0400 Subject: [PATCH 30/65] fix async tests --- .../storage/blob/ContainerAsyncApiTests.java | 126 +++++++++++++++++- 1 file changed, 123 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index caab550917f8..8020b4b3aa99 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -10,8 +10,14 @@ import com.azure.core.test.TestMode; import com.azure.core.test.utils.MockTokenCredential; import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.models.BlobItemInternal; +import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.*; import com.azure.storage.blob.options.BlobContainerCreateOptions; import com.azure.storage.blob.options.BlobParallelUploadOptions; @@ -41,6 +47,7 @@ import reactor.util.function.Tuple2; import java.net.URL; +import java.io.ByteArrayInputStream; import java.time.Duration; import java.time.OffsetDateTime; import java.util.*; @@ -2144,6 +2151,7 @@ public void getBlobContainerUrlEncodesContainerName() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowBasic() { // Upload a test blob String blobName = generateBlobName(); @@ -2166,6 +2174,7 @@ public void listBlobsArrowBasic() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowWithMetadata() { String blobName = generateBlobName(); Map metadata = new HashMap<>(); @@ -2186,9 +2195,10 @@ public void listBlobsArrowWithMetadata() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowPagination() { - // Upload 3 blobs - Flux uploads = Flux.range(0, 3) + // Upload 4 blobs + Flux uploads = Flux.range(0, 4) .flatMap(i -> ccAsync.getBlobAsyncClient("blob" + i) .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); @@ -2199,10 +2209,17 @@ public void listBlobsArrowPagination() { assertTrue(page.getValue().size() <= 1); }).flatMap(page -> Flux.fromIterable(page.getValue())).collectList()); - StepVerifier.create(result).assertNext(allBlobs -> assertEquals(3, allBlobs.size())).verifyComplete(); + StepVerifier.create(result).assertNext(allBlobs -> assertEquals(4, allBlobs.size())).verifyComplete(); + + // Mirror the sync test's secondary assertion: requesting page size 2 yields exactly 2 blobs per page. + StepVerifier.create(ccAsync.listBlobs().byPage(2)).thenConsumeWhile(page -> { + assertEquals(2, page.getValue().size()); + return true; + }).verifyComplete(); } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowNullUseArrowUsesXml() { // Default apacheArrowEnabled is null — should use XML path without error String blobName = generateBlobName(); @@ -2220,6 +2237,7 @@ public void listBlobsArrowNullUseArrowUsesXml() { @LiveOnly @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowEncryptedBlob() { // Upload a blob with CPK (customer-provided key) String blobName = generateBlobName(); @@ -2239,7 +2257,106 @@ public void listBlobsArrowEncryptedBlob() { }).verifyComplete(); } + @ParameterizedTest + @MethodSource("listBlobsFlatRehydratePrioritySupplier") + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") + public void listBlobsArrowRehydratePriority(RehydratePriority rehydratePriority) { + String name = generateBlobName(); + BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(name).getBlockBlobAsyncClient(); + + Mono> rehydrate = Mono.empty(); + + if (rehydratePriority != null) { + rehydrate = bc.setAccessTier(AccessTier.ARCHIVE) + .then(bc.setAccessTierWithResponse( + new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority))); + } + + ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + + Flux response = bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) + .then(rehydrate) + .thenMany(ccAsync.listBlobs(options, null)); + + StepVerifier.create(response) + .assertNext(r -> assertEquals(rehydratePriority, r.getProperties().getRehydratePriority())) + .verifyComplete(); + } + + @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") + public void listBlobsArrowDeserializer() { + String blobName = generateBlobName(); + Map metadata = new HashMap<>(); + metadata.put("testkey", "testvalue"); + + BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); + + AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(ccAsync.getHttpPipeline()) + .url(ccAsync.getAccountUrl()) + .version(BlobServiceVersion.V2026_06_06.getVersion()) + .buildClient(); + + List include = new ArrayList<>(); + include.add(ListBlobsIncludeItem.METADATA); + + Mono testMono = bc + .uploadWithResponse(DATA.getDefaultFlux(), 7, null, metadata, null, null, null) + .then(impl.getContainers() + .listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, null, null, null, include, null, null, + null, null)) + .flatMap(response -> { + // Verify Content-Type is Arrow + String contentType = response.getDeserializedHeaders().getContentType(); + assertTrue(contentType.contains("application/vnd.apache.arrow.stream"), + "Expected Arrow content type but got: " + contentType); + + // Collect the Flux body into a byte[] and feed it to the deserializer. + return FluxUtil.collectBytesInByteBufferStream(response.getValue()) + .map(bytes -> ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(bytes))); + }); + + StepVerifier.create(testMono).assertNext(result -> { + // Verify pagination — single blob, no next page + assertNull(result.getNextMarker()); + + // Verify we got exactly one blob + assertEquals(1, result.getBlobItems().size()); + + BlobItemInternal item = result.getBlobItems().get(0); + + // Name + assertNotNull(item.getName()); + assertEquals(blobName, item.getName().getContent()); + + // Properties + assertNotNull(item.getProperties()); + assertEquals(7L, (long) item.getProperties().getContentLength()); + assertEquals("application/octet-stream", item.getProperties().getContentType()); + assertNotNull(item.getProperties().getETag()); + assertNotNull(item.getProperties().getLastModified()); + assertNotNull(item.getProperties().getCreationTime()); + assertEquals(BlobType.BLOCK_BLOB, item.getProperties().getBlobType()); + assertEquals(AccessTier.HOT, item.getProperties().getAccessTier()); + assertTrue(item.getProperties().isAccessTierInferred()); + assertTrue(item.getProperties().isServerEncrypted()); + assertEquals(LeaseStateType.AVAILABLE, item.getProperties().getLeaseState()); + assertEquals(LeaseStatusType.UNLOCKED, item.getProperties().getLeaseStatus()); + assertNotNull(item.getProperties().getContentMd5()); + + // Metadata + assertNotNull(item.getMetadata()); + assertEquals("testvalue", item.getMetadata().get("testkey")); + + // Verify ModelHelper can convert to public BlobItem + BlobItem publicItem = ModelHelper.populateBlobItem(item); + assertEquals(blobName, publicItem.getName()); + assertEquals(7L, (long) publicItem.getProperties().getContentLength()); + }).verifyComplete(); + } + @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsByHierarchyArrowBasic() { // Upload blobs in a directory structure Flux uploads = Flux.concat( @@ -2281,6 +2398,7 @@ public void listBlobsByHierarchyArrowBasic() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsByHierarchyArrowWithMetadata() { String blobName = generateBlobName(); Map metadata = new HashMap<>(); @@ -2305,6 +2423,7 @@ public void listBlobsByHierarchyArrowWithMetadata() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsByHierarchyArrowPagination() { // Upload blobs across multiple directories Flux uploads = Flux.concat( @@ -2328,6 +2447,7 @@ public void listBlobsByHierarchyArrowPagination() { } @Test + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-06-06") public void listBlobsArrowWithTags() { // Upload a blob and set tags String blobName = generateBlobName(); From e78fad3619edddee3b4e6443fe1f927ac8fcbd2d Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 15 Jun 2026 12:21:41 -0400 Subject: [PATCH 31/65] fix listBLobsArrowDeserializer async test --- .../storage/blob/ContainerAsyncApiTests.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 8020b4b3aa99..57133c2a3c77 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2300,21 +2300,21 @@ public void listBlobsArrowDeserializer() { List include = new ArrayList<>(); include.add(ListBlobsIncludeItem.METADATA); - Mono testMono = bc - .uploadWithResponse(DATA.getDefaultFlux(), 7, null, metadata, null, null, null) - .then(impl.getContainers() - .listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, null, null, null, include, null, null, - null, null)) - .flatMap(response -> { - // Verify Content-Type is Arrow - String contentType = response.getDeserializedHeaders().getContentType(); - assertTrue(contentType.contains("application/vnd.apache.arrow.stream"), - "Expected Arrow content type but got: " + contentType); - - // Collect the Flux body into a byte[] and feed it to the deserializer. - return FluxUtil.collectBytesInByteBufferStream(response.getValue()) - .map(bytes -> ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(bytes))); - }); + Mono testMono + = bc.uploadWithResponse(DATA.getDefaultFlux(), 7, null, metadata, null, null, null) + .then(impl.getContainers() + .listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, null, null, null, include, null, + null, null, null)) + .flatMap(response -> { + // Verify Content-Type is Arrow + String contentType = response.getDeserializedHeaders().getContentType(); + assertTrue(contentType.contains("application/vnd.apache.arrow.stream"), + "Expected Arrow content type but got: " + contentType); + + // Collect the Flux body into a byte[] and feed it to the deserializer. + return FluxUtil.collectBytesInByteBufferStream(response.getValue()) + .map(bytes -> ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(bytes))); + }); StepVerifier.create(testMono).assertNext(result -> { // Verify pagination — single blob, no next page From 9673f8513906d44c1cc179b99d729a025eeb2fac Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 15 Jun 2026 12:46:05 -0400 Subject: [PATCH 32/65] add recordinds for async tests --- sdk/storage/azure-storage-blob/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 2e0e6ca4c9d0..343f43c946b6 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_446be74201" + "Tag": "java/storage/azure-storage-blob_65730d9920" } From 6b6dfe7c7a11d2b9c6e619b301cad40ea6459540 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 15 Jun 2026 17:36:12 -0400 Subject: [PATCH 33/65] replace all references for boolean with StorageResponseSerializationFormat --- .../blob/BlobContainerAsyncClient.java | 21 ++++++++++---- .../storage/blob/BlobContainerClient.java | 17 ++++++----- .../blob/implementation/util/ModelHelper.java | 25 +++++++++++++++++ .../storage/blob/models/ListBlobsOptions.java | 25 +++++++++-------- .../StorageResponseSerializationFormat.java | 28 +++++++++++++++++++ .../azure/storage/blob/ContainerApiTests.java | 21 +++++++------- .../storage/blob/ContainerAsyncApiTests.java | 20 ++++++------- 7 files changed, 112 insertions(+), 45 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageResponseSerializationFormat.java diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index cd8880068ec3..c35a9ff13ab5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -43,6 +43,7 @@ import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.blob.models.ListBlobsIncludeItem; import com.azure.storage.blob.models.ListBlobsOptions; +import com.azure.storage.blob.models.StorageResponseSerializationFormat; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.TaggedBlobItem; @@ -1126,15 +1127,19 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize) .setPrefix(options.getPrefix()) .setDetails(options.getDetails()); - if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { - finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); + if (ModelHelper.resolveSerializationFormat(options.getStorageResponseSerializationFormat()) + == StorageResponseSerializationFormat.ARROW) { + finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setEndBefore(options.getEndBefore()); } } } else { finalOptions = options; } - if (finalOptions != null && Boolean.TRUE.equals(finalOptions.isApacheArrowEnabled())) { + if (finalOptions != null + && ModelHelper.resolveSerializationFormat(finalOptions.getStorageResponseSerializationFormat()) + == StorageResponseSerializationFormat.ARROW) { return listBlobsFlatSegmentArrow(marker, finalOptions, timeout); } @@ -1366,15 +1371,19 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List .setPrefix(options.getPrefix()) .setDetails(options.getDetails()) .setStartFrom(options.getStartFrom()); - if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { - finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); + if (ModelHelper.resolveSerializationFormat(options.getStorageResponseSerializationFormat()) + == StorageResponseSerializationFormat.ARROW) { + finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setEndBefore(options.getEndBefore()); } } } else { finalOptions = options; } - if (finalOptions != null && Boolean.TRUE.equals(finalOptions.isApacheArrowEnabled())) { + if (finalOptions != null + && ModelHelper.resolveSerializationFormat(finalOptions.getStorageResponseSerializationFormat()) + == StorageResponseSerializationFormat.ARROW) { return listBlobsHierarchySegmentArrow(marker, delimiter, finalOptions, timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index a7221b49b658..104f7852b5c7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -50,6 +50,7 @@ import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.StorageResponseSerializationFormat; import com.azure.storage.blob.models.TaggedBlobItem; import com.azure.storage.blob.models.UserDelegationKey; import com.azure.storage.blob.options.BlobContainerCreateOptions; @@ -1036,8 +1037,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin .setStartFrom(options.getStartFrom()) .setDetails(options.getDetails()); - if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { - finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); + if (options.getStorageResponseSerializationFormat() == StorageResponseSerializationFormat.ARROW) { + finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); } } @@ -1051,8 +1052,7 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin ArrayList include = finalOptions.getDetails().toList().isEmpty() ? null : finalOptions.getDetails().toList(); - // Using Boolean.TRUE.equals to avoid NPE because default for apacheArrowEnabled is null, not false. We want to treat null as false, but if user explicitly set it to true, then we use Arrow. - if (Boolean.TRUE.equals(finalOptions.isApacheArrowEnabled())) { + if (finalOptions.getStorageResponseSerializationFormat() == StorageResponseSerializationFormat.ARROW) { Callable> operation = () -> this.azureBlobStorage.getContainers() .listBlobFlatSegmentApacheArrowWithResponse(containerName, finalOptions.getPrefix(), nextMarker, @@ -1221,8 +1221,10 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO .setPrefix(options.getPrefix()) .setDetails(options.getDetails()) .setStartFrom(options.getStartFrom()); - if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { - finalOptions.setApacheArrowEnabled(true).setEndBefore(options.getEndBefore()); + if (ModelHelper.resolveSerializationFormat(options.getStorageResponseSerializationFormat()) + == StorageResponseSerializationFormat.ARROW) { + finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setEndBefore(options.getEndBefore()); } } /* @@ -1246,7 +1248,8 @@ private PagedResponse listBlobsHierarchySegment(String marker, String ArrayList include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - if (Boolean.TRUE.equals(options.isApacheArrowEnabled())) { + if (ModelHelper.resolveSerializationFormat(options.getStorageResponseSerializationFormat()) + == StorageResponseSerializationFormat.ARROW) { Callable> operation = () -> azureBlobStorage.getContainers() .listBlobHierarchySegmentApacheArrowWithResponse(containerName, delimiter, options.getPrefix(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index cb859dfa595d..6bd5deb8cc55 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -47,6 +47,7 @@ import com.azure.storage.blob.models.PageBlobCopyIncrementalRequestConditions; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.models.StorageResponseSerializationFormat; import com.azure.storage.blob.models.TaggedBlobItem; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; @@ -85,6 +86,14 @@ public final class ModelHelper { */ public static final int PAGE_BYTES = 512; + /** + * The format that {@link StorageResponseSerializationFormat#AUTO} currently resolves to on the + * wire. Changing this constant is a behavioral change (and should be noted in the CHANGELOG) + * but it is not a public API change. + */ + private static final StorageResponseSerializationFormat DEFAULT_SERIALIZATION_FORMAT + = StorageResponseSerializationFormat.XML; + /** * Determines whether the passed authority is IP style, that is, it is of the format {@code :}. * @@ -663,6 +672,22 @@ public static BlobStorageException mapToBlobStorageException(BlobStorageExceptio internal.getResponse(), code, headerName), internal.getResponse(), internal.getValue()); } + /** + * Resolves a user-supplied {@link StorageResponseSerializationFormat} to the concrete value + * to send on the wire. Treats {@code null} and {@link StorageResponseSerializationFormat#AUTO} + * identically — both yield {@link #DEFAULT_SERIALIZATION_FORMAT}. + * + * @param format the format requested by the caller, or {@code null} if unset. + * @return the concrete {@link StorageResponseSerializationFormat} to send on the wire. + */ + public static StorageResponseSerializationFormat + resolveSerializationFormat(StorageResponseSerializationFormat format) { + if (format == null || format == StorageResponseSerializationFormat.AUTO) { + return DEFAULT_SERIALIZATION_FORMAT; + } + return format; + } + private ModelHelper() { } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index 34bba18cddd5..79919a136782 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -19,7 +19,7 @@ public final class ListBlobsOptions { private String prefix; private String startFrom; private Integer maxResultsPerPage; - private Boolean apacheArrowEnabled; + private StorageResponseSerializationFormat storageResponseSerializationFormat; private String endBefore; /** @@ -115,24 +115,25 @@ public ListBlobsOptions setEndBefore(String endBefore) { } /** - * Gets whether the Apache Arrow response format is enabled for listing. + * Gets the response serialization format the service should use when listing blobs. * - * @return null by default, otherwise returns a Boolean indicating whether the Apache Arrow response format is - * enabled. + * @return the {@link StorageResponseSerializationFormat}, or {@code null} if unset + * (equivalent to {@link StorageResponseSerializationFormat#AUTO}). */ - public Boolean isApacheArrowEnabled() { - return apacheArrowEnabled; + public StorageResponseSerializationFormat getStorageResponseSerializationFormat() { + return storageResponseSerializationFormat; } /** - * Sets whether to use the Apache Arrow response format for listing. When enabled, the service returns an Arrow IPC - * stream instead of XML, which can provide latency and scale improvements. + * Sets the response serialization format the service should use when listing blobs. * - * @param apacheArrowEnabled whether to use Arrow format. - * @return the updated ListBlobsOptions object. + * @param storageResponseSerializationFormat the format to request. {@code null} and + * {@link StorageResponseSerializationFormat#AUTO} both let the SDK pick. + * @return the updated {@link ListBlobsOptions} object. */ - public ListBlobsOptions setApacheArrowEnabled(Boolean apacheArrowEnabled) { - this.apacheArrowEnabled = apacheArrowEnabled; + public ListBlobsOptions setStorageResponseSerializationFormat( + StorageResponseSerializationFormat storageResponseSerializationFormat) { + this.storageResponseSerializationFormat = storageResponseSerializationFormat; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageResponseSerializationFormat.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageResponseSerializationFormat.java new file mode 100644 index 000000000000..e5017accedbc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageResponseSerializationFormat.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +/** + * Defines the serialization format the service uses for list-blobs responses. + */ +public enum StorageResponseSerializationFormat { + /** + * Let the SDK choose the serialization format that is most appropriate for the request. + *

+ * The exact format selected by {@code AUTO} is an implementation detail and may change + * between SDK releases. Choose {@link #XML} or {@link #ARROW} explicitly if you require + * a specific format. + */ + AUTO, + + /** + * XML response format. + */ + XML, + + /** + * Apache Arrow response format. + */ + ARROW +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 5119b6af8f89..9c373ee1ada1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -34,6 +34,7 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.StorageResponseSerializationFormat; import com.azure.storage.blob.models.TaggedBlobItem; import com.azure.storage.blob.options.BlobContainerCreateOptions; import com.azure.storage.blob.options.BlobParallelUploadOptions; @@ -2152,7 +2153,7 @@ public void listBlobsArrowBasic() { String blobName = generateBlobName(); cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2176,7 +2177,7 @@ public void listBlobsArrowWithTags() { cc.getBlobClient(blobName).setTags(tags); // List with Arrow + retrieveTags - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) .setDetails(new BlobListDetails().setRetrieveTags(true)); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); @@ -2201,7 +2202,7 @@ public void listBlobsArrowRehydratePriority(RehydratePriority rehydratePriority) null, null); } - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); BlobItem item = cc.listBlobs(options, null).iterator().next(); assertEquals(rehydratePriority, item.getProperties().getRehydratePriority()); @@ -2218,7 +2219,7 @@ public void listBlobsArrowWithMetadata() { .uploadWithResponse(DATA.getDefaultInputStream(), DATA.getDefaultDataSize(), null, metadata, null, null, null, null, null); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) .setDetails(new BlobListDetails().setRetrieveMetadata(true)); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); @@ -2237,7 +2238,7 @@ public void listBlobsArrowPagination() { .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); } - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); List allBlobs = new ArrayList<>(); for (PagedResponse page : cc.listBlobs(options, null).iterableByPage()) { assertTrue(page.getValue().size() <= 1); @@ -2259,7 +2260,7 @@ public void listBlobsArrowNullUseArrowUsesXml() { cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); ListBlobsOptions options = new ListBlobsOptions(); - assertNull(options.isApacheArrowEnabled()); + assertNull(options.getStorageResponseSerializationFormat()); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2276,7 +2277,7 @@ public void listBlobsArrowEncryptedBlob() { BlobClient cpkClient = cc.getBlobClient(blobName).getCustomerProvidedKeyClient(cpk); cpkClient.getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2370,7 +2371,7 @@ public void listBlobsByHierarchyArrowBasic() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); List items = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); // Root level: one prefix "dir/" and one blob "topblob" @@ -2407,7 +2408,7 @@ public void listBlobsByHierarchyArrowWithMetadata() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) .setPrefix("dir/") .setDetails(new BlobListDetails().setRetrieveMetadata(true)); List blobs = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); @@ -2431,7 +2432,7 @@ public void listBlobsByHierarchyArrowPagination() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); List allItems = new ArrayList<>(); for (PagedResponse page : cc.listBlobsByHierarchy("/", options, null).iterableByPage()) { assertTrue(page.getValue().size() <= 1); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 57133c2a3c77..95e8e5d61a3a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2157,7 +2157,7 @@ public void listBlobsArrowBasic() { String blobName = generateBlobName(); BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); StepVerifier .create( @@ -2181,7 +2181,7 @@ public void listBlobsArrowWithMetadata() { metadata.put("testkey", "testvalue"); BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) .setDetails(new BlobListDetails().setRetrieveMetadata(true)); StepVerifier.create( @@ -2203,7 +2203,7 @@ public void listBlobsArrowPagination() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); Mono> result = uploads.then(ccAsync.listBlobs(options, null).byPage().doOnNext(page -> { assertTrue(page.getValue().size() <= 1); @@ -2226,7 +2226,7 @@ public void listBlobsArrowNullUseArrowUsesXml() { BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); ListBlobsOptions options = new ListBlobsOptions(); - assertNull(options.isApacheArrowEnabled()); + assertNull(options.getStorageResponseSerializationFormat()); StepVerifier .create( @@ -2245,7 +2245,7 @@ public void listBlobsArrowEncryptedBlob() { BlockBlobAsyncClient cpkClient = ccAsync.getBlobAsyncClient(blobName).getCustomerProvidedKeyAsyncClient(cpk).getBlockBlobAsyncClient(); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); StepVerifier.create(cpkClient.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) .thenMany(ccAsync.listBlobs(options, null))).assertNext(item -> { @@ -2272,7 +2272,7 @@ public void listBlobsArrowRehydratePriority(RehydratePriority rehydratePriority) new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority))); } - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); Flux response = bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) .then(rehydrate) @@ -2370,7 +2370,7 @@ public void listBlobsByHierarchyArrowBasic() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); Mono> items = uploads.then(ccAsync.listBlobsByHierarchy("/", options).collect(Collectors.toList())); @@ -2411,7 +2411,7 @@ public void listBlobsByHierarchyArrowWithMetadata() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) .setPrefix("dir/") .setDetails(new BlobListDetails().setRetrieveMetadata(true)); @@ -2435,7 +2435,7 @@ public void listBlobsByHierarchyArrowPagination() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true).setMaxResultsPerPage(1); + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); Mono> result = uploads.then(ccAsync.listBlobsByHierarchy("/", options).byPage().doOnNext(page -> { @@ -2456,7 +2456,7 @@ public void listBlobsArrowWithTags() { Map tags = new HashMap<>(); tags.put("tagkey", "tagvalue"); - ListBlobsOptions options = new ListBlobsOptions().setApacheArrowEnabled(true) + ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) .setDetails(new BlobListDetails().setRetrieveTags(true)); Mono upload = bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) From 46d2082b9cfdc9cd034c92ba1ada5d9e7bcb3f90 Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 16 Jun 2026 12:09:42 -0400 Subject: [PATCH 34/65] fix linting issues --- .../storage/blob/models/ListBlobsOptions.java | 4 +- .../azure/storage/blob/ContainerApiTests.java | 37 ++++++++++++------- .../storage/blob/ContainerAsyncApiTests.java | 37 ++++++++++++------- 3 files changed, 50 insertions(+), 28 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index 79919a136782..e434681ac6e9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -131,8 +131,8 @@ public StorageResponseSerializationFormat getStorageResponseSerializationFormat( * {@link StorageResponseSerializationFormat#AUTO} both let the SDK pick. * @return the updated {@link ListBlobsOptions} object. */ - public ListBlobsOptions setStorageResponseSerializationFormat( - StorageResponseSerializationFormat storageResponseSerializationFormat) { + public ListBlobsOptions + setStorageResponseSerializationFormat(StorageResponseSerializationFormat storageResponseSerializationFormat) { this.storageResponseSerializationFormat = storageResponseSerializationFormat; return this; } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 9c373ee1ada1..d4c9d3838d35 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2153,7 +2153,8 @@ public void listBlobsArrowBasic() { String blobName = generateBlobName(); cc.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2177,8 +2178,9 @@ public void listBlobsArrowWithTags() { cc.getBlobClient(blobName).setTags(tags); // List with Arrow + retrieveTags - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) - .setDetails(new BlobListDetails().setRetrieveTags(true)); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setDetails(new BlobListDetails().setRetrieveTags(true)); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2202,7 +2204,8 @@ public void listBlobsArrowRehydratePriority(RehydratePriority rehydratePriority) null, null); } - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); BlobItem item = cc.listBlobs(options, null).iterator().next(); assertEquals(rehydratePriority, item.getProperties().getRehydratePriority()); @@ -2219,8 +2222,9 @@ public void listBlobsArrowWithMetadata() { .uploadWithResponse(DATA.getDefaultInputStream(), DATA.getDefaultDataSize(), null, metadata, null, null, null, null, null); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) - .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2238,7 +2242,9 @@ public void listBlobsArrowPagination() { .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); } - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setMaxResultsPerPage(1); List allBlobs = new ArrayList<>(); for (PagedResponse page : cc.listBlobs(options, null).iterableByPage()) { assertTrue(page.getValue().size() <= 1); @@ -2277,7 +2283,8 @@ public void listBlobsArrowEncryptedBlob() { BlobClient cpkClient = cc.getBlobClient(blobName).getCustomerProvidedKeyClient(cpk); cpkClient.getBlockBlobClient().upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); List blobs = cc.listBlobs(options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2371,7 +2378,8 @@ public void listBlobsByHierarchyArrowBasic() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); List items = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); // Root level: one prefix "dir/" and one blob "topblob" @@ -2408,9 +2416,10 @@ public void listBlobsByHierarchyArrowWithMetadata() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) - .setPrefix("dir/") - .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setPrefix("dir/") + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); List blobs = cc.listBlobsByHierarchy("/", options, null).stream().collect(Collectors.toList()); assertEquals(1, blobs.size()); @@ -2432,7 +2441,9 @@ public void listBlobsByHierarchyArrowPagination() { .getBlockBlobClient() .upload(DATA.getDefaultInputStream(), DATA.getDefaultDataSize()); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setMaxResultsPerPage(1); List allItems = new ArrayList<>(); for (PagedResponse page : cc.listBlobsByHierarchy("/", options, null).iterableByPage()) { assertTrue(page.getValue().size() <= 1); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 95e8e5d61a3a..ee240afdc4bc 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2157,7 +2157,8 @@ public void listBlobsArrowBasic() { String blobName = generateBlobName(); BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); StepVerifier .create( @@ -2181,8 +2182,9 @@ public void listBlobsArrowWithMetadata() { metadata.put("testkey", "testvalue"); BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) - .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); StepVerifier.create( bc.uploadWithResponse(DATA.getDefaultFlux(), DATA.getDefaultDataSize(), null, metadata, null, null, null) @@ -2203,7 +2205,9 @@ public void listBlobsArrowPagination() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setMaxResultsPerPage(1); Mono> result = uploads.then(ccAsync.listBlobs(options, null).byPage().doOnNext(page -> { assertTrue(page.getValue().size() <= 1); @@ -2245,7 +2249,8 @@ public void listBlobsArrowEncryptedBlob() { BlockBlobAsyncClient cpkClient = ccAsync.getBlobAsyncClient(blobName).getCustomerProvidedKeyAsyncClient(cpk).getBlockBlobAsyncClient(); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); StepVerifier.create(cpkClient.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) .thenMany(ccAsync.listBlobs(options, null))).assertNext(item -> { @@ -2272,7 +2277,8 @@ public void listBlobsArrowRehydratePriority(RehydratePriority rehydratePriority) new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority))); } - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); Flux response = bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) .then(rehydrate) @@ -2370,7 +2376,8 @@ public void listBlobsByHierarchyArrowBasic() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); Mono> items = uploads.then(ccAsync.listBlobsByHierarchy("/", options).collect(Collectors.toList())); @@ -2411,9 +2418,10 @@ public void listBlobsByHierarchyArrowWithMetadata() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) - .setPrefix("dir/") - .setDetails(new BlobListDetails().setRetrieveMetadata(true)); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setPrefix("dir/") + .setDetails(new BlobListDetails().setRetrieveMetadata(true)); StepVerifier.create(uploads.thenMany(ccAsync.listBlobsByHierarchy("/", options))).assertNext(item -> { assertFalse(item.isPrefix()); @@ -2435,7 +2443,9 @@ public void listBlobsByHierarchyArrowPagination() { .getBlockBlobAsyncClient() .upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize())); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW).setMaxResultsPerPage(1); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setMaxResultsPerPage(1); Mono> result = uploads.then(ccAsync.listBlobsByHierarchy("/", options).byPage().doOnNext(page -> { @@ -2456,8 +2466,9 @@ public void listBlobsArrowWithTags() { Map tags = new HashMap<>(); tags.put("tagkey", "tagvalue"); - ListBlobsOptions options = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) - .setDetails(new BlobListDetails().setRetrieveTags(true)); + ListBlobsOptions options + = new ListBlobsOptions().setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setDetails(new BlobListDetails().setRetrieveTags(true)); Mono upload = bc.upload(DATA.getDefaultFlux(), DATA.getDefaultDataSize()) .then(ccAsync.getBlobAsyncClient(blobName).setTags(tags)); From b139c0d4ccd9277df9f55c5a2478c7e015a104c4 Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 16 Jun 2026 12:15:08 -0400 Subject: [PATCH 35/65] remove bom, add versions to pom --- sdk/storage/azure-storage-blob/pom.xml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index bf10037aec77..5e4d33329fc1 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -145,35 +145,26 @@ org.apache.arrow arrow-vector + 18.1.0 org.apache.arrow arrow-memory-core + 18.1.0 org.apache.arrow arrow-memory-unsafe + 18.1.0 org.checkerframework checker-qual - 3.42.0 + 3.42.0 - - - - org.apache.arrow - arrow-bom - 18.1.0 - pom - import - - - - inject-sas-service-version From c33aeae028c10aa43c9382fe705f6dc300d7ea92 Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 16 Jun 2026 17:33:41 -0400 Subject: [PATCH 36/65] change hardcoded serviceVersion in listBlobsArrowDeserializer --- .../src/test/java/com/azure/storage/blob/ContainerApiTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index d4c9d3838d35..cea14904857f 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2307,7 +2307,7 @@ public void listBlobsArrowDeserializer() throws Exception { AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(cc.getHttpPipeline()) .url(cc.getAccountUrl()) - .version(BlobServiceVersion.V2026_06_06.getVersion()) + .version(cc.getServiceVersion().getVersion()) .buildClient(); // Call the Arrow endpoint From 55f10ce47aad0a4b7bebc9bc7d4dbbc96926b3eb Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 17 Jun 2026 15:36:18 -0400 Subject: [PATCH 37/65] swagger - add Accept header for Arrow,Xml --- .../blob/implementation/ContainersImpl.java | 16 +- .../models/BlobItemInternal.java | 27 ---- .../models/BlobItemPropertiesInternal.java | 84 ---------- .../models/BlobsDownloadHeaders.java | 143 ------------------ .../blob/models/BlobRetentionPolicy.java | 14 +- .../azure-storage-blob/swagger/README.md | 2 +- 6 files changed, 16 insertions(+), 270 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 6bfa32ac060d..af54bda3cb4b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -6255,7 +6255,7 @@ public Response listBlobFlatSegmentNoCustomHeaders String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -6426,7 +6426,7 @@ public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithRes String startFrom, String endBefore, String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -6478,7 +6478,7 @@ public Mono listBlobFlatSegmentApacheArrowNoCustomHeadersWithRes try { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -6572,7 +6572,7 @@ public Response listBlobFlatSegmentApacheArrowNoCustomHeadersWithRe try { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -7089,7 +7089,7 @@ public Response listBlobHierarchySegmentNoCus String endBefore, String requestId, Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -7273,7 +7273,7 @@ public Mono listBlobHierarchySegmentApacheArrowNoCustomHeadersWi Context context) { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -7328,7 +7328,7 @@ public Mono listBlobHierarchySegmentApacheArrowNoCustomHeadersWi try { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() @@ -7428,7 +7428,7 @@ public Response listBlobHierarchySegmentApacheArrowNoCustomHeadersW try { final String restype = "container"; final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream"; + final String accept = "application/vnd.apache.arrow.stream,application/xml"; String includeConverted = (include == null) ? null : include.stream() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java index b4206292da11..ff98bcc2dbc5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java @@ -80,12 +80,6 @@ public final class BlobItemInternal implements XmlSerializable @Generated private Boolean hasVersionsOnly; - /* - * When a blob is encrypted with a customer provided key and has application metadata, - * the Encrypted field will be set to true and the metadata will be null. - */ - private Boolean metadataEncrypted; - /* * The IsPrefix property. */ @@ -341,27 +335,6 @@ public BlobItemInternal setIsPrefix(Boolean isPrefix) { return this; } - /** - * Get the metadataEncrypted property: When a blob is encrypted with a customer provided key and has application - * metadata, the Encrypted field will be set to true and the metadata will be null. - * - * @return the metadataEncrypted value. - */ - public Boolean isMetadataEncrypted() { - return this.metadataEncrypted; - } - - /** - * Set the metadataEncrypted property. - * - * @param metadataEncrypted the metadataEncrypted value to set. - * @return the BlobItemInternal object itself. - */ - public BlobItemInternal setMetadataEncrypted(Boolean metadataEncrypted) { - this.metadataEncrypted = metadataEncrypted; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java index 7dc441380236..909005607d59 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java @@ -272,21 +272,6 @@ public final class BlobItemPropertiesInternal implements XmlSerializable { +public final class BlobRetentionPolicy implements XmlSerializable { /* * Indicates whether a retention policy is enabled for the storage service */ @@ -40,7 +40,7 @@ public BlobRetentionPolicy() { /** * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @return the enabled value. */ @Generated @@ -50,7 +50,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @param enabled the enabled value to set. * @return the BlobRetentionPolicy object itself. */ @@ -63,7 +63,7 @@ public BlobRetentionPolicy setEnabled(boolean enabled) { /** * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @return the days value. */ @Generated @@ -74,7 +74,7 @@ public Integer getDays() { /** * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @param days the days value to set. * @return the BlobRetentionPolicy object itself. */ @@ -103,7 +103,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobRetentionPolicy from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -116,7 +116,7 @@ public static BlobRetentionPolicy fromXml(XmlReader xmlReader) throws XMLStreamE /** * Reads an instance of BlobRetentionPolicy from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index a69eb1ee871b..0019d026a0d0 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.63' -input-file: https://raw.githubusercontent.com/nickliu-msft/azure-rest-api-specs/ab1ec63862fdf4506cfb1cdd4c8105281b5de3f0/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-10-06/blob.json +input-file: https://raw.githubusercontent.com/nickliu-msft/azure-rest-api-specs/f85584d452061985a5fc21a67b8fc0b46b75188a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-10-06/blob.json java: true output-folder: ../ namespace: com.azure.storage.blob From 52b3816666192ea722e13762d74b44c8e20012cf Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 17 Jun 2026 14:41:55 -0400 Subject: [PATCH 38/65] Replace Apache Arrow vector reader with custom ListBlobs Arrow stream reader Swap the official arrow-vector based parser for a self-contained BlobListArrowStreamReader plus internally-implemented column/batch data structures (Batch, Column, StringColumn, IntColumn, BoolColumn, TimestampColumn, MapColumn). The reader decodes the ListBlobs Arrow IPC stream using only the arrow-format flatbuffer definitions. Dependency footprint: arrow-format becomes the sole compile-scoped Arrow dependency; arrow-vector / arrow-memory-core / arrow-memory-unsafe / checker-qual move to test scope (they back the parity test that validates the custom reader against the official Arrow writer); module-info drops requires for org.apache.arrow.vector and org.apache.arrow.memory.core, keeping org.apache.arrow.format. --- sdk/parents/azure-client-sdk-parent/pom.xml | 3 +- sdk/storage/azure-storage-blob/assets.json | 2 +- sdk/storage/azure-storage-blob/pom.xml | 14 +- .../blob/BlobContainerAsyncClient.java | 15 +- .../storage/blob/BlobContainerClient.java | 129 ++-- .../models/BlobListArrowParseException.java | 30 + .../util/ArrowBlobListDeserializer.java | 292 ++++----- .../util/BlobListArrowStreamReader.java | 554 ++++++++++++++++++ .../src/main/java/module-info.java | 2 - .../azure/storage/blob/ContainerApiTests.java | 2 +- .../storage/blob/ContainerAsyncApiTests.java | 2 +- .../util/ArrowBlobListDeserializerTests.java | 34 ++ .../util/BlobListArrowStreamReaderTests.java | 184 ++++++ 13 files changed, 1029 insertions(+), 234 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobListArrowParseException.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index 9e7a897b26a9..2d9802e7d0c5 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -602,7 +602,8 @@ com.google.code.findbugs:jsr305:[3.0.2] - + + org.apache.arrow:arrow-format:[18.1.0] org.apache.arrow:arrow-memory-core:[18.1.0] org.apache.arrow:arrow-memory-unsafe:[18.1.0] org.apache.arrow:arrow-vector:[18.1.0] diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 343f43c946b6..99770bd61507 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_65730d9920" + "Tag": "java/storage/azure-storage-blob_c4cdc68ef6" } diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 5e4d33329fc1..8584e0446245 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -57,7 +57,6 @@ --add-reads com.azure.storage.blob=com.azure.core.http.jdk.httpclient --add-reads com.azure.storage.blob=com.azure.core.http.vertx --add-opens java.base/java.nio=ALL-UNNAMED - --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED concurrent @@ -142,25 +141,38 @@ + + + org.apache.arrow + arrow-format + 18.1.0 + org.apache.arrow arrow-vector 18.1.0 + test org.apache.arrow arrow-memory-core 18.1.0 + test org.apache.arrow arrow-memory-unsafe 18.1.0 + test org.checkerframework checker-qual 3.42.0 + test diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index c35a9ff13ab5..07ec28af4a40 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -29,6 +29,7 @@ import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; +import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer.ArrowListBlobsResult; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ModelHelper; @@ -1120,13 +1121,19 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S Duration timeout) { BiFunction>> func = (marker, pageSize) -> { ListBlobsOptions finalOptions; + /* + If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. + Otherwise, prefer the new value. + */ if (pageSize != null) { if (options == null) { finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize); } else { + // Note that this prefers the value passed to .byPage(int) over the value on the options finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize) .setPrefix(options.getPrefix()) - .setDetails(options.getDetails()); + .setDetails(options.getDetails()) + .setStartFrom(options.getStartFrom()); if (ModelHelper.resolveSerializationFormat(options.getStorageResponseSerializationFormat()) == StorageResponseSerializationFormat.ARROW) { finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) @@ -1209,8 +1216,7 @@ private Mono> listBlobsFlatSegmentArrow(String marker, L java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(bytes); if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { - ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult - = ArrowBlobListDeserializer.deserialize(bais); + ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(bais); List value = arrowResult.getBlobItems() .stream() @@ -1450,8 +1456,7 @@ private Mono> listBlobsHierarchySegmentArrow(String mark java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(bytes); if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { - ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult - = ArrowBlobListDeserializer.deserialize(bais); + ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(bais); List value = arrowResult.getBlobItems() .stream() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 104f7852b5c7..e59b2508f71a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -34,6 +34,7 @@ import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; +import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer.ArrowListBlobsResult; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ModelHelper; @@ -63,7 +64,9 @@ import com.azure.xml.XmlReader; +import java.io.IOException; import java.io.InputStream; +import java.io.UncheckedIOException; import javax.xml.stream.XMLStreamException; import java.net.URI; import java.time.Duration; @@ -1063,38 +1066,45 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { - // Arrow response — parse with Arrow deserializer - ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult - = ArrowBlobListDeserializer.deserialize(response.getValue()); - - List value = arrowResult.getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); - - return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), value, arrowResult.getNextMarker(), response.getDeserializedHeaders()); - } else { - // XML fallback — service returned XML instead of Arrow - try { - ListBlobsFlatSegmentResponse xmlResponse - = ListBlobsFlatSegmentResponse.fromXml(XmlReader.fromStream(response.getValue())); + // The response body is an InputStream backed by the network buffer. It must be closed to release the + // underlying buffer, otherwise the transport (e.g. Netty) will report a resource leak. + try (InputStream responseBody = response.getValue()) { + if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + // Arrow response — parse with Arrow parser entrypoint + ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(responseBody); - List value = xmlResponse.getSegment() == null - ? Collections.emptyList() - : xmlResponse.getSegment() - .getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); + List value = arrowResult.getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), value, xmlResponse.getNextMarker(), null); - } catch (XMLStreamException e) { - throw LOGGER - .logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + response.getHeaders(), value, arrowResult.getNextMarker(), + response.getDeserializedHeaders()); + } else { + // XML fallback — service returned XML instead of Arrow + try { + ListBlobsFlatSegmentResponse xmlResponse + = ListBlobsFlatSegmentResponse.fromXml(XmlReader.fromStream(responseBody)); + + List value = xmlResponse.getSegment() == null + ? Collections.emptyList() + : xmlResponse.getSegment() + .getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), value, xmlResponse.getNextMarker(), null); + } catch (XMLStreamException e) { + throw LOGGER + .logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + } } + } catch (IOException e) { + throw LOGGER + .logExceptionAsError(new UncheckedIOException("Failed to close ListBlobs response stream.", e)); } } else { Callable> operation @@ -1260,38 +1270,45 @@ private PagedResponse listBlobsHierarchySegment(String marker, String String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { - ArrowBlobListDeserializer.ArrowListBlobsResult arrowResult - = ArrowBlobListDeserializer.deserialize(response.getValue()); - - List value = arrowResult.getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); + // The response body is an InputStream backed by the network buffer. It must be closed to release the + // underlying buffer, otherwise the transport (e.g. Netty) will report a resource leak. + try (InputStream responseBody = response.getValue()) { + if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(responseBody); - return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), - value, arrowResult.getNextMarker(), response.getDeserializedHeaders()); - } else { - // XML fallback — service returned XML instead of Arrow - try { - ListBlobsHierarchySegmentResponse xmlResponse - = ListBlobsHierarchySegmentResponse.fromXml(XmlReader.fromStream(response.getValue())); - - BlobHierarchyListSegment segment = xmlResponse.getSegment(); - List value = new ArrayList<>(); - if (segment != null) { - segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); - segment.getBlobPrefixes() - .forEach(prefix -> value - .add(new BlobItem().setName(ModelHelper.toBlobNameString(prefix.getName())) - .setIsPrefix(true))); - } + List value = arrowResult.getBlobItems() + .stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), value, xmlResponse.getNextMarker(), null); - } catch (XMLStreamException e) { - throw LOGGER.logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + response.getHeaders(), value, arrowResult.getNextMarker(), response.getDeserializedHeaders()); + } else { + // XML fallback — service returned XML instead of Arrow + try { + ListBlobsHierarchySegmentResponse xmlResponse + = ListBlobsHierarchySegmentResponse.fromXml(XmlReader.fromStream(responseBody)); + + BlobHierarchyListSegment segment = xmlResponse.getSegment(); + List value = new ArrayList<>(); + if (segment != null) { + segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); + segment.getBlobPrefixes() + .forEach(prefix -> value + .add(new BlobItem().setName(ModelHelper.toBlobNameString(prefix.getName())) + .setIsPrefix(true))); + } + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), value, xmlResponse.getNextMarker(), null); + } catch (XMLStreamException e) { + throw LOGGER + .logExceptionAsError(new RuntimeException("Failed to parse XML fallback response", e)); + } } + } catch (IOException e) { + throw LOGGER + .logExceptionAsError(new UncheckedIOException("Failed to close ListBlobs response stream.", e)); } } else { Callable> operation diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobListArrowParseException.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobListArrowParseException.java new file mode 100644 index 000000000000..6d2465d26bff --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobListArrowParseException.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.models; + +/** + * Exception thrown when parsing Arrow ListBlobs payloads fails or encounters unsupported content. + */ +public final class BlobListArrowParseException extends RuntimeException { + private static final long serialVersionUID = 1L; + + /** + * Creates an exception with a message. + * + * @param message parse failure details. + */ + public BlobListArrowParseException(String message) { + super(message); + } + + /** + * Creates an exception with a message and cause. + * + * @param message parse failure details. + * @param cause originating cause. + */ + public BlobListArrowParseException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 7347ed28141e..34e29c8a3668 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -5,7 +5,16 @@ import com.azure.storage.blob.implementation.models.BlobItemInternal; import com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal; +import com.azure.storage.blob.implementation.models.BlobListArrowParseException; import com.azure.storage.blob.implementation.models.BlobName; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.Batch; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.BoolColumn; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.Column; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.IntColumn; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.MapColumn; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.Parsed; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.StringColumn; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.TimestampColumn; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.ArchiveStatus; import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; @@ -15,28 +24,13 @@ import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; import com.azure.storage.blob.models.RehydratePriority; -import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.vector.BitVector; -import org.apache.arrow.vector.BigIntVector; -import org.apache.arrow.vector.FieldVector; -import org.apache.arrow.vector.TimeStampSecVector; -import org.apache.arrow.vector.UInt8Vector; -import org.apache.arrow.vector.VarCharVector; -import org.apache.arrow.vector.VectorSchemaRoot; -import org.apache.arrow.vector.complex.MapVector; -import org.apache.arrow.vector.complex.impl.UnionMapReader; -import org.apache.arrow.vector.ipc.ArrowStreamReader; - -import java.io.IOException; + import java.io.InputStream; -import java.nio.charset.StandardCharsets; import java.time.Instant; import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Base64; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -96,57 +90,56 @@ private ArrowBlobListDeserializer() { * * @param arrowStream the Arrow IPC input stream from the service response * @return the deserialized result containing blob items and next marker - * @throws RuntimeException if deserialization fails + * @throws BlobListArrowParseException if deserialization fails */ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { + if (arrowStream == null) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: input stream is null."); + } + List results = new ArrayList<>(); String nextMarker = null; Integer numberOfRecords = null; - try (BufferAllocator allocator = new RootAllocator(); - ArrowStreamReader reader = new ArrowStreamReader(arrowStream, allocator)) { + Parsed parsed = BlobListArrowStreamReader.read(arrowStream); - VectorSchemaRoot root = reader.getVectorSchemaRoot(); - - // Extract pagination metadata from schema - Map schemaMetadata = root.getSchema().getCustomMetadata(); - if (schemaMetadata != null) { - nextMarker = schemaMetadata.get("NextMarker"); - if (nextMarker != null && nextMarker.isEmpty()) { - nextMarker = null; - } + Map schemaMetadata = parsed.getSchemaMetadata(); + if (schemaMetadata != null) { + nextMarker = schemaMetadata.get("NextMarker"); + if (nextMarker != null && nextMarker.isEmpty()) { + nextMarker = null; + } - String numberOfRecordsStr = schemaMetadata.get("NumberOfRecords"); - if (numberOfRecordsStr != null && !numberOfRecordsStr.isEmpty()) { + String numberOfRecordsStr = schemaMetadata.get("NumberOfRecords"); + if (numberOfRecordsStr != null && !numberOfRecordsStr.isEmpty()) { + try { numberOfRecords = Integer.parseInt(numberOfRecordsStr); + } catch (NumberFormatException e) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: schema metadata 'NumberOfRecords' isn't a valid integer.", e); } } + } - // Read all batches - while (reader.loadNextBatch()) { - int rowCount = root.getRowCount(); - for (int i = 0; i < rowCount; i++) { - results.add(readRow(root, i)); - } + for (Batch batch : parsed.getBatches()) { + int rowCount = batch.getRowCount(); + for (int i = 0; i < rowCount; i++) { + results.add(readRow(batch, i)); } - } catch (IOException e) { - throw new RuntimeException("Failed to deserialize Arrow IPC response", e); } return new ArrowListBlobsResult(results, nextMarker, numberOfRecords); } - private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { + private static BlobItemInternal readRow(Batch batch, int index) { BlobItemInternal item = new BlobItemInternal(); - // Name - String name = getVarChar(root, "Name", index); + String name = getVarChar(batch, "Name", index); if (name != null) { item.setName(new BlobName().setContent(name)); } - // ResourceType — hierarchy listings use "blobprefix" for virtual directory rows - String resourceType = getVarChar(root, "ResourceType", index); + String resourceType = getVarChar(batch, "ResourceType", index); if ("blobprefix".equals(resourceType)) { item.setIsPrefix(true); return item; @@ -154,158 +147,130 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { BlobItemPropertiesInternal properties = new BlobItemPropertiesInternal(); - // Deleted - Boolean deleted = getBit(root, "Deleted", index); + Boolean deleted = getBit(batch, "Deleted", index); if (deleted != null) { item.setDeleted(deleted); } - // Snapshot - item.setSnapshot(getVarChar(root, "Snapshot", index)); - - // VersionId - item.setVersionId(getVarChar(root, "VersionId", index)); + item.setSnapshot(getVarChar(batch, "Snapshot", index)); + item.setVersionId(getVarChar(batch, "VersionId", index)); + item.setIsCurrentVersion(getBit(batch, "IsCurrentVersion", index)); + item.setHasVersionsOnly(getBit(batch, "HasVersionsOnly", index)); - // IsCurrentVersion - item.setIsCurrentVersion(getBit(root, "IsCurrentVersion", index)); - - // HasVersionsOnly - item.setHasVersionsOnly(getBit(root, "HasVersionsOnly", index)); - - // Metadata - Map metadata = getMap(root, "Metadata", index); + Map metadata = getMap(batch, "Metadata", index); if (metadata != null) { item.setMetadata(metadata); } - // OrMetadata - Map orMetadata = getMap(root, "OrMetadata", index); + Map orMetadata = getMap(batch, "OrMetadata", index); if (orMetadata != null) { item.setObjectReplicationMetadata(orMetadata); } - // Tags - Map tags = getMap(root, "Tags", index); + Map tags = getMap(batch, "Tags", index); if (tags != null) { item.setBlobTags(ModelHelper.toBlobTags(tags)); } - // Encrypted — indicates metadata is encrypted with customer-provided key - item.setMetadataEncrypted(getBit(root, "Encrypted", index)); + item.setMetadataEncrypted(getBit(batch, "Encrypted", index)); - // --- Properties --- + properties.setCreationTime(getTimestamp(batch, "Creation-Time", index)); + properties.setLastModified(getTimestamp(batch, "Last-Modified", index)); + properties.setETag(getVarChar(batch, "Etag", index)); + properties.setContentLength(getUInt64(batch, "Content-Length", index)); + properties.setContentType(getVarChar(batch, "Content-Type", index)); + properties.setContentEncoding(getVarChar(batch, "Content-Encoding", index)); + properties.setContentLanguage(getVarChar(batch, "Content-Language", index)); + properties.setContentDisposition(getVarChar(batch, "Content-Disposition", index)); + properties.setCacheControl(getVarChar(batch, "Cache-Control", index)); - properties.setCreationTime(getTimestamp(root, "Creation-Time", index)); - properties.setLastModified(getTimestamp(root, "Last-Modified", index)); - properties.setETag(getVarChar(root, "Etag", index)); - properties.setContentLength(getUInt64(root, "Content-Length", index)); - properties.setContentType(getVarChar(root, "Content-Type", index)); - properties.setContentEncoding(getVarChar(root, "Content-Encoding", index)); - properties.setContentLanguage(getVarChar(root, "Content-Language", index)); - properties.setContentDisposition(getVarChar(root, "Content-Disposition", index)); - properties.setCacheControl(getVarChar(root, "Cache-Control", index)); - - // Content-MD5: service returns Base64 string, property expects byte[] - String contentMd5 = getVarChar(root, "Content-MD5", index); + String contentMd5 = getVarChar(batch, "Content-MD5", index); if (contentMd5 != null) { properties.setContentMd5(Base64.getDecoder().decode(contentMd5)); } - // Content-CRC64: same encoding as Content-MD5 - String contentCrc64 = getVarChar(root, "Content-CRC64", index); + String contentCrc64 = getVarChar(batch, "Content-CRC64", index); if (contentCrc64 != null) { properties.setContentCrc64(Base64.getDecoder().decode(contentCrc64)); } - // BlobType - String blobType = getVarChar(root, "BlobType", index); + String blobType = getVarChar(batch, "BlobType", index); if (blobType != null) { properties.setBlobType(BlobType.fromString(blobType)); } - // AccessTier - String accessTier = getVarChar(root, "AccessTier", index); + String accessTier = getVarChar(batch, "AccessTier", index); if (accessTier != null) { properties.setAccessTier(AccessTier.fromString(accessTier)); } - properties.setAccessTierInferred(getBit(root, "AccessTierInferred", index)); - properties.setAccessTierChangeTime(getTimestamp(root, "AccessTierChangeTime", index)); + properties.setAccessTierInferred(getBit(batch, "AccessTierInferred", index)); + properties.setAccessTierChangeTime(getTimestamp(batch, "AccessTierChangeTime", index)); - // SmartAccessTier - String smartAccessTier = getVarChar(root, "SmartAccessTier", index); + String smartAccessTier = getVarChar(batch, "SmartAccessTier", index); if (smartAccessTier != null) { properties.setSmartAccessTier(AccessTier.fromString(smartAccessTier)); } - // Lease - String leaseStatus = getVarChar(root, "LeaseStatus", index); + String leaseStatus = getVarChar(batch, "LeaseStatus", index); if (leaseStatus != null) { properties.setLeaseStatus(LeaseStatusType.fromString(leaseStatus)); } - String leaseState = getVarChar(root, "LeaseState", index); + String leaseState = getVarChar(batch, "LeaseState", index); if (leaseState != null) { properties.setLeaseState(LeaseStateType.fromString(leaseState)); } - String leaseDuration = getVarChar(root, "LeaseDuration", index); + String leaseDuration = getVarChar(batch, "LeaseDuration", index); if (leaseDuration != null) { properties.setLeaseDuration(LeaseDurationType.fromString(leaseDuration)); } - // Encryption - properties.setServerEncrypted(getBit(root, "ServerEncrypted", index)); - properties.setCustomerProvidedKeySha256(getVarChar(root, "CustomerProvidedKeySha256", index)); - properties.setEncryptionScope(getVarChar(root, "EncryptionScope", index)); - properties.setIncrementalCopy(getBit(root, "IncrementalCopy", index)); - - // OrsPolicySourceBlob - properties.setOrsPolicySourceBlob(getVarChar(root, "OrsPolicySourceBlob", index)); + properties.setServerEncrypted(getBit(batch, "ServerEncrypted", index)); + properties.setCustomerProvidedKeySha256(getVarChar(batch, "CustomerProvidedKeySha256", index)); + properties.setEncryptionScope(getVarChar(batch, "EncryptionScope", index)); + properties.setIncrementalCopy(getBit(batch, "IncrementalCopy", index)); - // AffinityId - properties.setAffinityId(getVarChar(root, "AffinityId", index)); + properties.setOrsPolicySourceBlob(getVarChar(batch, "OrsPolicySourceBlob", index)); + properties.setAffinityId(getVarChar(batch, "AffinityId", index)); - // Copy fields - properties.setCopyId(getVarChar(root, "CopyId", index)); - String copyStatus = getVarChar(root, "CopyStatus", index); + properties.setCopyId(getVarChar(batch, "CopyId", index)); + String copyStatus = getVarChar(batch, "CopyStatus", index); if (copyStatus != null) { properties.setCopyStatus(CopyStatusType.fromString(copyStatus)); } - properties.setCopySource(getVarChar(root, "CopySource", index)); - properties.setCopyProgress(getVarChar(root, "CopyProgress", index)); - properties.setCopyCompletionTime(getTimestamp(root, "CopyCompletionTime", index)); - properties.setCopyStatusDescription(getVarChar(root, "CopyStatusDescription", index)); - properties.setDestinationSnapshot(getVarChar(root, "CopyDestinationSnapshot", index)); + properties.setCopySource(getVarChar(batch, "CopySource", index)); + properties.setCopyProgress(getVarChar(batch, "CopyProgress", index)); + properties.setCopyCompletionTime(getTimestamp(batch, "CopyCompletionTime", index)); + properties.setCopyStatusDescription(getVarChar(batch, "CopyStatusDescription", index)); + properties.setDestinationSnapshot(getVarChar(batch, "CopyDestinationSnapshot", index)); - // Sequence number - properties.setBlobSequenceNumber(getUInt64(root, "x-ms-blob-sequence-number", index)); + properties.setBlobSequenceNumber(getUInt64(batch, "x-ms-blob-sequence-number", index)); - // Misc properties - properties.setIsSealed(getBit(root, "Sealed", index)); - properties.setLegalHold(getBit(root, "LegalHold", index)); - properties.setDeletedTime(getTimestamp(root, "DeletedTime", index)); - properties.setLastAccessedOn(getTimestamp(root, "LastAccessTime", index)); - properties.setImmutabilityPolicyExpiresOn(getTimestamp(root, "ImmutabilityPolicyUntilDate", index)); + properties.setIsSealed(getBit(batch, "Sealed", index)); + properties.setLegalHold(getBit(batch, "LegalHold", index)); + properties.setDeletedTime(getTimestamp(batch, "DeletedTime", index)); + properties.setLastAccessedOn(getTimestamp(batch, "LastAccessTime", index)); + properties.setImmutabilityPolicyExpiresOn(getTimestamp(batch, "ImmutabilityPolicyUntilDate", index)); - String immutabilityMode = getVarChar(root, "ImmutabilityPolicyMode", index); + String immutabilityMode = getVarChar(batch, "ImmutabilityPolicyMode", index); if (immutabilityMode != null) { properties.setImmutabilityPolicyMode(BlobImmutabilityPolicyMode.fromString(immutabilityMode)); } - String archiveStatus = getVarChar(root, "ArchiveStatus", index); + String archiveStatus = getVarChar(batch, "ArchiveStatus", index); if (archiveStatus != null) { properties.setArchiveStatus(ArchiveStatus.fromString(archiveStatus)); } - String rehydratePriority = getVarChar(root, "RehydratePriority", index); + String rehydratePriority = getVarChar(batch, "RehydratePriority", index); if (rehydratePriority != null) { properties.setRehydratePriority(RehydratePriority.fromString(rehydratePriority)); } - // TagCount and RemainingRetentionDays — service uses uint64 but property is Integer - Long tagCount = getUInt64(root, "TagCount", index); + Long tagCount = getUInt64(batch, "TagCount", index); if (tagCount != null) { properties.setTagCount(tagCount.intValue()); } - Long remainingRetentionDays = getUInt64(root, "RemainingRetentionDays", index); + Long remainingRetentionDays = getUInt64(batch, "RemainingRetentionDays", index); if (remainingRetentionDays != null) { properties.setRemainingRetentionDays(remainingRetentionDays.intValue()); } @@ -314,69 +279,64 @@ private static BlobItemInternal readRow(VectorSchemaRoot root, int index) { return item; } - // --- Safe vector read helpers --- - // Each returns null if the column is absent from the schema or the value is null at the given row. - - private static String getVarChar(VectorSchemaRoot root, String name, int index) { - FieldVector vec = root.getVector(name); - if (vec == null || vec.isNull(index)) { + private static String getVarChar(Batch batch, String name, int index) { + Column column = batch.getColumn(name); + if (column == null || column.isNull(index)) { return null; } - return new String(((VarCharVector) vec).get(index), StandardCharsets.UTF_8); + if (!(column instanceof StringColumn)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + + "' has unsupported string column type '" + column.getClass().getSimpleName() + "'."); + } + return ((StringColumn) column).get(index); } - private static Long getUInt64(VectorSchemaRoot root, String name, int index) { - FieldVector vec = root.getVector(name); - if (vec == null || vec.isNull(index)) { + private static Long getUInt64(Batch batch, String name, int index) { + Column column = batch.getColumn(name); + if (column == null || column.isNull(index)) { return null; } - // Arrow may represent uint64 as BigIntVector (signed 64-bit) or UInt8Vector - if (vec instanceof BigIntVector) { - return ((BigIntVector) vec).get(index); - } else if (vec instanceof UInt8Vector) { - return ((UInt8Vector) vec).get(index); + if (!(column instanceof IntColumn)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + + "' has unsupported integer column type '" + column.getClass().getSimpleName() + "'."); } - return null; + return ((IntColumn) column).get(index); } - private static Boolean getBit(VectorSchemaRoot root, String name, int index) { - FieldVector vec = root.getVector(name); - if (vec == null || vec.isNull(index)) { + private static Boolean getBit(Batch batch, String name, int index) { + Column column = batch.getColumn(name); + if (column == null || column.isNull(index)) { return null; } - return ((BitVector) vec).get(index) == 1; + if (!(column instanceof BoolColumn)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + + "' has unsupported boolean column type '" + column.getClass().getSimpleName() + "'."); + } + return ((BoolColumn) column).get(index); } - private static OffsetDateTime getTimestamp(VectorSchemaRoot root, String name, int index) { - FieldVector vec = root.getVector(name); - if (vec == null || vec.isNull(index)) { + private static OffsetDateTime getTimestamp(Batch batch, String name, int index) { + Column column = batch.getColumn(name); + if (column == null || column.isNull(index)) { return null; } - // Service returns Timestamp(SECOND, null) — epoch seconds without timezone, treat as UTC - if (vec instanceof TimeStampSecVector) { - long epochSeconds = ((TimeStampSecVector) vec).get(index); - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(epochSeconds), ZoneOffset.UTC); + if (!(column instanceof TimestampColumn)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + + "' has unsupported timestamp column type '" + column.getClass().getSimpleName() + "'."); } - return null; + long epochSeconds = ((TimestampColumn) column).getEpochSeconds(index); + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(epochSeconds), ZoneOffset.UTC); } - private static Map getMap(VectorSchemaRoot root, String name, int index) { - FieldVector vec = root.getVector(name); - if (vec == null || vec.isNull(index)) { + private static Map getMap(Batch batch, String name, int index) { + Column column = batch.getColumn(name); + if (column == null || column.isNull(index)) { return null; } - if (vec instanceof MapVector) { - MapVector mapVec = (MapVector) vec; - UnionMapReader reader = mapVec.getReader(); - reader.setPosition(index); - Map map = new HashMap<>(); - while (reader.next()) { - String key = reader.key().readText().toString(); - String value = reader.value().readText().toString(); - map.put(key, value); - } - return map.isEmpty() ? null : map; + if (!(column instanceof MapColumn)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + + "' has unsupported map column type '" + column.getClass().getSimpleName() + "'."); } - return null; + return ((MapColumn) column).get(index); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java new file mode 100644 index 000000000000..d813c21b43a4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -0,0 +1,554 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.models.BlobListArrowParseException; +import org.apache.arrow.flatbuf.Buffer; +import org.apache.arrow.flatbuf.Endianness; +import org.apache.arrow.flatbuf.Field; +import org.apache.arrow.flatbuf.FieldNode; +import org.apache.arrow.flatbuf.Int; +import org.apache.arrow.flatbuf.KeyValue; +import org.apache.arrow.flatbuf.Message; +import org.apache.arrow.flatbuf.MessageHeader; +import org.apache.arrow.flatbuf.RecordBatch; +import org.apache.arrow.flatbuf.Schema; +import org.apache.arrow.flatbuf.TimeUnit; +import org.apache.arrow.flatbuf.Timestamp; +import org.apache.arrow.flatbuf.Type; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * Minimal Apache Arrow IPC stream reader scoped to the needs of the ListBlobs Arrow response. + *

+ * This reader intentionally supports only the subset of the Arrow IPC format emitted by the Storage ListBlobs + * endpoint: a single schema message followed by zero or more uncompressed, little-endian record batches whose + * columns are UTF-8 strings, booleans, integers, second-precision timestamps, and map<string,string>. Anything + * outside that subset (dictionaries, compression, big-endian, unsupported types) fails fast with + * {@link BlobListArrowParseException}. + *

+ * It depends only on the {@code arrow-format} flatbuffer definitions for metadata decoding and reads record batch + * bodies directly, so it does not require the {@code arrow-vector} runtime. + */ +final class BlobListArrowStreamReader { + + private static final int CONTINUATION_MARKER = 0xFFFFFFFF; + + private BlobListArrowStreamReader() { + } + + /** + * The decoded contents of an Arrow IPC stream. + */ + static final class Parsed { + private final Map schemaMetadata; + private final List batches; + + Parsed(Map schemaMetadata, List batches) { + this.schemaMetadata = schemaMetadata; + this.batches = batches; + } + + Map getSchemaMetadata() { + return schemaMetadata; + } + + List getBatches() { + return batches; + } + } + + /** + * A single decoded record batch: a row count and columns addressable by field name. + */ + static final class Batch { + private final int rowCount; + private final Map columns; + + Batch(int rowCount, Map columns) { + this.rowCount = rowCount; + this.columns = columns; + } + + int getRowCount() { + return rowCount; + } + + Column getColumn(String name) { + return columns.get(name); + } + } + + /** + * Reads and decodes an Arrow IPC stream. + * + * @param stream the Arrow IPC stream. + * @return the decoded schema metadata and record batches. + * @throws BlobListArrowParseException if the stream is malformed or uses an unsupported feature. + */ + static Parsed read(InputStream stream) { + byte[] bytes; + try { + bytes = readAll(stream); + } catch (IOException e) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: unable to read IPC stream.", e); + } + + ByteBuffer body = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); + + Map schemaMetadata = null; + List fields = null; + List batches = new ArrayList<>(); + + int pos = 0; + int length = bytes.length; + while (pos + 4 <= length) { + int marker = body.getInt(pos); + pos += 4; + + int metadataLength; + if (marker == CONTINUATION_MARKER) { + if (pos + 4 > length) { + break; + } + metadataLength = body.getInt(pos); + pos += 4; + } else { + // Pre-0.15 streams used a bare length prefix without the continuation marker. + metadataLength = marker; + } + + if (metadataLength == 0) { + // End-of-stream marker. + break; + } + if (metadataLength < 0 || pos + metadataLength > length) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: message metadata length is out of bounds."); + } + + ByteBuffer messageBuffer + = ByteBuffer.wrap(bytes, pos, metadataLength).slice().order(ByteOrder.LITTLE_ENDIAN); + Message message = Message.getRootAsMessage(messageBuffer); + pos += metadataLength; + + long bodyLength = message.bodyLength(); + if (bodyLength < 0 || pos + bodyLength > length) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: message body length is out of bounds."); + } + int bodyStart = pos; + pos += (int) bodyLength; + + byte headerType = message.headerType(); + if (headerType == MessageHeader.Schema) { + Schema schema = (Schema) message.header(new Schema()); + if (schema == null) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: schema message header is missing."); + } + if (schema.endianness() != Endianness.Little) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: only little-endian streams are supported."); + } + schemaMetadata = readKeyValueMetadata(schema); + fields = readFields(schema); + } else if (headerType == MessageHeader.RecordBatch) { + if (fields == null) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: record batch encountered before schema."); + } + RecordBatch recordBatch = (RecordBatch) message.header(new RecordBatch()); + if (recordBatch == null) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: record batch message header is missing."); + } + if (recordBatch.compression() != null) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: compressed record batches are not supported."); + } + batches.add(buildBatch(fields, recordBatch, body, bodyStart)); + } else if (headerType == MessageHeader.DictionaryBatch) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: dictionary-encoded streams are not supported."); + } + // Other header types (Tensor, SparseTensor) are not expected and are ignored. + } + + if (fields == null) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: stream contained no schema."); + } + + return new Parsed(schemaMetadata == null ? new HashMap<>() : schemaMetadata, batches); + } + + private static Batch buildBatch(List fields, RecordBatch recordBatch, ByteBuffer body, int bodyStart) { + BatchCursor cursor = new BatchCursor(recordBatch, body, bodyStart); + Map columns = new LinkedHashMap<>(); + for (ArrowField field : fields) { + columns.put(field.name, buildColumn(field, cursor)); + } + return new Batch((int) recordBatch.length(), columns); + } + + private static Column buildColumn(ArrowField field, BatchCursor cursor) { + FieldNode node = cursor.nextNode(); + int valueCount = (int) node.length(); + + switch (field.typeType) { + case Type.Utf8: + case Type.Binary: { + BufferRegion validity = cursor.nextBuffer(); + BufferRegion offsets = cursor.nextBuffer(); + BufferRegion data = cursor.nextBuffer(); + return new StringColumn(valueCount, validity, offsets, data, cursor.body, cursor.bodyStart); + } + + case Type.Bool: { + BufferRegion validity = cursor.nextBuffer(); + BufferRegion data = cursor.nextBuffer(); + return new BoolColumn(valueCount, validity, data, cursor.body, cursor.bodyStart); + } + + case Type.Int: { + BufferRegion validity = cursor.nextBuffer(); + BufferRegion data = cursor.nextBuffer(); + return new IntColumn(valueCount, validity, data, field.bitWidth, field.signed, cursor.body, + cursor.bodyStart); + } + + case Type.Timestamp: { + BufferRegion validity = cursor.nextBuffer(); + BufferRegion data = cursor.nextBuffer(); + return new TimestampColumn(valueCount, validity, data, cursor.body, cursor.bodyStart); + } + + case Type.Map: { + BufferRegion validity = cursor.nextBuffer(); + BufferRegion offsets = cursor.nextBuffer(); + // Map has a single Struct child ("entries") with key and value children. + ArrowField entries = field.children.get(0); + StructColumn struct = (StructColumn) buildColumn(entries, cursor); + Column keyColumn = struct.children.get(0); + Column valueColumn = struct.children.get(1); + if (!(keyColumn instanceof StringColumn) || !(valueColumn instanceof StringColumn)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + field.name + + "' map entries must be string keys and values."); + } + return new MapColumn(valueCount, validity, offsets, (StringColumn) keyColumn, + (StringColumn) valueColumn, cursor.body, cursor.bodyStart); + } + + case Type.Struct_: { + cursor.nextBuffer(); // struct validity buffer + List children = new ArrayList<>(field.children.size()); + for (ArrowField child : field.children) { + children.add(buildColumn(child, cursor)); + } + return new StructColumn(children); + } + + default: + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + field.name + + "' has unsupported Arrow type '" + Type.name(field.typeType) + "'."); + } + } + + private static List readFields(Schema schema) { + int count = schema.fieldsLength(); + List fields = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + fields.add(readField(schema.fields(i))); + } + return fields; + } + + private static ArrowField readField(Field field) { + ArrowField arrowField = new ArrowField(); + arrowField.name = field.name(); + arrowField.typeType = field.typeType(); + + if (arrowField.typeType == Type.Int) { + Int intType = (Int) field.type(new Int()); + if (intType != null) { + arrowField.bitWidth = intType.bitWidth(); + arrowField.signed = intType.isSigned(); + } + } else if (arrowField.typeType == Type.Timestamp) { + Timestamp timestamp = (Timestamp) field.type(new Timestamp()); + if (timestamp != null && timestamp.unit() != TimeUnit.SECOND) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + arrowField.name + + "' uses an unsupported timestamp unit '" + TimeUnit.name(timestamp.unit()) + "'."); + } + } + + int childCount = field.childrenLength(); + arrowField.children = new ArrayList<>(childCount); + for (int i = 0; i < childCount; i++) { + arrowField.children.add(readField(field.children(i))); + } + return arrowField; + } + + private static Map readKeyValueMetadata(Schema schema) { + int count = schema.customMetadataLength(); + if (count == 0) { + return new HashMap<>(); + } + Map metadata = new HashMap<>(); + for (int i = 0; i < count; i++) { + KeyValue keyValue = schema.customMetadata(i); + metadata.put(keyValue.key(), keyValue.value()); + } + return metadata; + } + + private static byte[] readAll(InputStream stream) throws IOException { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + byte[] chunk = new byte[8192]; + int read; + while ((read = stream.read(chunk)) != -1) { + buffer.write(chunk, 0, read); + } + return buffer.toByteArray(); + } + + /** + * A parsed schema field with the minimal type information required for decoding. + */ + private static final class ArrowField { + private String name; + private byte typeType; + private int bitWidth; + private boolean signed; + private List children = new ArrayList<>(); + } + + /** + * Sequentially hands out the field nodes and buffers of a record batch in pre-order. + */ + private static final class BatchCursor { + private final RecordBatch recordBatch; + private final ByteBuffer body; + private final int bodyStart; + private int nodeIndex; + private int bufferIndex; + + BatchCursor(RecordBatch recordBatch, ByteBuffer body, int bodyStart) { + this.recordBatch = recordBatch; + this.body = body; + this.bodyStart = bodyStart; + } + + FieldNode nextNode() { + if (nodeIndex >= recordBatch.nodesLength()) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: record batch is missing expected field nodes."); + } + return recordBatch.nodes(nodeIndex++); + } + + BufferRegion nextBuffer() { + if (bufferIndex >= recordBatch.buffersLength()) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: record batch is missing expected buffers."); + } + Buffer buffer = recordBatch.buffers(bufferIndex++); + return new BufferRegion(buffer.offset(), buffer.length()); + } + } + + /** + * Offset and length of a single buffer within the record batch body. + */ + private static final class BufferRegion { + private final long offset; + private final long length; + + BufferRegion(long offset, long length) { + this.offset = offset; + this.length = length; + } + } + + /** + * Base class for decoded columns. + */ + abstract static class Column { + final int valueCount; + final BufferRegion validity; + final ByteBuffer body; + final int bodyStart; + + Column(int valueCount, BufferRegion validity, ByteBuffer body, int bodyStart) { + this.valueCount = valueCount; + this.validity = validity; + this.body = body; + this.bodyStart = bodyStart; + } + + boolean isNull(int index) { + if (validity == null || validity.length == 0) { + return false; + } + int bytePosition = bodyStart + (int) validity.offset + (index >> 3); + int bit = (body.get(bytePosition) >> (index & 7)) & 1; + return bit == 0; + } + } + + /** + * UTF-8 string column (Arrow Utf8/Binary). + */ + static final class StringColumn extends Column { + private final BufferRegion offsets; + private final BufferRegion data; + + StringColumn(int valueCount, BufferRegion validity, BufferRegion offsets, BufferRegion data, ByteBuffer body, + int bodyStart) { + super(valueCount, validity, body, bodyStart); + this.offsets = offsets; + this.data = data; + } + + String get(int index) { + int start = body.getInt(bodyStart + (int) offsets.offset + index * 4); + int end = body.getInt(bodyStart + (int) offsets.offset + (index + 1) * 4); + int dataStart = bodyStart + (int) data.offset + start; + byte[] valueBytes = new byte[end - start]; + for (int i = 0; i < valueBytes.length; i++) { + valueBytes[i] = body.get(dataStart + i); + } + return new String(valueBytes, StandardCharsets.UTF_8); + } + } + + /** + * Boolean column stored as a bitmap (Arrow Bool). + */ + static final class BoolColumn extends Column { + private final BufferRegion data; + + BoolColumn(int valueCount, BufferRegion validity, BufferRegion data, ByteBuffer body, int bodyStart) { + super(valueCount, validity, body, bodyStart); + this.data = data; + } + + boolean get(int index) { + int bytePosition = bodyStart + (int) data.offset + (index >> 3); + int bit = (body.get(bytePosition) >> (index & 7)) & 1; + return bit == 1; + } + } + + /** + * Integer column (Arrow Int) of width 8/16/32/64, signed or unsigned, returned as a long. + */ + static final class IntColumn extends Column { + private final BufferRegion data; + private final int bitWidth; + private final boolean signed; + + IntColumn(int valueCount, BufferRegion validity, BufferRegion data, int bitWidth, boolean signed, + ByteBuffer body, int bodyStart) { + super(valueCount, validity, body, bodyStart); + this.data = data; + this.bitWidth = bitWidth; + this.signed = signed; + } + + long get(int index) { + int base = bodyStart + (int) data.offset; + switch (bitWidth) { + case 64: + return body.getLong(base + index * 8); + + case 32: { + int value = body.getInt(base + index * 4); + return signed ? value : (value & 0xFFFFFFFFL); + } + + case 16: { + short value = body.getShort(base + index * 2); + return signed ? value : (value & 0xFFFF); + } + + case 8: { + byte value = body.get(base + index); + return signed ? value : (value & 0xFF); + } + + default: + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: unsupported integer bit width '" + bitWidth + "'."); + } + } + } + + /** + * Second-precision timestamp column (Arrow Timestamp, SECOND unit). + */ + static final class TimestampColumn extends Column { + private final BufferRegion data; + + TimestampColumn(int valueCount, BufferRegion validity, BufferRegion data, ByteBuffer body, int bodyStart) { + super(valueCount, validity, body, bodyStart); + this.data = data; + } + + long getEpochSeconds(int index) { + return body.getLong(bodyStart + (int) data.offset + index * 8); + } + } + + /** + * Struct column holding ordered child columns (used internally for map entries). + */ + static final class StructColumn extends Column { + private final List children; + + StructColumn(List children) { + super(0, null, null, 0); + this.children = children; + } + } + + /** + * Map<string,string> column (Arrow Map of Struct<key:utf8,value:utf8>). + */ + static final class MapColumn extends Column { + private final BufferRegion offsets; + private final StringColumn keys; + private final StringColumn values; + + MapColumn(int valueCount, BufferRegion validity, BufferRegion offsets, StringColumn keys, StringColumn values, + ByteBuffer body, int bodyStart) { + super(valueCount, validity, body, bodyStart); + this.offsets = offsets; + this.keys = keys; + this.values = values; + } + + Map get(int index) { + int start = body.getInt(bodyStart + (int) offsets.offset + index * 4); + int end = body.getInt(bodyStart + (int) offsets.offset + (index + 1) * 4); + Map map = new HashMap<>(); + for (int entry = start; entry < end; entry++) { + map.put(keys.get(entry), values.get(entry)); + } + return map.isEmpty() ? null : map; + } + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/module-info.java b/sdk/storage/azure-storage-blob/src/main/java/module-info.java index e622d0aa2e95..7eae7cff59b4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/module-info.java @@ -5,8 +5,6 @@ requires transitive com.azure.storage.common; requires com.azure.storage.internal.avro; - requires org.apache.arrow.vector; - requires org.apache.arrow.memory.core; requires org.apache.arrow.format; exports com.azure.storage.blob; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index cea14904857f..54ae007c7165 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2307,7 +2307,7 @@ public void listBlobsArrowDeserializer() throws Exception { AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(cc.getHttpPipeline()) .url(cc.getAccountUrl()) - .version(cc.getServiceVersion().getVersion()) + .version(BlobServiceVersion.getLatest().getVersion()) .buildClient(); // Call the Arrow endpoint diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index ee240afdc4bc..6e574cda0e27 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2300,7 +2300,7 @@ public void listBlobsArrowDeserializer() { AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(ccAsync.getHttpPipeline()) .url(ccAsync.getAccountUrl()) - .version(BlobServiceVersion.V2026_06_06.getVersion()) + .version(BlobServiceVersion.getLatest().getVersion()) .buildClient(); List include = new ArrayList<>(); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java new file mode 100644 index 000000000000..e23bf2cbfae0 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.models.BlobListArrowParseException; +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; + +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class ArrowBlobListDeserializerTests { + @Test + public void parseNullStreamFailsFast() { + BlobListArrowParseException exception + = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(null)); + + assertTrue(exception.getMessage().startsWith("ListBlobs Arrow parse failure:")); + } + + @Test + public void parseInvalidPayloadFailsFast() { + ByteArrayInputStream invalidPayload + = new ByteArrayInputStream("not-an-arrow-stream".getBytes(StandardCharsets.UTF_8)); + + BlobListArrowParseException exception = assertThrows(BlobListArrowParseException.class, + () -> ArrowBlobListDeserializer.deserialize(invalidPayload)); + + assertTrue(exception.getMessage().startsWith("ListBlobs Arrow parse failure:")); + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java new file mode 100644 index 000000000000..b03027eeb841 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.models.BlobItemInternal; +import org.apache.arrow.memory.BufferAllocator; +import org.apache.arrow.memory.RootAllocator; +import org.apache.arrow.vector.BigIntVector; +import org.apache.arrow.vector.BitVector; +import org.apache.arrow.vector.FieldVector; +import org.apache.arrow.vector.TimeStampSecVector; +import org.apache.arrow.vector.VarCharVector; +import org.apache.arrow.vector.VectorSchemaRoot; +import org.apache.arrow.vector.complex.MapVector; +import org.apache.arrow.vector.complex.impl.UnionMapWriter; +import org.apache.arrow.vector.ipc.ArrowStreamWriter; +import org.apache.arrow.vector.types.pojo.Field; +import org.apache.arrow.vector.types.pojo.Schema; +import org.apache.arrow.vector.util.Text; +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Parity tests that build a real Arrow IPC payload with the official {@code arrow-vector} writer and validate that the + * internal {@link BlobListArrowStreamReader} / {@link ArrowBlobListDeserializer} decode it identically. This proves the + * custom reader has the same implementation as the Apache Arrow parser + */ +public class BlobListArrowStreamReaderTests { + + @Test + public void parsesRealArrowPayload() throws Exception { + byte[] payload; + try (BufferAllocator allocator = new RootAllocator()) { + payload = buildPayload(allocator); + } + + ArrowBlobListDeserializer.ArrowListBlobsResult result + = ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(payload)); + + // Schema metadata + assertEquals("nextPage", result.getNextMarker()); + assertEquals(Integer.valueOf(2), result.getNumberOfRecords()); + + // Two rows: one blob, one prefix + List items = result.getBlobItems(); + assertEquals(2, items.size()); + + BlobItemInternal blob = items.get(0); + assertNotNull(blob.getName()); + assertEquals("blob1", blob.getName().getContent()); + assertNull(blob.isPrefix()); + assertEquals(Boolean.FALSE, blob.isDeleted()); + assertNotNull(blob.getProperties()); + assertEquals(7L, (long) blob.getProperties().getContentLength()); + assertEquals("application/octet-stream", blob.getProperties().getContentType()); + assertNotNull(blob.getProperties().getCreationTime()); + assertEquals(1000L, blob.getProperties().getCreationTime().toEpochSecond()); + + Map metadata = blob.getMetadata(); + assertNotNull(metadata); + assertEquals("v1", metadata.get("k1")); + assertEquals("v2", metadata.get("k2")); + + BlobItemInternal prefix = items.get(1); + assertNotNull(prefix.getName()); + assertEquals("dir/", prefix.getName().getContent()); + assertTrue(prefix.isPrefix()); + } + + @Test + public void parsesEmptyMetadataAsNull() throws Exception { + byte[] payload; + try (BufferAllocator allocator = new RootAllocator()) { + payload = buildPayload(allocator); + } + + ArrowBlobListDeserializer.ArrowListBlobsResult result + = ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(payload)); + // Row 1 (prefix) had no metadata entries; ensure prefix path doesn't surface an (empty) metadata map. + assertNull(result.getBlobItems().get(1).getMetadata()); + assertFalse(result.getBlobItems().isEmpty()); + } + + /** + * Builds an Arrow IPC stream with a representative ListBlobs schema: string, integer, boolean, second-precision + * timestamp, content-type string and a map<string,string> metadata column, plus schema-level NextMarker and + * NumberOfRecords metadata. + */ + private static byte[] buildPayload(BufferAllocator allocator) throws Exception { + VarCharVector name = new VarCharVector("Name", allocator); + VarCharVector resourceType = new VarCharVector("ResourceType", allocator); + BigIntVector contentLength = new BigIntVector("Content-Length", allocator); + VarCharVector contentType = new VarCharVector("Content-Type", allocator); + BitVector deleted = new BitVector("Deleted", allocator); + TimeStampSecVector creationTime = new TimeStampSecVector("Creation-Time", allocator); + MapVector metadata = MapVector.empty("Metadata", allocator, false); + + name.allocateNew(); + resourceType.allocateNew(); + contentLength.allocateNew(); + contentType.allocateNew(); + deleted.allocateNew(); + creationTime.allocateNew(); + + // Row 0: a real blob. + name.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); + // resourceType[0] left null -> not a prefix. + contentLength.setSafe(0, 7L); + contentType.setSafe(0, "application/octet-stream".getBytes(StandardCharsets.UTF_8)); + deleted.setSafe(0, 0); + creationTime.setSafe(0, 1000L); + + // Row 1: a virtual directory (prefix). + name.setSafe(1, "dir/".getBytes(StandardCharsets.UTF_8)); + resourceType.setSafe(1, "blobprefix".getBytes(StandardCharsets.UTF_8)); + // remaining columns null for the prefix row. + + name.setValueCount(2); + resourceType.setValueCount(2); + contentLength.setValueCount(2); + contentType.setValueCount(2); + deleted.setValueCount(2); + creationTime.setValueCount(2); + + UnionMapWriter mapWriter = metadata.getWriter(); + mapWriter.setPosition(0); + mapWriter.startMap(); + writeEntry(mapWriter, "k1", "v1"); + writeEntry(mapWriter, "k2", "v2"); + mapWriter.endMap(); + // Row 1 metadata left null. + metadata.setValueCount(2); + + List vectors = new ArrayList<>(); + vectors.add(name); + vectors.add(resourceType); + vectors.add(contentLength); + vectors.add(contentType); + vectors.add(deleted); + vectors.add(creationTime); + vectors.add(metadata); + + List fields = new ArrayList<>(); + for (FieldVector vector : vectors) { + fields.add(vector.getField()); + } + + Map schemaMetadata = new LinkedHashMap<>(); + schemaMetadata.put("NextMarker", "nextPage"); + schemaMetadata.put("NumberOfRecords", "2"); + Schema schema = new Schema(fields, schemaMetadata); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + try (VectorSchemaRoot root = new VectorSchemaRoot(schema, vectors, 2); + ArrowStreamWriter writer = new ArrowStreamWriter(root, null, out)) { + writer.start(); + writer.writeBatch(); + writer.end(); + } + + return out.toByteArray(); + } + + private static void writeEntry(UnionMapWriter mapWriter, String key, String value) { + mapWriter.startEntry(); + mapWriter.key().varChar().writeVarChar(new Text(key)); + mapWriter.value().varChar().writeVarChar(new Text(value)); + mapWriter.endEntry(); + } +} From aff29c188c39735a3c3ee621c391e8cd4b09ceab Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 18 Jun 2026 14:25:20 -0400 Subject: [PATCH 39/65] Revert "Storage - STG104 Add Blob Access Tier to Get Blob Response (#49219)" This reverts commit ce83bc7bf08b0cf118be593991f264fc751ef548. --- sdk/storage/azure-storage-blob/assets.json | 2 +- .../models/BlobsDownloadHeaders.java | 143 ------------------ .../blob/models/BlobDownloadHeaders.java | 91 ----------- .../com/azure/storage/blob/BlobApiTests.java | 30 ---- .../azure/storage/blob/BlobAsyncApiTests.java | 27 ---- .../azure-storage-blob/swagger/README.md | 2 +- 6 files changed, 2 insertions(+), 293 deletions(-) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 7f5e5b611d0c..8cad139f33ff 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_1da9542ee2" + "Tag": "java/storage/azure-storage-blob_47f4243e59" } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java index 7dd424fe666c..1d409a5a4cdd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java @@ -295,30 +295,6 @@ public final class BlobsDownloadHeaders { @Generated private Long xMsStructuredContentLength; - /* - * The x-ms-access-tier property. - */ - @Generated - private String xMsAccessTier; - - /* - * The x-ms-access-tier-inferred property. - */ - @Generated - private Boolean xMsAccessTierInferred; - - /* - * The x-ms-access-tier-change-time property. - */ - @Generated - private DateTimeRfc1123 xMsAccessTierChangeTime; - - /* - * The x-ms-smart-access-tier property. - */ - @Generated - private String xMsSmartAccessTier; - /* * The x-ms-content-crc64 property. */ @@ -391,16 +367,6 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_STRUCTURED_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-structured-content-length"); - private static final HttpHeaderName X_MS_ACCESS_TIER = HttpHeaderName.fromString("x-ms-access-tier"); - - private static final HttpHeaderName X_MS_ACCESS_TIER_INFERRED - = HttpHeaderName.fromString("x-ms-access-tier-inferred"); - - private static final HttpHeaderName X_MS_ACCESS_TIER_CHANGE_TIME - = HttpHeaderName.fromString("x-ms-access-tier-change-time"); - - private static final HttpHeaderName X_MS_SMART_ACCESS_TIER = HttpHeaderName.fromString("x-ms-smart-access-tier"); - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); // HttpHeaders containing the raw property values. @@ -563,20 +529,6 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { } else { this.xMsStructuredContentLength = null; } - this.xMsAccessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); - String xMsAccessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); - if (xMsAccessTierInferred != null) { - this.xMsAccessTierInferred = Boolean.parseBoolean(xMsAccessTierInferred); - } else { - this.xMsAccessTierInferred = null; - } - String xMsAccessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); - if (xMsAccessTierChangeTime != null) { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); - } else { - this.xMsAccessTierChangeTime = null; - } - this.xMsSmartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); if (xMsContentCrc64 != null) { this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); @@ -1632,101 +1584,6 @@ public BlobsDownloadHeaders setXMsStructuredContentLength(Long xMsStructuredCont return this; } - /** - * Get the xMsAccessTier property: The x-ms-access-tier property. - * - * @return the xMsAccessTier value. - */ - @Generated - public String getXMsAccessTier() { - return this.xMsAccessTier; - } - - /** - * Set the xMsAccessTier property: The x-ms-access-tier property. - * - * @param xMsAccessTier the xMsAccessTier value to set. - * @return the BlobsDownloadHeaders object itself. - */ - @Generated - public BlobsDownloadHeaders setXMsAccessTier(String xMsAccessTier) { - this.xMsAccessTier = xMsAccessTier; - return this; - } - - /** - * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * - * @return the xMsAccessTierInferred value. - */ - @Generated - public Boolean isXMsAccessTierInferred() { - return this.xMsAccessTierInferred; - } - - /** - * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * - * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. - * @return the BlobsDownloadHeaders object itself. - */ - @Generated - public BlobsDownloadHeaders setXMsAccessTierInferred(Boolean xMsAccessTierInferred) { - this.xMsAccessTierInferred = xMsAccessTierInferred; - return this; - } - - /** - * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * - * @return the xMsAccessTierChangeTime value. - */ - @Generated - public OffsetDateTime getXMsAccessTierChangeTime() { - if (this.xMsAccessTierChangeTime == null) { - return null; - } - return this.xMsAccessTierChangeTime.getDateTime(); - } - - /** - * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * - * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. - * @return the BlobsDownloadHeaders object itself. - */ - @Generated - public BlobsDownloadHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAccessTierChangeTime) { - if (xMsAccessTierChangeTime == null) { - this.xMsAccessTierChangeTime = null; - } else { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); - } - return this; - } - - /** - * Get the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @return the xMsSmartAccessTier value. - */ - @Generated - public String getXMsSmartAccessTier() { - return this.xMsSmartAccessTier; - } - - /** - * Set the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @param xMsSmartAccessTier the xMsSmartAccessTier value to set. - * @return the BlobsDownloadHeaders object itself. - */ - @Generated - public BlobsDownloadHeaders setXMsSmartAccessTier(String xMsSmartAccessTier) { - this.xMsSmartAccessTier = xMsSmartAccessTier; - return this; - } - /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index 6a372f5b2c74..dfd93a535fc6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -825,97 +825,6 @@ public BlobDownloadHeaders setEncryptionScope(String encryptionScope) { return this; } - /** - * Gets the access tier of the blob. - * - * @return the access tier of the blob. This is only set for Page blobs on a premium storage account or for Block - * blobs on blob storage or general purpose V2 account. - */ - public AccessTier getAccessTier() { - String accessTier = internalHeaders.getXMsAccessTier(); - return accessTier == null ? null : AccessTier.fromString(accessTier); - } - - /** - * Sets the access tier of the blob. - * - * @param accessTier the access tier of the blob. - * @return the BlobDownloadHeaders object itself. - */ - public BlobDownloadHeaders setAccessTier(AccessTier accessTier) { - internalHeaders.setXMsAccessTier(accessTier == null ? null : accessTier.toString()); - return this; - } - - /** - * Gets the status of the tier being inferred for the blob. - * - * @return the status of the tier being inferred for the blob. This is only set for Page blobs on a premium storage - * account or for Block blobs on blob storage or general purpose V2 account. - */ - public Boolean isAccessTierInferred() { - return Boolean.TRUE.equals(internalHeaders.isXMsAccessTierInferred()); - } - - /** - * Sets the status of the tier being inferred for the blob. - * - * @param accessTierInferred the status of the tier being inferred for the blob. - * @return the BlobDownloadHeaders object itself. - */ - public BlobDownloadHeaders setAccessTierInferred(Boolean accessTierInferred) { - internalHeaders.setXMsAccessTierInferred(accessTierInferred); - return this; - } - - /** - * Gets the time when the access tier for the blob was last changed. - * - * @return the time when the access tier for the blob was last changed. - */ - public OffsetDateTime getAccessTierChangeTime() { - return internalHeaders.getXMsAccessTierChangeTime(); - } - - /** - * Sets the time when the access tier for the blob was last changed. - * - * @param accessTierChangeTime the time when the access tier for the blob was last changed. - * @return the BlobDownloadHeaders object itself. - */ - public BlobDownloadHeaders setAccessTierChangeTime(OffsetDateTime accessTierChangeTime) { - internalHeaders.setXMsAccessTierChangeTime(accessTierChangeTime); - return this; - } - - /** - * Gets the underlying access tier of the blob when its access tier is {@link AccessTier#SMART}. - *

- * This value is only populated when {@link #getAccessTier()} returns {@link AccessTier#SMART}. In that case, it - * represents the concrete access tier (for example {@link AccessTier#HOT} or {@link AccessTier#COOL}) that the - * service has selected for the blob. For all other access tiers, this property is {@code null} and should be - * ignored. - * - * @return the underlying access tier chosen by the service when the blob's access tier is {@link AccessTier#SMART}, - * or {@code null} if the blob is not using the smart access tier. - */ - public AccessTier getSmartAccessTier() { - String smartAccessTier = internalHeaders.getXMsSmartAccessTier(); - return smartAccessTier == null ? null : AccessTier.fromString(smartAccessTier); - } - - /** - * Sets the underlying access tier of the blob when its access tier is {@link AccessTier#SMART}. - * - * @param smartAccessTier the underlying access tier chosen by the service when the blob's access tier is - * {@link AccessTier#SMART}. - * @return the BlobDownloadHeaders object itself. - */ - public BlobDownloadHeaders setSmartAccessTier(AccessTier smartAccessTier) { - internalHeaders.setXMsSmartAccessTier(smartAccessTier == null ? null : smartAccessTier.toString()); - return this; - } - /** * Get the blobContentMD5 property: If the blob has a MD5 hash, and if request contains range header (Range or * x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java index 71c474ba295c..50a9eb63ef21 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java @@ -543,36 +543,6 @@ public void downloadAllNullBinaryData() { // headers.getLastAccessedTime() /* TODO (gapra): re-enable when last access time enabled. */ } - @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-10-06") - @Test - public void downloadSmartAccessTierHeaders() { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - bc.setAccessTier(AccessTier.SMART); - - BlobDownloadResponse response = bc.downloadStreamWithResponse(stream, null, null, null, false, null, null); - ByteBuffer body = ByteBuffer.wrap(stream.toByteArray()); - - assertEquals(DATA.getDefaultData(), body); - assertSmartAccessTierHeaders(response.getDeserializedHeaders()); - } - - @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-10-06") - @Test - public void downloadContentSmartAccessTierHeaders() { - bc.setAccessTier(AccessTier.SMART); - BlobDownloadContentResponse response = bc.downloadContentWithResponse(null, null, null, null); - - TestUtils.assertArraysEqual(DATA.getDefaultBytes(), response.getValue().toBytes()); - assertSmartAccessTierHeaders(response.getDeserializedHeaders()); - } - - private static void assertSmartAccessTierHeaders(BlobDownloadHeaders headers) { - assertEquals(AccessTier.SMART, headers.getAccessTier()); - assertNotNull(headers.getSmartAccessTier()); - assertFalse(headers.isAccessTierInferred()); - assertNotEquals(OffsetDateTime.now(), headers.getAccessTierChangeTime()); - } - @Test public void downloadEmptyFile() { AppendBlobClient bc = cc.getBlobClient("emptyAppendBlob").getAppendBlobClient(); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java index ea01df338d18..049e4254e92a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java @@ -382,33 +382,6 @@ public void downloadAllNullBinaryData() { .verifyComplete(); } - @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-10-06") - @Test - public void downloadSmartAccessTierHeaders() { - Mono response = bc.setAccessTier(AccessTier.SMART) - .then(bc.downloadStreamWithResponse(null, null, null, false)) - .flatMap(r -> { - assertSmartAccessTierHeaders(r.getDeserializedHeaders()); - return FluxUtil.collectBytesInByteBufferStream(r.getValue()); - }) - .flatMap(r -> { - TestUtils.assertArraysEqual(DATA.getDefaultBytes(), r); - return bc.downloadContentWithResponse(null, null); - }); - - StepVerifier.create(response).assertNext(r -> { - assertSmartAccessTierHeaders(r.getDeserializedHeaders()); - TestUtils.assertArraysEqual(DATA.getDefaultBytes(), r.getValue().toBytes()); - }).verifyComplete(); - } - - private static void assertSmartAccessTierHeaders(BlobDownloadHeaders headers) { - assertEquals(AccessTier.SMART, headers.getAccessTier()); - assertNotNull(headers.getSmartAccessTier()); - assertFalse(headers.isAccessTierInferred()); - assertNotEquals(OffsetDateTime.now(), headers.getAccessTierChangeTime()); - } - @Test public void downloadEmptyFile() { AppendBlobAsyncClient bc = ccAsync.getBlobAsyncClient("emptyAppendBlob").getAppendBlobAsyncClient(); diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 98afe0c616dc..292d2f7c231d 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.63' -input-file: https://raw.githubusercontent.com/seanmcc-msft/azure-rest-api-specs/eb29a830edf5db50758e7d044160c7f18077f7f7/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-10-06/blob.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/15d7f54a5389d5906ffb4e56bb2f38fe5525c0d3/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-06-06/blob.json java: true output-folder: ../ namespace: com.azure.storage.blob From 5658599b2310726cf654e66a5b1f6547c8fd328a Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 19 Jun 2026 11:44:08 -0400 Subject: [PATCH 40/65] wip - clean up var names --- .../storage/blob/BlobContainerAsyncClient.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 07ec28af4a40..6d5b4dd29249 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -1213,10 +1213,10 @@ private Mono> listBlobsFlatSegmentArrow(String marker, L String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { - java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(bytes); + java.io.ByteArrayInputStream inputStream = new java.io.ByteArrayInputStream(bytes); if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { - ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(bais); + ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(inputStream); List value = arrowResult.getBlobItems() .stream() @@ -1230,7 +1230,7 @@ private Mono> listBlobsFlatSegmentArrow(String marker, L // XML fallback try { ListBlobsFlatSegmentResponse xmlResponse - = ListBlobsFlatSegmentResponse.fromXml(com.azure.xml.XmlReader.fromStream(bais)); + = ListBlobsFlatSegmentResponse.fromXml(com.azure.xml.XmlReader.fromStream(inputStream)); List value = xmlResponse.getSegment() == null ? Collections.emptyList() @@ -1453,10 +1453,10 @@ private Mono> listBlobsHierarchySegmentArrow(String mark String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { - java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(bytes); + java.io.ByteArrayInputStream inputStream = new java.io.ByteArrayInputStream(bytes); if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { - ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(bais); + ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(inputStream); List value = arrowResult.getBlobItems() .stream() @@ -1469,8 +1469,8 @@ private Mono> listBlobsHierarchySegmentArrow(String mark } else { // XML fallback try { - ListBlobsHierarchySegmentResponse xmlResponse - = ListBlobsHierarchySegmentResponse.fromXml(com.azure.xml.XmlReader.fromStream(bais)); + ListBlobsHierarchySegmentResponse xmlResponse = ListBlobsHierarchySegmentResponse + .fromXml(com.azure.xml.XmlReader.fromStream(inputStream)); BlobHierarchyListSegment segment = xmlResponse.getSegment(); List value = new ArrayList<>(); From 52525ef37cc2a84ae7f7ef26549045547000dfa8 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 22 Jun 2026 11:44:48 -0400 Subject: [PATCH 41/65] remove getContentCrc64, getOrsPolicySourceBlob, getAffinityId --- .../util/ArrowBlobListDeserializer.java | 14 +++------- .../azure/storage/blob/models/BlobItem.java | 10 ------- .../blob/models/BlobItemProperties.java | 27 ------------------- 3 files changed, 4 insertions(+), 47 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 34e29c8a3668..58f661a81b14 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -172,8 +172,6 @@ private static BlobItemInternal readRow(Batch batch, int index) { item.setBlobTags(ModelHelper.toBlobTags(tags)); } - item.setMetadataEncrypted(getBit(batch, "Encrypted", index)); - properties.setCreationTime(getTimestamp(batch, "Creation-Time", index)); properties.setLastModified(getTimestamp(batch, "Last-Modified", index)); properties.setETag(getVarChar(batch, "Etag", index)); @@ -189,11 +187,6 @@ private static BlobItemInternal readRow(Batch batch, int index) { properties.setContentMd5(Base64.getDecoder().decode(contentMd5)); } - String contentCrc64 = getVarChar(batch, "Content-CRC64", index); - if (contentCrc64 != null) { - properties.setContentCrc64(Base64.getDecoder().decode(contentCrc64)); - } - String blobType = getVarChar(batch, "BlobType", index); if (blobType != null) { properties.setBlobType(BlobType.fromString(blobType)); @@ -229,9 +222,6 @@ private static BlobItemInternal readRow(Batch batch, int index) { properties.setEncryptionScope(getVarChar(batch, "EncryptionScope", index)); properties.setIncrementalCopy(getBit(batch, "IncrementalCopy", index)); - properties.setOrsPolicySourceBlob(getVarChar(batch, "OrsPolicySourceBlob", index)); - properties.setAffinityId(getVarChar(batch, "AffinityId", index)); - properties.setCopyId(getVarChar(batch, "CopyId", index)); String copyStatus = getVarChar(batch, "CopyStatus", index); if (copyStatus != null) { @@ -279,6 +269,8 @@ private static BlobItemInternal readRow(Batch batch, int index) { return item; } + // region Arrow helpers + private static String getVarChar(Batch batch, String name, int index) { Column column = batch.getColumn(name); if (column == null || column.isNull(index)) { @@ -339,4 +331,6 @@ private static Map getMap(Batch batch, String name, int index) { } return ((MapColumn) column).get(index); } + + //endregion } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java index 049762502c29..7b3558005a5e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java @@ -274,16 +274,6 @@ public BlobItem setHasVersionsOnly(Boolean hasVersionsOnly) { return this; } - /** - * Get the metadataEncrypted property: When a blob is encrypted with a customer provided key and has application - * metadata, the Encrypted field will be set to true and the metadata will be null. - * - * @return the metadataEncrypted value. - */ - public Boolean isMetadataEncrypted() { - return blobItemInternal.isMetadataEncrypted(); - } - /** * Get the isPrefix property: If blobs are named to mimic a directory hierarchy (i.e. path elements separated by a * delimiter), this property may be used to determine if the {@code BlobItem} is a virtual directory. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java index 9f0dc5c3b3f9..ccd3b89a3f5b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java @@ -845,33 +845,6 @@ public BlobItemProperties setImmutabilityPolicy(BlobImmutabilityPolicy immutabil return this; } - /** - * Get the contentCrc64 property: The Content-CRC64 property. - * - * @return the contentCrc64 value. - */ - public byte[] getContentCrc64() { - return internalProperties.getContentCrc64(); - } - - /** - * Get the orsPolicySourceBlob property: The OrsPolicySourceBlob property. - * - * @return the orsPolicySourceBlob value. - */ - public String getOrsPolicySourceBlob() { - return internalProperties.getOrsPolicySourceBlob(); - } - - /** - * Get the affinityId property: The AffinityId property. - * - * @return the affinityId value. - */ - public String getAffinityId() { - return internalProperties.getAffinityId(); - } - /** * Get the hasLegalHold property: The LegalHold property. * From 64612828122c7f247fc53b198f89a7ee05af00da Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 22 Jun 2026 12:13:32 -0400 Subject: [PATCH 42/65] add external dependencies to external_dependencies.txt, add google buffers to azure-client-sdk-parent and azure-storage-blob xml files --- eng/versioning/external_dependencies.txt | 1 + sdk/parents/azure-client-sdk-parent/pom.xml | 2 ++ sdk/storage/azure-storage-blob/pom.xml | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index b87325d7f361..6a476715a635 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -25,6 +25,7 @@ com.github.spotbugs:spotbugs;4.8.3 com.github.spotbugs:spotbugs-annotations;4.8.3 com.github.spotbugs:spotbugs-maven-plugin;4.8.3.1 com.google.code.gson:gson;2.13.1 +com.google.flatbuffers:flatbuffers-java;24.3.25 com.google.guava:guava;33.1.0-jre com.h2database:h2;2.2.220 com.h3xstream.findsecbugs:findsecbugs-plugin;1.9.0 diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index 2d9802e7d0c5..f0dcf06f053d 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -603,7 +603,9 @@ com.google.code.findbugs:jsr305:[3.0.2] + org.apache.arrow:arrow-format:[18.1.0] + com.google.flatbuffers:flatbuffers-java:[24.3.25] org.apache.arrow:arrow-memory-core:[18.1.0] org.apache.arrow:arrow-memory-unsafe:[18.1.0] org.apache.arrow:arrow-vector:[18.1.0] diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 8584e0446245..1ef76b068a48 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -150,6 +150,14 @@ arrow-format 18.1.0 + + + com.google.flatbuffers + flatbuffers-java + 24.3.25 + org.apache.arrow arrow-vector From a4c6e682484afb00836a4dac28ccd55758e9ba59 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 22 Jun 2026 16:04:07 -0400 Subject: [PATCH 43/65] remove arrow-format for java 8 failures, vendor, create parity tests --- sdk/storage/azure-storage-blob/pom.xml | 18 +- .../util/BlobListArrowStreamReader.java | 52 +-- .../util/arrow/BodyCompression.java | 39 +++ .../implementation/util/arrow/Buffer.java | 54 ++++ .../implementation/util/arrow/Endianness.java | 18 ++ .../blob/implementation/util/arrow/Field.java | 99 ++++++ .../implementation/util/arrow/FieldNode.java | 54 ++++ .../blob/implementation/util/arrow/Int.java | 56 ++++ .../implementation/util/arrow/KeyValue.java | 56 ++++ .../implementation/util/arrow/Message.java | 90 ++++++ .../util/arrow/MessageHeader.java | 26 ++ .../util/arrow/RecordBatch.java | 130 ++++++++ .../implementation/util/arrow/Schema.java | 110 +++++++ .../implementation/util/arrow/TimeUnit.java | 34 ++ .../implementation/util/arrow/Timestamp.java | 46 +++ .../blob/implementation/util/arrow/Type.java | 84 +++++ .../util/arrow/package-info.java | 18 ++ .../src/main/java/module-info.java | 2 +- .../BlobListArrowAccessorParityTests.java | 298 ++++++++++++++++++ .../BlobListArrowFlatbufConstantsTest.java | 114 +++++++ ...obListArrowStreamReaderRejectionTests.java | 182 +++++++++++ 21 files changed, 1541 insertions(+), 39 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 1ef76b068a48..366652da5ae9 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -141,18 +141,12 @@ - - - org.apache.arrow - arrow-format - 18.1.0 - - + com.google.flatbuffers flatbuffers-java diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index d813c21b43a4..c1fb68b7c5ec 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -4,19 +4,19 @@ package com.azure.storage.blob.implementation.util; import com.azure.storage.blob.implementation.models.BlobListArrowParseException; -import org.apache.arrow.flatbuf.Buffer; -import org.apache.arrow.flatbuf.Endianness; -import org.apache.arrow.flatbuf.Field; -import org.apache.arrow.flatbuf.FieldNode; -import org.apache.arrow.flatbuf.Int; -import org.apache.arrow.flatbuf.KeyValue; -import org.apache.arrow.flatbuf.Message; -import org.apache.arrow.flatbuf.MessageHeader; -import org.apache.arrow.flatbuf.RecordBatch; -import org.apache.arrow.flatbuf.Schema; -import org.apache.arrow.flatbuf.TimeUnit; -import org.apache.arrow.flatbuf.Timestamp; -import org.apache.arrow.flatbuf.Type; +import com.azure.storage.blob.implementation.util.arrow.Buffer; +import com.azure.storage.blob.implementation.util.arrow.Endianness; +import com.azure.storage.blob.implementation.util.arrow.Field; +import com.azure.storage.blob.implementation.util.arrow.FieldNode; +import com.azure.storage.blob.implementation.util.arrow.Int; +import com.azure.storage.blob.implementation.util.arrow.KeyValue; +import com.azure.storage.blob.implementation.util.arrow.Message; +import com.azure.storage.blob.implementation.util.arrow.MessageHeader; +import com.azure.storage.blob.implementation.util.arrow.RecordBatch; +import com.azure.storage.blob.implementation.util.arrow.Schema; +import com.azure.storage.blob.implementation.util.arrow.TimeUnit; +import com.azure.storage.blob.implementation.util.arrow.Timestamp; +import com.azure.storage.blob.implementation.util.arrow.Type; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -153,19 +153,19 @@ static Parsed read(InputStream stream) { pos += (int) bodyLength; byte headerType = message.headerType(); - if (headerType == MessageHeader.Schema) { + if (headerType == MessageHeader.SCHEMA) { Schema schema = (Schema) message.header(new Schema()); if (schema == null) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: schema message header is missing."); } - if (schema.endianness() != Endianness.Little) { + if (schema.endianness() != Endianness.LITTLE) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: only little-endian streams are supported."); } schemaMetadata = readKeyValueMetadata(schema); fields = readFields(schema); - } else if (headerType == MessageHeader.RecordBatch) { + } else if (headerType == MessageHeader.RECORD_BATCH) { if (fields == null) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: record batch encountered before schema."); @@ -180,7 +180,7 @@ static Parsed read(InputStream stream) { "ListBlobs Arrow parse failure: compressed record batches are not supported."); } batches.add(buildBatch(fields, recordBatch, body, bodyStart)); - } else if (headerType == MessageHeader.DictionaryBatch) { + } else if (headerType == MessageHeader.DICTIONARY_BATCH) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: dictionary-encoded streams are not supported."); } @@ -208,34 +208,34 @@ private static Column buildColumn(ArrowField field, BatchCursor cursor) { int valueCount = (int) node.length(); switch (field.typeType) { - case Type.Utf8: - case Type.Binary: { + case Type.UTF8: + case Type.BINARY: { BufferRegion validity = cursor.nextBuffer(); BufferRegion offsets = cursor.nextBuffer(); BufferRegion data = cursor.nextBuffer(); return new StringColumn(valueCount, validity, offsets, data, cursor.body, cursor.bodyStart); } - case Type.Bool: { + case Type.BOOL: { BufferRegion validity = cursor.nextBuffer(); BufferRegion data = cursor.nextBuffer(); return new BoolColumn(valueCount, validity, data, cursor.body, cursor.bodyStart); } - case Type.Int: { + case Type.INT: { BufferRegion validity = cursor.nextBuffer(); BufferRegion data = cursor.nextBuffer(); return new IntColumn(valueCount, validity, data, field.bitWidth, field.signed, cursor.body, cursor.bodyStart); } - case Type.Timestamp: { + case Type.TIMESTAMP: { BufferRegion validity = cursor.nextBuffer(); BufferRegion data = cursor.nextBuffer(); return new TimestampColumn(valueCount, validity, data, cursor.body, cursor.bodyStart); } - case Type.Map: { + case Type.MAP: { BufferRegion validity = cursor.nextBuffer(); BufferRegion offsets = cursor.nextBuffer(); // Map has a single Struct child ("entries") with key and value children. @@ -251,7 +251,7 @@ private static Column buildColumn(ArrowField field, BatchCursor cursor) { (StringColumn) valueColumn, cursor.body, cursor.bodyStart); } - case Type.Struct_: { + case Type.STRUCT: { cursor.nextBuffer(); // struct validity buffer List children = new ArrayList<>(field.children.size()); for (ArrowField child : field.children) { @@ -280,13 +280,13 @@ private static ArrowField readField(Field field) { arrowField.name = field.name(); arrowField.typeType = field.typeType(); - if (arrowField.typeType == Type.Int) { + if (arrowField.typeType == Type.INT) { Int intType = (Int) field.type(new Int()); if (intType != null) { arrowField.bitWidth = intType.bitWidth(); arrowField.signed = intType.isSigned(); } - } else if (arrowField.typeType == Type.Timestamp) { + } else if (arrowField.typeType == Type.TIMESTAMP) { Timestamp timestamp = (Timestamp) field.type(new Timestamp()); if (timestamp != null && timestamp.unit() != TimeUnit.SECOND) { throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + arrowField.name diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java new file mode 100644 index 000000000000..1def5fa220bd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code BodyCompression} table. + *

+ * The ListBlobs reader only needs to detect the presence of this table to reject compressed record batches, so no + * fields are exposed. + */ +public final class BodyCompression extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public BodyCompression __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java new file mode 100644 index 000000000000..2fc6c28447ce --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Struct; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code Buffer} struct (offset/length of a buffer within a record batch body). + */ +public final class Buffer extends Struct { + /** + * Positions this accessor at the given struct offset. + * + * @param i the struct offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given struct offset. + * + * @param i the struct offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public Buffer __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the byte offset of the buffer relative to the start of the record batch body. + * + * @return the buffer offset. + */ + public long offset() { + return bb.getLong(bb_pos); + } + + /** + * Gets the length, in bytes, of the buffer. + * + * @return the buffer length. + */ + public long length() { + return bb.getLong(bb_pos + 8); + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java new file mode 100644 index 000000000000..91c30efe2edb --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +/** + * Values for the Arrow IPC {@code Endianness} enum. + */ +public final class Endianness { + private Endianness() { + } + + /** Little-endian byte order. */ + public static final short LITTLE = 0; + /** Big-endian byte order. */ + public static final short BIG = 1; +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java new file mode 100644 index 000000000000..f121785d16e1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code Field} table describing a single column. + */ +public final class Field extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public Field __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the field name. + * + * @return the field name, or {@code null} when absent. + */ + public String name() { + int o = __offset(4); + return o != 0 ? __string(o + bb_pos) : null; + } + + /** + * Gets the discriminator identifying the field's {@code type} union (see {@link Type}). + * + * @return the type union discriminator, or {@code 0} when absent. + */ + public byte typeType() { + int o = __offset(8); + return o != 0 ? bb.get(o + bb_pos) : 0; + } + + /** + * Resolves the {@code type} union value into the supplied accessor. + * + * @param obj the accessor to assign to the union value. + * @return the assigned accessor, or {@code null} when absent. + */ + public Table type(Table obj) { + int o = __offset(10); + return o != 0 ? __union(obj, o + bb_pos) : null; + } + + /** + * Gets the child field at the given index. + * + * @param j the child index. + * @return the child field accessor. + */ + public Field children(int j) { + return children(new Field(), j); + } + + /** + * Gets the child field at the given index into the supplied accessor. + * + * @param obj the accessor to assign. + * @param j the child index. + * @return the assigned accessor, or {@code null} when absent. + */ + public Field children(Field obj, int j) { + int o = __offset(14); + return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; + } + + /** + * Gets the number of child fields. + * + * @return the child field count. + */ + public int childrenLength() { + int o = __offset(14); + return o != 0 ? __vector_len(o) : 0; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java new file mode 100644 index 000000000000..bc44e0d0ccb6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Struct; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code FieldNode} struct (per-column metadata within a record batch). + */ +public final class FieldNode extends Struct { + /** + * Positions this accessor at the given struct offset. + * + * @param i the struct offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given struct offset. + * + * @param i the struct offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public FieldNode __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the number of value slots in the column. + * + * @return the value count. + */ + public long length() { + return bb.getLong(bb_pos); + } + + /** + * Gets the number of null value slots in the column. + * + * @return the null count. + */ + public long nullCount() { + return bb.getLong(bb_pos + 8); + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java new file mode 100644 index 000000000000..efbddb99e3ff --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code Int} type table. + */ +public final class Int extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public Int __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the bit width of the integer (8, 16, 32, or 64). + * + * @return the bit width, or {@code 0} when absent. + */ + public int bitWidth() { + int o = __offset(4); + return o != 0 ? bb.getInt(o + bb_pos) : 0; + } + + /** + * Gets whether the integer is signed. + * + * @return {@code true} if signed, otherwise {@code false}. + */ + public boolean isSigned() { + int o = __offset(6); + return o != 0 && 0 != bb.get(o + bb_pos); + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java new file mode 100644 index 000000000000..c70a275a3278 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code KeyValue} table (a single custom metadata entry). + */ +public final class KeyValue extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public KeyValue __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the metadata key. + * + * @return the key, or {@code null} when absent. + */ + public String key() { + int o = __offset(4); + return o != 0 ? __string(o + bb_pos) : null; + } + + /** + * Gets the metadata value. + * + * @return the value, or {@code null} when absent. + */ + public String value() { + int o = __offset(6); + return o != 0 ? __string(o + bb_pos) : null; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java new file mode 100644 index 000000000000..f68b14f57281 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * Accessor for the Arrow IPC {@code Message} table (root of every encapsulated IPC message). + */ +public final class Message extends Table { + /** + * Reads the {@code Message} located at the root offset of the supplied buffer. + * + * @param bb the little-endian buffer positioned at the start of the message. + * @return the {@code Message} accessor. + */ + public static Message getRootAsMessage(ByteBuffer bb) { + return getRootAsMessage(bb, new Message()); + } + + /** + * Reads the {@code Message} located at the root offset of the supplied buffer into {@code obj}. + * + * @param bb the buffer positioned at the start of the message. + * @param obj the accessor instance to assign. + * @return the assigned {@code Message} accessor. + */ + public static Message getRootAsMessage(ByteBuffer bb, Message obj) { + bb.order(ByteOrder.LITTLE_ENDIAN); + return obj.__assign(bb.getInt(bb.position()) + bb.position(), bb); + } + + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public Message __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the discriminator identifying the type of the {@code header} union (see {@link MessageHeader}). + * + * @return the header union type, or {@code 0} when absent. + */ + public byte headerType() { + int o = __offset(6); + return o != 0 ? bb.get(o + bb_pos) : 0; + } + + /** + * Resolves the {@code header} union value into the supplied accessor. + * + * @param obj the accessor to assign to the union value. + * @return the assigned accessor, or {@code null} when the header is absent. + */ + public Table header(Table obj) { + int o = __offset(8); + return o != 0 ? __union(obj, o + bb_pos) : null; + } + + /** + * Gets the length, in bytes, of the message body that follows the metadata. + * + * @return the body length, or {@code 0} when absent. + */ + public long bodyLength() { + int o = __offset(10); + return o != 0 ? bb.getLong(o + bb_pos) : 0L; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java new file mode 100644 index 000000000000..25e8c69da309 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +/** + * Discriminator values for the Arrow IPC {@code MessageHeader} union. + */ +public final class MessageHeader { + private MessageHeader() { + } + + /** No header. */ + public static final byte NONE = 0; + /** A {@link Schema} header. */ + public static final byte SCHEMA = 1; + /** A dictionary batch header. */ + public static final byte DICTIONARY_BATCH = 2; + /** A {@link RecordBatch} header. */ + public static final byte RECORD_BATCH = 3; + /** A tensor header. */ + public static final byte TENSOR = 4; + /** A sparse tensor header. */ + public static final byte SPARSE_TENSOR = 5; +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java new file mode 100644 index 000000000000..7afa0f3cde36 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code RecordBatch} table. + */ +public final class RecordBatch extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public RecordBatch __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the number of rows in the record batch. + * + * @return the row count, or {@code 0} when absent. + */ + public long length() { + int o = __offset(4); + return o != 0 ? bb.getLong(o + bb_pos) : 0L; + } + + /** + * Gets the field node at the given index. + * + * @param j the node index. + * @return the field node accessor. + */ + public FieldNode nodes(int j) { + return nodes(new FieldNode(), j); + } + + /** + * Gets the field node at the given index into the supplied accessor. + * + * @param obj the accessor to assign. + * @param j the node index. + * @return the assigned accessor, or {@code null} when absent. + */ + public FieldNode nodes(FieldNode obj, int j) { + int o = __offset(6); + return o != 0 ? obj.__assign(__vector(o) + j * 16, bb) : null; + } + + /** + * Gets the number of field nodes. + * + * @return the field node count. + */ + public int nodesLength() { + int o = __offset(6); + return o != 0 ? __vector_len(o) : 0; + } + + /** + * Gets the buffer region at the given index. + * + * @param j the buffer index. + * @return the buffer accessor. + */ + public Buffer buffers(int j) { + return buffers(new Buffer(), j); + } + + /** + * Gets the buffer region at the given index into the supplied accessor. + * + * @param obj the accessor to assign. + * @param j the buffer index. + * @return the assigned accessor, or {@code null} when absent. + */ + public Buffer buffers(Buffer obj, int j) { + int o = __offset(8); + return o != 0 ? obj.__assign(__vector(o) + j * 16, bb) : null; + } + + /** + * Gets the number of buffers. + * + * @return the buffer count. + */ + public int buffersLength() { + int o = __offset(8); + return o != 0 ? __vector_len(o) : 0; + } + + /** + * Gets the optional body compression descriptor. + * + * @return the body compression accessor, or {@code null} when the batch is uncompressed. + */ + public BodyCompression compression() { + return compression(new BodyCompression()); + } + + /** + * Gets the optional body compression descriptor into the supplied accessor. + * + * @param obj the accessor to assign. + * @return the assigned accessor, or {@code null} when the batch is uncompressed. + */ + public BodyCompression compression(BodyCompression obj) { + int o = __offset(10); + return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java new file mode 100644 index 000000000000..1990ea7d8556 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code Schema} table. + */ +public final class Schema extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public Schema __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the byte order of the schema's buffers (see {@link Endianness}). + * + * @return the endianness, or {@code 0} ({@link Endianness#LITTLE}) when absent. + */ + public short endianness() { + int o = __offset(4); + return o != 0 ? bb.getShort(o + bb_pos) : 0; + } + + /** + * Gets the field at the given index. + * + * @param j the field index. + * @return the field accessor. + */ + public Field fields(int j) { + return fields(new Field(), j); + } + + /** + * Gets the field at the given index into the supplied accessor. + * + * @param obj the accessor to assign. + * @param j the field index. + * @return the assigned accessor, or {@code null} when absent. + */ + public Field fields(Field obj, int j) { + int o = __offset(6); + return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; + } + + /** + * Gets the number of top-level fields in the schema. + * + * @return the field count. + */ + public int fieldsLength() { + int o = __offset(6); + return o != 0 ? __vector_len(o) : 0; + } + + /** + * Gets the custom metadata entry at the given index. + * + * @param j the entry index. + * @return the key/value accessor. + */ + public KeyValue customMetadata(int j) { + return customMetadata(new KeyValue(), j); + } + + /** + * Gets the custom metadata entry at the given index into the supplied accessor. + * + * @param obj the accessor to assign. + * @param j the entry index. + * @return the assigned accessor, or {@code null} when absent. + */ + public KeyValue customMetadata(KeyValue obj, int j) { + int o = __offset(8); + return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; + } + + /** + * Gets the number of custom metadata entries. + * + * @return the entry count. + */ + public int customMetadataLength() { + int o = __offset(8); + return o != 0 ? __vector_len(o) : 0; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java new file mode 100644 index 000000000000..347e85337f9b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +/** + * Values for the Arrow IPC {@code TimeUnit} enum. + */ +public final class TimeUnit { + private TimeUnit() { + } + + /** Second resolution. */ + public static final short SECOND = 0; + /** Millisecond resolution. */ + public static final short MILLISECOND = 1; + /** Microsecond resolution. */ + public static final short MICROSECOND = 2; + /** Nanosecond resolution. */ + public static final short NANOSECOND = 3; + + private static final String[] NAMES = { "SECOND", "MILLISECOND", "MICROSECOND", "NANOSECOND" }; + + /** + * Gets the canonical Arrow name for a {@code TimeUnit} value, for diagnostic messages. + * + * @param e the time unit value. + * @return the canonical Arrow time unit name. + */ + public static String name(int e) { + return NAMES[e]; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java new file mode 100644 index 000000000000..4be2b069813e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +import com.google.flatbuffers.Table; + +import java.nio.ByteBuffer; + +/** + * Accessor for the Arrow IPC {@code Timestamp} type table. + */ +public final class Timestamp extends Table { + /** + * Positions this accessor at the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + */ + public void __init(int i, ByteBuffer bb) { + __reset(i, bb); + } + + /** + * Assigns this accessor to the given table offset. + * + * @param i the table offset. + * @param bb the backing buffer. + * @return this accessor. + */ + public Timestamp __assign(int i, ByteBuffer bb) { + __init(i, bb); + return this; + } + + /** + * Gets the timestamp resolution (see {@link TimeUnit}). + * + * @return the time unit, or {@code 0} ({@link TimeUnit#SECOND}) when absent. + */ + public short unit() { + int o = __offset(4); + return o != 0 ? bb.getShort(o + bb_pos) : 0; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java new file mode 100644 index 000000000000..615d0d2ce1f5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util.arrow; + +/** + * Discriminator values for the Arrow IPC {@code Type} union, identifying a field's logical type. + */ +public final class Type { + private Type() { + } + + /** No type. */ + public static final byte NONE = 0; + /** Null type. */ + public static final byte NULL = 1; + /** Integer type (see {@link Int}). */ + public static final byte INT = 2; + /** Floating-point type. */ + public static final byte FLOATING_POINT = 3; + /** Variable-length binary type. */ + public static final byte BINARY = 4; + /** Variable-length UTF-8 string type. */ + public static final byte UTF8 = 5; + /** Boolean type. */ + public static final byte BOOL = 6; + /** Decimal type. */ + public static final byte DECIMAL = 7; + /** Date type. */ + public static final byte DATE = 8; + /** Time-of-day type. */ + public static final byte TIME = 9; + /** Timestamp type (see {@link Timestamp}). */ + public static final byte TIMESTAMP = 10; + /** Interval type. */ + public static final byte INTERVAL = 11; + /** List type. */ + public static final byte LIST = 12; + /** Struct type. */ + public static final byte STRUCT = 13; + /** Union type. */ + public static final byte UNION = 14; + /** Fixed-size binary type. */ + public static final byte FIXED_SIZE_BINARY = 15; + /** Fixed-size list type. */ + public static final byte FIXED_SIZE_LIST = 16; + /** Map type. */ + public static final byte MAP = 17; + /** Duration type. */ + public static final byte DURATION = 18; + /** Large variable-length binary type. */ + public static final byte LARGE_BINARY = 19; + /** Large variable-length UTF-8 string type. */ + public static final byte LARGE_UTF8 = 20; + /** Large list type. */ + public static final byte LARGE_LIST = 21; + /** Run-end encoded type. */ + public static final byte RUN_END_ENCODED = 22; + /** Binary view type. */ + public static final byte BINARY_VIEW = 23; + /** UTF-8 string view type. */ + public static final byte UTF8_VIEW = 24; + /** List view type. */ + public static final byte LIST_VIEW = 25; + /** Large list view type. */ + public static final byte LARGE_LIST_VIEW = 26; + + private static final String[] NAMES = { + "NONE", "Null", "Int", "FloatingPoint", "Binary", "Utf8", "Bool", "Decimal", "Date", "Time", "Timestamp", + "Interval", "List", "Struct_", "Union", "FixedSizeBinary", "FixedSizeList", "Map", "Duration", "LargeBinary", + "LargeUtf8", "LargeList", "RunEndEncoded", "BinaryView", "Utf8View", "ListView", "LargeListView" + }; + + /** + * Gets the canonical Arrow name for a {@code Type} union discriminator, for diagnostic messages. + * + * @param e the discriminator value. + * @return the canonical Arrow type name. + */ + public static String name(int e) { + return NAMES[e]; + } +} + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java new file mode 100644 index 000000000000..ce929799031f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Minimal Apache Arrow IPC FlatBuffer metadata accessors used internally by the Blob Storage ListBlobs Arrow reader. + *

+ * The classes in this package are thin {@link com.google.flatbuffers.Table}/{@link com.google.flatbuffers.Struct} + * accessors over the FlatBuffer-encoded metadata of the Apache Arrow IPC format. They expose only the small subset of + * the {@code org.apache.arrow.flatbuf} schema that {@code BlobListArrowStreamReader} requires, so that the main + * (Java 8 baseline) compile classpath does not depend on the {@code arrow-format} artifact, which ships Java 11 + * bytecode. + *

+ * The field orderings (FlatBuffer vtable slots) and enum values are defined by the public Apache Arrow columnar format + * specification (see {@code Schema.fbs} and {@code Message.fbs} in the Apache Arrow project, licensed under the Apache + * License, Version 2.0) and must match the on-the-wire layout produced by the Storage service. + */ +package com.azure.storage.blob.implementation.util.arrow; + diff --git a/sdk/storage/azure-storage-blob/src/main/java/module-info.java b/sdk/storage/azure-storage-blob/src/main/java/module-info.java index 7eae7cff59b4..e6947c9af0c4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/module-info.java @@ -5,7 +5,7 @@ requires transitive com.azure.storage.common; requires com.azure.storage.internal.avro; - requires org.apache.arrow.format; + requires flatbuffers.java; exports com.azure.storage.blob; exports com.azure.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java new file mode 100644 index 000000000000..a59a2e215723 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.util.arrow.Buffer; +import com.azure.storage.blob.implementation.util.arrow.Field; +import com.azure.storage.blob.implementation.util.arrow.Int; +import com.azure.storage.blob.implementation.util.arrow.KeyValue; +import com.azure.storage.blob.implementation.util.arrow.Message; +import com.azure.storage.blob.implementation.util.arrow.MessageHeader; +import com.azure.storage.blob.implementation.util.arrow.RecordBatch; +import com.azure.storage.blob.implementation.util.arrow.Schema; +import com.azure.storage.blob.implementation.util.arrow.Timestamp; +import com.azure.storage.blob.implementation.util.arrow.Type; +import org.apache.arrow.memory.BufferAllocator; +import org.apache.arrow.memory.RootAllocator; +import org.apache.arrow.vector.BigIntVector; +import org.apache.arrow.vector.BitVector; +import org.apache.arrow.vector.FieldVector; +import org.apache.arrow.vector.SmallIntVector; +import org.apache.arrow.vector.TimeStampSecVector; +import org.apache.arrow.vector.UInt1Vector; +import org.apache.arrow.vector.UInt4Vector; +import org.apache.arrow.vector.VarCharVector; +import org.apache.arrow.vector.VectorSchemaRoot; +import org.apache.arrow.vector.complex.MapVector; +import org.apache.arrow.vector.complex.impl.UnionMapWriter; +import org.apache.arrow.vector.ipc.ArrowStreamWriter; +import org.apache.arrow.vector.util.Text; +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Differential drift detector for the vendored Arrow FlatBuffer accessors. + *

+ * This test builds a real Arrow IPC stream with the official {@code arrow-vector} writer, then decodes the same bytes + * twice: once with Apache Arrow's own generated {@code org.apache.arrow.flatbuf.*} accessors (the upstream source of + * truth, available at test scope via {@code arrow-vector} → {@code arrow-format}) and once with the vendored + * accessors in {@code com.azure.storage.blob.implementation.util.arrow}. It asserts every accessor the ListBlobs reader + * relies on returns identical results from both implementations. + *

+ * Why this exists: the vendored accessors hardcode FlatBuffer vtable offsets and struct sizes taken + * from a specific Arrow schema revision. When the Arrow test dependency is upgraded (for example to 19.x), re-running + * this test re-validates the vendored copy against the new upstream: if Arrow renumbers a field, resizes a struct, or + * changes an accessor's semantics in a way that affects how ListBlobs payloads are parsed, this test fails and points + * at the exact accessor that diverged, so the vendored copy can be brought back in sync. A compatible upgrade that does + * not touch these structures leaves the test passing (no false positives). + */ +public class BlobListArrowAccessorParityTests { + + private static final int CONTINUATION_MARKER = 0xFFFFFFFF; + + @Test + public void vendoredAccessorsMatchArrowAccessors() throws Exception { + byte[] stream; + try (BufferAllocator allocator = new RootAllocator()) { + stream = buildRepresentativePayload(allocator); + } + + List messages = extractMessageMetadata(stream); + boolean sawSchema = false; + boolean sawRecordBatch = false; + + for (byte[] metadata : messages) { + org.apache.arrow.flatbuf.Message arrowMessage + = org.apache.arrow.flatbuf.Message.getRootAsMessage(littleEndian(metadata)); + Message vendoredMessage = Message.getRootAsMessage(littleEndian(metadata)); + + assertEquals(arrowMessage.headerType(), vendoredMessage.headerType(), "headerType"); + assertEquals(arrowMessage.bodyLength(), vendoredMessage.bodyLength(), "bodyLength"); + + if (vendoredMessage.headerType() == MessageHeader.SCHEMA) { + sawSchema = true; + org.apache.arrow.flatbuf.Schema arrowSchema + = (org.apache.arrow.flatbuf.Schema) arrowMessage.header(new org.apache.arrow.flatbuf.Schema()); + Schema vendoredSchema = (Schema) vendoredMessage.header(new Schema()); + assertNotNull(arrowSchema, "arrow schema header"); + assertNotNull(vendoredSchema, "vendored schema header"); + compareSchema(arrowSchema, vendoredSchema); + } else if (vendoredMessage.headerType() == MessageHeader.RECORD_BATCH) { + sawRecordBatch = true; + org.apache.arrow.flatbuf.RecordBatch arrowBatch = (org.apache.arrow.flatbuf.RecordBatch) arrowMessage + .header(new org.apache.arrow.flatbuf.RecordBatch()); + RecordBatch vendoredBatch = (RecordBatch) vendoredMessage.header(new RecordBatch()); + assertNotNull(arrowBatch, "arrow record batch header"); + assertNotNull(vendoredBatch, "vendored record batch header"); + compareRecordBatch(arrowBatch, vendoredBatch); + } + } + + assertTrue(sawSchema, "expected a Schema message in the stream"); + assertTrue(sawRecordBatch, "expected a RecordBatch message in the stream"); + } + + private static void compareSchema(org.apache.arrow.flatbuf.Schema arrow, Schema vendored) { + assertEquals(arrow.endianness(), vendored.endianness(), "schema.endianness"); + assertEquals(arrow.fieldsLength(), vendored.fieldsLength(), "schema.fieldsLength"); + for (int i = 0; i < arrow.fieldsLength(); i++) { + compareField(arrow.fields(i), vendored.fields(i)); + } + assertEquals(arrow.customMetadataLength(), vendored.customMetadataLength(), "schema.customMetadataLength"); + for (int i = 0; i < arrow.customMetadataLength(); i++) { + org.apache.arrow.flatbuf.KeyValue arrowKv = arrow.customMetadata(i); + KeyValue vendoredKv = vendored.customMetadata(i); + assertEquals(arrowKv.key(), vendoredKv.key(), "keyValue.key"); + assertEquals(arrowKv.value(), vendoredKv.value(), "keyValue.value"); + } + } + + private static void compareField(org.apache.arrow.flatbuf.Field arrow, Field vendored) { + assertEquals(arrow.name(), vendored.name(), "field.name"); + assertEquals(arrow.typeType(), vendored.typeType(), "field.typeType for " + vendored.name()); + assertEquals(arrow.childrenLength(), vendored.childrenLength(), "field.childrenLength for " + vendored.name()); + + if (vendored.typeType() == Type.INT) { + org.apache.arrow.flatbuf.Int arrowInt + = (org.apache.arrow.flatbuf.Int) arrow.type(new org.apache.arrow.flatbuf.Int()); + Int vendoredInt = (Int) vendored.type(new Int()); + assertNotNull(arrowInt, "arrow Int type for " + vendored.name()); + assertNotNull(vendoredInt, "vendored Int type for " + vendored.name()); + assertEquals(arrowInt.bitWidth(), vendoredInt.bitWidth(), "int.bitWidth for " + vendored.name()); + assertEquals(arrowInt.isSigned(), vendoredInt.isSigned(), "int.isSigned for " + vendored.name()); + } else if (vendored.typeType() == Type.TIMESTAMP) { + org.apache.arrow.flatbuf.Timestamp arrowTs + = (org.apache.arrow.flatbuf.Timestamp) arrow.type(new org.apache.arrow.flatbuf.Timestamp()); + Timestamp vendoredTs = (Timestamp) vendored.type(new Timestamp()); + assertNotNull(arrowTs, "arrow Timestamp type for " + vendored.name()); + assertNotNull(vendoredTs, "vendored Timestamp type for " + vendored.name()); + assertEquals(arrowTs.unit(), vendoredTs.unit(), "timestamp.unit for " + vendored.name()); + } + + for (int i = 0; i < arrow.childrenLength(); i++) { + compareField(arrow.children(i), vendored.children(i)); + } + } + + private static void compareRecordBatch(org.apache.arrow.flatbuf.RecordBatch arrow, RecordBatch vendored) { + assertEquals(arrow.length(), vendored.length(), "recordBatch.length"); + + assertEquals(arrow.nodesLength(), vendored.nodesLength(), "recordBatch.nodesLength"); + for (int i = 0; i < arrow.nodesLength(); i++) { + assertEquals(arrow.nodes(i).length(), vendored.nodes(i).length(), "fieldNode.length at " + i); + } + + assertEquals(arrow.buffersLength(), vendored.buffersLength(), "recordBatch.buffersLength"); + for (int i = 0; i < arrow.buffersLength(); i++) { + Buffer vendoredBuffer = vendored.buffers(i); + assertEquals(arrow.buffers(i).offset(), vendoredBuffer.offset(), "buffer.offset at " + i); + assertEquals(arrow.buffers(i).length(), vendoredBuffer.length(), "buffer.length at " + i); + } + + assertEquals(arrow.compression() == null, vendored.compression() == null, "recordBatch.compression presence"); + } + + // region helpers + + private static ByteBuffer littleEndian(byte[] metadata) { + return ByteBuffer.wrap(metadata).order(ByteOrder.LITTLE_ENDIAN); + } + + /** + * Splits an Arrow IPC stream into the metadata FlatBuffer of each encapsulated message, mirroring the framing the + * production reader performs (continuation marker + metadata length prefix, body skipped). + */ + private static List extractMessageMetadata(byte[] stream) { + List messages = new ArrayList<>(); + ByteBuffer buffer = ByteBuffer.wrap(stream).order(ByteOrder.LITTLE_ENDIAN); + int pos = 0; + int length = stream.length; + while (pos + 4 <= length) { + int marker = buffer.getInt(pos); + pos += 4; + + int metadataLength; + if (marker == CONTINUATION_MARKER) { + if (pos + 4 > length) { + break; + } + metadataLength = buffer.getInt(pos); + pos += 4; + } else { + metadataLength = marker; + } + + if (metadataLength == 0) { + break; + } + + byte[] metadata = new byte[metadataLength]; + System.arraycopy(stream, pos, metadata, 0, metadataLength); + messages.add(metadata); + pos += metadataLength; + + long bodyLength = Message.getRootAsMessage(littleEndian(metadata)).bodyLength(); + pos += (int) bodyLength; + } + return messages; + } + + /** + * Builds an Arrow IPC stream with a representative ListBlobs schema (string; signed and unsigned integers of + * several bit widths; boolean; second-precision timestamp; and a map<string,string> column) plus schema-level + * metadata, so the differential comparison exercises every vendored accessor — including {@code Int.bitWidth} + * / {@code Int.isSigned} across multiple widths and both signedness values, and the nested map → struct → + * key/value fields. + */ + private static byte[] buildRepresentativePayload(BufferAllocator allocator) throws Exception { + VarCharVector name = new VarCharVector("Name", allocator); + UInt1Vector uint8 = new UInt1Vector("U8", allocator); + SmallIntVector int16 = new SmallIntVector("I16", allocator); + UInt4Vector uint32 = new UInt4Vector("U32", allocator); + BigIntVector contentLength = new BigIntVector("Content-Length", allocator); + BitVector deleted = new BitVector("Deleted", allocator); + TimeStampSecVector creationTime = new TimeStampSecVector("Creation-Time", allocator); + MapVector metadata = MapVector.empty("Metadata", allocator, false); + + name.allocateNew(); + uint8.allocateNew(); + int16.allocateNew(); + uint32.allocateNew(); + contentLength.allocateNew(); + deleted.allocateNew(); + creationTime.allocateNew(); + + name.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); + uint8.setSafe(0, 200); + int16.setSafe(0, -5); + uint32.setSafe(0, 42); + contentLength.setSafe(0, 7L); + deleted.setSafe(0, 0); + creationTime.setSafe(0, 1000L); + + name.setValueCount(1); + uint8.setValueCount(1); + int16.setValueCount(1); + uint32.setValueCount(1); + contentLength.setValueCount(1); + deleted.setValueCount(1); + creationTime.setValueCount(1); + + UnionMapWriter mapWriter = metadata.getWriter(); + mapWriter.setPosition(0); + mapWriter.startMap(); + mapWriter.startEntry(); + mapWriter.key().varChar().writeVarChar(new Text("k1")); + mapWriter.value().varChar().writeVarChar(new Text("v1")); + mapWriter.endEntry(); + mapWriter.endMap(); + metadata.setValueCount(1); + + List vectors = new ArrayList<>(); + vectors.add(name); + vectors.add(uint8); + vectors.add(int16); + vectors.add(uint32); + vectors.add(contentLength); + vectors.add(deleted); + vectors.add(creationTime); + vectors.add(metadata); + + List fields = new ArrayList<>(); + for (FieldVector vector : vectors) { + fields.add(vector.getField()); + } + + Map schemaMetadata = new LinkedHashMap<>(); + schemaMetadata.put("NextMarker", "nextPage"); + schemaMetadata.put("NumberOfRecords", "1"); + org.apache.arrow.vector.types.pojo.Schema schema + = new org.apache.arrow.vector.types.pojo.Schema(fields, schemaMetadata); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + try (VectorSchemaRoot root = new VectorSchemaRoot(schema, vectors, 1); + ArrowStreamWriter writer = new ArrowStreamWriter(root, null, out)) { + writer.start(); + writer.writeBatch(); + writer.end(); + } + return out.toByteArray(); + } + + //endregion +} + + diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java new file mode 100644 index 000000000000..3ed329140545 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.util.arrow.Endianness; +import com.azure.storage.blob.implementation.util.arrow.MessageHeader; +import com.azure.storage.blob.implementation.util.arrow.TimeUnit; +import com.azure.storage.blob.implementation.util.arrow.Type; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Fidelity tests that pin the vendored Arrow FlatBuffer metadata constants + * (in {@code com.azure.storage.blob.implementation.util.arrow}) to the values defined by the official + * {@code org.apache.arrow.flatbuf} classes shipped in {@code arrow-format} (pulled in transitively at test scope via + * {@code arrow-vector}). + *

+ * {@link BlobListArrowStreamReaderTests} validates decoding behavior against payloads written by the real + * Arrow writer, but only exercises the enum values that a representative ListBlobs response happens to use. These tests + * close that gap by asserting every enum ordinal and name our reader relies on matches Apache Arrow exactly, + * including values that live on error/rejection paths (for example dictionary batches). If a future {@code arrow} + * version bump renumbers or extends one of these enums, these tests fail loudly so the vendored copy can be reviewed. + */ +public class BlobListArrowFlatbufConstantsTest { + + @Test + public void messageHeaderUnionMatchesArrow() { + assertEquals(org.apache.arrow.flatbuf.MessageHeader.NONE, MessageHeader.NONE); + assertEquals(org.apache.arrow.flatbuf.MessageHeader.Schema, MessageHeader.SCHEMA); + assertEquals(org.apache.arrow.flatbuf.MessageHeader.DictionaryBatch, MessageHeader.DICTIONARY_BATCH); + assertEquals(org.apache.arrow.flatbuf.MessageHeader.RecordBatch, MessageHeader.RECORD_BATCH); + assertEquals(org.apache.arrow.flatbuf.MessageHeader.Tensor, MessageHeader.TENSOR); + assertEquals(org.apache.arrow.flatbuf.MessageHeader.SparseTensor, MessageHeader.SPARSE_TENSOR); + } + + @Test + public void endiannessMatchesArrow() { + assertEquals(org.apache.arrow.flatbuf.Endianness.Little, Endianness.LITTLE); + assertEquals(org.apache.arrow.flatbuf.Endianness.Big, Endianness.BIG); + } + + @Test + public void timeUnitMatchesArrow() { + assertEquals(org.apache.arrow.flatbuf.TimeUnit.SECOND, TimeUnit.SECOND); + assertEquals(org.apache.arrow.flatbuf.TimeUnit.MILLISECOND, TimeUnit.MILLISECOND); + assertEquals(org.apache.arrow.flatbuf.TimeUnit.MICROSECOND, TimeUnit.MICROSECOND); + assertEquals(org.apache.arrow.flatbuf.TimeUnit.NANOSECOND, TimeUnit.NANOSECOND); + + // The vendored name table must match Arrow's, element-for-element and in length. + assertEquals(org.apache.arrow.flatbuf.TimeUnit.names.length, namesLength(TimeUnit::name), + "Arrow TimeUnit enum changed size; review the vendored TimeUnit."); + for (int i = 0; i < org.apache.arrow.flatbuf.TimeUnit.names.length; i++) { + assertEquals(org.apache.arrow.flatbuf.TimeUnit.name(i), TimeUnit.name(i), + "TimeUnit name mismatch at ordinal " + i); + } + } + + @Test + public void typeUnionOrdinalsMatchArrow() { + assertEquals(org.apache.arrow.flatbuf.Type.NONE, Type.NONE); + assertEquals(org.apache.arrow.flatbuf.Type.Null, Type.NULL); + assertEquals(org.apache.arrow.flatbuf.Type.Int, Type.INT); + assertEquals(org.apache.arrow.flatbuf.Type.FloatingPoint, Type.FLOATING_POINT); + assertEquals(org.apache.arrow.flatbuf.Type.Binary, Type.BINARY); + assertEquals(org.apache.arrow.flatbuf.Type.Utf8, Type.UTF8); + assertEquals(org.apache.arrow.flatbuf.Type.Bool, Type.BOOL); + assertEquals(org.apache.arrow.flatbuf.Type.Decimal, Type.DECIMAL); + assertEquals(org.apache.arrow.flatbuf.Type.Date, Type.DATE); + assertEquals(org.apache.arrow.flatbuf.Type.Time, Type.TIME); + assertEquals(org.apache.arrow.flatbuf.Type.Timestamp, Type.TIMESTAMP); + assertEquals(org.apache.arrow.flatbuf.Type.Interval, Type.INTERVAL); + assertEquals(org.apache.arrow.flatbuf.Type.List, Type.LIST); + assertEquals(org.apache.arrow.flatbuf.Type.Struct_, Type.STRUCT); + assertEquals(org.apache.arrow.flatbuf.Type.Union, Type.UNION); + assertEquals(org.apache.arrow.flatbuf.Type.FixedSizeBinary, Type.FIXED_SIZE_BINARY); + assertEquals(org.apache.arrow.flatbuf.Type.FixedSizeList, Type.FIXED_SIZE_LIST); + assertEquals(org.apache.arrow.flatbuf.Type.Map, Type.MAP); + assertEquals(org.apache.arrow.flatbuf.Type.Duration, Type.DURATION); + assertEquals(org.apache.arrow.flatbuf.Type.LargeBinary, Type.LARGE_BINARY); + assertEquals(org.apache.arrow.flatbuf.Type.LargeUtf8, Type.LARGE_UTF8); + assertEquals(org.apache.arrow.flatbuf.Type.LargeList, Type.LARGE_LIST); + assertEquals(org.apache.arrow.flatbuf.Type.RunEndEncoded, Type.RUN_END_ENCODED); + assertEquals(org.apache.arrow.flatbuf.Type.BinaryView, Type.BINARY_VIEW); + assertEquals(org.apache.arrow.flatbuf.Type.Utf8View, Type.UTF8_VIEW); + assertEquals(org.apache.arrow.flatbuf.Type.ListView, Type.LIST_VIEW); + assertEquals(org.apache.arrow.flatbuf.Type.LargeListView, Type.LARGE_LIST_VIEW); + } + + @Test + public void typeUnionNamesMatchArrow() { + // A length mismatch means Arrow added/removed a Type; the vendored Type (and reader's switch) must be reviewed. + assertEquals(org.apache.arrow.flatbuf.Type.names.length, namesLength(Type::name), + "Arrow Type enum changed size; review the vendored Type and the reader's type switch."); + for (int i = 0; i < org.apache.arrow.flatbuf.Type.names.length; i++) { + assertEquals(org.apache.arrow.flatbuf.Type.name(i), Type.name(i), "Type name mismatch at ordinal " + i); + } + } + + /** Counts a vendored name table's length by probing for its array bound. */ + private static int namesLength(java.util.function.IntFunction nameFn) { + int count = 0; + while (true) { + try { + nameFn.apply(count); + count++; + } catch (ArrayIndexOutOfBoundsException e) { + return count; + } + } + } +} + diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java new file mode 100644 index 000000000000..f91a9e56ab50 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.models.BlobListArrowParseException; +import org.apache.arrow.memory.BufferAllocator; +import org.apache.arrow.memory.RootAllocator; +import org.apache.arrow.vector.FieldVector; +import org.apache.arrow.vector.Float8Vector; +import org.apache.arrow.vector.TimeStampMilliVector; +import org.apache.arrow.vector.VarCharVector; +import org.apache.arrow.vector.VectorSchemaRoot; +import org.apache.arrow.vector.complex.MapVector; +import org.apache.arrow.vector.complex.impl.UnionMapWriter; +import org.apache.arrow.vector.dictionary.Dictionary; +import org.apache.arrow.vector.dictionary.DictionaryEncoder; +import org.apache.arrow.vector.dictionary.DictionaryProvider; +import org.apache.arrow.vector.ipc.ArrowStreamWriter; +import org.apache.arrow.vector.types.pojo.DictionaryEncoding; +import org.apache.arrow.vector.types.pojo.Field; +import org.apache.arrow.vector.util.Text; +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Parity tests for Arrow IPC content the ListBlobs reader intentionally rejects or treats as an error. Where possible + * the payloads are produced with the official {@code arrow-vector} writer (test scope) so the vendored reader's + * rejection paths are validated against genuine Arrow output rather than hand-crafted bytes. The remaining cases cover + * malformed/edge inputs that the writer cannot produce (null and empty streams). + *

+ * Behavioral parity for supported content lives in {@link BlobListArrowStreamReaderTests}; enum/ordinal + * fidelity lives in {@link BlobListArrowFlatbufConstantsTest}. + */ +public class BlobListArrowStreamReaderRejectionTests { + + @Test + public void rejectsNullStream() { + BlobListArrowParseException ex = assertThrows(BlobListArrowParseException.class, + () -> ArrowBlobListDeserializer.deserialize(null)); + assertTrue(ex.getMessage().contains("input stream is null"), "Unexpected message: " + ex.getMessage()); + } + + @Test + public void rejectsStreamWithNoSchema() { + assertRejected(new byte[0], "stream contained no schema"); + } + + @Test + public void rejectsDictionaryEncodedStreams() throws Exception { + byte[] payload; + try (BufferAllocator allocator = new RootAllocator()) { + payload = buildDictionaryEncodedPayload(allocator); + } + assertRejected(payload, "dictionary-encoded streams are not supported"); + } + + @Test + public void rejectsUnsupportedColumnType() throws Exception { + byte[] payload; + try (BufferAllocator allocator = new RootAllocator()) { + Float8Vector score = new Float8Vector("Score", allocator); + score.allocateNew(); + score.setSafe(0, 1.5); + score.setValueCount(1); + payload = writeBatch(allocator, Collections.singletonList(score), 1); + } + assertRejected(payload, "unsupported Arrow type 'FloatingPoint'"); + } + + @Test + public void rejectsUnsupportedTimestampUnit() throws Exception { + byte[] payload; + try (BufferAllocator allocator = new RootAllocator()) { + TimeStampMilliVector creationTime = new TimeStampMilliVector("Creation-Time", allocator); + creationTime.allocateNew(); + creationTime.setSafe(0, 1000L); + creationTime.setValueCount(1); + payload = writeBatch(allocator, Collections.singletonList(creationTime), 1); + } + assertRejected(payload, "unsupported timestamp unit 'MILLISECOND'"); + } + + @Test + public void rejectsMapWithNonStringValues() throws Exception { + byte[] payload; + try (BufferAllocator allocator = new RootAllocator()) { + MapVector metadata = MapVector.empty("Metadata", allocator, false); + UnionMapWriter mapWriter = metadata.getWriter(); + mapWriter.setPosition(0); + mapWriter.startMap(); + mapWriter.startEntry(); + mapWriter.key().varChar().writeVarChar(new Text("k1")); + mapWriter.value().bigInt().writeBigInt(42L); + mapWriter.endEntry(); + mapWriter.endMap(); + metadata.setValueCount(1); + payload = writeBatch(allocator, Collections.singletonList(metadata), 1); + } + assertRejected(payload, "map entries must be string keys and values"); + } + + // region helpers + + private static void assertRejected(byte[] payload, String expectedMessageFragment) { + InputStream stream = new ByteArrayInputStream(payload); + BlobListArrowParseException ex + = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(stream)); + assertTrue(ex.getMessage().contains(expectedMessageFragment), "Unexpected message: " + ex.getMessage()); + } + + /** + * Writes a single-batch Arrow IPC stream from the supplied vectors. The vectors are owned by (and closed with) the + * returned {@link VectorSchemaRoot}. + */ + private static byte[] writeBatch(BufferAllocator allocator, List vectors, int rowCount) + throws Exception { + List fields = new ArrayList<>(vectors.size()); + for (FieldVector vector : vectors) { + fields.add(vector.getField()); + } + ByteArrayOutputStream out = new ByteArrayOutputStream(); + try (VectorSchemaRoot root = new VectorSchemaRoot(fields, vectors, rowCount); + ArrowStreamWriter writer = new ArrowStreamWriter(root, null, out)) { + writer.start(); + writer.writeBatch(); + writer.end(); + } + return out.toByteArray(); + } + + /** + * Builds an Arrow IPC stream whose single column is dictionary-encoded, which forces the official writer to emit a + * {@code DictionaryBatch} message ahead of the record batch. + */ + private static byte[] buildDictionaryEncodedPayload(BufferAllocator allocator) throws Exception { + VarCharVector dictVector = new VarCharVector("Name-dict", allocator); + VarCharVector name = new VarCharVector("Name", allocator); + try { + dictVector.allocateNew(); + dictVector.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); + dictVector.setSafe(1, "blob2".getBytes(StandardCharsets.UTF_8)); + dictVector.setValueCount(2); + Dictionary dictionary = new Dictionary(dictVector, new DictionaryEncoding(1L, false, null)); + + name.allocateNew(); + name.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); + name.setSafe(1, "blob2".getBytes(StandardCharsets.UTF_8)); + name.setValueCount(2); + + DictionaryProvider.MapDictionaryProvider provider = new DictionaryProvider.MapDictionaryProvider(); + provider.put(dictionary); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + FieldVector encoded = (FieldVector) DictionaryEncoder.encode(name, dictionary); + try (VectorSchemaRoot root = new VectorSchemaRoot(Collections.singletonList(encoded.getField()), + Collections.singletonList(encoded), 2); + ArrowStreamWriter writer = new ArrowStreamWriter(root, provider, out)) { + writer.start(); + writer.writeBatch(); + writer.end(); + } + return out.toByteArray(); + } finally { + name.close(); + dictVector.close(); + } + } + + //endregion +} + From 3e983b5fd84cb6fcf407c66fc7ec9c973c730d74 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 22 Jun 2026 16:47:53 -0400 Subject: [PATCH 44/65] add dependency exclusion for tests that require arrow deps that cause java 8 deprecation warning --- sdk/storage/azure-storage-blob/pom.xml | 34 +++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 366652da5ae9..ab5c87cc4033 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -63,6 +63,34 @@ false + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + base-testCompile + + + **/BlobListArrowAccessorParityTests.java + **/BlobListArrowFlatbufConstantsTest.java + + + + + + + + com.azure @@ -155,19 +183,19 @@ org.apache.arrow arrow-vector - 18.1.0 + 19.0.0 test org.apache.arrow arrow-memory-core - 18.1.0 + 19.0.0 test org.apache.arrow arrow-memory-unsafe - 18.1.0 + 19.0.0 test From d5077f854fbfd486d6bfd9b6698e5c1035691514 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 22 Jun 2026 16:59:56 -0400 Subject: [PATCH 45/65] update dependency exclusion so that it works --- sdk/storage/azure-storage-blob/pom.xml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index ab5c87cc4033..0ef775b9e206 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -65,14 +65,15 @@ - + org.apache.maven.plugins maven-compiler-plugin @@ -80,10 +81,7 @@ base-testCompile - - **/BlobListArrowAccessorParityTests.java - **/BlobListArrowFlatbufConstantsTest.java - + false From d06b731adec1436d0e13bb5ad378481fa7dbb07f Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 23 Jun 2026 11:21:38 -0400 Subject: [PATCH 46/65] bump arrow deps to 19.0 for tests --- eng/versioning/external_dependencies.txt | 8 ++++---- sdk/parents/azure-client-sdk-parent/pom.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 6a476715a635..b61266979bce 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -163,10 +163,10 @@ commons-io:commons-io;2.17.0 net.java.dev.jna:jna-platform;5.17.0 net.oneandone.reflections8:reflections8;0.11.7 net.jonathangiles.tools:dependencyChecker-maven-plugin;1.0.6 -org.apache.arrow:arrow-format;18.1.0 -org.apache.arrow:arrow-memory-core;18.1.0 -org.apache.arrow:arrow-memory-unsafe;18.1.0 -org.apache.arrow:arrow-vector;18.1.0 +org.apache.arrow:arrow-format;19.0.0 +org.apache.arrow:arrow-memory-core;19.0.0 +org.apache.arrow:arrow-memory-unsafe;19.0.0 +org.apache.arrow:arrow-vector;19.0.0 org.apache.commons:commons-collections4;4.4 org.apache.commons:commons-text;1.10.0 org.apache.maven:maven-plugin-api;3.9.11 diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index f0dcf06f053d..b4699f77c890 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -604,11 +604,11 @@ com.google.code.findbugs:jsr305:[3.0.2] - org.apache.arrow:arrow-format:[18.1.0] + org.apache.arrow:arrow-format:[19.0.0] com.google.flatbuffers:flatbuffers-java:[24.3.25] - org.apache.arrow:arrow-memory-core:[18.1.0] - org.apache.arrow:arrow-memory-unsafe:[18.1.0] - org.apache.arrow:arrow-vector:[18.1.0] + org.apache.arrow:arrow-memory-core:[19.0.0] + org.apache.arrow:arrow-memory-unsafe:[19.0.0] + org.apache.arrow:arrow-vector:[19.0.0] org.checkerframework:checker-qual:[3.42.0] From b506f903add8b556d0a5c102f2fb95976f25bf6a Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 23 Jun 2026 12:05:55 -0400 Subject: [PATCH 47/65] remove arrow deps from banndedDeps includes block --- sdk/parents/azure-client-sdk-parent/pom.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index b4699f77c890..8791704f0585 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -603,13 +603,12 @@ com.google.code.findbugs:jsr305:[3.0.2] - - org.apache.arrow:arrow-format:[19.0.0] + com.google.flatbuffers:flatbuffers-java:[24.3.25] - org.apache.arrow:arrow-memory-core:[19.0.0] - org.apache.arrow:arrow-memory-unsafe:[19.0.0] - org.apache.arrow:arrow-vector:[19.0.0] - org.checkerframework:checker-qual:[3.42.0] From 2a8853debd468179ff984b29990dc095c23889ef Mon Sep 17 00:00:00 2001 From: browndav Date: Tue, 23 Jun 2026 12:19:59 -0400 Subject: [PATCH 48/65] update comments in blob pom.xml to explicitly state workaround for base java version --- sdk/storage/azure-storage-blob/pom.xml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 0ef775b9e206..50a94288934c 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -65,20 +65,16 @@ - + org.apache.maven.plugins maven-compiler-plugin + base-testCompile false From 50e3eebc1eb8939a772bacb72bf971a26b3516b7 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 25 Jun 2026 11:49:35 -0400 Subject: [PATCH 49/65] remove unnecessary arrow parity tests, add remaining parity tests to excludes for java 8 in pom --- sdk/storage/azure-storage-blob/pom.xml | 15 +- .../util/ArrowBlobListDeserializerTests.java | 34 ---- ...obListArrowStreamReaderRejectionTests.java | 3 +- .../util/BlobListArrowStreamReaderTests.java | 184 ------------------ 4 files changed, 12 insertions(+), 224 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java delete mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 5d94fb7059b5..e5a603c3d758 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -65,10 +65,13 @@ - + org.apache.maven.plugins maven-compiler-plugin @@ -78,6 +81,10 @@ base-testCompile false + + **/implementation/util/BlobListArrowAccessorParityTests.java + **/implementation/util/BlobListArrowStreamReaderRejectionTests.java + diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java deleted file mode 100644 index e23bf2cbfae0..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.implementation.util; - -import com.azure.storage.blob.implementation.models.BlobListArrowParseException; -import org.junit.jupiter.api.Test; - -import java.io.ByteArrayInputStream; -import java.nio.charset.StandardCharsets; - -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class ArrowBlobListDeserializerTests { - @Test - public void parseNullStreamFailsFast() { - BlobListArrowParseException exception - = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(null)); - - assertTrue(exception.getMessage().startsWith("ListBlobs Arrow parse failure:")); - } - - @Test - public void parseInvalidPayloadFailsFast() { - ByteArrayInputStream invalidPayload - = new ByteArrayInputStream("not-an-arrow-stream".getBytes(StandardCharsets.UTF_8)); - - BlobListArrowParseException exception = assertThrows(BlobListArrowParseException.class, - () -> ArrowBlobListDeserializer.deserialize(invalidPayload)); - - assertTrue(exception.getMessage().startsWith("ListBlobs Arrow parse failure:")); - } -} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java index f91a9e56ab50..1462073b44f7 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java @@ -39,8 +39,7 @@ * rejection paths are validated against genuine Arrow output rather than hand-crafted bytes. The remaining cases cover * malformed/edge inputs that the writer cannot produce (null and empty streams). *

- * Behavioral parity for supported content lives in {@link BlobListArrowStreamReaderTests}; enum/ordinal - * fidelity lives in {@link BlobListArrowFlatbufConstantsTest}. + * Fidelity parity lives in {@link BlobListArrowFlatbufConstantsTest}. */ public class BlobListArrowStreamReaderRejectionTests { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java deleted file mode 100644 index b03027eeb841..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderTests.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.implementation.util; - -import com.azure.storage.blob.implementation.models.BlobItemInternal; -import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.vector.BigIntVector; -import org.apache.arrow.vector.BitVector; -import org.apache.arrow.vector.FieldVector; -import org.apache.arrow.vector.TimeStampSecVector; -import org.apache.arrow.vector.VarCharVector; -import org.apache.arrow.vector.VectorSchemaRoot; -import org.apache.arrow.vector.complex.MapVector; -import org.apache.arrow.vector.complex.impl.UnionMapWriter; -import org.apache.arrow.vector.ipc.ArrowStreamWriter; -import org.apache.arrow.vector.types.pojo.Field; -import org.apache.arrow.vector.types.pojo.Schema; -import org.apache.arrow.vector.util.Text; -import org.junit.jupiter.api.Test; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Parity tests that build a real Arrow IPC payload with the official {@code arrow-vector} writer and validate that the - * internal {@link BlobListArrowStreamReader} / {@link ArrowBlobListDeserializer} decode it identically. This proves the - * custom reader has the same implementation as the Apache Arrow parser - */ -public class BlobListArrowStreamReaderTests { - - @Test - public void parsesRealArrowPayload() throws Exception { - byte[] payload; - try (BufferAllocator allocator = new RootAllocator()) { - payload = buildPayload(allocator); - } - - ArrowBlobListDeserializer.ArrowListBlobsResult result - = ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(payload)); - - // Schema metadata - assertEquals("nextPage", result.getNextMarker()); - assertEquals(Integer.valueOf(2), result.getNumberOfRecords()); - - // Two rows: one blob, one prefix - List items = result.getBlobItems(); - assertEquals(2, items.size()); - - BlobItemInternal blob = items.get(0); - assertNotNull(blob.getName()); - assertEquals("blob1", blob.getName().getContent()); - assertNull(blob.isPrefix()); - assertEquals(Boolean.FALSE, blob.isDeleted()); - assertNotNull(blob.getProperties()); - assertEquals(7L, (long) blob.getProperties().getContentLength()); - assertEquals("application/octet-stream", blob.getProperties().getContentType()); - assertNotNull(blob.getProperties().getCreationTime()); - assertEquals(1000L, blob.getProperties().getCreationTime().toEpochSecond()); - - Map metadata = blob.getMetadata(); - assertNotNull(metadata); - assertEquals("v1", metadata.get("k1")); - assertEquals("v2", metadata.get("k2")); - - BlobItemInternal prefix = items.get(1); - assertNotNull(prefix.getName()); - assertEquals("dir/", prefix.getName().getContent()); - assertTrue(prefix.isPrefix()); - } - - @Test - public void parsesEmptyMetadataAsNull() throws Exception { - byte[] payload; - try (BufferAllocator allocator = new RootAllocator()) { - payload = buildPayload(allocator); - } - - ArrowBlobListDeserializer.ArrowListBlobsResult result - = ArrowBlobListDeserializer.deserialize(new ByteArrayInputStream(payload)); - // Row 1 (prefix) had no metadata entries; ensure prefix path doesn't surface an (empty) metadata map. - assertNull(result.getBlobItems().get(1).getMetadata()); - assertFalse(result.getBlobItems().isEmpty()); - } - - /** - * Builds an Arrow IPC stream with a representative ListBlobs schema: string, integer, boolean, second-precision - * timestamp, content-type string and a map<string,string> metadata column, plus schema-level NextMarker and - * NumberOfRecords metadata. - */ - private static byte[] buildPayload(BufferAllocator allocator) throws Exception { - VarCharVector name = new VarCharVector("Name", allocator); - VarCharVector resourceType = new VarCharVector("ResourceType", allocator); - BigIntVector contentLength = new BigIntVector("Content-Length", allocator); - VarCharVector contentType = new VarCharVector("Content-Type", allocator); - BitVector deleted = new BitVector("Deleted", allocator); - TimeStampSecVector creationTime = new TimeStampSecVector("Creation-Time", allocator); - MapVector metadata = MapVector.empty("Metadata", allocator, false); - - name.allocateNew(); - resourceType.allocateNew(); - contentLength.allocateNew(); - contentType.allocateNew(); - deleted.allocateNew(); - creationTime.allocateNew(); - - // Row 0: a real blob. - name.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); - // resourceType[0] left null -> not a prefix. - contentLength.setSafe(0, 7L); - contentType.setSafe(0, "application/octet-stream".getBytes(StandardCharsets.UTF_8)); - deleted.setSafe(0, 0); - creationTime.setSafe(0, 1000L); - - // Row 1: a virtual directory (prefix). - name.setSafe(1, "dir/".getBytes(StandardCharsets.UTF_8)); - resourceType.setSafe(1, "blobprefix".getBytes(StandardCharsets.UTF_8)); - // remaining columns null for the prefix row. - - name.setValueCount(2); - resourceType.setValueCount(2); - contentLength.setValueCount(2); - contentType.setValueCount(2); - deleted.setValueCount(2); - creationTime.setValueCount(2); - - UnionMapWriter mapWriter = metadata.getWriter(); - mapWriter.setPosition(0); - mapWriter.startMap(); - writeEntry(mapWriter, "k1", "v1"); - writeEntry(mapWriter, "k2", "v2"); - mapWriter.endMap(); - // Row 1 metadata left null. - metadata.setValueCount(2); - - List vectors = new ArrayList<>(); - vectors.add(name); - vectors.add(resourceType); - vectors.add(contentLength); - vectors.add(contentType); - vectors.add(deleted); - vectors.add(creationTime); - vectors.add(metadata); - - List fields = new ArrayList<>(); - for (FieldVector vector : vectors) { - fields.add(vector.getField()); - } - - Map schemaMetadata = new LinkedHashMap<>(); - schemaMetadata.put("NextMarker", "nextPage"); - schemaMetadata.put("NumberOfRecords", "2"); - Schema schema = new Schema(fields, schemaMetadata); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - try (VectorSchemaRoot root = new VectorSchemaRoot(schema, vectors, 2); - ArrowStreamWriter writer = new ArrowStreamWriter(root, null, out)) { - writer.start(); - writer.writeBatch(); - writer.end(); - } - - return out.toByteArray(); - } - - private static void writeEntry(UnionMapWriter mapWriter, String key, String value) { - mapWriter.startEntry(); - mapWriter.key().varChar().writeVarChar(new Text(key)); - mapWriter.value().varChar().writeVarChar(new Text(value)); - mapWriter.endEntry(); - } -} From 2ec403b3895ed287c63869e9ed6ef301cd42f69b Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 25 Jun 2026 17:18:49 -0400 Subject: [PATCH 50/65] lint files in arrow package --- .../storage/blob/implementation/util/arrow/BodyCompression.java | 1 - .../com/azure/storage/blob/implementation/util/arrow/Buffer.java | 1 - .../azure/storage/blob/implementation/util/arrow/Endianness.java | 1 - .../com/azure/storage/blob/implementation/util/arrow/Field.java | 1 - .../azure/storage/blob/implementation/util/arrow/FieldNode.java | 1 - .../com/azure/storage/blob/implementation/util/arrow/Int.java | 1 - .../azure/storage/blob/implementation/util/arrow/KeyValue.java | 1 - .../azure/storage/blob/implementation/util/arrow/Message.java | 1 - .../storage/blob/implementation/util/arrow/MessageHeader.java | 1 - .../storage/blob/implementation/util/arrow/RecordBatch.java | 1 - .../com/azure/storage/blob/implementation/util/arrow/Schema.java | 1 - .../azure/storage/blob/implementation/util/arrow/TimeUnit.java | 1 - .../azure/storage/blob/implementation/util/arrow/Timestamp.java | 1 - .../storage/blob/implementation/util/arrow/package-info.java | 1 - 14 files changed, 14 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java index 1def5fa220bd..405076a1d5d1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java @@ -36,4 +36,3 @@ public BodyCompression __assign(int i, ByteBuffer bb) { return this; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java index 2fc6c28447ce..af0b726b850a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java @@ -51,4 +51,3 @@ public long length() { return bb.getLong(bb_pos + 8); } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java index 91c30efe2edb..a78fa5073ebc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java @@ -15,4 +15,3 @@ private Endianness() { /** Big-endian byte order. */ public static final short BIG = 1; } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java index f121785d16e1..4f45fe9d72ca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java @@ -96,4 +96,3 @@ public int childrenLength() { return o != 0 ? __vector_len(o) : 0; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java index bc44e0d0ccb6..53dbd61568f5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java @@ -51,4 +51,3 @@ public long nullCount() { return bb.getLong(bb_pos + 8); } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java index efbddb99e3ff..c488e4fef797 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java @@ -53,4 +53,3 @@ public boolean isSigned() { return o != 0 && 0 != bb.get(o + bb_pos); } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java index c70a275a3278..e7a2474311cd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java @@ -53,4 +53,3 @@ public String value() { return o != 0 ? __string(o + bb_pos) : null; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java index f68b14f57281..8a052c6c0f0a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java @@ -87,4 +87,3 @@ public long bodyLength() { return o != 0 ? bb.getLong(o + bb_pos) : 0L; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java index 25e8c69da309..4071fbac43b5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java @@ -23,4 +23,3 @@ private MessageHeader() { /** A sparse tensor header. */ public static final byte SPARSE_TENSOR = 5; } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java index 7afa0f3cde36..97007c1fb7d7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java @@ -127,4 +127,3 @@ public BodyCompression compression(BodyCompression obj) { return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java index 1990ea7d8556..042dd9b491fa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java @@ -107,4 +107,3 @@ public int customMetadataLength() { return o != 0 ? __vector_len(o) : 0; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java index 347e85337f9b..9eefa9e55904 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java @@ -31,4 +31,3 @@ public static String name(int e) { return NAMES[e]; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java index 4be2b069813e..7f1c92eed98f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java @@ -43,4 +43,3 @@ public short unit() { return o != 0 ? bb.getShort(o + bb_pos) : 0; } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java index ce929799031f..cf349c6ed350 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java @@ -15,4 +15,3 @@ * License, Version 2.0) and must match the on-the-wire layout produced by the Storage service. */ package com.azure.storage.blob.implementation.util.arrow; - From ac2eb80809079c516df2328bf3426e2729336f24 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 25 Jun 2026 21:27:47 -0400 Subject: [PATCH 51/65] add arrow golden decode tests and rejection tests, add test for all known columns --- eng/versioning/external_dependencies.txt | 5 - sdk/parents/azure-client-sdk-parent/pom.xml | 7 +- sdk/storage/azure-storage-blob/pom.xml | 64 +--- .../util/ArrowBlobListDeserializer.java | 195 +++++++----- .../util/BlobListArrowStreamReader.java | 8 +- .../blob/implementation/util/arrow/Type.java | 32 +- .../azure/storage/blob/ContainerApiTests.java | 6 - .../BlobListArrowAccessorParityTests.java | 298 ------------------ .../BlobListArrowFlatbufConstantsTest.java | 114 ------- .../util/BlobListArrowGoldenDecodeTests.java | 148 +++++++++ ...obListArrowStreamReaderRejectionTests.java | 172 +++------- .../src/test/resources/arrow/README.md | 26 ++ .../resources/arrow/allcolumns.arrow.base64 | 1 + .../arrow/reject-dictionary.arrow.base64 | 1 + .../resources/arrow/reject-float.arrow.base64 | 1 + .../arrow/reject-map-nonstring.arrow.base64 | 1 + .../arrow/reject-timestamp-milli.arrow.base64 | 1 + .../arrow/reject-unknown-column.arrow.base64 | 1 + .../arrow/representative.arrow.base64 | 1 + 19 files changed, 380 insertions(+), 702 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java delete mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/allcolumns.arrow.base64 create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-dictionary.arrow.base64 create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-float.arrow.base64 create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-map-nonstring.arrow.base64 create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-timestamp-milli.arrow.base64 create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-unknown-column.arrow.base64 create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/arrow/representative.arrow.base64 diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 22d2fcf2dd17..f46ba3118d01 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -163,10 +163,6 @@ commons-io:commons-io;2.17.0 net.java.dev.jna:jna-platform;5.17.0 net.oneandone.reflections8:reflections8;0.11.7 net.jonathangiles.tools:dependencyChecker-maven-plugin;1.0.6 -org.apache.arrow:arrow-format;19.0.0 -org.apache.arrow:arrow-memory-core;19.0.0 -org.apache.arrow:arrow-memory-unsafe;19.0.0 -org.apache.arrow:arrow-vector;19.0.0 org.apache.commons:commons-collections4;4.4 org.apache.commons:commons-text;1.10.0 org.apache.maven:maven-plugin-api;3.9.11 @@ -191,7 +187,6 @@ org.apache.maven.plugins:maven-shade-plugin;3.6.0 org.apache.maven.plugins:maven-site-plugin;3.21.0 org.apache.maven.plugins:maven-source-plugin;3.3.1 org.apache.maven.plugins:maven-surefire-plugin;3.5.3 -org.checkerframework:checker-qual;3.42.0 org.codehaus.mojo:animal-sniffer-maven-plugin;1.24 org.codehaus.mojo:build-helper-maven-plugin;3.6.1 org.codehaus.mojo:exec-maven-plugin;3.5.1 diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index 14c21d9be22f..2079dbfd3b53 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -603,11 +603,8 @@ com.google.code.findbugs:jsr305:[3.0.2] - + com.google.flatbuffers:flatbuffers-java:[24.3.25] diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index e5a603c3d758..4b9d9ac6cb4a 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -56,42 +56,12 @@ --add-reads com.azure.storage.blob=com.azure.core.http.okhttp --add-reads com.azure.storage.blob=com.azure.core.http.jdk.httpclient --add-reads com.azure.storage.blob=com.azure.core.http.vertx - --add-opens java.base/java.nio=ALL-UNNAMED concurrent false - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - base-testCompile - - false - - **/implementation/util/BlobListArrowAccessorParityTests.java - **/implementation/util/BlobListArrowStreamReaderRejectionTests.java - - - - - - - - com.azure @@ -169,42 +139,18 @@ test - + + dependency needed to parse the Arrow format. The arrow-format artifact is deliberately NOT a dependency: it + ships Java 11 bytecode and would break the Java 8 baseline build. The reader's behavior is validated against + committed golden base64 fixtures (src/test/resources/arrow) rather than the official arrow-vector writer, so no + Apache Arrow test dependency is required. --> com.google.flatbuffers flatbuffers-java 24.3.25 - - org.apache.arrow - arrow-vector - 19.0.0 - test - - - org.apache.arrow - arrow-memory-core - 19.0.0 - test - - - org.apache.arrow - arrow-memory-unsafe - 19.0.0 - test - - - org.checkerframework - checker-qual - 3.42.0 - test - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 58f661a81b14..95fe3c7110b8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -30,9 +30,13 @@ import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.util.ArrayList; +import java.util.Arrays; import java.util.Base64; +import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; /** * Deserializes an Apache Arrow IPC stream from the ListBlobs response into a list of {@link BlobItemInternal} objects. @@ -40,49 +44,33 @@ public final class ArrowBlobListDeserializer { /** - * Result of deserializing an Arrow ListBlobs response. + * The authoritative set of Arrow column names this deserializer knows how to read. It must mirror exactly the + * field names requested by {@link #readRow(Batch, int)}; the {@code alltypes} golden fixture drift-guard test + * asserts they stay in sync. Any column present in the response schema but absent from this set means the service + * has emitted a field this SDK version does not understand, which {@link #validateKnownColumns(Batch)} rejects. */ - public static final class ArrowListBlobsResult { - private final List blobItems; - private final String nextMarker; - private final Integer numberOfRecords; + private static final Set KNOWN_COLUMNS = Collections.unmodifiableSet(new HashSet<>( + Arrays.asList("Name", "ResourceType", "Deleted", "Snapshot", "VersionId", "IsCurrentVersion", "HasVersionsOnly", + "Metadata", "OrMetadata", "Tags", "Creation-Time", "Last-Modified", "Etag", "Content-Length", + "Content-Type", "Content-Encoding", "Content-Language", "Content-Disposition", "Cache-Control", + "Content-MD5", "BlobType", "AccessTier", "AccessTierInferred", "AccessTierChangeTime", "SmartAccessTier", + "LeaseStatus", "LeaseState", "LeaseDuration", "ServerEncrypted", "CustomerProvidedKeySha256", + "EncryptionScope", "IncrementalCopy", "CopyId", "CopyStatus", "CopySource", "CopyProgress", + "CopyCompletionTime", "CopyStatusDescription", "CopyDestinationSnapshot", "x-ms-blob-sequence-number", + "Sealed", "LegalHold", "DeletedTime", "LastAccessTime", "ImmutabilityPolicyUntilDate", + "ImmutabilityPolicyMode", "ArchiveStatus", "RehydratePriority", "TagCount", "RemainingRetentionDays"))); - /** - * Creates an ArrowListBlobsResult. - * - * @param blobItems the deserialized blob items - * @param nextMarker the continuation token for the next page, or null if this is the last page - * @param numberOfRecords the total number of records reported by the service, or null if not present - */ - public ArrowListBlobsResult(List blobItems, String nextMarker, Integer numberOfRecords) { - this.blobItems = blobItems; - this.nextMarker = nextMarker; - this.numberOfRecords = numberOfRecords; - } - - /** - * @return the deserialized blob items - */ - public List getBlobItems() { - return blobItems; - } - - /** - * @return the continuation token for the next page, or null if this is the last page - */ - public String getNextMarker() { - return nextMarker; - } - - /** - * @return the total number of records reported by the service, or null if not present - */ - public Integer getNumberOfRecords() { - return numberOfRecords; - } + private ArrowBlobListDeserializer() { } - private ArrowBlobListDeserializer() { + /** + * Exposes the authoritative set of columns this deserializer understands, for the drift-guard test that asserts it + * stays in sync with the full-schema golden fixture. Package-private: not part of the public API. + * + * @return the immutable set of known column names + */ + static Set knownColumns() { + return KNOWN_COLUMNS; } /** @@ -122,6 +110,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { } for (Batch batch : parsed.getBatches()) { + validateKnownColumns(batch); int rowCount = batch.getRowCount(); for (int i = 0; i < rowCount; i++) { results.add(readRow(batch, i)); @@ -131,6 +120,31 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { return new ArrowListBlobsResult(results, nextMarker, numberOfRecords); } + /** + * Fails loudly if the batch schema contains any column this deserializer does not handle, so that a newly added + * service field surfaces as an error instead of being silently dropped. + * + * @param batch the record batch to validate + * @throws BlobListArrowParseException if the batch contains one or more columns absent from {@link #KNOWN_COLUMNS} + */ + private static void validateKnownColumns(Batch batch) { + List unknownColumns = null; + for (String columnName : batch.getColumnNames()) { + if (!KNOWN_COLUMNS.contains(columnName)) { + if (unknownColumns == null) { + unknownColumns = new ArrayList<>(); + } + unknownColumns.add(columnName); + } + } + + if (unknownColumns != null) { + Collections.sort(unknownColumns); + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: response contains unhandled column(s) " + unknownColumns + "."); + } + } + private static BlobItemInternal readRow(Batch batch, int index) { BlobItemInternal item = new BlobItemInternal(); @@ -269,67 +283,90 @@ private static BlobItemInternal readRow(Batch batch, int index) { return item; } - // region Arrow helpers - - private static String getVarChar(Batch batch, String name, int index) { + private static T getColumn(Batch batch, String name, int index, Class type, + String typeLabel) { Column column = batch.getColumn(name); if (column == null || column.isNull(index)) { return null; } - if (!(column instanceof StringColumn)) { - throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name - + "' has unsupported string column type '" + column.getClass().getSimpleName() + "'."); + if (!type.isInstance(column)) { + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + "' has unsupported " + + typeLabel + " column type '" + column.getClass().getSimpleName() + "'."); } - return ((StringColumn) column).get(index); + return type.cast(column); + } + + // region Arrow helpers + + private static String getVarChar(Batch batch, String name, int index) { + StringColumn column = getColumn(batch, name, index, StringColumn.class, "string"); + return column == null ? null : column.get(index); } private static Long getUInt64(Batch batch, String name, int index) { - Column column = batch.getColumn(name); - if (column == null || column.isNull(index)) { - return null; - } - if (!(column instanceof IntColumn)) { - throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name - + "' has unsupported integer column type '" + column.getClass().getSimpleName() + "'."); - } - return ((IntColumn) column).get(index); + IntColumn column = getColumn(batch, name, index, IntColumn.class, "integer"); + return column == null ? null : column.get(index); } private static Boolean getBit(Batch batch, String name, int index) { - Column column = batch.getColumn(name); - if (column == null || column.isNull(index)) { - return null; - } - if (!(column instanceof BoolColumn)) { - throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name - + "' has unsupported boolean column type '" + column.getClass().getSimpleName() + "'."); - } - return ((BoolColumn) column).get(index); + BoolColumn column = getColumn(batch, name, index, BoolColumn.class, "boolean"); + return column == null ? null : column.get(index); } private static OffsetDateTime getTimestamp(Batch batch, String name, int index) { - Column column = batch.getColumn(name); - if (column == null || column.isNull(index)) { + TimestampColumn column = getColumn(batch, name, index, TimestampColumn.class, "timestamp"); + if (column == null) { return null; } - if (!(column instanceof TimestampColumn)) { - throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name - + "' has unsupported timestamp column type '" + column.getClass().getSimpleName() + "'."); - } - long epochSeconds = ((TimestampColumn) column).getEpochSeconds(index); - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(epochSeconds), ZoneOffset.UTC); + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(column.getEpochSeconds(index)), ZoneOffset.UTC); } private static Map getMap(Batch batch, String name, int index) { - Column column = batch.getColumn(name); - if (column == null || column.isNull(index)) { - return null; + MapColumn column = getColumn(batch, name, index, MapColumn.class, "map"); + return column == null ? null : column.get(index); + } + + /** + * Result of deserializing an Arrow ListBlobs response. + */ + public static final class ArrowListBlobsResult { + private final List blobItems; + private final String nextMarker; + private final Integer numberOfRecords; + + /** + * Creates an ArrowListBlobsResult. + * + * @param blobItems the deserialized blob items + * @param nextMarker the continuation token for the next page, or null if this is the last page + * @param numberOfRecords the total number of records reported by the service, or null if not present + */ + public ArrowListBlobsResult(List blobItems, String nextMarker, Integer numberOfRecords) { + this.blobItems = blobItems; + this.nextMarker = nextMarker; + this.numberOfRecords = numberOfRecords; + } + + /** + * @return the deserialized blob items + */ + public List getBlobItems() { + return blobItems; + } + + /** + * @return the continuation token for the next page, or null if this is the last page + */ + public String getNextMarker() { + return nextMarker; } - if (!(column instanceof MapColumn)) { - throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name - + "' has unsupported map column type '" + column.getClass().getSimpleName() + "'."); + + /** + * @return the total number of records reported by the service, or null if not present + */ + public Integer getNumberOfRecords() { + return numberOfRecords; } - return ((MapColumn) column).get(index); } //endregion diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index c1fb68b7c5ec..60cb0bb66268 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -25,10 +25,12 @@ import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** * Minimal Apache Arrow IPC stream reader scoped to the needs of the ListBlobs Arrow response. @@ -43,7 +45,7 @@ * bodies directly, so it does not require the {@code arrow-vector} runtime. */ final class BlobListArrowStreamReader { - + // This is hex representation of the maximum value of an unsigned 32-bit integer. private static final int CONTINUATION_MARKER = 0xFFFFFFFF; private BlobListArrowStreamReader() { @@ -89,6 +91,10 @@ int getRowCount() { Column getColumn(String name) { return columns.get(name); } + + Set getColumnNames() { + return Collections.unmodifiableSet(columns.keySet()); + } } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java index 615d0d2ce1f5..b23d76e741a3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java @@ -66,10 +66,33 @@ private Type() { public static final byte LARGE_LIST_VIEW = 26; private static final String[] NAMES = { - "NONE", "Null", "Int", "FloatingPoint", "Binary", "Utf8", "Bool", "Decimal", "Date", "Time", "Timestamp", - "Interval", "List", "Struct_", "Union", "FixedSizeBinary", "FixedSizeList", "Map", "Duration", "LargeBinary", - "LargeUtf8", "LargeList", "RunEndEncoded", "BinaryView", "Utf8View", "ListView", "LargeListView" - }; + "NONE", + "Null", + "Int", + "FloatingPoint", + "Binary", + "Utf8", + "Bool", + "Decimal", + "Date", + "Time", + "Timestamp", + "Interval", + "List", + "Struct_", + "Union", + "FixedSizeBinary", + "FixedSizeList", + "Map", + "Duration", + "LargeBinary", + "LargeUtf8", + "LargeList", + "RunEndEncoded", + "BinaryView", + "Utf8View", + "ListView", + "LargeListView" }; /** * Gets the canonical Arrow name for a {@code Type} union discriminator, for diagnostic messages. @@ -81,4 +104,3 @@ public static String name(int e) { return NAMES[e]; } } - diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 54ae007c7165..f72b8908f8c1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -51,10 +51,6 @@ import com.azure.storage.common.test.shared.extensions.PlaybackOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.common.test.shared.policy.InvalidServiceVersionPipelinePolicy; -import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.vector.ipc.ArrowStreamReader; -import org.apache.arrow.vector.VectorSchemaRoot; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -63,11 +59,9 @@ import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; -import com.azure.core.http.HttpPipeline; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; -import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.ListBlobsIncludeItem; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java deleted file mode 100644 index a59a2e215723..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowAccessorParityTests.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.implementation.util; - -import com.azure.storage.blob.implementation.util.arrow.Buffer; -import com.azure.storage.blob.implementation.util.arrow.Field; -import com.azure.storage.blob.implementation.util.arrow.Int; -import com.azure.storage.blob.implementation.util.arrow.KeyValue; -import com.azure.storage.blob.implementation.util.arrow.Message; -import com.azure.storage.blob.implementation.util.arrow.MessageHeader; -import com.azure.storage.blob.implementation.util.arrow.RecordBatch; -import com.azure.storage.blob.implementation.util.arrow.Schema; -import com.azure.storage.blob.implementation.util.arrow.Timestamp; -import com.azure.storage.blob.implementation.util.arrow.Type; -import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.vector.BigIntVector; -import org.apache.arrow.vector.BitVector; -import org.apache.arrow.vector.FieldVector; -import org.apache.arrow.vector.SmallIntVector; -import org.apache.arrow.vector.TimeStampSecVector; -import org.apache.arrow.vector.UInt1Vector; -import org.apache.arrow.vector.UInt4Vector; -import org.apache.arrow.vector.VarCharVector; -import org.apache.arrow.vector.VectorSchemaRoot; -import org.apache.arrow.vector.complex.MapVector; -import org.apache.arrow.vector.complex.impl.UnionMapWriter; -import org.apache.arrow.vector.ipc.ArrowStreamWriter; -import org.apache.arrow.vector.util.Text; -import org.junit.jupiter.api.Test; - -import java.io.ByteArrayOutputStream; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Differential drift detector for the vendored Arrow FlatBuffer accessors. - *

- * This test builds a real Arrow IPC stream with the official {@code arrow-vector} writer, then decodes the same bytes - * twice: once with Apache Arrow's own generated {@code org.apache.arrow.flatbuf.*} accessors (the upstream source of - * truth, available at test scope via {@code arrow-vector} → {@code arrow-format}) and once with the vendored - * accessors in {@code com.azure.storage.blob.implementation.util.arrow}. It asserts every accessor the ListBlobs reader - * relies on returns identical results from both implementations. - *

- * Why this exists: the vendored accessors hardcode FlatBuffer vtable offsets and struct sizes taken - * from a specific Arrow schema revision. When the Arrow test dependency is upgraded (for example to 19.x), re-running - * this test re-validates the vendored copy against the new upstream: if Arrow renumbers a field, resizes a struct, or - * changes an accessor's semantics in a way that affects how ListBlobs payloads are parsed, this test fails and points - * at the exact accessor that diverged, so the vendored copy can be brought back in sync. A compatible upgrade that does - * not touch these structures leaves the test passing (no false positives). - */ -public class BlobListArrowAccessorParityTests { - - private static final int CONTINUATION_MARKER = 0xFFFFFFFF; - - @Test - public void vendoredAccessorsMatchArrowAccessors() throws Exception { - byte[] stream; - try (BufferAllocator allocator = new RootAllocator()) { - stream = buildRepresentativePayload(allocator); - } - - List messages = extractMessageMetadata(stream); - boolean sawSchema = false; - boolean sawRecordBatch = false; - - for (byte[] metadata : messages) { - org.apache.arrow.flatbuf.Message arrowMessage - = org.apache.arrow.flatbuf.Message.getRootAsMessage(littleEndian(metadata)); - Message vendoredMessage = Message.getRootAsMessage(littleEndian(metadata)); - - assertEquals(arrowMessage.headerType(), vendoredMessage.headerType(), "headerType"); - assertEquals(arrowMessage.bodyLength(), vendoredMessage.bodyLength(), "bodyLength"); - - if (vendoredMessage.headerType() == MessageHeader.SCHEMA) { - sawSchema = true; - org.apache.arrow.flatbuf.Schema arrowSchema - = (org.apache.arrow.flatbuf.Schema) arrowMessage.header(new org.apache.arrow.flatbuf.Schema()); - Schema vendoredSchema = (Schema) vendoredMessage.header(new Schema()); - assertNotNull(arrowSchema, "arrow schema header"); - assertNotNull(vendoredSchema, "vendored schema header"); - compareSchema(arrowSchema, vendoredSchema); - } else if (vendoredMessage.headerType() == MessageHeader.RECORD_BATCH) { - sawRecordBatch = true; - org.apache.arrow.flatbuf.RecordBatch arrowBatch = (org.apache.arrow.flatbuf.RecordBatch) arrowMessage - .header(new org.apache.arrow.flatbuf.RecordBatch()); - RecordBatch vendoredBatch = (RecordBatch) vendoredMessage.header(new RecordBatch()); - assertNotNull(arrowBatch, "arrow record batch header"); - assertNotNull(vendoredBatch, "vendored record batch header"); - compareRecordBatch(arrowBatch, vendoredBatch); - } - } - - assertTrue(sawSchema, "expected a Schema message in the stream"); - assertTrue(sawRecordBatch, "expected a RecordBatch message in the stream"); - } - - private static void compareSchema(org.apache.arrow.flatbuf.Schema arrow, Schema vendored) { - assertEquals(arrow.endianness(), vendored.endianness(), "schema.endianness"); - assertEquals(arrow.fieldsLength(), vendored.fieldsLength(), "schema.fieldsLength"); - for (int i = 0; i < arrow.fieldsLength(); i++) { - compareField(arrow.fields(i), vendored.fields(i)); - } - assertEquals(arrow.customMetadataLength(), vendored.customMetadataLength(), "schema.customMetadataLength"); - for (int i = 0; i < arrow.customMetadataLength(); i++) { - org.apache.arrow.flatbuf.KeyValue arrowKv = arrow.customMetadata(i); - KeyValue vendoredKv = vendored.customMetadata(i); - assertEquals(arrowKv.key(), vendoredKv.key(), "keyValue.key"); - assertEquals(arrowKv.value(), vendoredKv.value(), "keyValue.value"); - } - } - - private static void compareField(org.apache.arrow.flatbuf.Field arrow, Field vendored) { - assertEquals(arrow.name(), vendored.name(), "field.name"); - assertEquals(arrow.typeType(), vendored.typeType(), "field.typeType for " + vendored.name()); - assertEquals(arrow.childrenLength(), vendored.childrenLength(), "field.childrenLength for " + vendored.name()); - - if (vendored.typeType() == Type.INT) { - org.apache.arrow.flatbuf.Int arrowInt - = (org.apache.arrow.flatbuf.Int) arrow.type(new org.apache.arrow.flatbuf.Int()); - Int vendoredInt = (Int) vendored.type(new Int()); - assertNotNull(arrowInt, "arrow Int type for " + vendored.name()); - assertNotNull(vendoredInt, "vendored Int type for " + vendored.name()); - assertEquals(arrowInt.bitWidth(), vendoredInt.bitWidth(), "int.bitWidth for " + vendored.name()); - assertEquals(arrowInt.isSigned(), vendoredInt.isSigned(), "int.isSigned for " + vendored.name()); - } else if (vendored.typeType() == Type.TIMESTAMP) { - org.apache.arrow.flatbuf.Timestamp arrowTs - = (org.apache.arrow.flatbuf.Timestamp) arrow.type(new org.apache.arrow.flatbuf.Timestamp()); - Timestamp vendoredTs = (Timestamp) vendored.type(new Timestamp()); - assertNotNull(arrowTs, "arrow Timestamp type for " + vendored.name()); - assertNotNull(vendoredTs, "vendored Timestamp type for " + vendored.name()); - assertEquals(arrowTs.unit(), vendoredTs.unit(), "timestamp.unit for " + vendored.name()); - } - - for (int i = 0; i < arrow.childrenLength(); i++) { - compareField(arrow.children(i), vendored.children(i)); - } - } - - private static void compareRecordBatch(org.apache.arrow.flatbuf.RecordBatch arrow, RecordBatch vendored) { - assertEquals(arrow.length(), vendored.length(), "recordBatch.length"); - - assertEquals(arrow.nodesLength(), vendored.nodesLength(), "recordBatch.nodesLength"); - for (int i = 0; i < arrow.nodesLength(); i++) { - assertEquals(arrow.nodes(i).length(), vendored.nodes(i).length(), "fieldNode.length at " + i); - } - - assertEquals(arrow.buffersLength(), vendored.buffersLength(), "recordBatch.buffersLength"); - for (int i = 0; i < arrow.buffersLength(); i++) { - Buffer vendoredBuffer = vendored.buffers(i); - assertEquals(arrow.buffers(i).offset(), vendoredBuffer.offset(), "buffer.offset at " + i); - assertEquals(arrow.buffers(i).length(), vendoredBuffer.length(), "buffer.length at " + i); - } - - assertEquals(arrow.compression() == null, vendored.compression() == null, "recordBatch.compression presence"); - } - - // region helpers - - private static ByteBuffer littleEndian(byte[] metadata) { - return ByteBuffer.wrap(metadata).order(ByteOrder.LITTLE_ENDIAN); - } - - /** - * Splits an Arrow IPC stream into the metadata FlatBuffer of each encapsulated message, mirroring the framing the - * production reader performs (continuation marker + metadata length prefix, body skipped). - */ - private static List extractMessageMetadata(byte[] stream) { - List messages = new ArrayList<>(); - ByteBuffer buffer = ByteBuffer.wrap(stream).order(ByteOrder.LITTLE_ENDIAN); - int pos = 0; - int length = stream.length; - while (pos + 4 <= length) { - int marker = buffer.getInt(pos); - pos += 4; - - int metadataLength; - if (marker == CONTINUATION_MARKER) { - if (pos + 4 > length) { - break; - } - metadataLength = buffer.getInt(pos); - pos += 4; - } else { - metadataLength = marker; - } - - if (metadataLength == 0) { - break; - } - - byte[] metadata = new byte[metadataLength]; - System.arraycopy(stream, pos, metadata, 0, metadataLength); - messages.add(metadata); - pos += metadataLength; - - long bodyLength = Message.getRootAsMessage(littleEndian(metadata)).bodyLength(); - pos += (int) bodyLength; - } - return messages; - } - - /** - * Builds an Arrow IPC stream with a representative ListBlobs schema (string; signed and unsigned integers of - * several bit widths; boolean; second-precision timestamp; and a map<string,string> column) plus schema-level - * metadata, so the differential comparison exercises every vendored accessor — including {@code Int.bitWidth} - * / {@code Int.isSigned} across multiple widths and both signedness values, and the nested map → struct → - * key/value fields. - */ - private static byte[] buildRepresentativePayload(BufferAllocator allocator) throws Exception { - VarCharVector name = new VarCharVector("Name", allocator); - UInt1Vector uint8 = new UInt1Vector("U8", allocator); - SmallIntVector int16 = new SmallIntVector("I16", allocator); - UInt4Vector uint32 = new UInt4Vector("U32", allocator); - BigIntVector contentLength = new BigIntVector("Content-Length", allocator); - BitVector deleted = new BitVector("Deleted", allocator); - TimeStampSecVector creationTime = new TimeStampSecVector("Creation-Time", allocator); - MapVector metadata = MapVector.empty("Metadata", allocator, false); - - name.allocateNew(); - uint8.allocateNew(); - int16.allocateNew(); - uint32.allocateNew(); - contentLength.allocateNew(); - deleted.allocateNew(); - creationTime.allocateNew(); - - name.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); - uint8.setSafe(0, 200); - int16.setSafe(0, -5); - uint32.setSafe(0, 42); - contentLength.setSafe(0, 7L); - deleted.setSafe(0, 0); - creationTime.setSafe(0, 1000L); - - name.setValueCount(1); - uint8.setValueCount(1); - int16.setValueCount(1); - uint32.setValueCount(1); - contentLength.setValueCount(1); - deleted.setValueCount(1); - creationTime.setValueCount(1); - - UnionMapWriter mapWriter = metadata.getWriter(); - mapWriter.setPosition(0); - mapWriter.startMap(); - mapWriter.startEntry(); - mapWriter.key().varChar().writeVarChar(new Text("k1")); - mapWriter.value().varChar().writeVarChar(new Text("v1")); - mapWriter.endEntry(); - mapWriter.endMap(); - metadata.setValueCount(1); - - List vectors = new ArrayList<>(); - vectors.add(name); - vectors.add(uint8); - vectors.add(int16); - vectors.add(uint32); - vectors.add(contentLength); - vectors.add(deleted); - vectors.add(creationTime); - vectors.add(metadata); - - List fields = new ArrayList<>(); - for (FieldVector vector : vectors) { - fields.add(vector.getField()); - } - - Map schemaMetadata = new LinkedHashMap<>(); - schemaMetadata.put("NextMarker", "nextPage"); - schemaMetadata.put("NumberOfRecords", "1"); - org.apache.arrow.vector.types.pojo.Schema schema - = new org.apache.arrow.vector.types.pojo.Schema(fields, schemaMetadata); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - try (VectorSchemaRoot root = new VectorSchemaRoot(schema, vectors, 1); - ArrowStreamWriter writer = new ArrowStreamWriter(root, null, out)) { - writer.start(); - writer.writeBatch(); - writer.end(); - } - return out.toByteArray(); - } - - //endregion -} - - diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java deleted file mode 100644 index 3ed329140545..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowFlatbufConstantsTest.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.implementation.util; - -import com.azure.storage.blob.implementation.util.arrow.Endianness; -import com.azure.storage.blob.implementation.util.arrow.MessageHeader; -import com.azure.storage.blob.implementation.util.arrow.TimeUnit; -import com.azure.storage.blob.implementation.util.arrow.Type; -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -/** - * Fidelity tests that pin the vendored Arrow FlatBuffer metadata constants - * (in {@code com.azure.storage.blob.implementation.util.arrow}) to the values defined by the official - * {@code org.apache.arrow.flatbuf} classes shipped in {@code arrow-format} (pulled in transitively at test scope via - * {@code arrow-vector}). - *

- * {@link BlobListArrowStreamReaderTests} validates decoding behavior against payloads written by the real - * Arrow writer, but only exercises the enum values that a representative ListBlobs response happens to use. These tests - * close that gap by asserting every enum ordinal and name our reader relies on matches Apache Arrow exactly, - * including values that live on error/rejection paths (for example dictionary batches). If a future {@code arrow} - * version bump renumbers or extends one of these enums, these tests fail loudly so the vendored copy can be reviewed. - */ -public class BlobListArrowFlatbufConstantsTest { - - @Test - public void messageHeaderUnionMatchesArrow() { - assertEquals(org.apache.arrow.flatbuf.MessageHeader.NONE, MessageHeader.NONE); - assertEquals(org.apache.arrow.flatbuf.MessageHeader.Schema, MessageHeader.SCHEMA); - assertEquals(org.apache.arrow.flatbuf.MessageHeader.DictionaryBatch, MessageHeader.DICTIONARY_BATCH); - assertEquals(org.apache.arrow.flatbuf.MessageHeader.RecordBatch, MessageHeader.RECORD_BATCH); - assertEquals(org.apache.arrow.flatbuf.MessageHeader.Tensor, MessageHeader.TENSOR); - assertEquals(org.apache.arrow.flatbuf.MessageHeader.SparseTensor, MessageHeader.SPARSE_TENSOR); - } - - @Test - public void endiannessMatchesArrow() { - assertEquals(org.apache.arrow.flatbuf.Endianness.Little, Endianness.LITTLE); - assertEquals(org.apache.arrow.flatbuf.Endianness.Big, Endianness.BIG); - } - - @Test - public void timeUnitMatchesArrow() { - assertEquals(org.apache.arrow.flatbuf.TimeUnit.SECOND, TimeUnit.SECOND); - assertEquals(org.apache.arrow.flatbuf.TimeUnit.MILLISECOND, TimeUnit.MILLISECOND); - assertEquals(org.apache.arrow.flatbuf.TimeUnit.MICROSECOND, TimeUnit.MICROSECOND); - assertEquals(org.apache.arrow.flatbuf.TimeUnit.NANOSECOND, TimeUnit.NANOSECOND); - - // The vendored name table must match Arrow's, element-for-element and in length. - assertEquals(org.apache.arrow.flatbuf.TimeUnit.names.length, namesLength(TimeUnit::name), - "Arrow TimeUnit enum changed size; review the vendored TimeUnit."); - for (int i = 0; i < org.apache.arrow.flatbuf.TimeUnit.names.length; i++) { - assertEquals(org.apache.arrow.flatbuf.TimeUnit.name(i), TimeUnit.name(i), - "TimeUnit name mismatch at ordinal " + i); - } - } - - @Test - public void typeUnionOrdinalsMatchArrow() { - assertEquals(org.apache.arrow.flatbuf.Type.NONE, Type.NONE); - assertEquals(org.apache.arrow.flatbuf.Type.Null, Type.NULL); - assertEquals(org.apache.arrow.flatbuf.Type.Int, Type.INT); - assertEquals(org.apache.arrow.flatbuf.Type.FloatingPoint, Type.FLOATING_POINT); - assertEquals(org.apache.arrow.flatbuf.Type.Binary, Type.BINARY); - assertEquals(org.apache.arrow.flatbuf.Type.Utf8, Type.UTF8); - assertEquals(org.apache.arrow.flatbuf.Type.Bool, Type.BOOL); - assertEquals(org.apache.arrow.flatbuf.Type.Decimal, Type.DECIMAL); - assertEquals(org.apache.arrow.flatbuf.Type.Date, Type.DATE); - assertEquals(org.apache.arrow.flatbuf.Type.Time, Type.TIME); - assertEquals(org.apache.arrow.flatbuf.Type.Timestamp, Type.TIMESTAMP); - assertEquals(org.apache.arrow.flatbuf.Type.Interval, Type.INTERVAL); - assertEquals(org.apache.arrow.flatbuf.Type.List, Type.LIST); - assertEquals(org.apache.arrow.flatbuf.Type.Struct_, Type.STRUCT); - assertEquals(org.apache.arrow.flatbuf.Type.Union, Type.UNION); - assertEquals(org.apache.arrow.flatbuf.Type.FixedSizeBinary, Type.FIXED_SIZE_BINARY); - assertEquals(org.apache.arrow.flatbuf.Type.FixedSizeList, Type.FIXED_SIZE_LIST); - assertEquals(org.apache.arrow.flatbuf.Type.Map, Type.MAP); - assertEquals(org.apache.arrow.flatbuf.Type.Duration, Type.DURATION); - assertEquals(org.apache.arrow.flatbuf.Type.LargeBinary, Type.LARGE_BINARY); - assertEquals(org.apache.arrow.flatbuf.Type.LargeUtf8, Type.LARGE_UTF8); - assertEquals(org.apache.arrow.flatbuf.Type.LargeList, Type.LARGE_LIST); - assertEquals(org.apache.arrow.flatbuf.Type.RunEndEncoded, Type.RUN_END_ENCODED); - assertEquals(org.apache.arrow.flatbuf.Type.BinaryView, Type.BINARY_VIEW); - assertEquals(org.apache.arrow.flatbuf.Type.Utf8View, Type.UTF8_VIEW); - assertEquals(org.apache.arrow.flatbuf.Type.ListView, Type.LIST_VIEW); - assertEquals(org.apache.arrow.flatbuf.Type.LargeListView, Type.LARGE_LIST_VIEW); - } - - @Test - public void typeUnionNamesMatchArrow() { - // A length mismatch means Arrow added/removed a Type; the vendored Type (and reader's switch) must be reviewed. - assertEquals(org.apache.arrow.flatbuf.Type.names.length, namesLength(Type::name), - "Arrow Type enum changed size; review the vendored Type and the reader's type switch."); - for (int i = 0; i < org.apache.arrow.flatbuf.Type.names.length; i++) { - assertEquals(org.apache.arrow.flatbuf.Type.name(i), Type.name(i), "Type name mismatch at ordinal " + i); - } - } - - /** Counts a vendored name table's length by probing for its array bound. */ - private static int namesLength(java.util.function.IntFunction nameFn) { - int count = 0; - while (true) { - try { - nameFn.apply(count); - count++; - } catch (ArrayIndexOutOfBoundsException e) { - return count; - } - } - } -} - diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java new file mode 100644 index 000000000000..d0b514d94208 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.storage.blob.implementation.models.BlobItemInternal; +import com.azure.storage.blob.implementation.models.BlobListArrowParseException; +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Base64; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Golden-payload decode tests for the vendored {@link BlobListArrowStreamReader} / {@link ArrowBlobListDeserializer}. + *

+ * The fixture ({@code arrow/representative.arrow.base64}) is a real Arrow IPC stream that was produced once by the + * official {@code arrow-vector} writer (see {@code ArrowFixtureGenerator}) and committed as a frozen resource. This test + * decodes those exact bytes with the vendored reader and pins every field the ListBlobs path relies on, so any + * regression in the vendored FlatBuffer accessors surfaces here without requiring the Arrow library on the test + * classpath. It replaces the former differential parity test that re-decoded a freshly written payload with Apache + * Arrow's own accessors; the frozen fixture is the same shape but removes the runtime dependency. + */ +public class BlobListArrowGoldenDecodeTests { + + @Test + public void decodesRepresentativePayload() throws IOException { + ArrowBlobListDeserializer.ArrowListBlobsResult result + = ArrowBlobListDeserializer.deserialize(openFixture("representative.arrow.base64")); + + // Schema metadata. + assertEquals("nextPage", result.getNextMarker()); + assertEquals(Integer.valueOf(2), result.getNumberOfRecords()); + + // Two rows: one blob, one prefix. + List items = result.getBlobItems(); + assertEquals(2, items.size()); + + BlobItemInternal blob = items.get(0); + assertNotNull(blob.getName()); + assertEquals("blob1", blob.getName().getContent()); + assertNull(blob.isPrefix()); + assertEquals(Boolean.FALSE, blob.isDeleted()); + assertNotNull(blob.getProperties()); + assertEquals(7L, (long) blob.getProperties().getContentLength()); + assertEquals("application/octet-stream", blob.getProperties().getContentType()); + assertNotNull(blob.getProperties().getCreationTime()); + assertEquals(1000L, blob.getProperties().getCreationTime().toEpochSecond()); + + Map metadata = blob.getMetadata(); + assertNotNull(metadata); + assertEquals("v1", metadata.get("k1")); + assertEquals("v2", metadata.get("k2")); + + BlobItemInternal prefix = items.get(1); + assertNotNull(prefix.getName()); + assertEquals("dir/", prefix.getName().getContent()); + assertTrue(prefix.isPrefix()); + // The prefix row had no metadata entries; the reader must not surface an (empty) map for it. + assertNull(prefix.getMetadata()); + assertFalse(items.isEmpty()); + } + + @Test + public void allColumnsFixtureDecodesWithoutRejection() throws IOException { + // Every column the SDK claims to handle is present in this full-schema fixture and must decode without the + // unknown-column guard firing (no false positives) and without a type-mismatch error. + ArrowBlobListDeserializer.ArrowListBlobsResult result + = ArrowBlobListDeserializer.deserialize(openFixture("allcolumns.arrow.base64")); + + List items = result.getBlobItems(); + assertEquals(1, items.size()); + BlobItemInternal blob = items.get(0); + + // Spot-check one field from each Arrow type category to prove full-schema decode. + assertEquals("blob1", blob.getName().getContent()); + assertEquals(Boolean.FALSE, blob.isDeleted()); + assertEquals(7L, (long) blob.getProperties().getContentLength()); + assertEquals(1000L, blob.getProperties().getCreationTime().toEpochSecond()); + assertEquals("mv", blob.getMetadata().get("mk")); + } + + @Test + public void allColumnsFixtureSchemaMatchesKnownColumnSet() throws IOException { + // Drift guard: the frozen full-schema fixture and the deserializer's known-column set must stay identical. If a + // column is added to KNOWN_COLUMNS without regenerating the fixture (or vice versa), this fails loudly. + Set fixtureColumns; + try (InputStream stream = openFixture("allcolumns.arrow.base64")) { + BlobListArrowStreamReader.Parsed parsed = BlobListArrowStreamReader.read(stream); + fixtureColumns = parsed.getBatches().get(0).getColumnNames(); + } + assertEquals(ArrowBlobListDeserializer.knownColumns(), fixtureColumns); + } + + @Test + public void rejectsUnknownColumn() throws IOException { + // The service added a column a future SDK understands; this SDK must reject loudly and name the offender. + try (InputStream stream = openFixture("reject-unknown-column.arrow.base64")) { + BlobListArrowParseException ex + = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(stream)); + assertTrue(ex.getMessage().contains("FutureField"), "Unexpected message: " + ex.getMessage()); + } + } + + private static InputStream openFixture(String name) throws IOException { + byte[] base64; + try (InputStream resource = classpathResource("/arrow/" + name)) { + assertNotNull(resource, "missing test fixture: arrow/" + name); + base64 = readAll(resource); + } + return new ByteArrayInputStream(Base64.getDecoder().decode(base64)); + } + + /** + * Loads a resource from the test classpath. Calling {@code getResourceAsStream} on this test's class literal is + * equivalent to going through its class loader directly (like + * {@code Thread.currentThread().getContextClassLoader().getResourceAsStream(...)}); we use the class literal because + * this is a static context with no {@code this} on which to call {@code getClass()}. The leading {@code /} makes the + * path absolute from the classpath root. + * + * @param absolutePath the classpath-absolute resource path, beginning with {@code /} + * @return the resource stream, or null if the resource is not found + */ + private static InputStream classpathResource(String absolutePath) { + return BlobListArrowGoldenDecodeTests.class.getResourceAsStream(absolutePath); + } + + private static byte[] readAll(InputStream in) throws IOException { + java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream(); + byte[] buffer = new byte[4096]; + int read; + while ((read = in.read(buffer)) != -1) { + out.write(buffer, 0, read); + } + return out.toByteArray(); + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java index 1462073b44f7..349db1cefa48 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReaderRejectionTests.java @@ -4,178 +4,90 @@ package com.azure.storage.blob.implementation.util; import com.azure.storage.blob.implementation.models.BlobListArrowParseException; -import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.vector.FieldVector; -import org.apache.arrow.vector.Float8Vector; -import org.apache.arrow.vector.TimeStampMilliVector; -import org.apache.arrow.vector.VarCharVector; -import org.apache.arrow.vector.VectorSchemaRoot; -import org.apache.arrow.vector.complex.MapVector; -import org.apache.arrow.vector.complex.impl.UnionMapWriter; -import org.apache.arrow.vector.dictionary.Dictionary; -import org.apache.arrow.vector.dictionary.DictionaryEncoder; -import org.apache.arrow.vector.dictionary.DictionaryProvider; -import org.apache.arrow.vector.ipc.ArrowStreamWriter; -import org.apache.arrow.vector.types.pojo.DictionaryEncoding; -import org.apache.arrow.vector.types.pojo.Field; -import org.apache.arrow.vector.util.Text; import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; +import java.util.Base64; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; /** - * Parity tests for Arrow IPC content the ListBlobs reader intentionally rejects or treats as an error. Where possible - * the payloads are produced with the official {@code arrow-vector} writer (test scope) so the vendored reader's - * rejection paths are validated against genuine Arrow output rather than hand-crafted bytes. The remaining cases cover - * malformed/edge inputs that the writer cannot produce (null and empty streams). - *

- * Fidelity parity lives in {@link BlobListArrowFlatbufConstantsTest}. + * Parity tests for Arrow IPC content the ListBlobs reader intentionally rejects or treats as an error. The payloads + * are committed golden fixtures (see {@code src/test/resources/arrow}) originally produced with the official + * {@code arrow-vector} writer, so these tests validate the vendored reader's rejection paths against genuine Arrow + * output with no Arrow dependency. The remaining cases cover malformed/edge inputs that the writer cannot produce + * (null and empty streams). */ public class BlobListArrowStreamReaderRejectionTests { @Test public void rejectsNullStream() { - BlobListArrowParseException ex = assertThrows(BlobListArrowParseException.class, - () -> ArrowBlobListDeserializer.deserialize(null)); + BlobListArrowParseException ex + = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(null)); assertTrue(ex.getMessage().contains("input stream is null"), "Unexpected message: " + ex.getMessage()); } @Test public void rejectsStreamWithNoSchema() { - assertRejected(new byte[0], "stream contained no schema"); + InputStream stream = new ByteArrayInputStream(new byte[0]); + BlobListArrowParseException ex + = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(stream)); + assertTrue(ex.getMessage().contains("stream contained no schema"), "Unexpected message: " + ex.getMessage()); } @Test - public void rejectsDictionaryEncodedStreams() throws Exception { - byte[] payload; - try (BufferAllocator allocator = new RootAllocator()) { - payload = buildDictionaryEncodedPayload(allocator); - } - assertRejected(payload, "dictionary-encoded streams are not supported"); + public void rejectsDictionaryEncodedStreams() throws IOException { + assertRejected("reject-dictionary.arrow.base64", "dictionary-encoded streams are not supported"); } @Test - public void rejectsUnsupportedColumnType() throws Exception { - byte[] payload; - try (BufferAllocator allocator = new RootAllocator()) { - Float8Vector score = new Float8Vector("Score", allocator); - score.allocateNew(); - score.setSafe(0, 1.5); - score.setValueCount(1); - payload = writeBatch(allocator, Collections.singletonList(score), 1); - } - assertRejected(payload, "unsupported Arrow type 'FloatingPoint'"); + public void rejectsUnsupportedColumnType() throws IOException { + assertRejected("reject-float.arrow.base64", "unsupported Arrow type 'FloatingPoint'"); } @Test - public void rejectsUnsupportedTimestampUnit() throws Exception { - byte[] payload; - try (BufferAllocator allocator = new RootAllocator()) { - TimeStampMilliVector creationTime = new TimeStampMilliVector("Creation-Time", allocator); - creationTime.allocateNew(); - creationTime.setSafe(0, 1000L); - creationTime.setValueCount(1); - payload = writeBatch(allocator, Collections.singletonList(creationTime), 1); - } - assertRejected(payload, "unsupported timestamp unit 'MILLISECOND'"); + public void rejectsUnsupportedTimestampUnit() throws IOException { + assertRejected("reject-timestamp-milli.arrow.base64", "unsupported timestamp unit 'MILLISECOND'"); } @Test - public void rejectsMapWithNonStringValues() throws Exception { - byte[] payload; - try (BufferAllocator allocator = new RootAllocator()) { - MapVector metadata = MapVector.empty("Metadata", allocator, false); - UnionMapWriter mapWriter = metadata.getWriter(); - mapWriter.setPosition(0); - mapWriter.startMap(); - mapWriter.startEntry(); - mapWriter.key().varChar().writeVarChar(new Text("k1")); - mapWriter.value().bigInt().writeBigInt(42L); - mapWriter.endEntry(); - mapWriter.endMap(); - metadata.setValueCount(1); - payload = writeBatch(allocator, Collections.singletonList(metadata), 1); - } - assertRejected(payload, "map entries must be string keys and values"); + public void rejectsMapWithNonStringValues() throws IOException { + assertRejected("reject-map-nonstring.arrow.base64", "map entries must be string keys and values"); } // region helpers - private static void assertRejected(byte[] payload, String expectedMessageFragment) { - InputStream stream = new ByteArrayInputStream(payload); - BlobListArrowParseException ex - = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(stream)); - assertTrue(ex.getMessage().contains(expectedMessageFragment), "Unexpected message: " + ex.getMessage()); + private static void assertRejected(String fixture, String expectedMessageFragment) throws IOException { + try (InputStream stream = openFixture(fixture)) { + BlobListArrowParseException ex + = assertThrows(BlobListArrowParseException.class, () -> ArrowBlobListDeserializer.deserialize(stream)); + assertTrue(ex.getMessage().contains(expectedMessageFragment), "Unexpected message: " + ex.getMessage()); + } } - /** - * Writes a single-batch Arrow IPC stream from the supplied vectors. The vectors are owned by (and closed with) the - * returned {@link VectorSchemaRoot}. - */ - private static byte[] writeBatch(BufferAllocator allocator, List vectors, int rowCount) - throws Exception { - List fields = new ArrayList<>(vectors.size()); - for (FieldVector vector : vectors) { - fields.add(vector.getField()); - } - ByteArrayOutputStream out = new ByteArrayOutputStream(); - try (VectorSchemaRoot root = new VectorSchemaRoot(fields, vectors, rowCount); - ArrowStreamWriter writer = new ArrowStreamWriter(root, null, out)) { - writer.start(); - writer.writeBatch(); - writer.end(); + private static InputStream openFixture(String name) throws IOException { + byte[] base64; + try (InputStream resource + = BlobListArrowStreamReaderRejectionTests.class.getResourceAsStream("/arrow/" + name)) { + assertNotNull(resource, "missing test fixture: arrow/" + name); + base64 = readAll(resource); } - return out.toByteArray(); + return new ByteArrayInputStream(Base64.getDecoder().decode(base64)); } - /** - * Builds an Arrow IPC stream whose single column is dictionary-encoded, which forces the official writer to emit a - * {@code DictionaryBatch} message ahead of the record batch. - */ - private static byte[] buildDictionaryEncodedPayload(BufferAllocator allocator) throws Exception { - VarCharVector dictVector = new VarCharVector("Name-dict", allocator); - VarCharVector name = new VarCharVector("Name", allocator); - try { - dictVector.allocateNew(); - dictVector.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); - dictVector.setSafe(1, "blob2".getBytes(StandardCharsets.UTF_8)); - dictVector.setValueCount(2); - Dictionary dictionary = new Dictionary(dictVector, new DictionaryEncoding(1L, false, null)); - - name.allocateNew(); - name.setSafe(0, "blob1".getBytes(StandardCharsets.UTF_8)); - name.setSafe(1, "blob2".getBytes(StandardCharsets.UTF_8)); - name.setValueCount(2); - - DictionaryProvider.MapDictionaryProvider provider = new DictionaryProvider.MapDictionaryProvider(); - provider.put(dictionary); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - FieldVector encoded = (FieldVector) DictionaryEncoder.encode(name, dictionary); - try (VectorSchemaRoot root = new VectorSchemaRoot(Collections.singletonList(encoded.getField()), - Collections.singletonList(encoded), 2); - ArrowStreamWriter writer = new ArrowStreamWriter(root, provider, out)) { - writer.start(); - writer.writeBatch(); - writer.end(); - } - return out.toByteArray(); - } finally { - name.close(); - dictVector.close(); + private static byte[] readAll(InputStream in) throws IOException { + java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream(); + byte[] buffer = new byte[4096]; + int read; + while ((read = in.read(buffer)) != -1) { + out.write(buffer, 0, read); } + return out.toByteArray(); } //endregion } - diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md b/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md new file mode 100644 index 000000000000..bfd89c0edf2a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md @@ -0,0 +1,26 @@ +# ListBlobs Arrow golden fixtures + +These `*.arrow.base64` files are committed golden fixtures for the vendored ListBlobs Arrow +deserializer tests (`BlobListArrowGoldenDecodeTests`, `BlobListArrowStreamReaderRejectionTests`). +Each one is an Apache Arrow IPC stream that has been **Base64-encoded** before being written to disk. + +## Why Base64 instead of raw binary? + +Storing the payloads as Base64 text is deliberate and safer for golden fixtures: + +- **No line-ending / encoding corruption.** Raw binary committed on Windows can be mangled by + git autocrlf or editor "fixes." Base64 is plain ASCII and survives git/editor round-trips + byte-for-byte — which is exactly what a byte-exact golden fixture needs. +- **Diff- and review-friendly.** git treats raw `.arrow` blobs as opaque binary; Base64 is text, + so it shows up as a normal blob in PRs. +- **No special tooling to read/regenerate.** The generator emits Base64 directly and the tests + decode it inline (`Base64.getDecoder().decode(...)`), so no binary read mode or hex tooling is + required. + +The tests decode the Base64 back to the original Arrow bytes before parsing, so the on-disk +encoding is transparent to the deserializer under test. + +## Naming + +`.arrow.base64` — `.arrow` denotes the Apache Arrow IPC stream; `.base64` denotes the +Base64 text wrapper. diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/allcolumns.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/allcolumns.arrow.base64 new file mode 100644 index 000000000000..44eeb10f79cc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/allcolumns.arrow.base64 @@ -0,0 +1 @@ +/////2gOAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAABkAAAAAgAAADgAAAAEAAAA2P///wgAAAAMAAAAAQAAADEAAAAPAAAATnVtYmVyT2ZSZWNvcmRzAAgADAAIAAQACAAAAAgAAAAMAAAAAAAAAAAAAAAKAAAATmV4dE1hcmtlcgAAMgAAAJgNAABMDQAAGA0AAOAMAACoDAAAaAwAACwMAABMCwAAfAoAALAJAAB0CQAAOAkAAAQJAAC4CAAAfAgAADwIAAD8BwAAvAcAAIAHAABIBwAAEAcAANgGAACYBgAAVAYAABgGAADgBQAAqAUAAGwFAAAwBQAA6AQAAKwEAABwBAAAPAQAAAQEAADMAwAAkAMAAFADAAAMAwAAyAIAAHgCAABEAgAADAIAANQBAACYAQAAUAEAAAwBAADQAAAAkAAAAFAAAAAEAAAAQvP//xQAAAAUAAAAFAAAAAAAAgEYAAAAAAAAAAAAAADc9///AAAAAUAAAAAWAAAAUmVtYWluaW5nUmV0ZW50aW9uRGF5cwAAivP//xQAAAAUAAAAFAAAAAAAAgEYAAAAAAAAAAAAAAAk+P//AAAAAUAAAAAIAAAAVGFnQ291bnQAAAAAxvP//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAAC08///EQAAAFJlaHlkcmF0ZVByaW9yaXR5AAAAAvT//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAADw8///DQAAAEFyY2hpdmVTdGF0dXMAAAA69P//FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAACj0//8WAAAASW1tdXRhYmlsaXR5UG9saWN5TW9kZQAAevT//xQAAAAUAAAAFAAAAAAACgEQAAAAAAAAAAAAAABo9P//GwAAAEltbXV0YWJpbGl0eVBvbGljeVVudGlsRGF0ZQC+9P//FAAAABQAAAAUAAAAAAAKARAAAAAAAAAAAAAAAKz0//8OAAAATGFzdEFjY2Vzc1RpbWUAAPb0//8UAAAAFAAAABQAAAAAAAoBEAAAAAAAAAAAAAAA5PT//wsAAABEZWxldGVkVGltZQAq9f//FAAAABQAAAAUAAAAAAAGARAAAAAAAAAAAAAAABj1//8JAAAATGVnYWxIb2xkAAAAXvX//xQAAAAUAAAAFAAAAAAABgEQAAAAAAAAAAAAAABM9f//BgAAAFNlYWxlZAAAjvX//xQAAAAUAAAAFAAAAAAAAgEYAAAAAAAAAAAAAAAo+v//AAAAAUAAAAAZAAAAeC1tcy1ibG9iLXNlcXVlbmNlLW51bWJlcgAAANr1//8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAyPX//xcAAABDb3B5RGVzdGluYXRpb25TbmFwc2hvdAAa9v//FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAAAj2//8VAAAAQ29weVN0YXR1c0Rlc2NyaXB0aW9uAAAAWvb//xQAAAAUAAAAFAAAAAAACgEQAAAAAAAAAAAAAABI9v//EgAAAENvcHlDb21wbGV0aW9uVGltZQAAlvb//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAACE9v//DAAAAENvcHlQcm9ncmVzcwAAAADO9v//FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAALz2//8KAAAAQ29weVNvdXJjZQAAAvf//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAADw9v//CgAAAENvcHlTdGF0dXMAADb3//8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAJPf//wYAAABDb3B5SWQAAGb3//8UAAAAFAAAABQAAAAAAAYBEAAAAAAAAAAAAAAAVPf//w8AAABJbmNyZW1lbnRhbENvcHkAnvf//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAACM9///DwAAAEVuY3J5cHRpb25TY29wZQDW9///FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAAMT3//8ZAAAAQ3VzdG9tZXJQcm92aWRlZEtleVNoYTI1NgAAABr4//8UAAAAFAAAABQAAAAAAAYBEAAAAAAAAAAAAAAACPj//w8AAABTZXJ2ZXJFbmNyeXB0ZWQAUvj//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAABA+P//DQAAAExlYXNlRHVyYXRpb24AAACK+P//FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAAHj4//8KAAAATGVhc2VTdGF0ZQAAvvj//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAACs+P//CwAAAExlYXNlU3RhdHVzAPL4//8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAA4Pj//w8AAABTbWFydEFjY2Vzc1RpZXIAKvn//xQAAAAUAAAAFAAAAAAACgEQAAAAAAAAAAAAAAAY+f//FAAAAEFjY2Vzc1RpZXJDaGFuZ2VUaW1lAAAAAGr5//8UAAAAFAAAABQAAAAAAAYBEAAAAAAAAAAAAAAAWPn//xIAAABBY2Nlc3NUaWVySW5mZXJyZWQAAKb5//8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAlPn//woAAABBY2Nlc3NUaWVyAADa+f//FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAAMj5//8IAAAAQmxvYlR5cGUAAAAADvr//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAAD8+f//CwAAAENvbnRlbnQtTUQ1AEL6//8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAMPr//w0AAABDYWNoZS1Db250cm9sAAAAevr//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAABo+v//EwAAAENvbnRlbnQtRGlzcG9zaXRpb24Atvr//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAACk+v//EAAAAENvbnRlbnQtTGFuZ3VhZ2UAAAAA8vr//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAADg+v//EAAAAENvbnRlbnQtRW5jb2RpbmcAAAAALvv//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAAAc+///DAAAAENvbnRlbnQtVHlwZQAAAABm+///FAAAABQAAAAcAAAAAAACASAAAAAAAAAAAAAAAAgADAAIAAcACAAAAAAAAAFAAAAADgAAAENvbnRlbnQtTGVuZ3RoAACu+///FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAAJz7//8EAAAARXRhZwAAAADe+///FAAAABQAAAAUAAAAAAAKARAAAAAAAAAAAAAAAMz7//8NAAAATGFzdC1Nb2RpZmllZAAAABb8//8UAAAAFAAAABQAAAAAAAoBEAAAAAAAAAAAAAAABPz//w0AAABDcmVhdGlvbi1UaW1lAAAATvz//xQAAAAUAAAArAAAAAAAEQGoAAAAAAAAAAEAAAAEAAAAFv7//xQAAAAUAAAAeAAAAAAAAA10AAAAAAAAAAIAAAA4AAAABAAAAJr8//8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAiPz//wUAAAB2YWx1ZQAAAG7+//8UAAAAFAAAABQAAAAAAAAFEAAAAAAAAAAAAAAAuPz//wMAAABrZXkAxPz//wcAAABlbnRyaWVzANT8//8EAAAAVGFncwAAAAAW/f//FAAAABQAAACsAAAAAAARAagAAAAAAAAAAQAAAAQAAADe/v//FAAAABQAAAB4AAAAAAAADXQAAAAAAAAAAgAAADgAAAAEAAAAYv3//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAABQ/f//BQAAAHZhbHVlAAAANv///xQAAAAUAAAAFAAAAAAAAAUQAAAAAAAAAAAAAACA/f//AwAAAGtleQCM/f//BwAAAGVudHJpZXMAnP3//woAAABPck1ldGFkYXRhAADi/f//FAAAABQAAAC8AAAAAAARAbgAAAAAAAAAAQAAAAQAAACq////FAAAABQAAACIAAAAAAAADYQAAAAAAAAAAgAAAEgAAAAEAAAALv7//xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAAAc/v//BQAAAHZhbHVlABIAGAAUAAAAEwAMAAAACAAEABIAAAAUAAAAFAAAABQAAAAAAAAFEAAAAAAAAAAAAAAAXP7//wMAAABrZXkAaP7//wcAAABlbnRyaWVzAHj+//8IAAAATWV0YWRhdGEAAAAAvv7//xQAAAAUAAAAFAAAAAAABgEQAAAAAAAAAAAAAACs/v//DwAAAEhhc1ZlcnNpb25zT25seQD2/v//FAAAABQAAAAUAAAAAAAGARAAAAAAAAAAAAAAAOT+//8QAAAASXNDdXJyZW50VmVyc2lvbgAAAAAy////FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAACD///8JAAAAVmVyc2lvbklkAAAAZv///xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAABU////CAAAAFNuYXBzaG90AAAAAJr///8UAAAAFAAAABQAAAAAAAYBEAAAAAAAAAAAAAAAiP///wcAAABEZWxldGVkAMr///8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAuP///wwAAABSZXNvdXJjZVR5cGUAABIAGAAUABMAEgAMAAAACAAEABIAAAAUAAAAFAAAABgAAAAAAAUBFAAAAAAAAAAAAAAABAAEAAQAAAAEAAAATmFtZQAAAAAAAAAA/////1gNAAAUAAAAAAAAAAwAFgAOABUAEAAEAAwAAACwBQAAAAAAAAAABAAQAAAAAAMKABgADAAIAAQACgAAABQAAABoCQAAAQAAAAAAAAAAAAAAlQAAAAAAAAAAAAAAAQAAAAAAAAAIAAAAAAAAAAgAAAAAAAAAEAAAAAAAAAAFAAAAAAAAABgAAAAAAAAAAQAAAAAAAAAgAAAAAAAAAAgAAAAAAAAAKAAAAAAAAAAEAAAAAAAAADAAAAAAAAAAAQAAAAAAAAA4AAAAAAAAAAEAAAAAAAAAQAAAAAAAAAABAAAAAAAAAEgAAAAAAAAACAAAAAAAAABQAAAAAAAAABwAAAAAAAAAcAAAAAAAAAABAAAAAAAAAHgAAAAAAAAACAAAAAAAAACAAAAAAAAAABwAAAAAAAAAoAAAAAAAAAABAAAAAAAAAKgAAAAAAAAAAQAAAAAAAACwAAAAAAAAAAEAAAAAAAAAuAAAAAAAAAABAAAAAAAAAMAAAAAAAAAAAQAAAAAAAADIAAAAAAAAAAgAAAAAAAAA0AAAAAAAAAABAAAAAAAAANgAAAAAAAAAAQAAAAAAAADgAAAAAAAAAAgAAAAAAAAA6AAAAAAAAAACAAAAAAAAAPAAAAAAAAAAAQAAAAAAAAD4AAAAAAAAAAgAAAAAAAAAAAEAAAAAAAACAAAAAAAAAAgBAAAAAAAAAQAAAAAAAAAQAQAAAAAAAAgAAAAAAAAAGAEAAAAAAAABAAAAAAAAACABAAAAAAAAAQAAAAAAAAAoAQAAAAAAAAgAAAAAAAAAMAEAAAAAAAACAAAAAAAAADgBAAAAAAAAAQAAAAAAAABAAQAAAAAAAAgAAAAAAAAASAEAAAAAAAACAAAAAAAAAFABAAAAAAAAAQAAAAAAAABYAQAAAAAAAAgAAAAAAAAAYAEAAAAAAAABAAAAAAAAAGgBAAAAAAAAAQAAAAAAAABwAQAAAAAAAAgAAAAAAAAAeAEAAAAAAAACAAAAAAAAAIABAAAAAAAAAQAAAAAAAACIAQAAAAAAAAgAAAAAAAAAkAEAAAAAAAACAAAAAAAAAJgBAAAAAAAAAQAAAAAAAACgAQAAAAAAAAgAAAAAAAAAqAEAAAAAAAABAAAAAAAAALABAAAAAAAACAAAAAAAAAC4AQAAAAAAAAEAAAAAAAAAwAEAAAAAAAAIAAAAAAAAAMgBAAAAAAAAEQAAAAAAAADgAQAAAAAAAAEAAAAAAAAA6AEAAAAAAAAIAAAAAAAAAPABAAAAAAAAAQAAAAAAAAD4AQAAAAAAAAgAAAAAAAAAAAIAAAAAAAAYAAAAAAAAABgCAAAAAAAAAQAAAAAAAAAgAgAAAAAAAAgAAAAAAAAAKAIAAAAAAAAEAAAAAAAAADACAAAAAAAAAQAAAAAAAAA4AgAAAAAAAAgAAAAAAAAAQAIAAAAAAAAFAAAAAAAAAEgCAAAAAAAAAQAAAAAAAABQAgAAAAAAAAgAAAAAAAAAWAIAAAAAAAAGAAAAAAAAAGACAAAAAAAAAQAAAAAAAABoAgAAAAAAAAgAAAAAAAAAcAIAAAAAAAAIAAAAAAAAAHgCAAAAAAAAAQAAAAAAAACAAgAAAAAAAAgAAAAAAAAAiAIAAAAAAAAIAAAAAAAAAJACAAAAAAAAAQAAAAAAAACYAgAAAAAAAAgAAAAAAAAAoAIAAAAAAAAJAAAAAAAAALACAAAAAAAAAQAAAAAAAAC4AgAAAAAAAAgAAAAAAAAAwAIAAAAAAAADAAAAAAAAAMgCAAAAAAAAAQAAAAAAAADQAgAAAAAAAAEAAAAAAAAA2AIAAAAAAAABAAAAAAAAAOACAAAAAAAACAAAAAAAAADoAgAAAAAAAAEAAAAAAAAA8AIAAAAAAAAIAAAAAAAAAPgCAAAAAAAABAAAAAAAAAAAAwAAAAAAAAEAAAAAAAAACAMAAAAAAAAIAAAAAAAAABADAAAAAAAACAAAAAAAAAAYAwAAAAAAAAEAAAAAAAAAIAMAAAAAAAAIAAAAAAAAACgDAAAAAAAACQAAAAAAAAA4AwAAAAAAAAEAAAAAAAAAQAMAAAAAAAAIAAAAAAAAAEgDAAAAAAAACAAAAAAAAABQAwAAAAAAAAEAAAAAAAAAWAMAAAAAAAABAAAAAAAAAGADAAAAAAAAAQAAAAAAAABoAwAAAAAAAAgAAAAAAAAAcAMAAAAAAAArAAAAAAAAAKADAAAAAAAAAQAAAAAAAACoAwAAAAAAAAgAAAAAAAAAsAMAAAAAAAAGAAAAAAAAALgDAAAAAAAAAQAAAAAAAADAAwAAAAAAAAEAAAAAAAAAyAMAAAAAAAABAAAAAAAAANADAAAAAAAACAAAAAAAAADYAwAAAAAAACQAAAAAAAAAAAQAAAAAAAABAAAAAAAAAAgEAAAAAAAACAAAAAAAAAAQBAAAAAAAAAcAAAAAAAAAGAQAAAAAAAABAAAAAAAAACAEAAAAAAAACAAAAAAAAAAoBAAAAAAAADYAAAAAAAAAYAQAAAAAAAABAAAAAAAAAGgEAAAAAAAACAAAAAAAAABwBAAAAAAAAAMAAAAAAAAAeAQAAAAAAAABAAAAAAAAAIAEAAAAAAAACAAAAAAAAACIBAAAAAAAAAEAAAAAAAAAkAQAAAAAAAAIAAAAAAAAAJgEAAAAAAAADQAAAAAAAACoBAAAAAAAAAEAAAAAAAAAsAQAAAAAAAAIAAAAAAAAALgEAAAAAAAAHAAAAAAAAADYBAAAAAAAAAEAAAAAAAAA4AQAAAAAAAAIAAAAAAAAAOgEAAAAAAAAAQAAAAAAAADwBAAAAAAAAAEAAAAAAAAA+AQAAAAAAAABAAAAAAAAAAAFAAAAAAAAAQAAAAAAAAAIBQAAAAAAAAEAAAAAAAAAEAUAAAAAAAAIAAAAAAAAABgFAAAAAAAAAQAAAAAAAAAgBQAAAAAAAAgAAAAAAAAAKAUAAAAAAAABAAAAAAAAADAFAAAAAAAACAAAAAAAAAA4BQAAAAAAAAEAAAAAAAAAQAUAAAAAAAAIAAAAAAAAAEgFAAAAAAAACAAAAAAAAABQBQAAAAAAAAEAAAAAAAAAWAUAAAAAAAAIAAAAAAAAAGAFAAAAAAAAGAAAAAAAAAB4BQAAAAAAAAEAAAAAAAAAgAUAAAAAAAAIAAAAAAAAAIgFAAAAAAAABAAAAAAAAACQBQAAAAAAAAEAAAAAAAAAmAUAAAAAAAAIAAAAAAAAAKAFAAAAAAAAAQAAAAAAAACoBQAAAAAAAAgAAAAAAAAAAAAAADsAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAABibG9iMQAAAAEAAAAAAAAAAAAAAAQAAABibG9iAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAcAAAAMjAyMC0wMS0wMVQwMDowMDowMC4wMDAwMDAwWgAAAAABAAAAAAAAAAAAAAAcAAAAMjAyMC0wMS0wMVQwMDowMDowMC4wMDAwMDAxWgAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAIAAABtawAAAAAAAAEAAAAAAAAAAAAAAAIAAABtdgAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAIAAABvawAAAAAAAAEAAAAAAAAAAAAAAAIAAABvdgAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAIAAAB0awAAAAAAAAEAAAAAAAAAAAAAAAIAAAB0dgAAAAAAAAEAAAAAAAAA6AMAAAAAAAABAAAAAAAAANAHAAAAAAAAAQAAAAAAAAAAAAAAEQAAADB4OEQ4RDhEOEQ4RDhEOEQ4AAAAAAAAAAEAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAYAAAAYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtAQAAAAAAAAAAAAAABAAAAGd6aXAAAAAAAQAAAAAAAAAAAAAABQAAAGVuLVVTAAAAAQAAAAAAAAAAAAAABgAAAGlubGluZQAAAQAAAAAAAAAAAAAACAAAAG5vLWNhY2hlAQAAAAAAAAAAAAAACAAAAEFRSURCQT09AQAAAAAAAAAAAAAACQAAAEJsb2NrQmxvYgAAAAAAAAABAAAAAAAAAAAAAAADAAAASG90AAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAC4CwAAAAAAAAEAAAAAAAAAAAAAAAQAAABDb29sAAAAAAEAAAAAAAAAAAAAAAgAAAB1bmxvY2tlZAEAAAAAAAAAAAAAAAkAAABhdmFpbGFibGUAAAAAAAAAAQAAAAAAAAAAAAAACAAAAGluZmluaXRlAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAACsAAABQbXQwUjBrazJ2N3E1cUIxUW5ublE0eFEwUTBRMFEwUTBRMFEwUTBRMFE9AAAAAAABAAAAAAAAAAAAAAAGAAAAc2NvcGUxAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAJAAAADAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMQAAAAABAAAAAAAAAAAAAAAHAAAAc3VjY2VzcwABAAAAAAAAAAAAAAA2AAAAaHR0cHM6Ly9hY2NvdW50LmJsb2IuY29yZS53aW5kb3dzLm5ldC9jb250YWluZXIvc291cmNlAAABAAAAAAAAAAAAAAADAAAANy83AAAAAAABAAAAAAAAAKAPAAAAAAAAAQAAAAAAAAAAAAAADQAAAGNvcHkgY29tcGxldGUAAAABAAAAAAAAAAAAAAAcAAAAMjAyMC0wMS0wMlQwMDowMDowMC4wMDAwMDAwWgAAAAABAAAAAAAAACoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAIgTAAAAAAAAAQAAAAAAAABwFwAAAAAAAAEAAAAAAAAAWBsAAAAAAAABAAAAAAAAAAAAAAAIAAAAdW5sb2NrZWQBAAAAAAAAAAAAAAAYAAAAcmVoeWRyYXRlLXBlbmRpbmctdG8taG90AQAAAAAAAAAAAAAABAAAAEhpZ2gAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAD/////AAAAAA== \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-dictionary.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-dictionary.arrow.base64 new file mode 100644 index 000000000000..a877f2b8d963 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-dictionary.arrow.base64 @@ -0,0 +1 @@ +/////7gAAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAAAIAAAAAAAAAAEAAAAYAAAAAAASABwAGAAXABYAEAAEAAwACAASAAAAKAAAABQAAAAUAAAARAAAAAAABQFAAAAAAAAAAAAAAAAIABAACAAEAAgAAAAUAAAAAQAAAAAAAAAIAAwACAAHAAgAAAAAAAABIAAAAAQABAAEAAAABAAAAE5hbWUAAAAA/////7gAAAAUAAAAAAAAAAwAHAASABsAFAAEAAwAAAAoAAAAAAAAAAAAAAAAAAQAEAAAAAAAAAIIABIACAAEAAgAAAAYAAAAAQAAAAAAAAAAAAoAGAAMAAgABAAKAAAAFAAAAEgAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAgAAAAAAAAADAAAAAAAAAAYAAAAAAAAAAoAAAAAAAAAAAAAAAEAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAABQAAAAoAAAAAAAAAYmxvYjFibG9iMgAAAAAAAP////+IAAAAFAAAAAAAAAAMABYADgAVABAABAAMAAAAEAAAAAAAAAAAAAQAEAAAAAADCgAYAAwACAAEAAoAAAAUAAAAOAAAAAIAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAD/////AAAAAA== \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-float.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-float.arrow.base64 new file mode 100644 index 000000000000..8065f28604cf --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-float.arrow.base64 @@ -0,0 +1 @@ +/////5AAAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAAAIAAAAAAAAAAEAAAAYAAAAAAASABgAFAATABIADAAAAAgABAASAAAAFAAAABQAAAAcAAAAAAADARwAAAAAAAAAAAAAAAAABgAIAAYABgAAAAAAAgAFAAAAU2NvcmUAAAD/////iAAAABQAAAAAAAAADAAWAA4AFQAQAAQADAAAABAAAAAAAAAAAAAEABAAAAAAAwoAGAAMAAgABAAKAAAAFAAAADgAAAABAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAPg//////wAAAAA= \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-map-nonstring.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-map-nonstring.arrow.base64 new file mode 100644 index 000000000000..9a26eb1d998a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-map-nonstring.arrow.base64 @@ -0,0 +1 @@ +/////0gBAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAAAIAAAAAAAAAAEAAAAEAAAAsv///xQAAAAUAAAA5AAAAAAAEQHgAAAAAAAAAAEAAAAEAAAAhv///xQAAAAUAAAArAAAAAAAAA2oAAAAAAAAAAIAAABsAAAAGAAAAAAAEgAYABQAEwASAAwAAAAIAAQAEgAAABQAAAAUAAAAHAAAAAAAAgEgAAAAAAAAAAAAAAAIAAwACAAHAAgAAAAAAAABQAAAAAUAAAB2YWx1ZQASABgAFAAAABMADAAAAAgABAASAAAAFAAAABQAAAAUAAAAAAAABRAAAAAAAAAAAAAAAOT///8DAAAAa2V5APD///8HAAAAZW50cmllcwAEAAQABAAAAAgAAABNZXRhZGF0YQAAAAAAAAAA/////xgBAAAUAAAAAAAAAAwAFgAOABUAEAAEAAwAAABAAAAAAAAAAAAABAAQAAAAAAMKABgADAAIAAQACgAAABQAAACYAAAAAQAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAIAAAAAAAAAAgAAAAAAAAAEAAAAAAAAAABAAAAAAAAABgAAAAAAAAAAQAAAAAAAAAgAAAAAAAAAAgAAAAAAAAAKAAAAAAAAAACAAAAAAAAADAAAAAAAAAAAQAAAAAAAAA4AAAAAAAAAAgAAAAAAAAAAAAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAgAAAGsxAAAAAAAAAQAAAAAAAAAqAAAAAAAAAP////8AAAAA \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-timestamp-milli.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-timestamp-milli.arrow.base64 new file mode 100644 index 000000000000..58c6263aa995 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-timestamp-milli.arrow.base64 @@ -0,0 +1 @@ +/////5gAAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAAAIAAAAAAAAAAEAAAAYAAAAAAASABgAFAATABIADAAAAAgABAASAAAAFAAAABQAAAAcAAAAAAAKARwAAAAAAAAAAAAAAAAABgAIAAYABgAAAAAAAQANAAAAQ3JlYXRpb24tVGltZQAAAP////+IAAAAFAAAAAAAAAAMABYADgAVABAABAAMAAAAEAAAAAAAAAAAAAQAEAAAAAADCgAYAAwACAAEAAoAAAAUAAAAOAAAAAEAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA6AMAAAAAAAD/////AAAAAA== \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-unknown-column.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-unknown-column.arrow.base64 new file mode 100644 index 000000000000..281e0d3be3da --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/reject-unknown-column.arrow.base64 @@ -0,0 +1 @@ +/////8AAAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAAAIAAAAAAAAAAIAAABQAAAABAAAAMr///8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAuP///wsAAABGdXR1cmVGaWVsZAAAABIAGAAUABMAEgAMAAAACAAEABIAAAAUAAAAFAAAABgAAAAAAAUBFAAAAAAAAAAAAAAABAAEAAQAAAAEAAAATmFtZQAAAAD/////2AAAABQAAAAAAAAADAAWAA4AFQAQAAQADAAAADAAAAAAAAAAAAAEABAAAAAAAwoAGAAMAAgABAAKAAAAFAAAAHgAAAABAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAABAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAQAAAAAAAAAAUAAAAAAAAAGAAAAAAAAAABAAAAAAAAACAAAAAAAAAACAAAAAAAAAAoAAAAAAAAAAgAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAABibG9iMQAAAAEAAAAAAAAAAAAAAAgAAABzdXJwcmlzZf////8AAAAA \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/representative.arrow.base64 b/sdk/storage/azure-storage-blob/src/test/resources/arrow/representative.arrow.base64 new file mode 100644 index 000000000000..7e43432b368e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/representative.arrow.base64 @@ -0,0 +1 @@ +/////wADAAAQAAAAAAAKAA4ABgANAAgACgAAAAAABAAQAAAAAAEKAAwAAAAIAAQACgAAAAgAAABsAAAAAgAAADgAAAAEAAAA2P///wgAAAAMAAAAAQAAADIAAAAPAAAATnVtYmVyT2ZSZWNvcmRzAAgADAAIAAQACAAAAAgAAAAUAAAACAAAAG5leHRQYWdlAAAAAAoAAABOZXh0TWFya2VyAAAHAAAAKAIAANwBAACQAQAAVAEAACABAADkAAAABAAAAAb+//8UAAAAFAAAALwAAAAAABEBuAAAAAAAAAABAAAABAAAAKr///8UAAAAFAAAAIgAAAAAAAANhAAAAAAAAAACAAAASAAAAAQAAABS/v//FAAAABQAAAAUAAAAAAAFARAAAAAAAAAAAAAAAED+//8FAAAAdmFsdWUAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAAAUAAAAFAAAAAAAAAUQAAAAAAAAAAAAAACA/v//AwAAAGtleQCM/v//BwAAAGVudHJpZXMAnP7//wgAAABNZXRhZGF0YQAAAADi/v//FAAAABQAAAAUAAAAAAAKARAAAAAAAAAAAAAAAND+//8NAAAAQ3JlYXRpb24tVGltZQAAABr///8UAAAAFAAAABQAAAAAAAYBEAAAAAAAAAAAAAAACP///wcAAABEZWxldGVkAEr///8UAAAAFAAAABQAAAAAAAUBEAAAAAAAAAAAAAAAOP///wwAAABDb250ZW50LVR5cGUAAAAAgv///xQAAAAUAAAAHAAAAAAAAgEgAAAAAAAAAAAAAAAIAAwACAAHAAgAAAAAAAABQAAAAA4AAABDb250ZW50LUxlbmd0aAAAyv///xQAAAAUAAAAFAAAAAAABQEQAAAAAAAAAAAAAAC4////DAAAAFJlc291cmNlVHlwZQAAEgAYABQAEwASAAwAAAAIAAQAEgAAABQAAAAUAAAAGAAAAAAABQEUAAAAAAAAAAAAAAAEAAQABAAAAAQAAABOYW1lAAAAAAAAAAD/////eAIAABQAAAAAAAAADAAWAA4AFQAQAAQADAAAACABAAAAAAAAAAAEABAAAAAAAwoAGAAMAAgABAAKAAAAFAAAAJgBAAACAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAABAAAAAAAAAAgAAAAAAAAADAAAAAAAAAAYAAAAAAAAAAkAAAAAAAAAKAAAAAAAAAABAAAAAAAAADAAAAAAAAAADAAAAAAAAABAAAAAAAAAAAoAAAAAAAAAUAAAAAAAAAABAAAAAAAAAFgAAAAAAAAAEAAAAAAAAABoAAAAAAAAAAEAAAAAAAAAcAAAAAAAAAAMAAAAAAAAAIAAAAAAAAAAGAAAAAAAAACYAAAAAAAAAAEAAAAAAAAAoAAAAAAAAAABAAAAAAAAAKgAAAAAAAAAAQAAAAAAAACwAAAAAAAAABAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAMgAAAAAAAAADAAAAAAAAADYAAAAAAAAAAEAAAAAAAAA4AAAAAAAAAABAAAAAAAAAOgAAAAAAAAADAAAAAAAAAD4AAAAAAAAAAQAAAAAAAAAAAEAAAAAAAABAAAAAAAAAAgBAAAAAAAADAAAAAAAAAAYAQAAAAAAAAQAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAABQAAAAkAAAAAAAAAYmxvYjFkaXIvAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAGJsb2JwcmVmaXgAAAAAAAABAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAYAAAAGAAAAAAAAABhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0BAAAAAAAAAAAAAAAAAAAAAQAAAAAAAADoAwAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAACAAAABAAAAAAAAABrMWsyAAAAAAMAAAAAAAAAAAAAAAIAAAAEAAAAAAAAAHYxdjIAAAAA/////wAAAAA= \ No newline at end of file From de6a97f8c8d2086dbc5275eeffacf10ff1ae81be Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 26 Jun 2026 11:06:53 -0400 Subject: [PATCH 52/65] change arrow classes to be more human readable --- .../util/ArrowBlobListDeserializer.java | 8 +-- .../util/BlobListArrowStreamReader.java | 64 ++++++++++++------- .../implementation/util/arrow/Message.java | 4 +- .../util/arrow/MessageHeader.java | 15 +++-- .../util/BlobListArrowGoldenDecodeTests.java | 4 +- 5 files changed, 60 insertions(+), 35 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 95fe3c7110b8..ad46d85ce175 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -12,7 +12,7 @@ import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.Column; import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.IntColumn; import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.MapColumn; -import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.Parsed; +import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.DecodedArrowStream; import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.StringColumn; import com.azure.storage.blob.implementation.util.BlobListArrowStreamReader.TimestampColumn; import com.azure.storage.blob.models.AccessTier; @@ -89,9 +89,9 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { String nextMarker = null; Integer numberOfRecords = null; - Parsed parsed = BlobListArrowStreamReader.read(arrowStream); + DecodedArrowStream decodedArrowStream = BlobListArrowStreamReader.read(arrowStream); - Map schemaMetadata = parsed.getSchemaMetadata(); + Map schemaMetadata = decodedArrowStream.getSchemaMetadata(); if (schemaMetadata != null) { nextMarker = schemaMetadata.get("NextMarker"); if (nextMarker != null && nextMarker.isEmpty()) { @@ -109,7 +109,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { } } - for (Batch batch : parsed.getBatches()) { + for (Batch batch : decodedArrowStream.getBatches()) { validateKnownColumns(batch); int rowCount = batch.getRowCount(); for (int i = 0; i < rowCount; i++) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index 60cb0bb66268..bfb8bd33c5f4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -54,11 +54,11 @@ private BlobListArrowStreamReader() { /** * The decoded contents of an Arrow IPC stream. */ - static final class Parsed { + static final class DecodedArrowStream { private final Map schemaMetadata; private final List batches; - Parsed(Map schemaMetadata, List batches) { + DecodedArrowStream(Map schemaMetadata, List batches) { this.schemaMetadata = schemaMetadata; this.batches = batches; } @@ -104,7 +104,7 @@ Set getColumnNames() { * @return the decoded schema metadata and record batches. * @throws BlobListArrowParseException if the stream is malformed or uses an unsupported feature. */ - static Parsed read(InputStream stream) { + static DecodedArrowStream read(InputStream stream) { byte[] bytes; try { bytes = readAll(stream); @@ -112,7 +112,7 @@ static Parsed read(InputStream stream) { throw new BlobListArrowParseException("ListBlobs Arrow parse failure: unable to read IPC stream.", e); } - ByteBuffer body = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); + ByteBuffer steamBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); Map schemaMetadata = null; List fields = null; @@ -120,16 +120,16 @@ static Parsed read(InputStream stream) { int pos = 0; int length = bytes.length; - while (pos + 4 <= length) { - int marker = body.getInt(pos); + while (atLeastFourBytesRemaining(pos, length)) { + int marker = steamBuffer.getInt(pos); pos += 4; int metadataLength; - if (marker == CONTINUATION_MARKER) { + if (isModernStream(marker)) { if (pos + 4 > length) { break; } - metadataLength = body.getInt(pos); + metadataLength = steamBuffer.getInt(pos); pos += 4; } else { // Pre-0.15 streams used a bare length prefix without the continuation marker. @@ -140,7 +140,7 @@ static Parsed read(InputStream stream) { // End-of-stream marker. break; } - if (metadataLength < 0 || pos + metadataLength > length) { + if (isMessageOutOfBounds(metadataLength, pos, length)) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: message metadata length is out of bounds."); } @@ -151,20 +151,16 @@ static Parsed read(InputStream stream) { pos += metadataLength; long bodyLength = message.bodyLength(); - if (bodyLength < 0 || pos + bodyLength > length) { + if (isMessageOutOfBounds(bodyLength, pos, length)) { throw new BlobListArrowParseException( - "ListBlobs Arrow parse failure: message body length is out of bounds."); + "ListBlobs Arrow parse failure: message steamBuffer length is out of bounds."); } int bodyStart = pos; pos += (int) bodyLength; byte headerType = message.headerType(); if (headerType == MessageHeader.SCHEMA) { - Schema schema = (Schema) message.header(new Schema()); - if (schema == null) { - throw new BlobListArrowParseException( - "ListBlobs Arrow parse failure: schema message header is missing."); - } + Schema schema = requireHeader((Schema) message.header(new Schema()), "schema"); if (schema.endianness() != Endianness.LITTLE) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: only little-endian streams are supported."); @@ -176,28 +172,48 @@ static Parsed read(InputStream stream) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: record batch encountered before schema."); } - RecordBatch recordBatch = (RecordBatch) message.header(new RecordBatch()); - if (recordBatch == null) { - throw new BlobListArrowParseException( - "ListBlobs Arrow parse failure: record batch message header is missing."); - } + RecordBatch recordBatch + = requireHeader((RecordBatch) message.header(new RecordBatch()), "record batch"); if (recordBatch.compression() != null) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: compressed record batches are not supported."); } - batches.add(buildBatch(fields, recordBatch, body, bodyStart)); + batches.add(buildBatch(fields, recordBatch, steamBuffer, bodyStart)); } else if (headerType == MessageHeader.DICTIONARY_BATCH) { throw new BlobListArrowParseException( "ListBlobs Arrow parse failure: dictionary-encoded streams are not supported."); } - // Other header types (Tensor, SparseTensor) are not expected and are ignored. + // Other header types (NONE, and the commented-out Tensor/SparseTensor members of the Arrow MessageHeader + // union) are not expected in a ListBlobs response and are ignored. See MessageHeader for why those two + // constants are kept (commented out) and how to revive them if the service ever starts emitting them. } if (fields == null) { throw new BlobListArrowParseException("ListBlobs Arrow parse failure: stream contained no schema."); } - return new Parsed(schemaMetadata == null ? new HashMap<>() : schemaMetadata, batches); + Map finalSchemaMetadata = schemaMetadata == null ? new HashMap<>() : schemaMetadata; + return new DecodedArrowStream(finalSchemaMetadata, batches); + } + + private static boolean isMessageOutOfBounds(long bodyLength, int pos, int length) { + return bodyLength < 0 || pos + bodyLength > length; + } + + private static boolean isModernStream(int marker) { + return marker == CONTINUATION_MARKER; + } + + private static boolean atLeastFourBytesRemaining(int pos, int length) { + return pos + 4 <= length; + } + + private static T requireHeader(T header, String description) { + if (header == null) { + throw new BlobListArrowParseException( + "ListBlobs Arrow parse failure: " + description + " message header is missing."); + } + return header; } private static Batch buildBatch(List fields, RecordBatch recordBatch, ByteBuffer body, int bodyStart) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java index 8a052c6c0f0a..5aa645f3f3ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java @@ -31,7 +31,9 @@ public static Message getRootAsMessage(ByteBuffer bb) { */ public static Message getRootAsMessage(ByteBuffer bb, Message obj) { bb.order(ByteOrder.LITTLE_ENDIAN); - return obj.__assign(bb.getInt(bb.position()) + bb.position(), bb); + // A FlatBuffer begins with a 4-byte offset (relative to here) pointing to the root table. + int rootTableOffset = bb.getInt(bb.position()) + bb.position(); + return obj.__assign(rootTableOffset, bb); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java index 4071fbac43b5..a902f37838a3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java @@ -5,6 +5,14 @@ /** * Discriminator values for the Arrow IPC {@code MessageHeader} union. + *

+ * Only the subset that a ListBlobs response can contain is defined as active constants: {@link #SCHEMA} and + * {@link #RECORD_BATCH} (a ListBlobs payload is a tabular result, i.e. a schema followed by record batches), + * plus {@link #DICTIONARY_BATCH}, which the reader recognizes solely to reject it. The union's remaining members, + * {@code TENSOR} (4) and {@code SPARSE_TENSOR} (5), are valid in the Arrow format but are never emitted for a + * ListBlobs response, so they are intentionally kept commented out below rather than deleted. If a future service or + * format change ever starts sending them, uncomment those constants and add the corresponding handling in + * {@code BlobListArrowStreamReader}. */ public final class MessageHeader { private MessageHeader() { @@ -18,8 +26,7 @@ private MessageHeader() { public static final byte DICTIONARY_BATCH = 2; /** A {@link RecordBatch} header. */ public static final byte RECORD_BATCH = 3; - /** A tensor header. */ - public static final byte TENSOR = 4; - /** A sparse tensor header. */ - public static final byte SPARSE_TENSOR = 5; + // TENSOR (4) and SPARSE_TENSOR (5) are omitted on purpose; see the class javadoc for why and how to revive them. + // public static final byte TENSOR = 4; + // public static final byte SPARSE_TENSOR = 5; } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java index d0b514d94208..ae5cedda007d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java @@ -97,8 +97,8 @@ public void allColumnsFixtureSchemaMatchesKnownColumnSet() throws IOException { // column is added to KNOWN_COLUMNS without regenerating the fixture (or vice versa), this fails loudly. Set fixtureColumns; try (InputStream stream = openFixture("allcolumns.arrow.base64")) { - BlobListArrowStreamReader.Parsed parsed = BlobListArrowStreamReader.read(stream); - fixtureColumns = parsed.getBatches().get(0).getColumnNames(); + BlobListArrowStreamReader.DecodedArrowStream decodedArrowStream = BlobListArrowStreamReader.read(stream); + fixtureColumns = decodedArrowStream.getBatches().get(0).getColumnNames(); } assertEquals(ArrowBlobListDeserializer.knownColumns(), fixtureColumns); } From 8d4bd474fcacf8970476168f6c3efed2c263b027 Mon Sep 17 00:00:00 2001 From: browndav Date: Fri, 26 Jun 2026 11:09:07 -0400 Subject: [PATCH 53/65] change DecodedArrowStream to record --- .../util/ArrowBlobListDeserializer.java | 4 ++-- .../util/BlobListArrowStreamReader.java | 21 +++---------------- .../util/BlobListArrowGoldenDecodeTests.java | 2 +- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index ad46d85ce175..0b3a348030df 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -91,7 +91,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { DecodedArrowStream decodedArrowStream = BlobListArrowStreamReader.read(arrowStream); - Map schemaMetadata = decodedArrowStream.getSchemaMetadata(); + Map schemaMetadata = decodedArrowStream.schemaMetadata(); if (schemaMetadata != null) { nextMarker = schemaMetadata.get("NextMarker"); if (nextMarker != null && nextMarker.isEmpty()) { @@ -109,7 +109,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { } } - for (Batch batch : decodedArrowStream.getBatches()) { + for (Batch batch : decodedArrowStream.batches()) { validateKnownColumns(batch); int rowCount = batch.getRowCount(); for (int i = 0; i < rowCount; i++) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index bfb8bd33c5f4..f8ee35cac4ec 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -52,24 +52,9 @@ private BlobListArrowStreamReader() { } /** - * The decoded contents of an Arrow IPC stream. - */ - static final class DecodedArrowStream { - private final Map schemaMetadata; - private final List batches; - - DecodedArrowStream(Map schemaMetadata, List batches) { - this.schemaMetadata = schemaMetadata; - this.batches = batches; - } - - Map getSchemaMetadata() { - return schemaMetadata; - } - - List getBatches() { - return batches; - } + * The decoded contents of an Arrow IPC stream. + */ + record DecodedArrowStream(Map schemaMetadata, List batches) { } /** diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java index ae5cedda007d..aa4d925476b0 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java @@ -98,7 +98,7 @@ public void allColumnsFixtureSchemaMatchesKnownColumnSet() throws IOException { Set fixtureColumns; try (InputStream stream = openFixture("allcolumns.arrow.base64")) { BlobListArrowStreamReader.DecodedArrowStream decodedArrowStream = BlobListArrowStreamReader.read(stream); - fixtureColumns = decodedArrowStream.getBatches().get(0).getColumnNames(); + fixtureColumns = decodedArrowStream.batches().get(0).getColumnNames(); } assertEquals(ArrowBlobListDeserializer.knownColumns(), fixtureColumns); } From bc247e99294c5070b58942b4a3370197f09419e4 Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 1 Jul 2026 14:53:21 -0400 Subject: [PATCH 54/65] Revert "change DecodedArrowStream to record" This reverts commit 8d4bd474fcacf8970476168f6c3efed2c263b027. --- .../util/ArrowBlobListDeserializer.java | 4 ++-- .../util/BlobListArrowStreamReader.java | 21 ++++++++++++++++--- .../util/BlobListArrowGoldenDecodeTests.java | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index 0b3a348030df..ad46d85ce175 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -91,7 +91,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { DecodedArrowStream decodedArrowStream = BlobListArrowStreamReader.read(arrowStream); - Map schemaMetadata = decodedArrowStream.schemaMetadata(); + Map schemaMetadata = decodedArrowStream.getSchemaMetadata(); if (schemaMetadata != null) { nextMarker = schemaMetadata.get("NextMarker"); if (nextMarker != null && nextMarker.isEmpty()) { @@ -109,7 +109,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { } } - for (Batch batch : decodedArrowStream.batches()) { + for (Batch batch : decodedArrowStream.getBatches()) { validateKnownColumns(batch); int rowCount = batch.getRowCount(); for (int i = 0; i < rowCount; i++) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index f8ee35cac4ec..bfb8bd33c5f4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -52,9 +52,24 @@ private BlobListArrowStreamReader() { } /** - * The decoded contents of an Arrow IPC stream. - */ - record DecodedArrowStream(Map schemaMetadata, List batches) { + * The decoded contents of an Arrow IPC stream. + */ + static final class DecodedArrowStream { + private final Map schemaMetadata; + private final List batches; + + DecodedArrowStream(Map schemaMetadata, List batches) { + this.schemaMetadata = schemaMetadata; + this.batches = batches; + } + + Map getSchemaMetadata() { + return schemaMetadata; + } + + List getBatches() { + return batches; + } } /** diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java index aa4d925476b0..ae5cedda007d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java @@ -98,7 +98,7 @@ public void allColumnsFixtureSchemaMatchesKnownColumnSet() throws IOException { Set fixtureColumns; try (InputStream stream = openFixture("allcolumns.arrow.base64")) { BlobListArrowStreamReader.DecodedArrowStream decodedArrowStream = BlobListArrowStreamReader.read(stream); - fixtureColumns = decodedArrowStream.batches().get(0).getColumnNames(); + fixtureColumns = decodedArrowStream.getBatches().get(0).getColumnNames(); } assertEquals(ArrowBlobListDeserializer.knownColumns(), fixtureColumns); } From d1d9062c71b476c4b6f10547479fad9b88da9738 Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 1 Jul 2026 16:26:50 -0400 Subject: [PATCH 55/65] add changes based on feedback --- .../storage/blob/BlobContainerAsyncClient.java | 7 +++++-- .../com/azure/storage/blob/BlobContainerClient.java | 10 +++++++--- .../util/BlobListArrowStreamReader.java | 2 +- .../com/azure/storage/blob/ContainerApiTests.java | 5 ++++- .../azure/storage/blob/ContainerAsyncApiTests.java | 6 +++++- .../src/test/resources/arrow/README.md | 13 ------------- .../storage/common/implementation/Constants.java | 8 ++++++++ .../common/implementation/StorageImplUtils.java | 13 +++++++++++++ .../storage/common/test/shared/TestEnvironment.java | 4 ++-- 9 files changed, 45 insertions(+), 23 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 6d5b4dd29249..44650de89a14 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -54,6 +54,7 @@ import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; @@ -1215,7 +1216,8 @@ private Mono> listBlobsFlatSegmentArrow(String marker, L return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { java.io.ByteArrayInputStream inputStream = new java.io.ByteArrayInputStream(bytes); - if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + if (StorageImplUtils.hasMatchingHeaderValue(contentType, + Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(inputStream); List value = arrowResult.getBlobItems() @@ -1455,7 +1457,8 @@ private Mono> listBlobsHierarchySegmentArrow(String mark return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { java.io.ByteArrayInputStream inputStream = new java.io.ByteArrayInputStream(bytes); - if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + if (StorageImplUtils.hasMatchingHeaderValue(contentType, + Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(inputStream); List value = arrowResult.getBlobItems() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index e59b2508f71a..696d95753dd4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -59,6 +59,7 @@ import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; @@ -1041,7 +1042,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin .setDetails(options.getDetails()); if (options.getStorageResponseSerializationFormat() == StorageResponseSerializationFormat.ARROW) { - finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW); + finalOptions.setStorageResponseSerializationFormat(StorageResponseSerializationFormat.ARROW) + .setEndBefore(options.getEndBefore()); } } @@ -1069,7 +1071,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin // The response body is an InputStream backed by the network buffer. It must be closed to release the // underlying buffer, otherwise the transport (e.g. Netty) will report a resource leak. try (InputStream responseBody = response.getValue()) { - if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + if (StorageImplUtils.hasMatchingHeaderValue(contentType, + Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { // Arrow response — parse with Arrow parser entrypoint ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(responseBody); @@ -1273,7 +1276,8 @@ private PagedResponse listBlobsHierarchySegment(String marker, String // The response body is an InputStream backed by the network buffer. It must be closed to release the // underlying buffer, otherwise the transport (e.g. Netty) will report a resource leak. try (InputStream responseBody = response.getValue()) { - if (contentType != null && contentType.contentEquals("application/vnd.apache.arrow.stream")) { + if (StorageImplUtils.hasMatchingHeaderValue(contentType, + Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(responseBody); List value = arrowResult.getBlobItems() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index bfb8bd33c5f4..cc340fac4840 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -153,7 +153,7 @@ static DecodedArrowStream read(InputStream stream) { long bodyLength = message.bodyLength(); if (isMessageOutOfBounds(bodyLength, pos, length)) { throw new BlobListArrowParseException( - "ListBlobs Arrow parse failure: message steamBuffer length is out of bounds."); + "ListBlobs Arrow parse failure: message body length is out of bounds."); } int bodyStart = pos; pos += (int) bodyLength; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index f72b8908f8c1..4eea5979e577 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -46,6 +46,7 @@ import com.azure.storage.blob.specialized.PageBlobClient; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.test.shared.TestHttpClientType; import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.PlaybackOnly; @@ -2314,7 +2315,9 @@ public void listBlobsArrowDeserializer() throws Exception { // Verify Content-Type is Arrow String contentType = response.getDeserializedHeaders().getContentType(); - assertTrue(contentType.contains("application/vnd.apache.arrow.stream"), + assertTrue( + StorageImplUtils.hasMatchingHeaderValue(contentType, + Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM), "Expected Arrow content type but got: " + contentType); // Deserialize using ArrowBlobListDeserializer diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 6e574cda0e27..f0b87b33ccd2 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -28,6 +28,8 @@ import com.azure.storage.blob.specialized.BlobAsyncClientBase; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.blob.specialized.PageBlobAsyncClient; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.test.shared.TestHttpClientType; import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.PlaybackOnly; @@ -2314,7 +2316,9 @@ public void listBlobsArrowDeserializer() { .flatMap(response -> { // Verify Content-Type is Arrow String contentType = response.getDeserializedHeaders().getContentType(); - assertTrue(contentType.contains("application/vnd.apache.arrow.stream"), + assertTrue( + StorageImplUtils.hasMatchingHeaderValue(contentType, + Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM), "Expected Arrow content type but got: " + contentType); // Collect the Flux body into a byte[] and feed it to the deserializer. diff --git a/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md b/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md index bfd89c0edf2a..747f82ae3a7f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md +++ b/sdk/storage/azure-storage-blob/src/test/resources/arrow/README.md @@ -4,19 +4,6 @@ These `*.arrow.base64` files are committed golden fixtures for the vendored List deserializer tests (`BlobListArrowGoldenDecodeTests`, `BlobListArrowStreamReaderRejectionTests`). Each one is an Apache Arrow IPC stream that has been **Base64-encoded** before being written to disk. -## Why Base64 instead of raw binary? - -Storing the payloads as Base64 text is deliberate and safer for golden fixtures: - -- **No line-ending / encoding corruption.** Raw binary committed on Windows can be mangled by - git autocrlf or editor "fixes." Base64 is plain ASCII and survives git/editor round-trips - byte-for-byte — which is exactly what a byte-exact golden fixture needs. -- **Diff- and review-friendly.** git treats raw `.arrow` blobs as opaque binary; Base64 is text, - so it shows up as a normal blob in PRs. -- **No special tooling to read/regenerate.** The generator emits Base64 directly and the tests - decode it inline (`Base64.getDecoder().decode(...)`), so no binary read mode or hex tooling is - required. - The tests decode the Base64 back to the original Arrow bytes before parsing, so the on-disk encoding is transparent to the deserializer under test. diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index 687e80c71961..fd72f67021d5 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -291,6 +291,14 @@ private HeaderConstants() { } } + public static final class ContentTypeConstants { + public static final String APPLICATION_VND_APACHE_ARROW_STREAM = "application/vnd.apache.arrow.stream"; + + private ContentTypeConstants() { + // Private to prevent construction. + } + } + /** * Defines constants for use with URLs. * diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java index 90aad19fffbb..081ea1f2df72 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java @@ -397,6 +397,19 @@ public static String convertStorageExceptionMessage(String message, HttpResponse return message; } + /** + * Checks whether the provided header value is non-null, non-empty, and starts with the expected value. + * + * @param headerValue The header value to inspect. + * @param expectedHeaderValue The expected header value prefix. + * @return {@code true} if the header value is present and matches the expected value; otherwise {@code false}. + */ + public static boolean hasMatchingHeaderValue(String headerValue, String expectedHeaderValue) { + return !CoreUtils.isNullOrEmpty(headerValue) + && !CoreUtils.isNullOrEmpty(expectedHeaderValue) + && headerValue.startsWith(expectedHeaderValue); + } + /** * Given a String representing a date in a form of the ISO8601 pattern, generates a Date representing it with up to * millisecond precision. diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java index 6134a8dbf9ee..5d9bc1c9dfac 100644 --- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java +++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/TestEnvironment.java @@ -107,8 +107,8 @@ private static TestAccount readTestAccountFromEnvironment(String prefix, TestMod + "AccountKey=%s;EndpointSuffix=core.windows.net", name, key); } } - String blobEndpoint = String.format(SCHEME + "://%s." + "blob."+ "preprod." +"core.windows.net", name); - String blobEndpointSecondary = String.format(SCHEME + "://%s-secondary." + "preprod." +"core.windows.net", name); + String blobEndpoint = String.format(SCHEME + "://%s.blob.core.windows.net", name); + String blobEndpointSecondary = String.format(SCHEME + "://%s-secondary.blob.core.windows.net", name); String dataLakeEndpoint = String.format(SCHEME + "://%s.dfs.core.windows.net", name); String queueEndpoint = String.format(SCHEME + "://%s.queue.core.windows.net", name); String fileEndpoint = String.format(SCHEME + "://%s.file.core.windows.net", name); From d2623febdcbf42aff1eeee186a36226040a770eb Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 2 Jul 2026 09:05:39 -0400 Subject: [PATCH 56/65] update recording --- sdk/storage/azure-storage-blob/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 99770bd61507..5f4b6d71aa4a 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_c4cdc68ef6" + "Tag": "java/storage/azure-storage-blob_e8c3fadcb8" } From f2bf13e6529c89d9e0289c490cba4d0cfd62a48f Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 2 Jul 2026 17:15:28 -0400 Subject: [PATCH 57/65] rename arrow to apachearrow --- .../util/BlobListArrowStreamReader.java | 26 +++++++++---------- .../BodyCompression.java | 2 +- .../util/{arrow => apachearrow}/Buffer.java | 2 +- .../{arrow => apachearrow}/Endianness.java | 2 +- .../util/{arrow => apachearrow}/Field.java | 2 +- .../{arrow => apachearrow}/FieldNode.java | 2 +- .../util/{arrow => apachearrow}/Int.java | 2 +- .../util/{arrow => apachearrow}/KeyValue.java | 2 +- .../util/{arrow => apachearrow}/Message.java | 2 +- .../{arrow => apachearrow}/MessageHeader.java | 2 +- .../{arrow => apachearrow}/RecordBatch.java | 2 +- .../util/{arrow => apachearrow}/Schema.java | 2 +- .../util/{arrow => apachearrow}/TimeUnit.java | 2 +- .../{arrow => apachearrow}/Timestamp.java | 2 +- .../util/{arrow => apachearrow}/Type.java | 2 +- .../{arrow => apachearrow}/package-info.java | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/BodyCompression.java (93%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Buffer.java (95%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Endianness.java (85%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Field.java (97%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/FieldNode.java (94%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Int.java (95%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/KeyValue.java (95%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Message.java (97%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/MessageHeader.java (95%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/RecordBatch.java (98%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Schema.java (97%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/TimeUnit.java (93%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Timestamp.java (94%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/Type.java (98%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/{arrow => apachearrow}/package-info.java (94%) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index cc340fac4840..d5eab7e25c88 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -4,19 +4,19 @@ package com.azure.storage.blob.implementation.util; import com.azure.storage.blob.implementation.models.BlobListArrowParseException; -import com.azure.storage.blob.implementation.util.arrow.Buffer; -import com.azure.storage.blob.implementation.util.arrow.Endianness; -import com.azure.storage.blob.implementation.util.arrow.Field; -import com.azure.storage.blob.implementation.util.arrow.FieldNode; -import com.azure.storage.blob.implementation.util.arrow.Int; -import com.azure.storage.blob.implementation.util.arrow.KeyValue; -import com.azure.storage.blob.implementation.util.arrow.Message; -import com.azure.storage.blob.implementation.util.arrow.MessageHeader; -import com.azure.storage.blob.implementation.util.arrow.RecordBatch; -import com.azure.storage.blob.implementation.util.arrow.Schema; -import com.azure.storage.blob.implementation.util.arrow.TimeUnit; -import com.azure.storage.blob.implementation.util.arrow.Timestamp; -import com.azure.storage.blob.implementation.util.arrow.Type; +import com.azure.storage.blob.implementation.util.apachearrow.Buffer; +import com.azure.storage.blob.implementation.util.apachearrow.Endianness; +import com.azure.storage.blob.implementation.util.apachearrow.Field; +import com.azure.storage.blob.implementation.util.apachearrow.FieldNode; +import com.azure.storage.blob.implementation.util.apachearrow.Int; +import com.azure.storage.blob.implementation.util.apachearrow.KeyValue; +import com.azure.storage.blob.implementation.util.apachearrow.Message; +import com.azure.storage.blob.implementation.util.apachearrow.MessageHeader; +import com.azure.storage.blob.implementation.util.apachearrow.RecordBatch; +import com.azure.storage.blob.implementation.util.apachearrow.Schema; +import com.azure.storage.blob.implementation.util.apachearrow.TimeUnit; +import com.azure.storage.blob.implementation.util.apachearrow.Timestamp; +import com.azure.storage.blob.implementation.util.apachearrow.Type; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java similarity index 93% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java index 405076a1d5d1..b60fd1f73c7e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/BodyCompression.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java index af0b726b850a..3726d713125b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Buffer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Struct; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java similarity index 85% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java index a78fa5073ebc..328c1c883738 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Endianness.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; /** * Values for the Arrow IPC {@code Endianness} enum. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java similarity index 97% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java index 4f45fe9d72ca..f0b7f4d164dc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Field.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java similarity index 94% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java index 53dbd61568f5..e4da21eba40f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/FieldNode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Struct; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java index c488e4fef797..a00ea3e521e6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Int.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java index e7a2474311cd..5122c4a04116 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/KeyValue.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java similarity index 97% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java index 5aa645f3f3ef..193ec3a994dd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Message.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java index a902f37838a3..ebdd3c08f530 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/MessageHeader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; /** * Discriminator values for the Arrow IPC {@code MessageHeader} union. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java index 97007c1fb7d7..395d7bd1c368 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/RecordBatch.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java similarity index 97% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java index 042dd9b491fa..cb2828e8f0f9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Schema.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java similarity index 93% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java index 9eefa9e55904..5ee99edf341e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/TimeUnit.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; /** * Values for the Arrow IPC {@code TimeUnit} enum. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java similarity index 94% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java index 7f1c92eed98f..a69e5087a6b1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Timestamp.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; import com.google.flatbuffers.Table; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java index b23d76e741a3..d99fcabdd109 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/Type.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; /** * Discriminator values for the Arrow IPC {@code Type} union, identifying a field's logical type. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/package-info.java similarity index 94% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/package-info.java index cf349c6ed350..dff44c7d8543 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/arrow/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/package-info.java @@ -14,4 +14,4 @@ * specification (see {@code Schema.fbs} and {@code Message.fbs} in the Apache Arrow project, licensed under the Apache * License, Version 2.0) and must match the on-the-wire layout produced by the Storage service. */ -package com.azure.storage.blob.implementation.util.arrow; +package com.azure.storage.blob.implementation.util.apachearrow; From 022e05ee4801778cb3ac77835982f9946e229651 Mon Sep 17 00:00:00 2001 From: browndav Date: Thu, 2 Jul 2026 19:09:47 -0400 Subject: [PATCH 58/65] add apache licensing --- NOTICE.txt | 19 +++++++++++++++- sdk/storage/azure-storage-blob/pom.xml | 10 ++++++--- .../util/apachearrow/BodyCompression.java | 22 +++++++++++++++++-- .../util/apachearrow/Buffer.java | 22 +++++++++++++++++-- .../util/apachearrow/Endianness.java | 22 +++++++++++++++++-- .../util/apachearrow/Field.java | 22 +++++++++++++++++-- .../util/apachearrow/FieldNode.java | 22 +++++++++++++++++-- .../implementation/util/apachearrow/Int.java | 22 +++++++++++++++++-- .../util/apachearrow/KeyValue.java | 22 +++++++++++++++++-- .../util/apachearrow/Message.java | 22 +++++++++++++++++-- .../util/apachearrow/MessageHeader.java | 22 +++++++++++++++++-- .../util/apachearrow/RecordBatch.java | 22 +++++++++++++++++-- .../util/apachearrow/Schema.java | 22 +++++++++++++++++-- .../util/apachearrow/TimeUnit.java | 22 +++++++++++++++++-- .../util/apachearrow/Timestamp.java | 22 +++++++++++++++++-- .../implementation/util/apachearrow/Type.java | 22 +++++++++++++++++-- 16 files changed, 305 insertions(+), 32 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index ef12f9a58bdc..391057bad80d 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -500,6 +500,23 @@ See the License for the specific language governing permissions and limitations ------------------------------------------------------------------------------------------------- +License notice for Apache Arrow +------------------------------------------------------------------------------- + +apache-arrow-java (https://github.com/apache/arrow-java) +Copyright 2015-2024 The Apache Software Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License +is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and limitations under the License. + +------------------------------------------------------------------------------------------------- + License notice for GraalVM ------------------------------------------------------------------------------ org.graalvm.sdk:graal-sdk - https://github.com/graalvm/native-build-tools/blob/master/common/junit-platform-native/LICENSE @@ -609,4 +626,4 @@ compliance with the License. You may obtain a copy of the License at: Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific -language governing permissions and limitations under the License. \ No newline at end of file +language governing permissions and limitations under the License. diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 4b9d9ac6cb4a..4d2a48b9f6c6 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -59,6 +59,10 @@ concurrent + + **/implementation/util/apachearrow/**/*.java + **/implementation/util/apachearrow/**/*.java + false @@ -141,9 +145,9 @@ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java index b60fd1f73c7e..44b985c4ddf6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/BodyCompression.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java index 3726d713125b..9016b0595dc8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Buffer.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java index 328c1c883738..af39bc7b6967 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Endianness.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java index f0b7f4d164dc..5a27e0e52f24 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Field.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java index e4da21eba40f..2cf4f51fc732 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/FieldNode.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java index a00ea3e521e6..cef3b699d894 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Int.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java index 5122c4a04116..7b26bb99a59b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/KeyValue.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java index 193ec3a994dd..3fef56e061de 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Message.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java index ebdd3c08f530..8eca35389946 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/MessageHeader.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java index 395d7bd1c368..63697054c91a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/RecordBatch.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java index cb2828e8f0f9..1cf0f8fb0669 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Schema.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java index 5ee99edf341e..2ba6d3072d40 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/TimeUnit.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java index a69e5087a6b1..e22e9b6147d6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Timestamp.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java index d99fcabdd109..63112d841c78 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java @@ -1,5 +1,23 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +git/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Portions Copyright (c) Microsoft Corporation + */ package com.azure.storage.blob.implementation.util.apachearrow; From fc15bc80b72c18d243460a94ff5fcb6f73c86483 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 6 Jul 2026 11:13:49 -0400 Subject: [PATCH 59/65] add apache share profile to pom --- sdk/storage/azure-storage-blob/pom.xml | 79 +++++++++++++++++++ .../implementation/util/apachearrow/Type.java | 2 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 4d2a48b9f6c6..03a609307cfd 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -200,5 +200,84 @@ + + + + + + + + + shade-apache-arrow-format + + + shade-apache-arrow-format + + + + + + org.apache.arrow + arrow-format + 19.0.0 + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + + shade + package + + shade + + + + + + true + true + true + shade-apache-arrow-format + false + + + + org.apache.arrow:arrow-format + + + + + + org.apache.arrow.flatbuf + com.azure.storage.blob.implementation.util.apachearrow + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.1 + + + + + org.apache.arrow:arrow-format:[19.0.0] + + + + + + + + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java index 63112d841c78..690eebf19562 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/apachearrow/Type.java @@ -1,4 +1,4 @@ -git/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. From 02681783d26e37ce9a3b164fb7fddb24ea3d3ab1 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 6 Jul 2026 13:24:22 -0400 Subject: [PATCH 60/65] add versions to pom shade profiling, add "Accept" header to match only available --- sdk/storage/azure-storage-blob/pom.xml | 6 +++--- .../src/test/java/com/azure/storage/blob/BlobTestBase.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 03a609307cfd..90796b484e71 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -219,7 +219,7 @@ org.apache.arrow arrow-format - 19.0.0 + 19.0.0 @@ -249,7 +249,7 @@ - org.apache.arrow:arrow-format + org.apache.arrow:arrow-format @@ -270,7 +270,7 @@ - org.apache.arrow:arrow-format:[19.0.0] + org.apache.arrow:arrow-format:[19.0.0] diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java index 71345472c393..6a61be0dba3b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java @@ -213,7 +213,7 @@ public void beforeTest() { interceptorManager.addMatchers(Collections.singletonList(new CustomMatcher().setComparingBodies(false) .setHeadersKeyOnlyMatch(Arrays.asList("x-ms-lease-id", "x-ms-proposed-lease-id", "If-Modified-Since", "If-Unmodified-Since", "x-ms-expiry-time", "x-ms-source-if-modified-since", - "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", + "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", "Accept", "x-ms-blob-if-modified-since", "x-ms-blob-if-unmodified-since")) .setQueryOrderingIgnored(true) .setIgnoredQueryParameters(Collections.singletonList("sv")))); From 169a280d52727ff250795fe05b4924ce9a6407c0 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 6 Jul 2026 13:32:02 -0400 Subject: [PATCH 61/65] add arrow 19 dep to external_dependencies.txt file --- eng/versioning/external_dependencies.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index f46ba3118d01..e8b29ee9ea20 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -64,6 +64,7 @@ io.vertx:vertx-codegen;4.5.27 io.vertx:vertx-core;4.5.27 javax.websocket:javax.websocket-api;1.1 org.apache.ant:ant;1.10.15 +org.apache.arrow:arrow-format;19.0.0 org.apache.avro:avro;1.11.4 org.apache.avro:avro-maven-plugin;1.11.4 org.apache.commons:commons-lang3;3.18.0 From c5e13c80a84c86044cdf93d5543904f979eb3965 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 6 Jul 2026 14:28:12 -0400 Subject: [PATCH 62/65] fix linting issues --- .../util/BlobListArrowStreamReader.java | 126 +++++++++--------- 1 file changed, 60 insertions(+), 66 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index d5eab7e25c88..30620cb4d341 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -231,56 +231,44 @@ private static Column buildColumn(ArrowField field, BatchCursor cursor) { switch (field.typeType) { case Type.UTF8: - case Type.BINARY: { - BufferRegion validity = cursor.nextBuffer(); - BufferRegion offsets = cursor.nextBuffer(); - BufferRegion data = cursor.nextBuffer(); - return new StringColumn(valueCount, validity, offsets, data, cursor.body, cursor.bodyStart); - } - - case Type.BOOL: { - BufferRegion validity = cursor.nextBuffer(); - BufferRegion data = cursor.nextBuffer(); - return new BoolColumn(valueCount, validity, data, cursor.body, cursor.bodyStart); - } + case Type.BINARY: + return new StringColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), cursor.nextBuffer(), + cursor.body, cursor.bodyStart); - case Type.INT: { - BufferRegion validity = cursor.nextBuffer(); - BufferRegion data = cursor.nextBuffer(); - return new IntColumn(valueCount, validity, data, field.bitWidth, field.signed, cursor.body, + case Type.BOOL: + return new BoolColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), cursor.body, cursor.bodyStart); - } - case Type.TIMESTAMP: { - BufferRegion validity = cursor.nextBuffer(); - BufferRegion data = cursor.nextBuffer(); - return new TimestampColumn(valueCount, validity, data, cursor.body, cursor.bodyStart); - } + case Type.INT: + return new IntColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), field.bitWidth, + field.signed, cursor.body, cursor.bodyStart); - case Type.MAP: { - BufferRegion validity = cursor.nextBuffer(); - BufferRegion offsets = cursor.nextBuffer(); + case Type.TIMESTAMP: + return new TimestampColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), cursor.body, + cursor.bodyStart); + + case Type.MAP: + BufferRegion mapValidity = cursor.nextBuffer(); + BufferRegion mapOffsets = cursor.nextBuffer(); // Map has a single Struct child ("entries") with key and value children. - ArrowField entries = field.children.get(0); - StructColumn struct = (StructColumn) buildColumn(entries, cursor); - Column keyColumn = struct.children.get(0); - Column valueColumn = struct.children.get(1); - if (!(keyColumn instanceof StringColumn) || !(valueColumn instanceof StringColumn)) { + ArrowField mapEntries = field.children.get(0); + StructColumn mapStruct = (StructColumn) buildColumn(mapEntries, cursor); + Column mapKeyColumn = mapStruct.children.get(0); + Column mapValueColumn = mapStruct.children.get(1); + if (!(mapKeyColumn instanceof StringColumn) || !(mapValueColumn instanceof StringColumn)) { throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + field.name + "' map entries must be string keys and values."); } - return new MapColumn(valueCount, validity, offsets, (StringColumn) keyColumn, - (StringColumn) valueColumn, cursor.body, cursor.bodyStart); - } + return new MapColumn(valueCount, mapValidity, mapOffsets, (StringColumn) mapKeyColumn, + (StringColumn) mapValueColumn, cursor.body, cursor.bodyStart); - case Type.STRUCT: { + case Type.STRUCT: cursor.nextBuffer(); // struct validity buffer - List children = new ArrayList<>(field.children.size()); + List structChildren = new ArrayList<>(field.children.size()); for (ArrowField child : field.children) { - children.add(buildColumn(child, cursor)); + structChildren.add(buildColumn(child, cursor)); } - return new StructColumn(children); - } + return new StructColumn(structChildren); default: throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + field.name @@ -298,30 +286,31 @@ private static List readFields(Schema schema) { } private static ArrowField readField(Field field) { - ArrowField arrowField = new ArrowField(); - arrowField.name = field.name(); - arrowField.typeType = field.typeType(); + String name = field.name(); + byte typeType = field.typeType(); + int bitWidth = 0; + boolean signed = false; - if (arrowField.typeType == Type.INT) { + if (typeType == Type.INT) { Int intType = (Int) field.type(new Int()); if (intType != null) { - arrowField.bitWidth = intType.bitWidth(); - arrowField.signed = intType.isSigned(); + bitWidth = intType.bitWidth(); + signed = intType.isSigned(); } - } else if (arrowField.typeType == Type.TIMESTAMP) { + } else if (typeType == Type.TIMESTAMP) { Timestamp timestamp = (Timestamp) field.type(new Timestamp()); if (timestamp != null && timestamp.unit() != TimeUnit.SECOND) { - throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + arrowField.name + throw new BlobListArrowParseException("ListBlobs Arrow parse failure: field '" + name + "' uses an unsupported timestamp unit '" + TimeUnit.name(timestamp.unit()) + "'."); } } int childCount = field.childrenLength(); - arrowField.children = new ArrayList<>(childCount); + List children = new ArrayList<>(childCount); for (int i = 0; i < childCount; i++) { - arrowField.children.add(readField(field.children(i))); + children.add(readField(field.children(i))); } - return arrowField; + return new ArrowField(name, typeType, bitWidth, signed, children); } private static Map readKeyValueMetadata(Schema schema) { @@ -351,11 +340,19 @@ private static byte[] readAll(InputStream stream) throws IOException { * A parsed schema field with the minimal type information required for decoding. */ private static final class ArrowField { - private String name; - private byte typeType; - private int bitWidth; - private boolean signed; - private List children = new ArrayList<>(); + private final String name; + private final byte typeType; + private final int bitWidth; + private final boolean signed; + private final List children; + + ArrowField(String name, byte typeType, int bitWidth, boolean signed, List children) { + this.name = name; + this.typeType = typeType; + this.bitWidth = bitWidth; + this.signed = signed; + this.children = children; + } } /** @@ -497,20 +494,17 @@ long get(int index) { case 64: return body.getLong(base + index * 8); - case 32: { - int value = body.getInt(base + index * 4); - return signed ? value : (value & 0xFFFFFFFFL); - } + case 32: + int value32 = body.getInt(base + index * 4); + return signed ? value32 : (value32 & 0xFFFFFFFFL); - case 16: { - short value = body.getShort(base + index * 2); - return signed ? value : (value & 0xFFFF); - } + case 16: + short value16 = body.getShort(base + index * 2); + return signed ? value16 : (value16 & 0xFFFF); - case 8: { - byte value = body.get(base + index); - return signed ? value : (value & 0xFF); - } + case 8: + byte value8 = body.get(base + index); + return signed ? value8 : (value8 & 0xFF); default: throw new BlobListArrowParseException( From f75a7680a3aa0d6e66f2bd60b9f39b02858c1d84 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 6 Jul 2026 14:49:18 -0400 Subject: [PATCH 63/65] fix more linting errors with spotless --- .../blob/implementation/util/BlobListArrowStreamReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java index 30620cb4d341..8db6c0b24556 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobListArrowStreamReader.java @@ -240,8 +240,8 @@ private static Column buildColumn(ArrowField field, BatchCursor cursor) { cursor.bodyStart); case Type.INT: - return new IntColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), field.bitWidth, - field.signed, cursor.body, cursor.bodyStart); + return new IntColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), field.bitWidth, field.signed, + cursor.body, cursor.bodyStart); case Type.TIMESTAMP: return new TimestampColumn(valueCount, cursor.nextBuffer(), cursor.nextBuffer(), cursor.body, From 913fff36f6604de26b34ad974718526b53871a10 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 6 Jul 2026 16:17:42 -0400 Subject: [PATCH 64/65] remove unused imports --- .../com/azure/storage/file/share/ShareDirectoryAsyncClient.java | 1 - .../java/com/azure/storage/file/share/ShareDirectoryClient.java | 1 - 2 files changed, 2 deletions(-) diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java index 56646909b01e..da521421629a 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java @@ -51,7 +51,6 @@ import reactor.core.publisher.Mono; import java.time.Duration; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java index 6065f4684853..cfa7b7383b81 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java @@ -58,7 +58,6 @@ import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; import java.time.Duration; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; From 2063b04cf55fd811314a80d49f0d0abc1e4865f1 Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 8 Jul 2026 13:13:50 -0400 Subject: [PATCH 65/65] revert add "Accept" to blobbasetest, add recordings --- sdk/storage/azure-storage-blob/assets.json | 2 +- .../src/test/java/com/azure/storage/blob/BlobTestBase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 5f4b6d71aa4a..d5cf9765e84f 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_e8c3fadcb8" + "Tag": "java/storage/azure-storage-blob_13b4ad4e16" } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java index 6a61be0dba3b..71345472c393 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java @@ -213,7 +213,7 @@ public void beforeTest() { interceptorManager.addMatchers(Collections.singletonList(new CustomMatcher().setComparingBodies(false) .setHeadersKeyOnlyMatch(Arrays.asList("x-ms-lease-id", "x-ms-proposed-lease-id", "If-Modified-Since", "If-Unmodified-Since", "x-ms-expiry-time", "x-ms-source-if-modified-since", - "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", "Accept", + "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", "x-ms-blob-if-modified-since", "x-ms-blob-if-unmodified-since")) .setQueryOrderingIgnored(true) .setIgnoredQueryParameters(Collections.singletonList("sv"))));