ManagedStorageSharedAccessSignatureClient.GetTokenAsync Method

Definition

Overloads

Name Description
GetTokenAsync(String, Nullable<Int32>, RequestContext)

[Protocol Method] Generate a SAS Token for the given storage account and container. The storage account and container must be associated with a Planetary Computer dataset indexed by the STAC API.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetTokenAsync(String, Nullable<Int32>, CancellationToken)

Generate a SAS Token for the given storage account and container. The storage account and container must be associated with a Planetary Computer dataset indexed by the STAC API.

GetTokenAsync(String, Nullable<Int32>, RequestContext)

Source:
ManagedStorageSharedAccessSignatureClient.cs

[Protocol Method] Generate a SAS Token for the given storage account and container. The storage account and container must be associated with a Planetary Computer dataset indexed by the STAC API.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetTokenAsync(string collectionId, int? durationInMinutes, Azure.RequestContext context);
abstract member GetTokenAsync : string * Nullable<int> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTokenAsync : string * Nullable<int> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetTokenAsync (collectionId As String, durationInMinutes As Nullable(Of Integer), context As RequestContext) As Task(Of Response)

Parameters

collectionId
String

The name of the Collection that the SAS token will be issued for.

durationInMinutes
Nullable<Int32>

The duration, in minutes, that the SAS token will be valid. Only valid for approved users.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

collectionId is null.

collectionId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

GetTokenAsync(String, Nullable<Int32>, CancellationToken)

Source:
ManagedStorageSharedAccessSignatureClient.cs

Generate a SAS Token for the given storage account and container. The storage account and container must be associated with a Planetary Computer dataset indexed by the STAC API.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.PlanetaryComputer.SharedAccessSignatureToken>> GetTokenAsync(string collectionId, int? durationInMinutes = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTokenAsync : string * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.PlanetaryComputer.SharedAccessSignatureToken>>
override this.GetTokenAsync : string * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.PlanetaryComputer.SharedAccessSignatureToken>>
Public Overridable Function GetTokenAsync (collectionId As String, Optional durationInMinutes As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SharedAccessSignatureToken))

Parameters

collectionId
String

The name of the Collection that the SAS token will be issued for.

durationInMinutes
Nullable<Int32>

The duration, in minutes, that the SAS token will be valid. Only valid for approved users.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

collectionId is null.

collectionId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to