Class KeyRotationPolicy
java.lang.Object
com.azure.security.keyvault.keys.models.KeyRotationPolicy
The complete key rotation policy that belongs to a key.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet thepolicy's
created time in UTC.Get the optional key expiration period used to define the duration after which a newly rotated key will expire.getId()
Get the identifier of thepolicy
.Get the actions that will be performed by Key Vault over the lifetime of a key.Get thepolicy's
last updated time in UTC.setExpiresIn
(String expiresIn) Set the optional key expiration period used to define the duration after which a newly rotated key will expire.setLifetimeActions
(List<KeyRotationLifetimeAction> lifetimeActions) Set the actions that will be performed by Key Vault over the lifetime of a key.
-
Constructor Details
-
KeyRotationPolicy
public KeyRotationPolicy()
-
-
Method Details
-
getId
- Returns:
- The identifier of the
policy
.
-
getLifetimeActions
Get the actions that will be performed by Key Vault over the lifetime of a key.You may also pass an empty array to restore to its default values.
-
setLifetimeActions
Set the actions that will be performed by Key Vault over the lifetime of a key.You may also pass an empty array to restore to its default values.
- Parameters:
lifetimeActions
- Theactions
to set.- Returns:
- The updated
KeyRotationPolicy
object.
-
getExpiresIn
Get the optional key expiration period used to define the duration after which a newly rotated key will expire. It should be at least 28 days and should be defined as an ISO 8601 duration. For example, 90 days would be "P90D", 3 months would be "P3M" and 1 year and 10 days would be "P1Y10D". See Wikipedia for more information on ISO 8601 durations.- Returns:
- The expiration time in ISO 8601 format.
-
setExpiresIn
Set the optional key expiration period used to define the duration after which a newly rotated key will expire. It should be at least 28 days and should be defined as an ISO 8601 duration. For example, 90 days would be "P90D", 3 months would be "P3M" and 1 year and 10 days would be "P1Y10D". See Wikipedia for more information on ISO 8601 durations.- Parameters:
expiresIn
- The expiration time to set in ISO 8601 duration format.- Returns:
- The updated
KeyRotationPolicy
object.
-
getCreatedOn
- Returns:
- The
policy's
created time in UTC.
-
getUpdatedOn
Get thepolicy's
last updated time in UTC.May be undefined if a
policy
has not been explicitly set.- Returns:
- The
policy's
last updated time in UTC.
-