- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
AddSourceIdentifierToSubscriptionCommand
Adds a source identifier to an existing event notification subscription.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DocDBClient, AddSourceIdentifierToSubscriptionCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, AddSourceIdentifierToSubscriptionCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // AddSourceIdentifierToSubscriptionMessage
SubscriptionName: "STRING_VALUE", // required
SourceIdentifier: "STRING_VALUE", // required
};
const command = new AddSourceIdentifierToSubscriptionCommand(input);
const response = await client.send(command);
// { // AddSourceIdentifierToSubscriptionResult
// EventSubscription: { // EventSubscription
// CustomerAwsId: "STRING_VALUE",
// CustSubscriptionId: "STRING_VALUE",
// SnsTopicArn: "STRING_VALUE",
// Status: "STRING_VALUE",
// SubscriptionCreationTime: "STRING_VALUE",
// SourceType: "STRING_VALUE",
// SourceIdsList: [ // SourceIdsList
// "STRING_VALUE",
// ],
// EventCategoriesList: [ // EventCategoriesList
// "STRING_VALUE",
// ],
// Enabled: true || false,
// EventSubscriptionArn: "STRING_VALUE",
// },
// };
AddSourceIdentifierToSubscriptionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
SourceIdentifier Required | string | undefined | The identifier of the event source to be added:
|
SubscriptionName Required | string | undefined | The name of the Amazon DocumentDB event notification subscription that you want to add a source identifier to. |
AddSourceIdentifierToSubscriptionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
EventSubscription | EventSubscription | undefined | Detailed information about an event to which you have subscribed. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
SourceNotFoundFault | client | The requested source could not be found. |
SubscriptionNotFoundFault | client | The subscription name does not exist. |
DocDBServiceException | Base exception class for all service exceptions from DocDB service. |