use of software.amazon.awssdk.services.pinpoint.model.GetSmsChannelRequest in project aws-doc-sdk-examples by awsdocs.
the class UpdateChannel method getSMSChannel.
// snippet-start:[pinpoint.java2.updatechannel.main]
private static SMSChannelResponse getSMSChannel(PinpointClient client, String appId) {
try {
GetSmsChannelRequest request = GetSmsChannelRequest.builder().applicationId(appId).build();
SMSChannelResponse response = client.getSmsChannel(request).smsChannelResponse();
System.out.println("Channel state is " + response.enabled());
return response;
} catch (PinpointException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
return null;
}
Aggregations