Class KeyRotationPolicy

java.lang.Object
com.azure.security.keyvault.keys.models.KeyRotationPolicy

public final class KeyRotationPolicy extends Object
The complete key rotation policy that belongs to a key.
  • Constructor Details

    • KeyRotationPolicy

      public KeyRotationPolicy()
  • Method Details

    • getId

      public String getId()
      Get the identifier of the policy.

      May be undefined if a policy has not been explicitly set.

      Returns:
      The identifier of the policy.
    • getLifetimeActions

      public List<KeyRotationLifetimeAction> 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.

      Returns:
      The actions in this policy.
    • setLifetimeActions

      public KeyRotationPolicy setLifetimeActions(List<KeyRotationLifetimeAction> lifetimeActions)
      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 - The actions to set.
      Returns:
      The updated KeyRotationPolicy object.
    • 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:
      The expiration time in ISO 8601 format.
    • 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:
      expiresIn - The expiration time to set in ISO 8601 duration format.
      Returns:
      The updated KeyRotationPolicy object.
    • getCreatedOn

      public OffsetDateTime getCreatedOn()
      Get the policy's created time in UTC.

      May be undefined if a policy has not been explicitly set.

      Returns:
      The policy's created time in UTC.
    • 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:
      The policy's last updated time in UTC.