- 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.
ModifyEventSubscriptionCommand
Modifies 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, ModifyEventSubscriptionCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, ModifyEventSubscriptionCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // ModifyEventSubscriptionMessage
SubscriptionName: "STRING_VALUE", // required
SnsTopicArn: "STRING_VALUE",
SourceType: "STRING_VALUE",
EventCategories: [ // EventCategoriesList
"STRING_VALUE",
],
Enabled: true || false,
};
const command = new ModifyEventSubscriptionCommand(input);
const response = await client.send(command);
// { // ModifyEventSubscriptionResult
// 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",
// },
// };
ModifyEventSubscriptionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
SubscriptionName Required | string | undefined | The name of the Amazon DocumentDB event notification subscription. |
Enabled | boolean | undefined | A Boolean value; set to |
EventCategories | string[] | undefined | A list of event categories for a |
SnsTopicArn | string | undefined | The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it. |
SourceType | string | undefined | The type of source that is generating the events. For example, if you want to be notified of events generated by an instance, set this parameter to Valid values: |
ModifyEventSubscriptionCommand 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 |
---|---|---|
EventSubscriptionQuotaExceededFault | client | You have reached the maximum number of event subscriptions. |
SNSInvalidTopicFault | client | Amazon SNS has responded that there is a problem with the specified topic. |
SNSNoAuthorizationFault | client | You do not have permission to publish to the SNS topic Amazon Resource Name (ARN). |
SNSTopicArnNotFoundFault | client | The SNS topic Amazon Resource Name (ARN) does not exist. |
SubscriptionCategoryNotFoundFault | client | The provided category does not exist. |
SubscriptionNotFoundFault | client | The subscription name does not exist. |
DocDBServiceException | Base exception class for all service exceptions from DocDB service. |