AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

### Hierarchy

- PubSub

## Index

### Constructors

- constructor

### Methods

- addPluggable
- configure
- getModuleName
- publish
- subscribe

## Constructors

### constructor

- new PubSub(options: PubSubOptions): PubSub

- - Defined in pubsub/src/PubSub.ts:26

  Initialize PubSub with AWS configurations

  #### Parameters

  - ##### options: PubSubOptions

    Configuration object for PubSub

  #### Returns PubSub

## Methods

### addPluggable

- addPluggable(pluggable: PubSubProvider): Promise<any>

- - Defined in pubsub/src/PubSub.ts:70

  add plugin into Analytics category

  #### Parameters

  - ##### pluggable: PubSubProvider

    an instance of the plugin

  #### Returns Promise<any>

### configure

- configure(options: PubSubOptions): any

- - Defined in pubsub/src/PubSub.ts:50

  Configure PubSub part with configurations

  #### Parameters

  - ##### options: PubSubOptions

  #### Returns any

  - The current configuration

### getModuleName

- getModuleName(): string

- - Defined in pubsub/src/PubSub.ts:40

  #### Returns string

### publish

- publish(topics: string[] | string, msg: any, options: ProvidertOptions): Promise<any[]>

- - Defined in pubsub/src/PubSub.ts:80

  #### Parameters

  - ##### topics: string[] | string

  - ##### msg: any

  - ##### options: ProvidertOptions

  #### Returns Promise<any[]>

### subscribe

- subscribe(topics: string[] | string, options: ProvidertOptions): Observable<any>

- - Defined in pubsub/src/PubSub.ts:84

  #### Parameters

  - ##### topics: string[] | string

  - ##### options: ProvidertOptions

  #### Returns Observable<any>