< Back

New-AzureStorageTableSASToken

Tue Jan 29, 2019 9:27 pm

NAME New-AzureStorageTableSASToken



SYNOPSIS

Generates an SAS token for an Azure Storage table.





SYNTAX

New-AzureStorageTableSASToken [-Name] <String> [-Context <IStorageContext>] [-EndPartitionKey <String>] [-EndRowKey <String>] [-ExpiryTime

<DateTime>] [-FullUri] [-IPAddressOrRange <String>] [-Permission <String>] [-Protocol {HttpsOnly | HttpsOrHttp}] [-StartPartitionKey <String>]

[-StartRowKey <String>] [-StartTime <DateTime>] [<CommonParameters>]



New-AzureStorageTableSASToken [-Name] <String> [-Context <IStorageContext>] [-EndPartitionKey <String>] [-EndRowKey <String>] [-ExpiryTime

<DateTime>] [-FullUri] [-IPAddressOrRange <String>] -Policy <String> [-Protocol {HttpsOnly | HttpsOrHttp}] [-StartPartitionKey <String>]

[-StartRowKey <String>] [-StartTime <DateTime>] [<CommonParameters>]





DESCRIPTION

The New-AzureStorageTableSASToken cmdlet generates a Shared Access Signature (SAS) token for an Azure Storage table.





PARAMETERS

-Context <IStorageContext>

Specifies an Azure storage context. To obtain a storage context, use the New-AzureStorageContext cmdlet.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-EndPartitionKey <String>

Specifies the partition key of the end of the range for the token that this cmdlet creates.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EndRowKey <String>

Specifies the row key for the end of the range for the token that this cmdlet creates.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ExpiryTime <DateTime>

Specifies when the SAS token expires.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FullUri [<SwitchParameter>]

Indicates that this cmdlet returns the full queue URI with the SAS token.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-IPAddressOrRange <String>

Specifies the IP address or range of IP addresses from which to accept requests, such as 168.1.5.65 or 168.1.5.60-168.1.5.70. The range is

inclusive.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of an Azure Storage table. This cmdlet creates an SAS token for the table that this parameter specifies.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Permission <String>

Specifies permissions for an Azure Storage table.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Policy <String>

Specifies a stored access policy, which includes the permissions for this SAS token.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Protocol <SharedAccessProtocol>

Specifies the protocol permitted for a request. The acceptable values for this parameter are: * HttpsOnly



* HttpsOrHttp





The default value is HttpsOrHttp.





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartPartitionKey <String>

Specifies the partition key of the start of the range for the token that this cmdlet creates.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartRowKey <String>

Specifies the row key for the start of the range for the token that this cmdlet creates.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartTime <DateTime>

Specifies when the SAS token becomes valid.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

IStorageContext

Parameter 'Context' accepts value of type 'IStorageContext' from the pipeline



String

Parameter 'Name' accepts value of type 'String' from the pipeline





OUTPUTS

System.String







NOTES









Example 1: Generate an SAS token that has full permissions for a table



C:\\PS>New-AzureStorageTableSASToken -Name "ContosoResources" -Permission "raud"



This command generates an SAS token with full permissions for the table named ContosoResources. That token is for read, add, update, and delete

permissions.





Example 2: Generate an SAS token for a range of partitions



C:\\PS>New-AzureStorageTableSASToken -Name "ContosoResources" -Permission "raud" -StartPartitionKey "a" -EndPartitionKey "b"



This command generates and SAS token with full permissions for the table named ContosoResources. The command limits the token to the range that

the StartPartitionKey and EndPartitionKey parameters specify.





Example 3: Generate an SAS token that has a stored access policy for a table



C:\\PS>New-AzureStorageTableSASToken -Name "ContosoResources" -Policy "ClientPolicy01"



This command generates an SAS token for the table named ContosoResources. The command specifies the stored access policy named ClientPolicy01.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... lesastoken

New-AzureStorageContext