ManagedStorageSharedAccessSignatureClient.GetToken Method

Definition

Overloads

Name Description
GetToken(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.
GetToken(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.

GetToken(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 Azure.Response GetToken(string collectionId, int? durationInMinutes, Azure.RequestContext context);
abstract member GetToken : string * Nullable<int> * Azure.RequestContext -> Azure.Response
override this.GetToken : string * Nullable<int> * Azure.RequestContext -> Azure.Response
Public Overridable Function GetToken (collectionId As String, durationInMinutes As Nullable(Of Integer), context As RequestContext) As 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

GetToken(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 Azure.Response<Azure.Analytics.PlanetaryComputer.SharedAccessSignatureToken> GetToken(string collectionId, int? durationInMinutes = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetToken : string * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.PlanetaryComputer.SharedAccessSignatureToken>
override this.GetToken : string * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.PlanetaryComputer.SharedAccessSignatureToken>
Public Overridable Function GetToken (collectionId As String, Optional durationInMinutes As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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