RemoveSourceIdentifierFromSubscriptionCommand

Removes a source identifier from an existing Amazon DocumentDB event notification subscription.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DocDBClient, RemoveSourceIdentifierFromSubscriptionCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, RemoveSourceIdentifierFromSubscriptionCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // RemoveSourceIdentifierFromSubscriptionMessage
  SubscriptionName: "STRING_VALUE", // required
  SourceIdentifier: "STRING_VALUE", // required
};
const command = new RemoveSourceIdentifierFromSubscriptionCommand(input);
const response = await client.send(command);
// { // RemoveSourceIdentifierFromSubscriptionResult
//   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",
//   },
// };

RemoveSourceIdentifierFromSubscriptionCommand Input

Parameter
Type
Description
SourceIdentifier
Required
string | undefined

The source identifier to be removed from the subscription, such as the instance identifier for an instance, or the name of a security group.

SubscriptionName
Required
string | undefined

The name of the Amazon DocumentDB event notification subscription that you want to remove a source identifier from.

RemoveSourceIdentifierFromSubscriptionCommand Output

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
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.