deactivateEventSource method
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.
May throw ResourceNotFoundException. May throw ConcurrentModificationException. May throw InvalidStateException. May throw InternalException. May throw OperationDisabledException.
Parameter name
:
The name of the partner event source to deactivate.
Implementation
Future<void> deactivateEventSource({
required String name,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.DeactivateEventSource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
},
);
}