use of software.amazon.awssdk.services.sns.model.SetSmsAttributesResponse in project aws-doc-sdk-examples by awsdocs.
the class SetSMSAttributes method setSNSAttributes.
// snippet-start:[sns.java2.SetSMSAttributes.main]
public static void setSNSAttributes(SnsClient snsClient, HashMap<String, String> attributes) {
try {
SetSmsAttributesRequest request = SetSmsAttributesRequest.builder().attributes(attributes).build();
SetSmsAttributesResponse result = snsClient.setSMSAttributes(request);
System.out.println("Set default Attributes to " + attributes + ". Status was " + result.sdkHttpResponse().statusCode());
} catch (SnsException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
}
Aggregations