private CreateGrantVersionResponse createGrantVersion()

in aws-licensemanager-grant/src/main/java/software/amazon/licensemanager/grant/UpdateHandler.java [65:85]


    private CreateGrantVersionResponse createGrantVersion(
            final ResourceModel model,
            final CreateGrantVersionRequest createGrantVersionRequest,
            final ProxyClient<LicenseManagerClient> proxyClient) {
        CreateGrantVersionResponse createGrantVersionResponse = null;
        try {
            createGrantVersionResponse = proxyClient.injectCredentialsAndInvokeV2(createGrantVersionRequest,
                    proxyClient.client()::createGrantVersion);
        }
        catch (InvalidParameterValueException | ValidationException e) {
            logger.log("Resource update failed");
            throw new CfnNotFoundException(model.getGrantArn(), ResourceModel.TYPE_NAME);
        }
        catch (final AwsServiceException e) {
            logger.log(String.format("Resource updation failed"));
            throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME + e.getMessage(), e);
        }

        logger.log(String.format("%s has successfully been updated.", ResourceModel.TYPE_NAME));
        return createGrantVersionResponse;
    }