Edit

Share via


New-AzStorageTableStoredAccessPolicy

Creates a stored access policy for an Azure storage table.

Syntax

Default (Default)

New-AzStorageTableStoredAccessPolicy
    [-Table] <String>
    [-Policy] <String>
    [-Permission <String>]
    [-StartTime <DateTime>]
    [-ExpiryTime <DateTime>]
    [-Context <IStorageContext>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzStorageTableStoredAccessPolicy cmdlet creates a stored access policy for an Azure storage table.

Examples

Example 1: Create a stored access policy in a table

New-AzStorageTableStoredAccessPolicy -Table "MyTable" -Policy "Policy02"

This command creates an access policy named Policy02 in the storage table named MyTable.

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

-ExpiryTime

Specifies the time at which the stored access policy becomes invalid.

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

-Permission

Specifies permissions in the stored access policy to access the storage table. It is important to note that this is a string, like raud (for Read, Add, Update and Delete).

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

-Policy

Specifies a name for the stored access policy.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StartTime

Specifies the time at which the stored access policy 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

-Table

Specifies the Azure storage table name.

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
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