Skip to main content

presigned_url

Creates, updates, deletes, gets or lists a presigned_url resource.

Overview

Namepresigned_url
TypeResource
Idsnowflake.stage.presigned_url

Fields

The following fields are returned by SELECT queries:

Materials for uploading and downloading stage files

NameDatatypeDescription
presigned_urlstringPresigned url for file transfer, only works for Server Side Encrypted Stages.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_presigned_urlselectdatabase_name, schema_name, name, filePath, endpointGenerate a presigned url and optionally encryption materials for uploading and downloading files.

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.

NameDatatypeDescription
database_namestringIdentifier (i.e. name) for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases.
endpointstringOrganization and Account Name (default: orgid-acctid)
filePathstringThe full stage path of the file.
namestringIdentifier (i.e. name) for the resource.
schema_namestringIdentifier (i.e. name) for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database.

SELECT examples

Generate a presigned url and optionally encryption materials for uploading and downloading files.

SELECT
presigned_url
FROM snowflake.stage.presigned_url
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND filePath = '{{ filePath }}' -- required
AND endpoint = '{{ endpoint }}' -- required;