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
Why are Texas Property Taxes So High? | Property Tax Lenders
Privilege Pierced by Ongoing or Future Wrongful Conduct: The Crime-Fraud Privilege Exception is Broader Than You Think
Friskies Tender And Crunchy Recall
Aberration Surface Entrances
Was ist ein Crawler? | Finde es jetzt raus! | OMT-Lexikon
Tesla Supercharger La Crosse Photos
Beautiful Scrap Wood Paper Towel Holder
Craigslist Cars And Trucks Buffalo Ny
Baseball-Reference Com
Knaben Pirate Download
Persona 4 Golden Taotie Fusion Calculator
The Murdoch succession drama kicks off this week. Here's everything you need to know
Gmail Psu
Gino Jennings Live Stream Today
Costco Gas Foster City
Unterwegs im autonomen Freightliner Cascadia: Finger weg, jetzt fahre ich!
Missed Connections Inland Empire
Rugged Gentleman Barber Shop Martinsburg Wv
Yard Goats Score
Lista trofeów | Jedi Upadły Zakon / Fallen Order - Star Wars Jedi Fallen Order - poradnik do gry | GRYOnline.pl
Shopmonsterus Reviews
Pirates Of The Caribbean 1 123Movies
Which Sentence is Punctuated Correctly?
Dei Ebill
14 Top-Rated Attractions & Things to Do in Medford, OR
Busted Mugshots Paducah Ky
Arlington Museum of Art to show shining, shimmering, splendid costumes from Disney Archives
Ullu Coupon Code
Pokémon Unbound Starters
San Jac Email Log In
Astro Seek Asteroid Chart
Babydepot Registry
Missing 2023 Showtimes Near Mjr Southgate
Utexas Baseball Schedule 2023
Workboy Kennel
The Ride | Rotten Tomatoes
Tas Restaurant Fall River Ma
Kips Sunshine Kwik Lube
Unlock The Secrets Of "Skip The Game" Greensboro North Carolina
Keeper Of The Lost Cities Series - Shannon Messenger
Evil Dead Rise (2023) | Film, Trailer, Kritik
Guy Ritchie's The Covenant Showtimes Near Grand Theatres - Bismarck
Craigslist Food And Beverage Jobs Chicago
UT Announces Physician Assistant Medicine Program
Conan Exiles Tiger Cub Best Food
This Doctor Was Vilified After Contracting Ebola. Now He Sees History Repeating Itself With Coronavirus
Ratchet And Clank Tools Of Destruction Rpcs3 Freeze
Congruent Triangles Coloring Activity Dinosaur Answer Key
De Donde Es El Area +63
Morgan State University Receives $20.9 Million NIH/NIMHD Grant to Expand Groundbreaking Research on Urban Health Disparities
Cbs Scores Mlb
Emmi-Sellers
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.