updateCustomAction method
Updates a custom action.
May throw InternalServiceError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw UnauthorizedException.
Parameter customActionArn :
The fully defined Amazon Resource Name (ARN) of the custom action.
Parameter definition :
The definition of the command to run when invoked as an alias or as an
action button.
Parameter aliasName :
The name used to invoke this action in the chat channel. For example,
@aws run my-alias.
Parameter attachments :
Defines when this custom action button should be attached to a
notification.
Implementation
Future<UpdateCustomActionResult> updateCustomAction({
required String customActionArn,
required CustomActionDefinition definition,
String? aliasName,
List<CustomActionAttachment>? attachments,
}) async {
final $payload = <String, dynamic>{
'CustomActionArn': customActionArn,
'Definition': definition,
if (aliasName != null) 'AliasName': aliasName,
if (attachments != null) 'Attachments': attachments,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/update-custom-action',
exceptionFnMap: _exceptionFns,
);
return UpdateCustomActionResult.fromJson(response);
}