SasPolicy Class

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

Implements

public final class SasPolicy
implements JsonSerializable<SasPolicy>

SasPolicy assigned to the storage account.

Constructor Summary

Constructor Description
SasPolicy()

Creates an instance of SasPolicy class.

Method Summary

Modifier and Type Method and Description
ExpirationAction expirationAction()

Get the expirationAction property: The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated.

static SasPolicy fromJson(JsonReader jsonReader)

Reads an instance of SasPolicy from the JsonReader.

String sasExpirationPeriod()

Get the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SasPolicy withExpirationAction(ExpirationAction expirationAction)

Set the expirationAction property: The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated.

SasPolicy withSasExpirationPeriod(String sasExpirationPeriod)

Set the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.

Methods inherited from java.lang.Object

Constructor Details

SasPolicy

public SasPolicy()

Creates an instance of SasPolicy class.

Method Details

expirationAction

public ExpirationAction expirationAction()

Get the expirationAction property: The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.

Returns:

the expirationAction value.

fromJson

public static SasPolicy fromJson(JsonReader jsonReader)

Reads an instance of SasPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SasPolicy 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.

sasExpirationPeriod

public String sasExpirationPeriod()

Get the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.

Returns:

the sasExpirationPeriod value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withExpirationAction

public SasPolicy withExpirationAction(ExpirationAction expirationAction)

Set the expirationAction property: The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.

Parameters:

expirationAction - the expirationAction value to set.

Returns:

the SasPolicy object itself.

withSasExpirationPeriod

public SasPolicy withSasExpirationPeriod(String sasExpirationPeriod)

Set the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.

Parameters:

sasExpirationPeriod - the sasExpirationPeriod value to set.

Returns:

the SasPolicy object itself.

Applies to