updateEventBridgeRuleTemplate method
Updates the specified eventbridge rule template.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter identifier :
An eventbridge rule template's identifier. Can be either be its id or
current name.
Parameter description :
A resource's optional description.
Parameter groupIdentifier :
An eventbridge rule template group's identifier. Can be either be its id
or current name.
Parameter name :
A resource's name. Names must be unique within the scope of a resource
type in a specific region.
Implementation
Future<UpdateEventBridgeRuleTemplateResponse> updateEventBridgeRuleTemplate({
required String identifier,
String? description,
List<EventBridgeRuleTemplateTarget>? eventTargets,
EventBridgeRuleTemplateEventType? eventType,
String? groupIdentifier,
String? name,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'description': description,
if (eventTargets != null) 'eventTargets': eventTargets,
if (eventType != null) 'eventType': eventType.value,
if (groupIdentifier != null) 'groupIdentifier': groupIdentifier,
if (name != null) 'name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/prod/eventbridge-rule-templates/${Uri.encodeComponent(identifier)}',
exceptionFnMap: _exceptionFns,
);
return UpdateEventBridgeRuleTemplateResponse.fromJson(response);
}