ShareSasBuilder
in package
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
$cacheControl
private
string|null
$cacheControl
= null
$contentDisposition
private
string|null
$contentDisposition
= null
$contentEncoding
private
string|null
$contentEncoding
= null
$contentLanguage
private
string|null
$contentLanguage
= null
$contentType
private
string|null
$contentType
= null
$expiresOn
private
DateTimeInterface
$expiresOn
$filePath
private
string|null
$filePath
= null
$identifier
private
string|null
$identifier
= null
$ipRange
private
SasIpRange|null
$ipRange
= null
$permissions
private
string|null
$permissions
= null
$protocol
private
SasProtocol|null
$protocol
= null
$shareName
private
string
$shareName
$startsOn
private
DateTimeInterface|null
$startsOn
= null
$version
private
string
$version
Methods
build()
Signs and returns the service SAS query string without a leading question mark.
public
build(StorageSharedKeyCredential $sharedKeyCredential) : string
Parameters
- $sharedKeyCredential : StorageSharedKeyCredential
Return values
stringnew()
Creates an empty file share service SAS builder.
public
static new() : self
Return values
selfsetCacheControl()
Overrides the Cache-Control response header for requests using the SAS.
public
setCacheControl(string $value) : self
Parameters
- $value : string
Return values
selfsetContentDisposition()
Overrides the Content-Disposition response header for requests using the SAS.
public
setContentDisposition(string $value) : self
Parameters
- $value : string
Return values
selfsetContentEncoding()
Overrides the Content-Encoding response header for requests using the SAS.
public
setContentEncoding(string $value) : self
Parameters
- $value : string
Return values
selfsetContentLanguage()
Overrides the Content-Language response header for requests using the SAS.
public
setContentLanguage(string $value) : self
Parameters
- $value : string
Return values
selfsetContentType()
Overrides the Content-Type response header for requests using the SAS.
public
setContentType(string $value) : self
Parameters
- $value : string
Return values
selfsetExpiresOn()
Sets the instant at which the SAS expires.
public
setExpiresOn(DateTimeInterface $value) : self
Parameters
- $value : DateTimeInterface
Return values
selfsetFilePath()
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
selfsetIdentifier()
Associates the SAS with a stored access policy identifier.
public
setIdentifier(string $value) : self
Parameters
- $value : string
Return values
selfsetIPRange()
Restricts requests to the specified source IP address or range.
public
setIPRange(SasIpRange $value) : self
Parameters
- $value : SasIpRange
Return values
selfsetPermissions()
Sets the operations permitted by the SAS.
public
setPermissions(string|ShareSasPermissions|ShareFileSasPermissions $value) : self
Parameters
- $value : string|ShareSasPermissions|ShareFileSasPermissions
Return values
selfsetProtocol()
Restricts requests to HTTPS, or permits both HTTPS and HTTP.
public
setProtocol(SasProtocol $value) : self
Parameters
- $value : SasProtocol
Return values
selfsetShareName()
Sets the share name included in the canonical signed resource.
public
setShareName(string $value) : self
Parameters
- $value : string
Return values
selfsetStartsOn()
Sets the earliest instant at which the SAS is valid.
public
setStartsOn(DateTimeInterface $value) : self
Parameters
- $value : DateTimeInterface
Return values
selfsetVersion()
Sets the Storage service version signed by the SAS.
public
setVersion(string $value) : self
Parameters
- $value : string
Return values
selfformatAs8601Zulu()
private
static formatAs8601Zulu(DateTimeInterface $date) : string
Parameters
- $date : DateTimeInterface
Return values
stringgetCanonicalizedResource()
private
getCanonicalizedResource(string $accountName) : string
Parameters
- $accountName : string
Return values
stringnormalizePath()
private
static normalizePath(string $value) : string|null
Parameters
- $value : string
Return values
string|nullvalidateState()
Ensures the builder contains the minimum state required to sign a SAS.
private
validateState() : void