Search in sources :

Example 1 with ListIdentitiesResponse

use of software.amazon.awssdk.services.ses.model.ListIdentitiesResponse in project aws-doc-sdk-examples by awsdocs.

the class ListIdentities method listSESIdentities.

// snippet-start:[ses.java2.identities.main]
public static void listSESIdentities(SesClient client) {
    try {
        ListIdentitiesResponse identitiesResponse = client.listIdentities();
        List<String> identities = identitiesResponse.identities();
        for (String identity : identities) {
            System.out.println("The identity is " + identity);
        }
    } catch (SesException e) {
        System.err.println(e.awsErrorDetails().errorMessage());
        System.exit(1);
    }
}
Also used : ListIdentitiesResponse(software.amazon.awssdk.services.ses.model.ListIdentitiesResponse) SesException(software.amazon.awssdk.services.ses.model.SesException)

Aggregations

ListIdentitiesResponse (software.amazon.awssdk.services.ses.model.ListIdentitiesResponse)1 SesException (software.amazon.awssdk.services.ses.model.SesException)1