Class CreateOctKeyOptions
- java.lang.Object
-
- com.azure.security.keyvault.keys.models.CreateKeyOptions
-
- com.azure.security.keyvault.keys.models.CreateOctKeyOptions
-
public class CreateOctKeyOptions extends CreateKeyOptions
Represents the configurable options to create a symmetric key.
-
-
Constructor Summary
Constructors Constructor Description CreateOctKeyOptions(String name)Creates aCreateOctKeyOptionswithnameas name of the key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetKeySize()Gets the key size in bits, such as 128, 192, or 256.BooleanisHardwareProtected()Get the HSM value of the key being created.CreateOctKeyOptionssetEnabled(Boolean enabled)Set a value that indicates if the key is enabled.CreateOctKeyOptionssetExpiresOn(OffsetDateTime expiresOn)Set theexpiresUTC time.CreateOctKeyOptionssetHardwareProtected(Boolean hardwareProtected)Set whether the key being created is of HSM type or not.CreateOctKeyOptionssetKeyOperations(KeyOperation... keyOperations)Set the key operations.CreateOctKeyOptionssetKeySize(Integer keySize)Sets the key size in bits, such as 128, 192, or 256.CreateOctKeyOptionssetNotBefore(OffsetDateTime notBefore)Set thenotBeforeUTC time.CreateOctKeyOptionssetTags(Map<String,String> tags)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, getTags, isEnabled
-
-
-
-
Constructor Detail
-
CreateOctKeyOptions
public CreateOctKeyOptions(String name)
Creates aCreateOctKeyOptionswithnameas name of the key.- Parameters:
name- The name of the key.
-
-
Method Detail
-
setKeySize
public CreateOctKeyOptions setKeySize(Integer keySize)
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
CreateOctKeyOptionsobject.
-
getKeySize
public Integer getKeySize()
Gets the key size in bits, such as 128, 192, or 256.- Returns:
- The key size in bits.
-
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
CreateOctKeyOptionsobject.
-
isHardwareProtected
public Boolean isHardwareProtected()
Get the HSM value of the key being created.- Returns:
- the HSM value.
-
setKeyOperations
public CreateOctKeyOptions setKeyOperations(KeyOperation... keyOperations)
Set the key operations.- Overrides:
setKeyOperationsin classCreateKeyOptions- Parameters:
keyOperations- The key operations to set.- Returns:
- The updated
CreateOctKeyOptionsobject.
-
setNotBefore
public CreateOctKeyOptions setNotBefore(OffsetDateTime notBefore)
Set thenotBeforeUTC time.- Overrides:
setNotBeforein classCreateKeyOptions- Parameters:
notBefore- The notBefore UTC time to set.- Returns:
- The updated
CreateOctKeyOptionsobject.
-
setExpiresOn
public CreateOctKeyOptions setExpiresOn(OffsetDateTime expiresOn)
Set theexpiresUTC time.- Overrides:
setExpiresOnin classCreateKeyOptions- Parameters:
expiresOn- The expiry time to set. for the key.- Returns:
- The updated
CreateOctKeyOptionsobject.
-
setTags
public CreateOctKeyOptions setTags(Map<String,String> tags)
Set the tags to be associated with the key.- Overrides:
setTagsin classCreateKeyOptions- Parameters:
tags- The tags to set.- Returns:
- The updated
CreateOctKeyOptionsobject.
-
setEnabled
public CreateOctKeyOptions setEnabled(Boolean enabled)
Set a value that indicates if the key is enabled.- Overrides:
setEnabledin classCreateKeyOptions- Parameters:
enabled- The enabled value to set.- Returns:
- The updated
CreateOctKeyOptionsobject.
-
-