TableAccountSasSignatureValues Class

  • java.lang.Object
    • com.azure.data.tables.sas.TableAccountSasSignatureValues

public final class TableAccountSasSignatureValues

Used to initialize parameters for a Shared Access Signature (SAS) for an Azure Storage account. Once all the values here are set, use the generateAccountSas() method on the desired service client to obtain a representation of the SAS which can then be applied to a new client using the sasToken(String) method on the desired client builder.

Constructor Summary

Constructor Description
TableAccountSasSignatureValues(OffsetDateTime expiryTime, TableAccountSasPermission permissions, TableAccountSasService services, TableAccountSasResourceType resourceTypes)

Initializes a new TableAccountSasSignatureValues object.

Method Summary

Modifier and Type Method and Description
OffsetDateTime getExpiryTime()

Get The time after which the SAS will no longer work.

String getPermissions()

Gets the operations the SAS user may perform.

TableSasProtocol getProtocol()

Get the TableSasProtocol which determines the HTTP protocol that will be used.

String getResourceTypes()

Get the resource types accessible with this SAS.

TableSasIpRange getSasIpRange()

Get the TableSasIpRange which determines the IP ranges that are allowed to use the SAS.

String getServices()

Get the services accessible with this SAS.

OffsetDateTime getStartTime()

Get when the SAS will take effect.

String getVersion()

Get the service version that is targeted, if null or empty the latest service version targeted by the library will be used.

TableAccountSasSignatureValues setProtocol(TableSasProtocol protocol)

Sets the TableSasProtocol which determines the HTTP protocol that will be used.

TableAccountSasSignatureValues setSasIpRange(TableSasIpRange sasIpRange)

Sets the TableSasIpRange which determines the IP ranges that are allowed to use the SAS.

TableAccountSasSignatureValues setStartTime(OffsetDateTime startTime)

Sets when the SAS will take effect.

TableAccountSasSignatureValues setVersion(String version)

Sets the service version that is targeted.

Methods inherited from java.lang.Object

Constructor Details

TableAccountSasSignatureValues

public TableAccountSasSignatureValues(OffsetDateTime expiryTime, TableAccountSasPermission permissions, TableAccountSasService services, TableAccountSasResourceType resourceTypes)

Initializes a new TableAccountSasSignatureValues object.

Parameters:

expiryTime - The time after which the SAS will no longer work.
permissions - TableAccountSasPermission allowed by the SAS.
services - TableAccountSasService targeted by the SAS.
resourceTypes - TableAccountSasResourceType targeted by the SAS.

Method Details

getExpiryTime

public OffsetDateTime getExpiryTime()

Get The time after which the SAS will no longer work.

Returns:

The time after which the SAS will no longer work.

getPermissions

public String getPermissions()

Gets the operations the SAS user may perform. Please refer to TableAccountSasPermission to help determine which permissions are allowed.

Returns:

The operations the SAS user may perform.

getProtocol

public TableSasProtocol getProtocol()

Get the TableSasProtocol which determines the HTTP protocol that will be used.

Returns:

getResourceTypes

public String getResourceTypes()

Get the resource types accessible with this SAS. Please refer to TableAccountSasResourceType to help determine the resource types that are accessible.

Returns:

The resource types accessible with this SAS.

getSasIpRange

public TableSasIpRange getSasIpRange()

Get the TableSasIpRange which determines the IP ranges that are allowed to use the SAS.

Returns:

getServices

public String getServices()

Get the services accessible with this SAS. Please refer to TableAccountSasService to help determine which services are accessible.

Returns:

The services accessible with this SAS.

getStartTime

public OffsetDateTime getStartTime()

Get when the SAS will take effect.

Returns:

When the SAS will take effect.

getVersion

public String getVersion()

Get the service version that is targeted, if null or empty the latest service version targeted by the library will be used.

Returns:

The service version that is targeted.

setProtocol

public TableAccountSasSignatureValues setProtocol(TableSasProtocol protocol)

Sets the TableSasProtocol which determines the HTTP protocol that will be used.

Parameters:

protocol - The TableSasProtocol to set.

Returns:

The updated TableAccountSasSignatureValues object.

setSasIpRange

public TableAccountSasSignatureValues setSasIpRange(TableSasIpRange sasIpRange)

Sets the TableSasIpRange which determines the IP ranges that are allowed to use the SAS.

Parameters:

sasIpRange - The TableSasIpRange to set.

Returns:

The updated TableAccountSasSignatureValues object.

setStartTime

public TableAccountSasSignatureValues setStartTime(OffsetDateTime startTime)

Sets when the SAS will take effect.

Parameters:

startTime - The start time to set.

Returns:

The updated TableAccountSasSignatureValues object.

setVersion

public TableAccountSasSignatureValues setVersion(String version)

Sets the service version that is targeted. Leave this null or empty to target the version used by the library.

Parameters:

version - The target version to set.

Returns:

The updated TableAccountSasSignatureValues object.

Applies to