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 OffsetDateTimegetExpiresOn()Get thekey expiration timein UTC.List<KeyOperation>getKeyOperations()Get the key operations.KeyTypegetKeyType()Get the key type.StringgetName()Get the key name.OffsetDateTimegetNotBefore()Get thekey's notBefore timein UTC.Map<String,String>getTags()Get the tags associated with the key.BooleanisEnabled()Get the enabled value.CreateKeyOptionssetEnabled(Boolean enabled)Set a value that indicates if the key is enabled.CreateKeyOptionssetExpiresOn(OffsetDateTime expiresOn)Set thekey expiration timein UTC.CreateKeyOptionssetKeyOperations(KeyOperation... keyOperations)Set the key operations.CreateKeyOptionssetNotBefore(OffsetDateTime notBefore)Set thekey's notBefore timein UTC.CreateKeyOptionssetTags(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
CreateKeyOptionsobject.
-
getNotBefore
public OffsetDateTime getNotBefore()
Get thekey's notBefore timein UTC.- Returns:
- The
key's notBefore timein UTC.
-
setNotBefore
public CreateKeyOptions setNotBefore(OffsetDateTime notBefore)
Set thekey's notBefore timein UTC.- Parameters:
notBefore- Thekey's notBefore timein UTC.- Returns:
- The updated
CreateKeyOptionsobject.
-
getExpiresOn
public OffsetDateTime getExpiresOn()
Get thekey expiration timein UTC.- Returns:
- The
key expiration timein UTC.
-
setExpiresOn
public CreateKeyOptions setExpiresOn(OffsetDateTime expiresOn)
Set thekey expiration timein UTC.- Parameters:
expiresOn- Thekey expiration timein UTC.- Returns:
- The updated
CreateKeyOptionsobject.
-
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
CreateKeyOptionsobject.
-
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
CreateKeyOptionsobject.
-
-