public void updatePoolProperties(String poolId, StartTask startTask,
            Collection<CertificateReference> certificateReferences,
            Collection<ApplicationPackageReference> applicationPackageReferences, Collection<MetadataItem> metadata,
            Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException {
        PoolUpdatePropertiesOptions options = new PoolUpdatePropertiesOptions();
        BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);
        bhMgr.applyRequestBehaviors(options);

        PoolUpdatePropertiesParameter param = new PoolUpdatePropertiesParameter()
                .withMetadata(metadata == null ? new LinkedList<MetadataItem>() : new LinkedList<>(metadata))
                .withApplicationPackageReferences(
                        applicationPackageReferences == null ? new LinkedList<ApplicationPackageReference>()
                                : new LinkedList<>(applicationPackageReferences))
                .withCertificateReferences(certificateReferences == null ? new LinkedList<CertificateReference>()
                        : new LinkedList<>(certificateReferences))
                .withStartTask(startTask);

        this.parentBatchClient.protocolLayer().pools().updateProperties(poolId, param, options);
    }
public void updatePoolProperties ( String poolId , StartTask startTask , Collection < CertificateReference > certificateReferences , Collection < ApplicationPackageReference > applicationPackageReferences , Collection < MetadataItem > metadata , Iterable < BatchClientBehavior > additionalBehaviors ) throws BatchErrorException , IOException { PoolUpdatePropertiesOptions options = new PoolUpdatePropertiesOptions ( ) ; BehaviorManager bhMgr = new BehaviorManager ( this . customBehaviors ( ) , additionalBehaviors ) ; bhMgr . applyRequestBehaviors ( options ) ; PoolUpdatePropertiesParameter param = new PoolUpdatePropertiesParameter ( ) . withMetadata ( metadata == null ? new LinkedList < MetadataItem > ( ) : new LinkedList < > ( metadata ) ) . withApplicationPackageReferences ( applicationPackageReferences == null ? new LinkedList < ApplicationPackageReference > ( ) : new LinkedList < > ( applicationPackageReferences ) ) . withCertificateReferences ( certificateReferences == null ? new LinkedList < CertificateReference > ( ) : new LinkedList < > ( certificateReferences ) ) . withStartTask ( startTask ) ; this . parentBatchClient . protocolLayer ( ) . pools ( ) . updateProperties ( poolId , param , options ) ; }
Updates the specified pool. This method fully replaces all the updatable
properties of the pool. For example, if the startTask parameter is null and
the pool has a start task associated with it, then the Batch service will
remove the existing start task.

@param poolId
The ID of the pool.
@param startTask
A task to run on each compute node as it joins the pool. If null,
any existing start task is removed from the pool.
@param certificateReferences
A collection of certificates to be installed on each compute node
in the pool. If null, any existing certificate references are
removed from the pool.
@param applicationPackageReferences
A collection of application packages to be installed on each
compute node in the pool. If null, any existing application
packages references are removed from the pool.
@param metadata
A collection of name-value pairs associated with the pool as
metadata. If null, any existing metadata is removed from the pool.
@param additionalBehaviors
A collection of {@link BatchClientBehavior} instances that are
applied to the Batch service request.
@throws BatchErrorException
Exception thrown when an error response is received from the
Batch service.
@throws IOException
Exception thrown when there is an error in
serialization/deserialization of data sent to/received from the
Batch service.