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.

Boolean requireUserBoundUserDelegationSas()

Get the requireUserBoundUserDelegationSas property: Indicates whether user delegation SAS (shared access signature) tokens are required to be bound to a specific user.

PolicyViolationAction requireUserBoundUserDelegationSasAction()

Get the requireUserBoundUserDelegationSasAction property: The action to perform when a user delegation SAS (shared access signature) token is not bound to a user as required by requireUserBoundUserDelegationSas.

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 withRequireUserBoundUserDelegationSas(Boolean requireUserBoundUserDelegationSas)

Set the requireUserBoundUserDelegationSas property: Indicates whether user delegation SAS (shared access signature) tokens are required to be bound to a specific user.

SasPolicy withRequireUserBoundUserDelegationSasAction(PolicyViolationAction requireUserBoundUserDelegationSasAction)

Set the requireUserBoundUserDelegationSasAction property: The action to perform when a user delegation SAS (shared access signature) token is not bound to a user as required by requireUserBoundUserDelegationSas.

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.

requireUserBoundUserDelegationSas

public Boolean requireUserBoundUserDelegationSas()

Get the requireUserBoundUserDelegationSas property: Indicates whether user delegation SAS (shared access signature) tokens are required to be bound to a specific user. The default interpretation is false for this property.

Returns:

the requireUserBoundUserDelegationSas value.

requireUserBoundUserDelegationSasAction

public PolicyViolationAction requireUserBoundUserDelegationSasAction()

Get the requireUserBoundUserDelegationSasAction property: The action to perform when a user delegation SAS (shared access signature) token is not bound to a user as required by requireUserBoundUserDelegationSas.

Returns:

the requireUserBoundUserDelegationSasAction value.

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.

withRequireUserBoundUserDelegationSas

public SasPolicy withRequireUserBoundUserDelegationSas(Boolean requireUserBoundUserDelegationSas)

Set the requireUserBoundUserDelegationSas property: Indicates whether user delegation SAS (shared access signature) tokens are required to be bound to a specific user. The default interpretation is false for this property.

Parameters:

requireUserBoundUserDelegationSas - the requireUserBoundUserDelegationSas value to set.

Returns:

the SasPolicy object itself.

withRequireUserBoundUserDelegationSasAction

public SasPolicy withRequireUserBoundUserDelegationSasAction(PolicyViolationAction requireUserBoundUserDelegationSasAction)

Set the requireUserBoundUserDelegationSasAction property: The action to perform when a user delegation SAS (shared access signature) token is not bound to a user as required by requireUserBoundUserDelegationSas.

Parameters:

requireUserBoundUserDelegationSasAction - the requireUserBoundUserDelegationSasAction 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