CreateOctKeyOptions Class

public class CreateOctKeyOptions
extends CreateKeyOptions

Represents the configurable options to create a symmetric key.

Constructor Summary

Constructor Description
CreateOctKeyOptions(String name)

Creates a CreateOctKeyOptions with name as name of the key.

Method Summary

Modifier and Type Method and Description
Integer getKeySize()

Gets the key size in bits, such as 128, 192, or 256.

Boolean isHardwareProtected()

Get the HSM value of the key being created.

CreateOctKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

CreateOctKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the expires UTC time.

CreateOctKeyOptions setExportable(Boolean exportable)

Set a flag that indicates if the private key can be exported.

CreateOctKeyOptions setHardwareProtected(Boolean hardwareProtected)

Set whether the key being created is of HSM type or not.

CreateOctKeyOptions setKeyOperations(KeyOperation[] keyOperations)

Set the key operations.

CreateOctKeyOptions setKeySize(Integer keySize)

Sets the key size in bits, such as 128, 192, or 256.

CreateOctKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the notBefore UTC time.

CreateOctKeyOptions setReleasePolicy(KeyReleasePolicy releasePolicy)

Set the policy rules under which the key can be exported.

CreateOctKeyOptions setTags(Map<String,String> tags)

Set the tags to be associated with the key.

Methods inherited from CreateKeyOptions

Methods inherited from java.lang.Object

Constructor Details

CreateOctKeyOptions

public CreateOctKeyOptions(String name)

Creates a CreateOctKeyOptions with name as name of the key.

Parameters:

name - The name of the key.

Method Details

getKeySize

public Integer getKeySize()

Gets the key size in bits, such as 128, 192, or 256.

Returns:

The key size in bits.

isHardwareProtected

public Boolean isHardwareProtected()

Get the HSM value of the key being created.

Returns:

the HSM value.

setEnabled

public CreateOctKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

Overrides:

CreateOctKeyOptions.setEnabled(Boolean enabled)

Parameters:

enabled - The enabled value to set.

Returns:

The updated CreateOctKeyOptions object.

setExpiresOn

public CreateOctKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the expires UTC time.

Overrides:

CreateOctKeyOptions.setExpiresOn(OffsetDateTime expiresOn)

Parameters:

expiresOn - The expiry time to set. for the key.

Returns:

The updated CreateOctKeyOptions object.

setExportable

public CreateOctKeyOptions setExportable(Boolean exportable)

Set a flag that indicates if the private key can be exported.

Overrides:

CreateOctKeyOptions.setExportable(Boolean exportable)

Parameters:

exportable - A flag that indicates if the private key can be exported.

Returns:

The updated CreateOctKeyOptions object.

setHardwareProtected

public CreateOctKeyOptions setHardwareProtected(Boolean hardwareProtected)

Set whether the key being created is of HSM type or not.

Parameters:

hardwareProtected - The HSM value to set.

Returns:

The updated CreateOctKeyOptions object.

setKeyOperations

public CreateOctKeyOptions setKeyOperations(KeyOperation[] keyOperations)

Set the key operations.

Overrides:

CreateOctKeyOptions.setKeyOperations(KeyOperation[] keyOperations)

Parameters:

keyOperations - The key operations to set.

Returns:

The updated CreateOctKeyOptions object.

setKeySize

public CreateOctKeyOptions setKeySize(Integer keySize)

Sets the key size in bits, such as 128, 192, or 256. If null, the service default is used.

Parameters:

keySize - The key size in bits to set.

Returns:

The updated CreateOctKeyOptions object.

setNotBefore

public CreateOctKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the notBefore UTC time.

Overrides:

CreateOctKeyOptions.setNotBefore(OffsetDateTime notBefore)

Parameters:

notBefore - The notBefore UTC time to set.

Returns:

The updated CreateOctKeyOptions object.

setReleasePolicy

public CreateOctKeyOptions setReleasePolicy(KeyReleasePolicy releasePolicy)

Set the policy rules under which the key can be exported.

Overrides:

CreateOctKeyOptions.setReleasePolicy(KeyReleasePolicy releasePolicy)

Parameters:

releasePolicy - The policy rules to set.

Returns:

The updated CreateOctKeyOptions object.

setTags

public CreateOctKeyOptions setTags(Map tags)

Set the tags to be associated with the key.

Overrides:

CreateOctKeyOptions.setTags(Map<String,String> tags)

Parameters:

tags - The tags to set.

Returns:

The updated CreateOctKeyOptions object.

Applies to