Class CreateOctKeyOptions
java.lang.Object
com.azure.security.keyvault.keys.models.CreateKeyOptions
com.azure.security.keyvault.keys.models.CreateOctKeyOptions
Represents the configurable options to create a symmetric key.
-
Constructor Summary
ConstructorDescriptionCreateOctKeyOptions
(String name) Creates aCreateOctKeyOptions
withname
as name of the key. -
Method Summary
Modifier and TypeMethodDescriptionGets the key size in bits, such as 128, 192, or 256.Get the HSM value of the key being created.setEnabled
(Boolean enabled) Set a value that indicates if the key is enabled.setExpiresOn
(OffsetDateTime expiresOn) Set theexpires
UTC time.setExportable
(Boolean exportable) Set a flag that indicates if the private key can be exported.setHardwareProtected
(Boolean hardwareProtected) Set whether the key being created is of HSM type or not.setKeyOperations
(KeyOperation... keyOperations) Set the key operations.setKeySize
(Integer keySize) Sets the key size in bits, such as 128, 192, or 256.setNotBefore
(OffsetDateTime notBefore) Set thenotBefore
UTC time.setReleasePolicy
(KeyReleasePolicy releasePolicy) Set the policy rules under which the key can be exported.Set the tags to be associated with the key.Methods inherited from class com.azure.security.keyvault.keys.models.CreateKeyOptions
getExpiresOn, getKeyOperations, getKeyType, getName, getNotBefore, getReleasePolicy, getTags, isEnabled, isExportable
-
Constructor Details
-
CreateOctKeyOptions
Creates aCreateOctKeyOptions
withname
as name of the key.- Parameters:
name
- The name of the key.
-
-
Method Details
-
setKeySize
Sets the key size in bits, such as 128, 192, or 256. Ifnull
, the service default is used.- Parameters:
keySize
- The key size in bits to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-
getKeySize
Gets the key size in bits, such as 128, 192, or 256.- Returns:
- The key size in bits.
-
setHardwareProtected
Set whether the key being created is of HSM type or not.- Parameters:
hardwareProtected
- The HSM value to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-
isHardwareProtected
Get the HSM value of the key being created.- Returns:
- the HSM value.
-
setKeyOperations
Set the key operations.- Overrides:
setKeyOperations
in classCreateKeyOptions
- Parameters:
keyOperations
- The key operations to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-
setNotBefore
Set thenotBefore
UTC time.- Overrides:
setNotBefore
in classCreateKeyOptions
- Parameters:
notBefore
- The notBefore UTC time to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-
setExpiresOn
Set theexpires
UTC time.- Overrides:
setExpiresOn
in classCreateKeyOptions
- Parameters:
expiresOn
- The expiry time to set. for the key.- Returns:
- The updated
CreateOctKeyOptions
object.
-
setTags
Set the tags to be associated with the key.- Overrides:
setTags
in classCreateKeyOptions
- Parameters:
tags
- The tags to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-
setEnabled
Set a value that indicates if the key is enabled.- Overrides:
setEnabled
in classCreateKeyOptions
- Parameters:
enabled
- The enabled value to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-
setExportable
Set a flag that indicates if the private key can be exported.- Overrides:
setExportable
in classCreateKeyOptions
- Parameters:
exportable
- A flag that indicates if the private key can be exported.- Returns:
- The updated
CreateOctKeyOptions
object.
-
setReleasePolicy
Set the policy rules under which the key can be exported.- Overrides:
setReleasePolicy
in classCreateKeyOptions
- Parameters:
releasePolicy
- The policy rules to set.- Returns:
- The updated
CreateOctKeyOptions
object.
-