Search in sources :

Example 1 with UpdateOpsItemRequest

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

the class ResolveOpsItem method setOpsItemStatus.

// snippet-start:[ssm.Java2.resolve_ops.main]
public static void setOpsItemStatus(SsmClient ssmClient, String opsID) {
    try {
        UpdateOpsItemRequest opsItemRequest = UpdateOpsItemRequest.builder().opsItemId(opsID).status(OpsItemStatus.RESOLVED).build();
        ssmClient.updateOpsItem(opsItemRequest);
    } catch (SsmException e) {
        System.err.println(e.getMessage());
        System.exit(1);
    }
}
Also used : UpdateOpsItemRequest(software.amazon.awssdk.services.ssm.model.UpdateOpsItemRequest) SsmException(software.amazon.awssdk.services.ssm.model.SsmException)

Aggregations

SsmException (software.amazon.awssdk.services.ssm.model.SsmException)1 UpdateOpsItemRequest (software.amazon.awssdk.services.ssm.model.UpdateOpsItemRequest)1