private void updateResourcePath(Request<?> request, String arn) {
        String encodedArn = SdkHttpUtils.urlEncode(arn, true);
        String resourcePath = request.getResourcePath().replace(arn, encodedArn);
        request.setResourcePath(resourcePath);
    }
URL-encodes the ARN for specific operations.
aws-java-sdk-s3control/src/main/java/com/amazonaws/services/s3control/internal/handlers/ArnHandler.java