use of com.microsoft.azure.batch.protocol.models.CertificateGetHeaders in project azure-sdk-for-java by Azure.
the class CertificateOperations method getCertificate.
/**
* Gets the specified {@link Certificate}.
*
* @param thumbprintAlgorithm the algorithm used to derive the thumbprint parameter. This must be sha1.
* @param thumbprint the thumbprint of the certificate to get.
* @param detailLevel A {@link DetailLevel} used for filtering the list and for controlling which properties are retrieved from the service.
* @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request.
* @return A {@link Certificate} containing information about the specified certificate in the Azure Batch account.
* @throws BatchErrorException Exception thrown from REST call
* @throws IOException Exception thrown from serialization/deserialization
*/
public Certificate getCertificate(String thumbprintAlgorithm, String thumbprint, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException {
CertificateGetOptions getCertificateOptions = new CertificateGetOptions();
BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);
bhMgr.appendDetailLevelToPerCallBehaviors(detailLevel);
bhMgr.applyRequestBehaviors(getCertificateOptions);
ServiceResponseWithHeaders<Certificate, CertificateGetHeaders> response = this._parentBatchClient.protocolLayer().certificates().get(thumbprintAlgorithm, thumbprint, getCertificateOptions);
return response.getBody();
}
Aggregations