PageBlobAsyncClient.createWithResponse Method

Definition

Overloads

createWithResponse(PageBlobCreateOptions options)

Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more information, see the Azure Docs.

To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch).

Code Samples

BlobHttpHeaders headers = new BlobHttpHeaders()
     .setContentLanguage("en-US")
     .setContentType("binary");
 BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId);
 
 client.createWithResponse(new PageBlobCreateOptions(size).setSequenceNumber(sequenceNumber)
     .setHeaders(headers).setMetadata(metadata).setTags(tags).setRequestConditions(blobRequestConditions))
     .subscribe(response -> System.out.printf(
         "Created page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber()));
createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, Map<String,String> metadata, BlobRequestConditions requestConditions)

Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more information, see the Azure Docs.

To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch).

Code Samples

BlobHttpHeaders headers = new BlobHttpHeaders()
     .setContentLanguage("en-US")
     .setContentType("binary");
 BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId);
 
 client.createWithResponse(size, sequenceNumber, headers, metadata, blobRequestConditions)
     .subscribe(response -> System.out.printf(
         "Created page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber()));

createWithResponse(PageBlobCreateOptions options)

Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more information, see the Azure Docs.

To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch).

Code Samples

BlobHttpHeaders headers = new BlobHttpHeaders()
     .setContentLanguage("en-US")
     .setContentType("binary");
 BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId);
 
 client.createWithResponse(new PageBlobCreateOptions(size).setSequenceNumber(sequenceNumber)
     .setHeaders(headers).setMetadata(metadata).setTags(tags).setRequestConditions(blobRequestConditions))
     .subscribe(response -> System.out.printf(
         "Created page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber()));
public Mono<Response<PageBlobItem>> createWithResponse(PageBlobCreateOptions options)

Parameters

Returns

reactor.core.publisher.Mono<Response<PageBlobItem>>

A reactive response containing the information of the created page blob.

createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, Map<String,String> metadata, BlobRequestConditions requestConditions)

Creates a page blob of the specified length. Call PutPage to upload data data to a page blob. For more information, see the Azure Docs.

To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch).

Code Samples

BlobHttpHeaders headers = new BlobHttpHeaders()
     .setContentLanguage("en-US")
     .setContentType("binary");
 BlobRequestConditions blobRequestConditions = new BlobRequestConditions().setLeaseId(leaseId);
 
 client.createWithResponse(size, sequenceNumber, headers, metadata, blobRequestConditions)
     .subscribe(response -> System.out.printf(
         "Created page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber()));
public Mono<Response<PageBlobItem>> createWithResponse(long size, Long sequenceNumber, BlobHttpHeaders headers, Map<String,String> metadata, BlobRequestConditions requestConditions)

Parameters

size
long

Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a 512-byte boundary.

sequenceNumber
java.lang.Long

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.The default value is 0.

metadata
java.util.Map<java.lang.String,java.lang.String>

Metadata to associate with the blob. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.

Returns

reactor.core.publisher.Mono<Response<PageBlobItem>>

A reactive response containing the information of the created page blob.

Applies to