UNPKG

1.58 kBSource Map (JSON)View Raw
1{"version":3,"file":"getUrl.mjs","sources":["../../../../../src/providers/s3/apis/getUrl.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { getUrl as getUrlInternal } from './internal/getUrl';\n/**\n * Get a temporary presigned URL to download the specified S3 object.\n * The presigned URL expires when the associated role used to sign the request expires or\n * the option `expiresIn` is reached. The `expiresAt` property in the output object indicates when the URL MAY expire.\n *\n * By default, it will not validate the object that exists in S3. If you set the `options.validateObjectExistence`\n * to true, this method will verify the given object already exists in S3 before returning a presigned\n * URL, and will throw {@link StorageError} if the object does not exist.\n *\n * @param input - The GetUrlInput object.\n * @returns Presigned URL and timestamp when the URL MAY expire.\n * @throws service: {@link S3Exception} - thrown when checking for existence of the object\n * @throws validation: {@link StorageValidationErrorCode } - Validation errors\n * thrown either username or key are not defined.\n *\n */\nexport const getUrl = (input) => {\n return getUrlInternal(Amplify, input);\n};\n"],"names":["getUrlInternal"],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,OAAOA,QAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC1C;;;;"}
\No newline at end of file