Share via


BatchCertificateReference Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchCertificateReference

Implements

public final class BatchCertificateReference
implements JsonSerializable<BatchCertificateReference>

A reference to a Certificate to be installed on Compute Nodes in a Pool. Warning: This object is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.

Constructor Summary

Constructor Description
BatchCertificateReference(String thumbprint, String thumbprintAlgorithm)

Creates an instance of BatchCertificateReference class.

Method Summary

Modifier and Type Method and Description
static BatchCertificateReference fromJson(JsonReader jsonReader)

Reads an instance of BatchCertificateReference from the JsonReader.

BatchCertificateStoreLocation getStoreLocation()

Get the storeLocation property: The location of the Certificate store on the Compute Node into which to install the Certificate.

String getStoreName()

Get the storeName property: The name of the Certificate store on the Compute Node into which to install the Certificate.

String getThumbprint()

Get the thumbprint property: The thumbprint of the Certificate.

String getThumbprintAlgorithm()

Get the thumbprintAlgorithm property: The algorithm with which the thumbprint is associated.

List<BatchCertificateVisibility> getVisibility()

Get the visibility property: Which user Accounts on the Compute Node should have access to the private data of the Certificate.

BatchCertificateReference setStoreLocation(BatchCertificateStoreLocation storeLocation)

Set the storeLocation property: The location of the Certificate store on the Compute Node into which to install the Certificate.

BatchCertificateReference setStoreName(String storeName)

Set the storeName property: The name of the Certificate store on the Compute Node into which to install the Certificate.

BatchCertificateReference setVisibility(List<BatchCertificateVisibility> visibility)

Set the visibility property: Which user Accounts on the Compute Node should have access to the private data of the Certificate.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchCertificateReference

public BatchCertificateReference(String thumbprint, String thumbprintAlgorithm)

Creates an instance of BatchCertificateReference class.

Parameters:

thumbprint - the thumbprint value to set.
thumbprintAlgorithm - the thumbprintAlgorithm value to set.

Method Details

fromJson

public static BatchCertificateReference fromJson(JsonReader jsonReader)

Reads an instance of BatchCertificateReference from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchCertificateReference if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getStoreLocation

public BatchCertificateStoreLocation getStoreLocation()

Get the storeLocation property: The location of the Certificate store on the Compute Node into which to install the Certificate. The default value is currentuser. This property is applicable only for Pools configured with Windows Compute Nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows Image reference). For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory.

Returns:

the storeLocation value.

getStoreName

public String getStoreName()

Get the storeName property: The name of the Certificate store on the Compute Node into which to install the Certificate. This property is applicable only for Pools configured with Windows Compute Nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows Image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My.

Returns:

the storeName value.

getThumbprint

public String getThumbprint()

Get the thumbprint property: The thumbprint of the Certificate.

Returns:

the thumbprint value.

getThumbprintAlgorithm

public String getThumbprintAlgorithm()

Get the thumbprintAlgorithm property: The algorithm with which the thumbprint is associated. This must be sha1.

Returns:

the thumbprintAlgorithm value.

getVisibility

public List<BatchCertificateVisibility> getVisibility()

Get the visibility property: Which user Accounts on the Compute Node should have access to the private data of the Certificate. You can specify more than one visibility in this collection. The default is all Accounts.

Returns:

the visibility value.

setStoreLocation

public BatchCertificateReference setStoreLocation(BatchCertificateStoreLocation storeLocation)

Set the storeLocation property: The location of the Certificate store on the Compute Node into which to install the Certificate. The default value is currentuser. This property is applicable only for Pools configured with Windows Compute Nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows Image reference). For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory.

Parameters:

storeLocation - the storeLocation value to set.

Returns:

the BatchCertificateReference object itself.

setStoreName

public BatchCertificateReference setStoreName(String storeName)

Set the storeName property: The name of the Certificate store on the Compute Node into which to install the Certificate. This property is applicable only for Pools configured with Windows Compute Nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows Image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My.

Parameters:

storeName - the storeName value to set.

Returns:

the BatchCertificateReference object itself.

setVisibility

public BatchCertificateReference setVisibility(List<BatchCertificateVisibility> visibility)

Set the visibility property: Which user Accounts on the Compute Node should have access to the private data of the Certificate. You can specify more than one visibility in this collection. The default is all Accounts.

Parameters:

visibility - the visibility value to set.

Returns:

the BatchCertificateReference object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to