New-AzStorageTableSASToken
Generates an SAS token for an Azure Storage table.
Syntax
SasPolicy
New-AzStorageTableSASToken
[-Name] <String>
-Policy <String>
[-Protocol <SharedAccessProtocol>]
[-IPAddressOrRange <String>]
[-StartTime <DateTime>]
[-ExpiryTime <DateTime>]
[-FullUri]
[-StartPartitionKey <String>]
[-StartRowKey <String>]
[-EndPartitionKey <String>]
[-EndRowKey <String>]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SasPermission
New-AzStorageTableSASToken
[-Name] <String>
[-Permission <String>]
[-Protocol <SharedAccessProtocol>]
[-IPAddressOrRange <String>]
[-StartTime <DateTime>]
[-ExpiryTime <DateTime>]
[-FullUri]
[-StartPartitionKey <String>]
[-StartRowKey <String>]
[-EndPartitionKey <String>]
[-EndRowKey <String>]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzStorageTableSASToken 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
New-AzStorageTableSASToken -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
New-AzStorageTableSASToken -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
New-AzStorageTableSASToken -Name "ContosoResources" -Policy "ClientPolicy01"
This command generates an SAS token for the table named ContosoResources.
The command specifies the stored access policy named ClientPolicy01.
Parameters
-Context
Specifies an Azure storage context.
To obtain a storage context, use the New-AzStorageContext cmdlet.
Parameter properties
Type: IStorageContext
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EndPartitionKey
Specifies the partition key of the end of the range for the token that this cmdlet creates.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: endpk
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EndRowKey
Specifies the row key for the end of the range for the token that this cmdlet creates.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: endrk
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ExpiryTime
Specifies when the SAS token expires.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FullUri
Indicates that this cmdlet returns the full queue URI with the SAS token.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies the name of an Azure Storage table.
This cmdlet creates an SAS token for the table that this parameter specifies.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: N, Table
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-Permission
Specifies permissions for an Azure Storage table.
It is important to note that this is a string, like rwd
(for Read, Write and Delete).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SasPermission
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Policy
Specifies a stored access policy, which includes the permissions for this SAS token.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SasPolicy
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Protocol
Specifies the protocol permitted for a request.
The acceptable values for this parameter are:
HttpsOnly
HttpsOrHttp
The default value is HttpsOrHttp.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StartPartitionKey
Specifies the partition key of the start of the range for the token that this cmdlet creates.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: startpk
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StartRowKey
Specifies the row key for the start of the range for the token that this cmdlet creates.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: startrk
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StartTime
Specifies when the SAS token becomes valid.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs