Class CreateKeyOptions
java.lang.Object
com.azure.security.keyvault.keys.models.CreateKeyOptions
- Direct Known Subclasses:
CreateEcKeyOptions
,CreateOctKeyOptions
,CreateRsaKeyOptions
Represents the configurable options to create a key.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet thekey expiration time
in UTC.Get the key operations.Get the key type.getName()
Get the key name.Get thekey's notBefore time
in UTC.Get the policy rules under which the key can be exported.getTags()
Get the tags associated with the key.Get the enabled value.Get a flag that indicates if the private key can be exported.setEnabled
(Boolean enabled) Set a value that indicates if the key is enabled.setExpiresOn
(OffsetDateTime expiresOn) Set thekey expiration time
in UTC.setExportable
(Boolean exportable) Set a flag that indicates if the private key can be exported.setKeyOperations
(KeyOperation... keyOperations) Set the key operations.setNotBefore
(OffsetDateTime notBefore) Set thekey's notBefore time
in UTC.setReleasePolicy
(KeyReleasePolicy releasePolicy) Set the policy rules under which the key can be exported.Set the tags to be associated with the key.
-
Constructor Details
-
CreateKeyOptions
- Parameters:
name
- The name of the key to create.keyType
- The type of the key to create.
-
-
Method Details
-
getName
Get the key name.- Returns:
- The name of the key.
-
getKeyType
Get the key type.- Returns:
- The key type.
-
getKeyOperations
Get the key operations.- Returns:
- The key operations.
-
setKeyOperations
Set the key operations.- Parameters:
keyOperations
- The key operations to set.- Returns:
- The updated
CreateKeyOptions
object.
-
getNotBefore
Get thekey's notBefore time
in UTC.- Returns:
- The
key's notBefore time
in UTC.
-
setNotBefore
Set thekey's notBefore time
in UTC.- Parameters:
notBefore
- Thekey's notBefore time
in UTC.- Returns:
- The updated
CreateKeyOptions
object.
-
getExpiresOn
Get thekey expiration time
in UTC.- Returns:
- The
key expiration time
in UTC.
-
setExpiresOn
Set thekey expiration time
in UTC.- Parameters:
expiresOn
- Thekey expiration time
in UTC.- Returns:
- The updated
CreateKeyOptions
object.
-
getTags
Get the tags associated with the key.- Returns:
- The tag names and values.
-
setTags
Set the tags to be associated with the key.- Parameters:
tags
- The tags to set.- Returns:
- The updated
CreateKeyOptions
object.
-
isEnabled
Get the enabled value.- Returns:
- The enabled value.
-
setEnabled
Set a value that indicates if the key is enabled.- Parameters:
enabled
- The enabled value to set.- Returns:
- The updated
CreateKeyOptions
object.
-
isExportable
Get a flag that indicates if the private key can be exported.- Returns:
- A flag that indicates if the private key can be exported.
-
setExportable
Set a flag that indicates if the private key can be exported.- Parameters:
exportable
- A flag that indicates if the private key can be exported.- Returns:
- The updated
CreateKeyOptions
object.
-
getReleasePolicy
Get the policy rules under which the key can be exported.- Returns:
- The policy rules under which the key can be exported.
-
setReleasePolicy
Set the policy rules under which the key can be exported.- Parameters:
releasePolicy
- The policy rules to set.- Returns:
- The updated
CreateKeyOptions
object.
-