UNPKG

1.05 kBTypeScriptView Raw
1import { GetUrlInput, GetUrlOutput } from '../types';
2/**
3 * Get a temporary presigned URL to download the specified S3 object.
4 * The presigned URL expires when the associated role used to sign the request expires or
5 * the option `expiresIn` is reached. The `expiresAt` property in the output object indicates when the URL MAY expire.
6 *
7 * By default, it will not validate the object that exists in S3. If you set the `options.validateObjectExistence`
8 * to true, this method will verify the given object already exists in S3 before returning a presigned
9 * URL, and will throw {@link StorageError} if the object does not exist.
10 *
11 * @param input - The GetUrlInput object.
12 * @returns Presigned URL and timestamp when the URL MAY expire.
13 * @throws service: {@link S3Exception} - thrown when checking for existence of the object
14 * @throws validation: {@link StorageValidationErrorCode } - Validation errors
15 * thrown either username or key are not defined.
16 *
17 */
18export declare const getUrl: (input: GetUrlInput) => Promise<GetUrlOutput>;