AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

Provide storage methods to use AWS S3

### Hierarchy

- StorageClass

## Index

### Constructors

- constructor

### Properties

- vault

### Methods

- addPluggable
- configure
- get
- getModuleName
- getPluggable
- list
- put
- remove
- removePluggable

## Constructors

### constructor

- new StorageClass(): StorageClass

- - Defined in storage/src/Storage.ts:35

  Initialize Storage

  #### Returns StorageClass

## Properties

### vault

vault: StorageClass

- Defined in storage/src/Storage.ts:35

## Methods

### addPluggable

- addPluggable(pluggable: StorageProvider): object

- - Defined in storage/src/Storage.ts:60

  add plugin into Storage category

  #### Parameters

  - ##### pluggable: StorageProvider

    an instance of the plugin

  #### Returns object

### configure

- configure(config?: any): any

- - Defined in storage/src/Storage.ts:98

  Configure Storage

  #### Parameters

  - ##### Optional config: any

    Configuration object for storage

  #### Returns any

  - Current configuration

### get

- get(key: string, config?: any): Promise<String | Object>

- - Defined in storage/src/Storage.ts:155

  Get a presigned URL of the file or the object data when download:true

  #### Parameters

  - ##### key: string

    key of the object

  - ##### Optional config: any

  #### Returns Promise<String | Object>

  - A promise resolves to either a presigned url or the object

### getModuleName

- getModuleName(): string

- - Defined in storage/src/Storage.ts:52

  #### Returns string

### getPluggable

- getPluggable(providerName: string): any

- - Defined in storage/src/Storage.ts:75

  Get the plugin object

  #### Parameters

  - ##### providerName: string

    the name of the plugin

  #### Returns any

### list

- list(path: any, config?: any): Promise<any>

- - Defined in storage/src/Storage.ts:206

  List bucket objects relative to the level and prefix specified

  #### Parameters

  - ##### path: any

    the path that contains objects

  - ##### Optional config: any

  #### Returns Promise<any>

  - Promise resolves to list of keys for all objects in path

### put

- put(key: string, object: any, config?: any): Promise<Object>

- - Defined in storage/src/Storage.ts:174

  Put a file in storage bucket specified to configure method

  #### Parameters

  - ##### key: string

    key of the object

  - ##### object: any

    File to be put in bucket

  - ##### Optional config: any

  #### Returns Promise<Object>

  - promise resolves to object on success

### remove

- remove(key: string, config?: any): Promise<any>

- - Defined in storage/src/Storage.ts:190

  Remove the object for specified key

  #### Parameters

  - ##### key: string

    key of the object

  - ##### Optional config: any

  #### Returns Promise<any>

  - Promise resolves upon successful removal of the object

### removePluggable

- removePluggable(providerName: string): void

- - Defined in storage/src/Storage.ts:88

  Remove the plugin object

  #### Parameters

  - ##### providerName: string

    the name of the plugin

  #### Returns void