< Back

Set-AzureKeyVaultManagedStorageSasDefinition

Tue Jan 29, 2019 9:50 pm

NAME Set-AzureKeyVaultManagedStorageSasDefinition



SYNOPSIS

Sets a Shared Access Signature (SAS) definition with Key Vault for a given Key Vault managed Azure Storage Account.





SYNTAX

Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-ApiVersion <String>]

[-DefaultProfile <IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Permission {Add | Create | Delete | List | Process | Read |

Query | Update | Write} [-Protocol {HttpsOnly | HttpsOrHttp}] -ResourceType {Service | Container | Object} -Service {Blob | File | Queue | Table}

[-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan> [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> -Blob <String> -Container <String>

[-DefaultProfile <IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Permission {Add | Create | Delete | List | Process | Read |

Query | Update | Write} [-Protocol {HttpsOnly | HttpsOrHttp}] [-SharedAccessHeader {CacheControl | ContentDisposition | ContentEncoding |

ContentLanguage | ContentType}] [-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan> [-Confirm] [-WhatIf]

[<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> -Blob <String> -Container <String>

[-DefaultProfile <IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Policy <String> [-Protocol {HttpsOnly | HttpsOrHttp}]

[-SharedAccessHeader {CacheControl | ContentDisposition | ContentEncoding | ContentLanguage | ContentType}] [-Tag <Hashtable>]

[-TargetStorageVersion <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> -Container <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Permission {Add | Create | Delete | List | Process | Read | Query | Update |

Write} [-Protocol {HttpsOnly | HttpsOrHttp}] [-SharedAccessHeader {CacheControl | ContentDisposition | ContentEncoding | ContentLanguage |

ContentType}] [-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan> [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> -Container <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Policy <String> [-Protocol {HttpsOnly | HttpsOrHttp}] [-SharedAccessHeader

{CacheControl | ContentDisposition | ContentEncoding | ContentLanguage | ContentType}] [-Tag <Hashtable>] [-TargetStorageVersion <String>]

[-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-EndPartitionKey <String>] [-EndRowKey <String>] [-IPAddressOrRange <String>] -Permission {Add | Create |

Delete | List | Process | Read | Query | Update | Write} [-Protocol {HttpsOnly | HttpsOrHttp}] [-StartPartitionKey <String>] [-StartRowKey

<String>] -Table <String> [-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan> [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-EndPartitionKey <String>] [-EndRowKey <String>] [-IPAddressOrRange <String>] -Policy <String> [-Protocol

{HttpsOnly | HttpsOrHttp}] [-StartPartitionKey <String>] [-StartRowKey <String>] -Table <String> [-Tag <Hashtable>] [-TargetStorageVersion

<String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Path <String> -Permission {Add | Create | Delete | List | Process | Read |

Query | Update | Write} [-Protocol {HttpsOnly | HttpsOrHttp}] -Share <String> [-SharedAccessHeader {CacheControl | ContentDisposition |

ContentEncoding | ContentLanguage | ContentType}] [-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan> [-Confirm]

[-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Permission {Add | Create | Delete | List | Process | Read | Query | Update |

Write} [-Protocol {HttpsOnly | HttpsOrHttp}] -Share <String> [-SharedAccessHeader {CacheControl | ContentDisposition | ContentEncoding |

ContentLanguage | ContentType}] [-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan> [-Confirm] [-WhatIf]

[<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Permission {Add | Create | Delete | List | Process | Read | Query | Update |

Write} [-Protocol {HttpsOnly | HttpsOrHttp}] -Queue <String> [-Tag <Hashtable>] [-TargetStorageVersion <String>] -ValidityPeriod <TimeSpan>

[-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Path <String> -Policy <String> [-Protocol {HttpsOnly | HttpsOrHttp}] -Share

<String> [-SharedAccessHeader {CacheControl | ContentDisposition | ContentEncoding | ContentLanguage | ContentType}] [-Tag <Hashtable>]

[-TargetStorageVersion <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Policy <String> [-Protocol {HttpsOnly | HttpsOrHttp}] -Share <String>

[-SharedAccessHeader {CacheControl | ContentDisposition | ContentEncoding | ContentLanguage | ContentType}] [-Tag <Hashtable>]

[-TargetStorageVersion <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-DefaultProfile

<IAzureContextContainer>] [-Disable] [-IPAddressOrRange <String>] -Policy <String> [-Protocol {HttpsOnly | HttpsOrHttp}] -Queue <String> [-Tag

<Hashtable>] [-TargetStorageVersion <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-AzureKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String> [-Parameter] <Hashtable>

[-DefaultProfile <IAzureContextContainer>] [-Disable] [-Tag <Hashtable>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

Sets a Shared Access Signature (SAS) definition with a given Key Vault managed Azure Storage Account. This also sets a secret which can be used to

get the SAS token per this SAS definition. SAS token is generated using these parameters and the active key of the Key Vault managed Azure Storage

Account.





PARAMETERS

-AccountName <String>

Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from vault name, currently selected

environment and manged storage account name.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ApiVersion <String>

Specifies the storage service version to use to execute the request made using the account SAS URI.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Blob <String>

Blob Name



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Container <String>

Container Name



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Disable [<SwitchParameter>]

Disables the use of sas definition for generation of sas token.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-EndPartitionKey <String>

End Partition Key



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EndRowKey <String>

End Row Key



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IPAddressOrRange <String>

IP, or IP range ACL (access control list) of the request that would be accepted by Azure Storage.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Storage sas definition name. Cmdlet constructs the FQDN of a storage sas definition from vault name, currently selected environment, storage

account name and sas definition name.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Parameter <Hashtable>

Sas definition parameters that will be used to create the sas token.



Required? true

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String>

Path to the cloud file to generate sas token against.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Permission <String[]>

Permission. Values include 'Query','Add','Update','Process'



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Policy <String>

Policy Identifier



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Protocol <String>

Protocol can be used in the request with the SAS token.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Queue <String>

Queue Name



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceType <String[]>

Resource types that this SAS token applies to. Values include 'Service','Container','Object'



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Service <String[]>

Service types that this SAS token applies to. Values include 'Blob','File','Queue','Table'



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Share <String>

Share Name



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SharedAccessHeader <String[]>

Specifies the query parameters to override response headers.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartPartitionKey <String>

Start Partition Key



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartRowKey <String>

Start Row Key



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Table <String>

Table Name



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Tag <Hashtable>

Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetStorageVersion <String>

Specifies the signed storage service version to use to authenticate requests made with the SAS token.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ValidityPeriod <TimeSpan>

Validity period that will get used to set the expiry time of sas token from the time it gets generated



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VaultName <String>

Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.KeyVault.Models.ManagedStorageSasDefinition







NOTES









Example 1 : Set an ad hoc service Blob sas definition



PS C:\\> Set-AzureKeyVaultManagedStorageSasDefinition -Blob 'blob1' -Container 'container1' -VaultName 'vault1' -AccountName 'account1' -Name

'sas1' -ValidityPeriod ([System.Timespan]::FromDays(30)) -Permission Read,Add -SharedAccessHeader CacheControl,ContentDisposition -Protocol

HttpsOnly -IPAddressOrRange '168.1.5.60-168.1.5.70'



Sets an ad hoc service blob sas definition 'sas1' with key vault managed storage account 'account1' in vault 'vault1'.





Example 2 : Set an ad hoc account sas definition



PS C:\\> Set-AzureKeyVaultManagedStorageSasDefinition -Service Blob,File -ResourceType Container,Service -VaultName 'vault1' -AccountName

'account1' -Name 'sas1' -Protocol HttpsOrHttp -IPAddressOrRange '168.1.5.60' -ValidityPeriod ([System.Timespan]::FromDays(30)) -Permission Read,Add



Sets an ad hoc blob sas definition 'sas1' with key vault managed storage account 'account1' in vault 'vault1'.





Example 3 : Set a sas definition using a hashtable



PS C:\\> $parameters = @{"sasType"="blob";"signedVersion"="2016-05-31";"signedProtocols"="https";"signedIp"="168.1.5.60-168.1.5.70";"validityPeriod"

="P30D";"signedPermissions"="ra";"blobName"="blob1";"containerName"="container1";"rscd"="";"rscc"=""}

PS C:\\> Set-AzureKeyVaultManagedStorageSasDefinition -VaultName vault1 -AccountName account1 -Name sas1 -Parameter $parameters



Sets an ad hoc blob sas definition 'sas1' with key vault managed storage account 'account1' in vault 'vault1' using a hashtable.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... definition

Azure??????????????????RM.??????????????????Key??????????????????Vault