ShareFileClient.SetHttpHeadersAsync Method

Definition

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>> SetHttpHeadersAsync (long? newSize = default, Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders httpHeaders = default, Azure.Storage.Files.Shares.Models.FileSmbProperties smbProperties = default, string filePermission = default, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetHttpHeadersAsync : Nullable<int64> * Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders * Azure.Storage.Files.Shares.Models.FileSmbProperties * string * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>>
override this.SetHttpHeadersAsync : Nullable<int64> * Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders * Azure.Storage.Files.Shares.Models.FileSmbProperties * string * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>>
Public Overridable Function SetHttpHeadersAsync (Optional newSize As Nullable(Of Long) = Nothing, Optional httpHeaders As ShareFileHttpHeaders = Nothing, Optional smbProperties As FileSmbProperties = Nothing, Optional filePermission As String = Nothing, Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareFileInfo))

Parameters

newSize
Nullable<Int64>

Optional. Resizes a file to the specified size. If the specified byte value is less than the current size of the file, then all ranges above the specified byte value are cleared.

httpHeaders
ShareFileHttpHeaders

Optional. The standard HTTP header system properties to set. If not specified, existing values will be cleared.

smbProperties
FileSmbProperties

Optional SMB properties to set for the file.

filePermission
String

Optional file permission to set for the file.

conditions
ShareFileRequestConditions

Optional ShareFileRequestConditions to add conditions on creating the file.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the file.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to