UNPKG

1.13 kBTypeScriptView Raw
1import { AmplifyClassV6, StorageAccessLevel } from '@aws-amplify/core';
2import { ResolvedS3Config, StorageBucket } from '../types/options';
3interface S3ApiOptions {
4 accessLevel?: StorageAccessLevel;
5 targetIdentityId?: string;
6 useAccelerateEndpoint?: boolean;
7 bucket?: StorageBucket;
8}
9interface ResolvedS3ConfigAndInput {
10 s3Config: ResolvedS3Config;
11 bucket: string;
12 keyPrefix: string;
13 isObjectLockEnabled?: boolean;
14 identityId?: string;
15}
16/**
17 * resolve the common input options for S3 API handlers from Amplify configuration and library options.
18 *
19 * @param {AmplifyClassV6} amplify The Amplify instance.
20 * @param {S3ApiOptions} apiOptions The input options for S3 provider.
21 * @returns {Promise<ResolvedS3ConfigAndInput>} The resolved common input options for S3 API handlers.
22 * @throws A `StorageError` with `error.name` from `StorageValidationErrorCode` indicating invalid
23 * configurations or Amplify library options.
24 *
25 * @internal
26 */
27export declare const resolveS3ConfigAndInput: (amplify: AmplifyClassV6, apiOptions?: S3ApiOptions) => Promise<ResolvedS3ConfigAndInput>;
28export {};