KeyRotationPolicy Class
- java.
lang. Object - com.
azure. security. keyvault. keys. models. KeyRotationPolicy
- com.
public final class KeyRotationPolicy
The complete key rotation policy that belongs to a key.
Constructor Summary
Constructor | Description |
---|---|
KeyRotationPolicy() |
Creates an instance of KeyRotationPolicy. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Offset |
getCreatedOn()
Get the policy's created time in UTC. |
String |
getExpiresIn()
Get the optional key expiration period used to define the duration after which a newly rotated key will expire. |
String |
getId()
Get the identifier of the policy. |
List<Key |
getLifetimeActions()
Get the actions that will be performed by Key Vault over the lifetime of a key. |
Offset |
getUpdatedOn()
Get the policy's last updated time in UTC. |
Key |
setExpiresIn(String expiresIn)
Set the optional key expiration period used to define the duration after which a newly rotated key will expire. |
Key |
setLifetimeActions(List<KeyRotationLifetimeAction> lifetimeActions)
Set the actions that will be performed by Key Vault over the lifetime of a key. |
Methods inherited from java.lang.Object
Constructor Details
KeyRotationPolicy
public KeyRotationPolicy()
Creates an instance of KeyRotationPolicy.
Method Details
getCreatedOn
public OffsetDateTime getCreatedOn()
Get the policy's created time in UTC.
May be undefined if a policy has not been explicitly set.
Returns:
getExpiresIn
public String 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:
getId
public String getId()
Get the identifier of the policy.
May be undefined if a policy has not been explicitly set.
Returns:
getLifetimeActions
public List
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.
Returns:
getUpdatedOn
public OffsetDateTime getUpdatedOn()
Get the policy's last updated time in UTC.
May be undefined if a policy has not been explicitly set.
Returns:
setExpiresIn
public KeyRotationPolicy setExpiresIn(String expiresIn)
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:
Returns:
setLifetimeActions
public KeyRotationPolicy setLifetimeActions(List
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:
Returns:
Applies to
Azure SDK for Java