New-​Azure​Storage​Table​SA​SToken

Generates an SAS token for an Azure Storage table.

Syntax

New-AzureStorageTableSASToken
   [-Name] <String>
   [-Context <AzureStorageContext>]
   [-EndPartitionKey <String>]
   [-EndRowKey <String>]
   [-ExpiryTime <DateTime>]
   [-FullUri]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-IPAddressOrRange <String>]
   [-Permission <String>]
   [-PipelineVariable <String>]
   [-Protocol <SharedAccessProtocol>]
   [-StartPartitionKey <String>]
   [-StartRowKey <String>]
   [-StartTime <DateTime>]
   [<CommonParameters>]
New-AzureStorageTableSASToken
   [-Name] <String>
   [-Context <AzureStorageContext>]
   [-EndPartitionKey <String>]
   [-EndRowKey <String>]
   [-ExpiryTime <DateTime>]
   [-FullUri]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-IPAddressOrRange <String>]
   [-PipelineVariable <String>]
   -Policy <String>
   [-Protocol <SharedAccessProtocol>]
   [-StartPartitionKey <String>]
   [-StartRowKey <String>]
   [-StartTime <DateTime>]
   [<CommonParameters>]

Description

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

Examples

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.

Required Parameters

-Name

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

Type:String
Aliases:N, Table
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Policy

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Context

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

Type:AzureStorageContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-EndPartitionKey

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

Type:String
Aliases:endpk
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EndRowKey

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

Type:String
Aliases:endrk
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExpiryTime

Specifies when the SAS token expires.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FullUri

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPAddressOrRange

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Permission

Specifies permissions for an Azure Storage table.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PipelineVariable

Stores the value of the current pipeline element as a variable, for any named command as it flows through the pipeline.

Type:String
Aliases:pv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Protocol

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

  • HttpsOnly
  • HttpsOrHttpThe default value is HttpsOrHttp.
Type:SharedAccessProtocol
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartPartitionKey

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

Type:String
Aliases:startpk
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartRowKey

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

Type:String
Aliases:startrk
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartTime

Specifies when the SAS token becomes valid.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False