Class SasPolicy
java.lang.Object
com.azure.resourcemanager.storage.models.SasPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SasPolicy>
SasPolicy assigned to the storage account.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the expirationAction property: The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated.static SasPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SasPolicy from the JsonReader.Get the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withExpirationAction(ExpirationAction expirationAction) Set the expirationAction property: The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated.withSasExpirationPeriod(String sasExpirationPeriod) Set the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SasPolicy
public SasPolicy()Creates an instance of SasPolicy class.
-
-
Method Details
-
sasExpirationPeriod
Get the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.- Returns:
- the sasExpirationPeriod value.
-
withSasExpirationPeriod
Set the sasExpirationPeriod property: The SAS expiration period, DD.HH:MM:SS.- Parameters:
sasExpirationPeriod- the sasExpirationPeriod value to set.- Returns:
- the SasPolicy object itself.
-
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.
-
withExpirationAction
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SasPolicy>- Throws:
IOException
-
fromJson
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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SasPolicy.
-