Class LibraryClient

java.lang.Object
com.azure.analytics.synapse.artifacts.LibraryClient

public final class LibraryClient extends Object
Initializes a new instance of the synchronous ArtifactsClient type.
  • Method Details

    • list

      public com.azure.core.http.rest.PagedIterable<LibraryResource> list()
      Lists Library.
      Returns:
      a list of Library resources as paginated response with PagedIterable.
      Throws:
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • list

      public com.azure.core.http.rest.PagedIterable<LibraryResource> list(com.azure.core.util.Context context)
      Lists Library.
      Parameters:
      context - The context to associate with this operation.
      Returns:
      a list of Library resources as paginated response with PagedIterable.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • flush

      public LibraryResourceInfo flush(String libraryName)
      Flush Library.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • flushWithResponse

      public com.azure.core.http.rest.Response<LibraryResourceInfo> flushWithResponse(String libraryName, com.azure.core.util.Context context)
      Flush Library.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      context - The context to associate with this operation.
      Returns:
      the response body along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getOperationResult

      public LibraryResource getOperationResult(String operationId)
      Get Operation result for Library.
      Parameters:
      operationId - operation id for which status is requested.
      Returns:
      operation result for Library.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getOperationResultWithResponse

      public com.azure.core.http.rest.Response<LibraryResource> getOperationResultWithResponse(String operationId, com.azure.core.util.Context context)
      Get Operation result for Library.
      Parameters:
      operationId - operation id for which status is requested.
      context - The context to associate with this operation.
      Returns:
      operation result for Library along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • delete

      public LibraryResourceInfo delete(String libraryName)
      Delete Library.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteWithResponse

      public com.azure.core.http.rest.Response<LibraryResourceInfo> deleteWithResponse(String libraryName, com.azure.core.util.Context context)
      Delete Library.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      context - The context to associate with this operation.
      Returns:
      the response body along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • get

      public LibraryResource get(String libraryName)
      Get Library.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      Returns:
      library.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getWithResponse

      public com.azure.core.http.rest.Response<LibraryResource> getWithResponse(String libraryName, com.azure.core.util.Context context)
      Get Library.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      context - The context to associate with this operation.
      Returns:
      library along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • create

      public LibraryResourceInfo create(String libraryName)
      Creates a library with the library name.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createWithResponse

      public com.azure.core.http.rest.Response<LibraryResourceInfo> createWithResponse(String libraryName, com.azure.core.util.Context context)
      Creates a library with the library name.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      context - The context to associate with this operation.
      Returns:
      the response body along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • append

      public void append(String libraryName, Flux<ByteBuffer> content, long contentLength, Long blobConditionAppendPosition)
      Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      content - Library file chunk.
      contentLength - The Content-Length header for the request.
      blobConditionAppendPosition - Set this header to a byte offset at which the block is expected to be appended. The request succeeds only if the current offset matches this value. Otherwise, the request fails with the AppendPositionConditionNotMet error (HTTP status code 412 – Precondition Failed).
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • append

      public void append(String libraryName, Flux<ByteBuffer> content, long contentLength)
      Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      content - Library file chunk.
      contentLength - The Content-Length header for the request.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • appendWithResponse

      public com.azure.core.http.rest.Response<Void> appendWithResponse(String libraryName, Flux<ByteBuffer> content, long contentLength, Long blobConditionAppendPosition, com.azure.core.util.Context context)
      Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      content - Library file chunk.
      contentLength - The Content-Length header for the request.
      blobConditionAppendPosition - Set this header to a byte offset at which the block is expected to be appended. The request succeeds only if the current offset matches this value. Otherwise, the request fails with the AppendPositionConditionNotMet error (HTTP status code 412 – Precondition Failed).
      context - The context to associate with this operation.
      Returns:
      the Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • append

      public void append(String libraryName, com.azure.core.util.BinaryData content, long contentLength, Long blobConditionAppendPosition)
      Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      content - Library file chunk.
      contentLength - The Content-Length header for the request.
      blobConditionAppendPosition - Set this header to a byte offset at which the block is expected to be appended. The request succeeds only if the current offset matches this value. Otherwise, the request fails with the AppendPositionConditionNotMet error (HTTP status code 412 – Precondition Failed).
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • append

      public void append(String libraryName, com.azure.core.util.BinaryData content, long contentLength)
      Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      content - Library file chunk.
      contentLength - The Content-Length header for the request.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • appendWithResponse

      public com.azure.core.http.rest.Response<Void> appendWithResponse(String libraryName, com.azure.core.util.BinaryData content, long contentLength, Long blobConditionAppendPosition, com.azure.core.util.Context context)
      Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks.
      Parameters:
      libraryName - file name to upload. Minimum length of the filename should be 1 excluding the extension length.
      content - Library file chunk.
      contentLength - The Content-Length header for the request.
      blobConditionAppendPosition - Set this header to a byte offset at which the block is expected to be appended. The request succeeds only if the current offset matches this value. Otherwise, the request fails with the AppendPositionConditionNotMet error (HTTP status code 412 – Precondition Failed).
      context - The context to associate with this operation.
      Returns:
      the Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      CloudErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.