New-AzStorageAccountSASToken (Az.Storage) (2024)

  • Reference
Module:
Az.Storage

Creates an account-level SAS token.

Syntax

New-AzStorageAccountSASToken -Service <SharedAccessAccountServices> -ResourceType <SharedAccessAccountResourceTypes> [-Permission <String>] [-Protocol <SharedAccessProtocol>] [-IPAddressOrRange <String>] [-StartTime <DateTime>] [-ExpiryTime <DateTime>] [-EncryptionScope <String>] [-Context <IStorageContext>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description

The New-AzStorageAccountSASToken cmdlet creates an account-level shared access signature (SAS) token for an Azure Storage account.You can use the SAS token to delegate permissions for multiple services, or to delegate permissions for services not available with an object-level SAS token.An account SAS is secured using the storage account key. To create an account SAS, a client application must possess the account key.

Examples

Example 1: Create an account-level SAS token with full permission

New-AzStorageAccountSASToken -Service Blob,File,Table,Queue -ResourceType Service,Container,Object -Permission "racwdlup"

This command creates an account-level SAS token with full permission.

Example 2: Create an account-level SAS token for a range of IP addresses and EncryptionScope

New-AzStorageAccountSASToken -Service Blob,File,Table,Queue -ResourceType Service,Container,Object -Permission "racwdlup" -Protocol HttpsOnly -IPAddressOrRange 168.1.5.60-168.1.5.70 -EncryptionScope scopename

This command creates an account-level SAS token for HTTPS-only requests from the specified range of IP addresses, with a specific EncryptionScope.

Example 3: Create an account-level SAS token valid for 24 hours

New-AzStorageAccountSASToken -Service Blob -ResourceType Service,Container,Object -Permission "rl" -ExpiryTime (Get-Date).AddDays(1)

This command creates an read-only account-level SAS token that is valid for 24 hours.

Parameters

-Context

Specifies the Azure storage context.You can use the New-AzStorageContext cmdlet to get an AzureStorageContext object.

Type:IStorageContext
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionScope

Encryption scope to use when sending requests authorized with this SAS URI.

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

-ExpiryTime

Specifies the time at which the shared access signature becomes invalid.

Type:Nullable<T>[DateTime]
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Permission

Specifies the permissions for Storage account.Permissions are valid only if they match the specified resource type.It is important to note that this is a string, like rwd (for Read, Write and Delete).For more information about acceptable permission values, see Constructing an Account SAS http://go.microsoft.com/fwlink/?LinkId=799514

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

-Protocol

Specifies the protocol permitted for a request made with the account SAS.The acceptable values for this parameter are:

  • HttpsOnly
  • HttpsOrHttpThe default value is HttpsOrHttp.
Type:Nullable<T>[SharedAccessProtocol]
Accepted values:HttpsOnly, HttpsOrHttp
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceType

Specifies the resource types that are available with the SAS token.The acceptable values for this parameter are:

  • None
  • Service
  • Container
  • Object
Type:SharedAccessAccountResourceTypes
Accepted values:None, Service, Container, Object
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Service

Specifies the service.The acceptable values for this parameter are:

  • None
  • Blob
  • File
  • Queue
  • Table
Type:SharedAccessAccountServices
Accepted values:None, Blob, File, Queue, Table
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StartTime

Specifies the time, as a DateTime object, at which the SAS becomes valid.To get a DateTime object, use the Get-Date cmdlet.

Type:Nullable<T>[DateTime]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IStorageContext

Outputs

String

New-AzStorageAccountSASToken (Az.Storage) (2024)
Top Articles
Discussion: why does DWP call a client who has submitted a PIP appeal?
Employee Development Plan - How To + Examples - Growthspace
How To Start a Consignment Shop in 12 Steps (2024) - Shopify
Aberration Surface Entrances
Breaded Mushrooms
Mate Me If You May Sapir Englard Pdf
Kobold Beast Tribe Guide and Rewards
Boat Jumping Female Otezla Commercial Actress
Erin Kate Dolan Twitter
Cooking Fever Wiki
Ts Lillydoll
Overton Funeral Home Waterloo Iowa
Grasons Estate Sales Tucson
7 Fly Traps For Effective Pest Control
Powerball winning numbers for Saturday, Sept. 14. Check tickets for $152 million drawing
Uconn Health Outlook
The best firm mattress 2024, approved by sleep experts
Mc Donald's Bruck - Fast-Food-Restaurant
Riherds Ky Scoreboard
Military life insurance and survivor benefits | USAGov
SuperPay.Me Review 2023 | Legitimate and user-friendly
Dragger Games For The Brain
St Clair County Mi Mugshots
Walgreens Bunce Rd
1 Filmy4Wap In
University Of Michigan Paging System
Cognitive Science Cornell
Is Henry Dicarlo Leaving Ktla
Pulitzer And Tony Winning Play About A Mathematical Genius Crossword
031515 828
Die wichtigsten E-Nummern
County Cricket Championship, day one - scores, radio commentary & live text
Bad Business Private Server Commands
Bursar.okstate.edu
Kstate Qualtrics
Nacho Libre Baptized Gif
Midsouthshooters Supply
The Best Restaurants in Dublin - The MICHELIN Guide
Weather Underground Bonita Springs
Sam's Club Gas Prices Florence Sc
Barstool Sports Gif
Chathuram Movie Download
Sig Mlok Bayonet Mount
Despacito Justin Bieber Lyrics
Iupui Course Search
Petfinder Quiz
Contico Tuff Box Replacement Locks
Rocket League Tracker: A useful tool for every player
Bf273-11K-Cl
OSF OnCall Urgent Care treats minor illnesses and injuries
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 6269

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.