- 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.
DeactivateEventSourceCommand
You can use this operation to temporarily stop receiving events from the specified partner event source. The matching event bus is not deleted.
When you deactivate a partner event source, the source goes into PENDING state. If it remains in PENDING state for more than two weeks, it is deleted.
To activate a deactivated partner event source, use ActivateEventSource .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CloudWatchEventsClient, DeactivateEventSourceCommand } from "@aws-sdk/client-cloudwatch-events"; // ES Modules import
// const { CloudWatchEventsClient, DeactivateEventSourceCommand } = require("@aws-sdk/client-cloudwatch-events"); // CommonJS import
const client = new CloudWatchEventsClient(config);
const input = { // DeactivateEventSourceRequest
Name: "STRING_VALUE", // required
};
const command = new DeactivateEventSourceCommand(input);
const response = await client.send(command);
// {};
DeactivateEventSourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Name Required | string | undefined | The name of the partner event source to deactivate. |
DeactivateEventSourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentModificationException | client | There is concurrent modification on a rule, target, archive, or replay. |
InternalException | server | This exception occurs due to unexpected causes. |
InvalidStateException | client | The specified state is not a valid state for an event source. |
OperationDisabledException | client | The operation you are attempting is not available in this region. |
ResourceNotFoundException | client | An entity that you specified does not exist. |
CloudWatchEventsServiceException | Base exception class for all service exceptions from CloudWatchEvents service. |