KeyPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.KeyPolicy

Implements

public final class KeyPolicy
implements JsonSerializable<KeyPolicy>

KeyPolicy assigned to the storage account.

Constructor Summary

Constructor Description
KeyPolicy()

Creates an instance of KeyPolicy class.

Method Summary

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

Reads an instance of KeyPolicy from the JsonReader.

int keyExpirationPeriodInDays()

Get the keyExpirationPeriodInDays property: The key expiration period in days.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

KeyPolicy withKeyExpirationPeriodInDays(int keyExpirationPeriodInDays)

Set the keyExpirationPeriodInDays property: The key expiration period in days.

Methods inherited from java.lang.Object

Constructor Details

KeyPolicy

public KeyPolicy()

Creates an instance of KeyPolicy class.

Method Details

fromJson

public static KeyPolicy fromJson(JsonReader jsonReader)

Reads an instance of KeyPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KeyPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

keyExpirationPeriodInDays

public int keyExpirationPeriodInDays()

Get the keyExpirationPeriodInDays property: The key expiration period in days.

Returns:

the keyExpirationPeriodInDays value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withKeyExpirationPeriodInDays

public KeyPolicy withKeyExpirationPeriodInDays(int keyExpirationPeriodInDays)

Set the keyExpirationPeriodInDays property: The key expiration period in days.

Parameters:

keyExpirationPeriodInDays - the keyExpirationPeriodInDays value to set.

Returns:

the KeyPolicy object itself.

Applies to