Edit

Share via


New-AzStorageQueueSASToken

Generates a shared access signature token for an Azure storage queue.

Syntax

SasPolicy

New-AzStorageQueueSASToken
    [-Name] <String>
    -Policy <String>
    [-Protocol <String>]
    [-IPAddressOrRange <String>]
    [-StartTime <DateTime>]
    [-ExpiryTime <DateTime>]
    [-FullUri]
    [-Context <IStorageContext>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SasPermission

New-AzStorageQueueSASToken
    [-Name] <String>
    [-Permission <String>]
    [-Protocol <String>]
    [-IPAddressOrRange <String>]
    [-StartTime <DateTime>]
    [-ExpiryTime <DateTime>]
    [-FullUri]
    [-Context <IStorageContext>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzStorageQueueSASToken cmdlet generates shared access signature token for an Azure storage queue.

Examples

Example 1: Generate a queue SAS token with full permission

New-AzStorageQueueSASToken -Name "Test" -Permission raup

This example generates a queue SAS token with full permission.

Parameters

-Context

Specifies the Azure storage context. You can create it by 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

-ExpiryTime

Specifies when the shared access signature is no longer valid.

Parameter properties

Type:

Nullable<T>[DateTime]

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

-FullUri

Indicates that this cmdlet return the full blob URI and the shared access signature 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 an Azure storage queue name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:N, Queue

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 a storage queue. It is important to note that this is a string, like raup (for Read, Add, Update and ProcessMessages).

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 an Azure stored access policy.

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

Type:String
Default value:None
Accepted values:HttpsOnly, HttpsOrHttp
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

-StartTime

Specifies when the shared access signature becomes valid.

Parameter properties

Type:

Nullable<T>[DateTime]

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

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.

Inputs

String

IStorageContext

Outputs

String