Class KeyRotationLifetimeAction
java.lang.Object
com.azure.security.keyvault.keys.models.KeyRotationLifetimeAction
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyRotationLifetimeAction>
public final class KeyRotationLifetimeAction
extends Object
implements com.azure.json.JsonSerializable<KeyRotationLifetimeAction>
Represents an action that will be performed by Key Vault over the lifetime of a key.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyRotationLifetimeAction
fromJson
(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aKeyReleasePolicy
.Get thepolicy action
.Get the time after creation to attempt to rotate in ISO 8601 duration format.Get the time before expiry to attempt to rotate or notify in ISO 8601 duration format.setTimeAfterCreate
(String timeAfterCreate) Set the time after creation to attempt to rotate in ISO 8601 duration format.setTimeBeforeExpiry
(String timeBeforeExpiry) Set the time before expiry to attempt to rotate or notify in ISO 8601 duration format.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
KeyRotationLifetimeAction
Creates aKeyRotationLifetimeAction
.- Parameters:
action
- Thepolicy action
.
-
-
Method Details
-
getAction
Get thepolicy action
.- Returns:
- The
policy action
.
-
getTimeAfterCreate
Get the time after creation to attempt to rotate in ISO 8601 duration format. 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 time after creation to attempt to rotate in ISO duration format.
-
setTimeAfterCreate
Set the time after creation to attempt to rotate in ISO 8601 duration format. 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:
timeAfterCreate
- The time after creation to attempt to rotate in ISO duration format.- Returns:
- The updated
KeyRotationLifetimeAction
object.
-
getTimeBeforeExpiry
Get the time before expiry to attempt to rotate or notify in ISO 8601 duration format. 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 time before expiry to attempt to rotate or notify in ISO duration format.
-
setTimeBeforeExpiry
Set the time before expiry to attempt to rotate or notify in ISO 8601 duration format. 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:
timeBeforeExpiry
- The time before expiry to attempt to rotate or notify in ISO duration format.- Returns:
- The updated
KeyRotationLifetimeAction
object.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<KeyRotationLifetimeAction>
- Throws:
IOException
-
fromJson
public static KeyRotationLifetimeAction fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads a JSON stream into aKeyReleasePolicy
.- Parameters:
jsonReader
- TheJsonReader
being read.- Returns:
- An instance of
KeyReleasePolicy
that the JSON stream represented, may return null. - Throws:
IOException
- If aKeyReleasePolicy
fails to be read from thejsonReader
.
-