sas
Creates, updates, deletes, gets or lists a sas resource.
Overview
| Name | sas |
| Type | Resource |
| Id | azure.planetary_computer_dataplane.sas |
Fields
The following fields are returned by SELECT queries:
- get_url
- get_token
| Name | Datatype | Description |
|---|---|---|
href | string | Href. Required. |
msft:expiry | string (date-time) | Msft:Expiry. |
| Name | Datatype | Description |
|---|---|---|
msft:expiry | string (date-time) | Msft:Expiry. Required. |
token | string | Token. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_url | select | href, endpoint | duration | sign an HREF in the format of a URL and returns a SharedAccessSignatureSignedHrefResponse. Signs a HREF (a link URL) by appending a SAS Token _. If the HREF is not a Azure Blob Storage HREF, then pass back the HREF unsigned. |
get_token | select | collection_id, endpoint | duration | generate a SAS Token for the given Azure Blob storage account and container. 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. |
revoke_token | exec | endpoint | duration | Revoke SAS token for the managed storage account of this GeoCatalog. Revoke a SAS Token _ for managed storage account of this GeoCatalog. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
collection_id | string | Collection Id. Required. |
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
href | string | Href. Required. |
duration | integer | Duration. Default value is None. |
SELECT examples
- get_url
- get_token
sign an HREF in the format of a URL and returns a SharedAccessSignatureSignedHrefResponse. Signs a HREF (a link URL) by appending a SAS Token _. If the HREF is not a Azure Blob Storage HREF, then pass back the HREF unsigned.
SELECT
href,
msft:expiry
FROM azure.planetary_computer_dataplane.sas
WHERE href = '{{ href }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND duration = '{{ duration }}'
;
generate a SAS Token for the given Azure Blob storage account and container. 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.
SELECT
msft:expiry,
token
FROM azure.planetary_computer_dataplane.sas
WHERE collection_id = '{{ collection_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND duration = '{{ duration }}'
;
Lifecycle Methods
- revoke_token
Revoke SAS token for the managed storage account of this GeoCatalog. Revoke a SAS Token _ for managed storage account of this GeoCatalog.
EXEC azure.planetary_computer_dataplane.sas.revoke_token
@endpoint='{{ endpoint }}' --required,
@duration='{{ duration }}'
;