in aws-events-apidestination/src/main/java/software/amazon/events/apidestination/UpdateHandler.java [51:71]
private UpdateApiDestinationResponse updateResource(UpdateApiDestinationRequest awsRequest, ProxyClient<EventBridgeClient> proxyClient) {
UpdateApiDestinationResponse awsResponse;
try {
awsResponse = proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::updateApiDestination);
} catch (final ConcurrentModificationException e) {
// There is a concurrent modification on a connection
throw new CfnResourceConflictException(e);
} catch (final ResourceNotFoundException e) {
// Provided connection arn does not exist
throw new CfnNotFoundException(e);
} catch (final LimitExceededException e) {
// Resource limit exceeded
throw new CfnServiceLimitExceededException(ResourceModel.TYPE_NAME, awsRequest.name(), e);
} catch (final AwsServiceException e) {
// general exception
throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME, e);
}
logger.log(String.format("%s successfully updated.", ResourceModel.TYPE_NAME));
return awsResponse;
}