updateDestination method
Updates properties of a destination.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The new name of the resource.
Parameter description :
A new description of the resource.
Parameter expression :
The new rule name or topic rule to send messages to.
Parameter expressionType :
The type of value in Expression.
Parameter roleArn :
The ARN of the IAM Role that authorizes the destination.
Implementation
Future<void> updateDestination({
required String name,
String? description,
String? expression,
ExpressionType? expressionType,
String? roleArn,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (expression != null) 'Expression': expression,
if (expressionType != null) 'ExpressionType': expressionType.value,
if (roleArn != null) 'RoleArn': roleArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/destinations/${Uri.encodeComponent(name)}',
exceptionFnMap: _exceptionFns,
);
}