public class CertificateOperations extends Object implements IInheritedBehaviors
Modifier and Type | Field and Description |
---|---|
static String |
SHA1_CERTIFICATE_ALGORITHM
The SHA certificate algorithm.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelDeleteCertificate(String thumbprintAlgorithm,
String thumbprint)
Cancels a failed deletion of the specified certificate.
|
void |
cancelDeleteCertificate(String thumbprintAlgorithm,
String thumbprint,
Iterable<BatchClientBehavior> additionalBehaviors)
Cancels a failed deletion of the specified certificate.
|
void |
createCertificate(CertificateAddParameter certificate)
Adds a certificate to the Batch account.
|
void |
createCertificate(CertificateAddParameter certificate,
Iterable<BatchClientBehavior> additionalBehaviors)
Adds a certificate to the Batch account.
|
void |
createCertificate(InputStream certStream)
Adds a certificate to the Batch account.
|
void |
createCertificate(InputStream certStream,
Iterable<BatchClientBehavior> additionalBehaviors)
Adds a certificate to the Batch account.
|
Collection<BatchClientBehavior> |
customBehaviors()
Gets a collection of behaviors that modify or customize requests to the Batch service.
|
void |
deleteCertificate(String thumbprintAlgorithm,
String thumbprint)
Deletes the certificate from the Batch account.
|
void |
deleteCertificate(String thumbprintAlgorithm,
String thumbprint,
Iterable<BatchClientBehavior> additionalBehaviors)
Deletes the certificate from the Batch account.
|
Certificate |
getCertificate(String thumbprintAlgorithm,
String thumbprint)
Gets the specified
Certificate . |
Certificate |
getCertificate(String thumbprintAlgorithm,
String thumbprint,
DetailLevel detailLevel)
Gets the specified
Certificate . |
Certificate |
getCertificate(String thumbprintAlgorithm,
String thumbprint,
DetailLevel detailLevel,
Iterable<BatchClientBehavior> additionalBehaviors)
Gets the specified
Certificate . |
List<Certificate> |
listCertificates()
Lists the
certificates in the Batch account. |
List<Certificate> |
listCertificates(DetailLevel detailLevel)
Lists the
certificates in the Batch account. |
List<Certificate> |
listCertificates(DetailLevel detailLevel,
Iterable<BatchClientBehavior> additionalBehaviors)
Lists the
certificates in the Batch account. |
IInheritedBehaviors |
withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
Sets a collection of behaviors that modify or customize requests to the Batch service.
|
public static final String SHA1_CERTIFICATE_ALGORITHM
public Collection<BatchClientBehavior> customBehaviors()
customBehaviors
in interface IInheritedBehaviors
BatchClientBehavior
instances.public IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
withCustomBehaviors
in interface IInheritedBehaviors
behaviors
- The collection of BatchClientBehavior
instances.public void createCertificate(InputStream certStream) throws BatchErrorException, IOException, CertificateException, NoSuchAlgorithmException
certStream
- The certificate data in .cer format.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.CertificateException
- Exception thrown when an error is encountered processing the provided certificate.NoSuchAlgorithmException
- Exception thrown if the X.509 provider is not registered in the Java security provider list.public void createCertificate(InputStream certStream, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException, CertificateException, NoSuchAlgorithmException
certStream
- The certificate data in .cer format.additionalBehaviors
- A collection of BatchClientBehavior
instances that are applied to the Batch service request.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.CertificateException
- Exception thrown when an error is encountered processing the provided certificate.NoSuchAlgorithmException
- Exception thrown if the X.509 provider is not registered in the Java security provider list.public void createCertificate(CertificateAddParameter certificate) throws BatchErrorException, IOException
certificate
- The certificate to be added.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void createCertificate(CertificateAddParameter certificate, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
certificate
- The certificate to be added.additionalBehaviors
- A collection of BatchClientBehavior
instances that are applied to the Batch service request.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void cancelDeleteCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException
Delete Failed
state, and restores
the certificate to the Active
state.thumbprintAlgorithm
- The algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- The thumbprint of the certificate that failed to delete.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void cancelDeleteCertificate(String thumbprintAlgorithm, String thumbprint, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Delete Failed
state, and restores
the certificate to the Active
state.thumbprintAlgorithm
- The algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- The thumbprint of the certificate that failed to delete.additionalBehaviors
- A collection of BatchClientBehavior
instances that are applied to the Batch service request.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void deleteCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException
The delete operation requests that the certificate be deleted. The request puts the certificate in the Deleting
state.
The Batch service will perform the actual certificate deletion without any further client action.
You cannot delete a certificate if a resource (pool or compute node) is using it. Before you can delete a certificate, you must therefore make sure that:
If you try to delete a certificate that is in use, the deletion fails. The certificate state changes to Delete Failed
.
You can use cancelDeleteCertificate(String, String)
to set the status back to Active if you decide that you want to continue using the certificate.
thumbprintAlgorithm
- The algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- The thumbprint of the certificate to delete.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void deleteCertificate(String thumbprintAlgorithm, String thumbprint, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
The delete operation requests that the certificate be deleted. The request puts the certificate in the Deleting
state.
The Batch service will perform the actual certificate deletion without any further client action.
You cannot delete a certificate if a resource (pool or compute node) is using it. Before you can delete a certificate, you must therefore make sure that:
If you try to delete a certificate that is in use, the deletion fails. The certificate state changes to Delete Failed
.
You can use cancelDeleteCertificate(String, String)
to set the status back to Active if you decide that you want to continue using the certificate.
thumbprintAlgorithm
- The algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- The thumbprint of the certificate to delete.additionalBehaviors
- A collection of BatchClientBehavior
instances that are applied to the Batch service request.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public Certificate getCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException
Certificate
.thumbprintAlgorithm
- The algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- The thumbprint of the certificate to get.Certificate
containing information about the specified certificate in the Azure Batch account.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public Certificate getCertificate(String thumbprintAlgorithm, String thumbprint, DetailLevel detailLevel) throws BatchErrorException, IOException
Certificate
.thumbprintAlgorithm
- The algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- The thumbprint of the certificate to get.detailLevel
- A DetailLevel
used for controlling which properties are retrieved from the service.Certificate
containing information about the specified certificate in the Azure Batch account.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public Certificate getCertificate(String thumbprintAlgorithm, String thumbprint, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
Certificate
.thumbprintAlgorithm
- the algorithm used to derive the thumbprint parameter. This must be sha1.thumbprint
- the thumbprint of the certificate to get.detailLevel
- A DetailLevel
used for controlling which properties are retrieved from the service.additionalBehaviors
- A collection of BatchClientBehavior
instances that are applied to the Batch service request.Certificate
containing information about the specified certificate in the Azure Batch account.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<Certificate> listCertificates() throws BatchErrorException, IOException
certificates
in the Batch account.Certificate
objects.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<Certificate> listCertificates(DetailLevel detailLevel) throws BatchErrorException, IOException
certificates
in the Batch account.detailLevel
- A DetailLevel
used for filtering the list and for controlling which properties are retrieved from the service.Certificate
objects.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<Certificate> listCertificates(DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
certificates
in the Batch account.detailLevel
- A DetailLevel
used for filtering the list and for controlling which properties are retrieved from the service.additionalBehaviors
- A collection of BatchClientBehavior
instances that are applied to the Batch service request.Certificate
objects.BatchErrorException
- Exception thrown when an error response is received from the Batch service.IOException
- Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.Copyright © 2019. All rights reserved.