Class AccountSasParameters
java.lang.Object
com.azure.resourcemanager.storage.models.AccountSasParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AccountSasParameters>
public final class AccountSasParameters
extends Object
implements com.azure.json.JsonSerializable<AccountSasParameters>
The parameters to list SAS credentials of a storage account.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccountSasParametersfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AccountSasParameters from the JsonReader.Get the ipAddressOrRange property: An IP address or a range of IP addresses from which to accept requests.Get the keyToSign property: The key to sign the account SAS token with.Get the permissions property: The signed permissions for the account SAS.Get the protocols property: The protocol permitted for a request made with the account SAS.Get the resourceTypes property: The signed resource types that are accessible with the account SAS.services()Get the services property: The signed services accessible with the account SAS.Get the sharedAccessExpiryTime property: The time at which the shared access signature becomes invalid.Get the sharedAccessStartTime property: The time at which the SAS becomes valid.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withIpAddressOrRange(String ipAddressOrRange) Set the ipAddressOrRange property: An IP address or a range of IP addresses from which to accept requests.withKeyToSign(String keyToSign) Set the keyToSign property: The key to sign the account SAS token with.withPermissions(Permissions permissions) Set the permissions property: The signed permissions for the account SAS.withProtocols(HttpProtocol protocols) Set the protocols property: The protocol permitted for a request made with the account SAS.withResourceTypes(SignedResourceTypes resourceTypes) Set the resourceTypes property: The signed resource types that are accessible with the account SAS.withServices(Services services) Set the services property: The signed services accessible with the account SAS.withSharedAccessExpiryTime(OffsetDateTime sharedAccessExpiryTime) Set the sharedAccessExpiryTime property: The time at which the shared access signature becomes invalid.withSharedAccessStartTime(OffsetDateTime sharedAccessStartTime) Set the sharedAccessStartTime property: The time at which the SAS becomes valid.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
-
AccountSasParameters
public AccountSasParameters()Creates an instance of AccountSasParameters class.
-
-
Method Details
-
services
Get the services property: The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).- Returns:
- the services value.
-
withServices
Set the services property: The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).- Parameters:
services- the services value to set.- Returns:
- the AccountSasParameters object itself.
-
resourceTypes
Get the resourceTypes property: The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.- Returns:
- the resourceTypes value.
-
withResourceTypes
Set the resourceTypes property: The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.- Parameters:
resourceTypes- the resourceTypes value to set.- Returns:
- the AccountSasParameters object itself.
-
permissions
Get the permissions property: The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).- Returns:
- the permissions value.
-
withPermissions
Set the permissions property: The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).- Parameters:
permissions- the permissions value to set.- Returns:
- the AccountSasParameters object itself.
-
ipAddressOrRange
Get the ipAddressOrRange property: An IP address or a range of IP addresses from which to accept requests.- Returns:
- the ipAddressOrRange value.
-
withIpAddressOrRange
Set the ipAddressOrRange property: An IP address or a range of IP addresses from which to accept requests.- Parameters:
ipAddressOrRange- the ipAddressOrRange value to set.- Returns:
- the AccountSasParameters object itself.
-
protocols
Get the protocols property: The protocol permitted for a request made with the account SAS.- Returns:
- the protocols value.
-
withProtocols
Set the protocols property: The protocol permitted for a request made with the account SAS.- Parameters:
protocols- the protocols value to set.- Returns:
- the AccountSasParameters object itself.
-
keyToSign
Get the keyToSign property: The key to sign the account SAS token with.- Returns:
- the keyToSign value.
-
withKeyToSign
Set the keyToSign property: The key to sign the account SAS token with.- Parameters:
keyToSign- the keyToSign value to set.- Returns:
- the AccountSasParameters 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<AccountSasParameters>- Throws:
IOException
-
fromJson
public static AccountSasParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AccountSasParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AccountSasParameters 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 AccountSasParameters.
-