DiskCustomerManagedKey Class

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

Implements

public final class DiskCustomerManagedKey
implements JsonSerializable<DiskCustomerManagedKey>

The Customer Managed Key reference to encrypt the Disk.

Constructor Summary

Constructor Description
DiskCustomerManagedKey()

Creates an instance of DiskCustomerManagedKey class.

Method Summary

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

Reads an instance of DiskCustomerManagedKey from the JsonReader.

BatchPoolIdentityReference getIdentityReference()

Get the identityReference property: The reference of one of the pool identities to encrypt Disk.

String getKeyUrl()

Get the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault.

Boolean isRotationToLatestKeyVersionEnabled()

Get the rotationToLatestKeyVersionEnabled property: Set this flag to true to enable auto-updating of the Disk Encryption to the latest key version.

DiskCustomerManagedKey setIdentityReference(BatchPoolIdentityReference identityReference)

Set the identityReference property: The reference of one of the pool identities to encrypt Disk.

DiskCustomerManagedKey setKeyUrl(String keyUrl)

Set the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault.

DiskCustomerManagedKey setRotationToLatestKeyVersionEnabled(Boolean rotationToLatestKeyVersionEnabled)

Set the rotationToLatestKeyVersionEnabled property: Set this flag to true to enable auto-updating of the Disk Encryption to the latest key version.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

DiskCustomerManagedKey

public DiskCustomerManagedKey()

Creates an instance of DiskCustomerManagedKey class.

Method Details

fromJson

public static DiskCustomerManagedKey fromJson(JsonReader jsonReader)

Reads an instance of DiskCustomerManagedKey from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the DiskCustomerManagedKey.

getIdentityReference

public BatchPoolIdentityReference getIdentityReference()

Get the identityReference property: The reference of one of the pool identities to encrypt Disk. This identity will be used to access the KeyVault.

Returns:

the identityReference value.

getKeyUrl

public String getKeyUrl()

Get the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.

Returns:

the keyUrl value.

isRotationToLatestKeyVersionEnabled

public Boolean isRotationToLatestKeyVersionEnabled()

Get the rotationToLatestKeyVersionEnabled property: Set this flag to true to enable auto-updating of the Disk Encryption to the latest key version. Default is false.

Returns:

the rotationToLatestKeyVersionEnabled value.

setIdentityReference

public DiskCustomerManagedKey setIdentityReference(BatchPoolIdentityReference identityReference)

Set the identityReference property: The reference of one of the pool identities to encrypt Disk. This identity will be used to access the KeyVault.

Parameters:

identityReference - the identityReference value to set.

Returns:

the DiskCustomerManagedKey object itself.

setKeyUrl

public DiskCustomerManagedKey setKeyUrl(String keyUrl)

Set the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.

Parameters:

keyUrl - the keyUrl value to set.

Returns:

the DiskCustomerManagedKey object itself.

setRotationToLatestKeyVersionEnabled

public DiskCustomerManagedKey setRotationToLatestKeyVersionEnabled(Boolean rotationToLatestKeyVersionEnabled)

Set the rotationToLatestKeyVersionEnabled property: Set this flag to true to enable auto-updating of the Disk Encryption to the latest key version. Default is false.

Parameters:

rotationToLatestKeyVersionEnabled - the rotationToLatestKeyVersionEnabled value to set.

Returns:

the DiskCustomerManagedKey object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to