PHP OSS for Azure API Reference

ShareSasBuilder
in package

FinalYes

Builds an Azure Files service shared access signature (SAS).

Table of Contents

Properties

$cacheControl  : string|null
$contentDisposition  : string|null
$contentEncoding  : string|null
$contentLanguage  : string|null
$contentType  : string|null
$expiresOn  : DateTimeInterface
$filePath  : string|null
$identifier  : string|null
$ipRange  : SasIpRange|null
$permissions  : string|null
$protocol  : SasProtocol|null
$shareName  : string
$startsOn  : DateTimeInterface|null
$version  : string

Methods

build()  : string
Signs and returns the service SAS query string without a leading question mark.
new()  : self
Creates an empty file share service SAS builder.
setCacheControl()  : self
Overrides the Cache-Control response header for requests using the SAS.
setContentDisposition()  : self
Overrides the Content-Disposition response header for requests using the SAS.
setContentEncoding()  : self
Overrides the Content-Encoding response header for requests using the SAS.
setContentLanguage()  : self
Overrides the Content-Language response header for requests using the SAS.
setContentType()  : self
Overrides the Content-Type response header for requests using the SAS.
setExpiresOn()  : self
Sets the instant at which the SAS expires.
setFilePath()  : self
Sets the file path included in the canonical signed resource.
setIdentifier()  : self
Associates the SAS with a stored access policy identifier.
setIPRange()  : self
Restricts requests to the specified source IP address or range.
setPermissions()  : self
Sets the operations permitted by the SAS.
setProtocol()  : self
Restricts requests to HTTPS, or permits both HTTPS and HTTP.
setShareName()  : self
Sets the share name included in the canonical signed resource.
setStartsOn()  : self
Sets the earliest instant at which the SAS is valid.
setVersion()  : self
Sets the Storage service version signed by the SAS.
formatAs8601Zulu()  : string
getCanonicalizedResource()  : string
normalizePath()  : string|null
validateState()  : void
Ensures the builder contains the minimum state required to sign a SAS.

Properties

Methods

new()

Creates an empty file share service SAS builder.

public static new() : self
Return values
self

setCacheControl()

Overrides the Cache-Control response header for requests using the SAS.

public setCacheControl(string $value) : self
Parameters
$value : string
Return values
self

setContentDisposition()

Overrides the Content-Disposition response header for requests using the SAS.

public setContentDisposition(string $value) : self
Parameters
$value : string
Return values
self

setContentEncoding()

Overrides the Content-Encoding response header for requests using the SAS.

public setContentEncoding(string $value) : self
Parameters
$value : string
Return values
self

setContentLanguage()

Overrides the Content-Language response header for requests using the SAS.

public setContentLanguage(string $value) : self
Parameters
$value : string
Return values
self

setContentType()

Overrides the Content-Type response header for requests using the SAS.

public setContentType(string $value) : self
Parameters
$value : string
Return values
self

setExpiresOn()

Sets the instant at which the SAS expires.

public setExpiresOn(DateTimeInterface $value) : self
Parameters
$value : DateTimeInterface
Return values
self

setFilePath()

Sets the file path included in the canonical signed resource.

public setFilePath(string|null $value) : self

The Azure Files service SAS model distinguishes only share (sr=s) and file (sr=f) resources. Directory clients therefore stamp their path here using the same file-path semantics that the Azure .NET SDK uses.

Parameters
$value : string|null
Return values
self

setIdentifier()

Associates the SAS with a stored access policy identifier.

public setIdentifier(string $value) : self
Parameters
$value : string
Return values
self

setIPRange()

Restricts requests to the specified source IP address or range.

public setIPRange(SasIpRange $value) : self
Parameters
$value : SasIpRange
Return values
self

setShareName()

Sets the share name included in the canonical signed resource.

public setShareName(string $value) : self
Parameters
$value : string
Return values
self

setStartsOn()

Sets the earliest instant at which the SAS is valid.

public setStartsOn(DateTimeInterface $value) : self
Parameters
$value : DateTimeInterface
Return values
self

setVersion()

Sets the Storage service version signed by the SAS.

public setVersion(string $value) : self
Parameters
$value : string
Return values
self

formatAs8601Zulu()

private static formatAs8601Zulu(DateTimeInterface $date) : string
Parameters
$date : DateTimeInterface
Return values
string

getCanonicalizedResource()

private getCanonicalizedResource(string $accountName) : string
Parameters
$accountName : string
Return values
string

normalizePath()

private static normalizePath(string $value) : string|null
Parameters
$value : string
Return values
string|null
On this page

Search results