protected SetTopicAttributesResponse invokeSetTopicAttributes()

in aws-sns-topicpolicy/src/main/java/software/amazon/sns/topicpolicy/BaseHandlerStd.java [164:187]


    protected SetTopicAttributesResponse invokeSetTopicAttributes(
            final SetTopicAttributesRequest setTopicAttributesRequest,
            final ProxyClient<SnsClient> proxyClient,
            final String action,
            final Logger logger) {

        SetTopicAttributesResponse setTopicAttributesResponse = null;
        try {
            setTopicAttributesResponse = proxyClient.injectCredentialsAndInvokeV2(setTopicAttributesRequest,
                    proxyClient.client()::setTopicAttributes);
        } catch (NotFoundException e) {
            throw new CfnNotFoundException(e);
        } catch (final InvalidParameterException e) {
            throw new CfnInvalidRequestException(e);
        } catch (final InternalErrorException ex) {
            throw new CfnServiceInternalErrorException(ex);
        } catch (final AuthorizationErrorException ex) {
            throw new CfnAccessDeniedException(ex);
        } catch (final InvalidSecurityException e) {
            throw new CfnInvalidCredentialsException(e);
        }
        logger.log(String.format("%s successfully %s.", ResourceModel.TYPE_NAME, action));
        return setTopicAttributesResponse;
    }