KeyRotationLifetimeAction Class

  • java.lang.Object
    • com.azure.security.keyvault.keys.models.KeyRotationLifetimeAction

Implements

public final class KeyRotationLifetimeAction
implements JsonSerializable<KeyRotationLifetimeAction>

Represents an action that will be performed by Key Vault over the lifetime of a key.

Constructor Summary

Constructor Description
KeyRotationLifetimeAction(KeyRotationPolicyAction action)

Creates a KeyRotationLifetimeAction.

Method Summary

Modifier and Type Method and Description
static KeyRotationLifetimeAction fromJson(JsonReader jsonReader)

Reads a JSON stream into a KeyReleasePolicy.

KeyRotationPolicyAction getAction()

Get the KeyRotationPolicyAction.

String getTimeAfterCreate()

Get the time after creation to attempt to rotate in ISO 8601 duration format.

String getTimeBeforeExpiry()

Get the time before expiry to attempt to rotate or notify in ISO 8601 duration format.

KeyRotationLifetimeAction setTimeAfterCreate(String timeAfterCreate)

Set the time after creation to attempt to rotate in ISO 8601 duration format.

KeyRotationLifetimeAction setTimeBeforeExpiry(String timeBeforeExpiry)

Set the time before expiry to attempt to rotate or notify in ISO 8601 duration format.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KeyRotationLifetimeAction

public KeyRotationLifetimeAction(KeyRotationPolicyAction action)

Creates a KeyRotationLifetimeAction.

Parameters:

action - The KeyRotationPolicyAction.

Method Details

fromJson

public static KeyRotationLifetimeAction fromJson(JsonReader jsonReader)

Reads a JSON stream into a KeyReleasePolicy.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KeyReleasePolicy that the JSON stream represented, may return null.

Throws:

IOException

- If a KeyReleasePolicy fails to be read from the jsonReader.

getAction

public KeyRotationPolicyAction getAction()

Get the KeyRotationPolicyAction.

Returns:

getTimeAfterCreate

public String 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.

getTimeBeforeExpiry

public String 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.

setTimeAfterCreate

public KeyRotationLifetimeAction setTimeAfterCreate(String timeAfterCreate)

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.

setTimeBeforeExpiry

public KeyRotationLifetimeAction setTimeBeforeExpiry(String timeBeforeExpiry)

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

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to