Skip to content

Upgrade to AWS SDK v2 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 5, 2022
Merged

Upgrade to AWS SDK v2 #6

merged 6 commits into from
Oct 5, 2022

Conversation

mngo87
Copy link
Contributor

@mngo87 mngo87 commented Sep 17, 2020

Issue #, if available:
#7

Description of changes:
Ensure this library is compatible with Java SDK V2

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

String errorMessage = "SNS extended client does not support sending JSON messages.";
LOGGER.error(errorMessage);
throw new AmazonClientException(errorMessage);
}

publishRequest.getRequestClientOptions().appendUserAgent(USER_AGENT_HEADER);
PublishRequest.Builder publishRequestBuilder = publishRequest.toBuilder();
publishRequestBuilder.overrideConfiguration(AwsRequestOverrideConfiguration.builder().putHeader(USER_AGENT_HEADER_NAME, USER_AGENT_HEADER).build());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if there was a better way to handle this. Please advise here

@mngo87
Copy link
Contributor Author

mngo87 commented Sep 17, 2020

I am unable to specify reviewers. so tagging @aws-ivvladim @aws-rizi

@aws-rizi aws-rizi self-requested a review September 18, 2020 18:26
@mngo87
Copy link
Contributor Author

mngo87 commented Sep 21, 2020

Thanks for the review @aws-rizi. I updated the comments per your request

@mngo87 mngo87 requested a review from aws-rizi September 22, 2020 02:30
@@ -1,6 +1,8 @@
package software.amazon.sns;

import software.amazon.awssdk.core.exception.SdkClientException;
import java.util.function.Consumer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We have following methods in that are not implemented in this class, so if somebody calls them on instance of
1) default ListEndpointsByPlatformApplicationIterable listEndpointsByPlatformApplicationPaginator(
            ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest)
2) default ListPlatformApplicationsIterable listPlatformApplicationsPaginator(
            ListPlatformApplicationsRequest listPlatformApplicationsRequest) 
3) default ListSubscriptionsIterable listSubscriptionsPaginator(ListSubscriptionsRequest listSubscriptionsRequest)
4) default ListSubscriptionsByTopicIterable listSubscriptionsByTopicPaginator(
            ListSubscriptionsByTopicRequest listSubscriptionsByTopicRequest) 
5) default ListTopicsIterable listTopicsPaginator(ListTopicsRequest listTopicsRequest) 

could you please override these methods as well here?


  • Please add exceptions to the methods to be consistent with DefaultSnsClient.java in software.amazon.awssdk.services.sns. (In both AmazonSNSExtendedClientBase.java and AmazonSNSExtendedClient.java)
    as sample:
@Override
public AddPermissionResponse addPermission(AddPermissionRequest addPermissionRequest) throws InvalidParameterException,
            InternalErrorException, AuthorizationErrorException, NotFoundException, AwsServiceException, SdkClientException,
            SnsException {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@mngo87 mngo87 requested a review from aws-rizi September 24, 2020 18:42
@markmansur
Copy link

markmansur commented Dec 3, 2021

Hey any updates on this? Support for SDK V2 would be awesome!

I am willing to contribute. What needs to be done here that's still remaining? How do we move this forward?

@stringbean
Copy link

Now that awslabs/amazon-sqs-java-extended-client-lib#58 has been merged can we get the dependency updated in this PR and get it merged in?

@shih shih requested review from shih and removed request for aws-rizi October 4, 2022 23:59
@agummi-amazon agummi-amazon self-requested a review October 5, 2022 00:05
@shih shih removed the request for review from agummi-amazon October 5, 2022 00:10
@shih shih merged commit 2861f22 into awslabs:main Oct 5, 2022
shih added a commit that referenced this pull request Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants