Search in sources :

Example 1 with GetSmsChannelRequest

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;
}
Also used : SMSChannelResponse(software.amazon.awssdk.services.pinpoint.model.SMSChannelResponse) PinpointException(software.amazon.awssdk.services.pinpoint.model.PinpointException) GetSmsChannelRequest(software.amazon.awssdk.services.pinpoint.model.GetSmsChannelRequest)

Aggregations

GetSmsChannelRequest (software.amazon.awssdk.services.pinpoint.model.GetSmsChannelRequest)1 PinpointException (software.amazon.awssdk.services.pinpoint.model.PinpointException)1 SMSChannelResponse (software.amazon.awssdk.services.pinpoint.model.SMSChannelResponse)1