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