use of software.amazon.awssdk.services.ssm.model.GetOpsItemResponse in project aws-doc-sdk-examples by awsdocs.
the class GetOpsItem method getOpsItem.
// snippet-start:[ssm.Java2.get_ops.main]
public static void getOpsItem(SsmClient ssmClient, String opsID) {
try {
GetOpsItemRequest opsRequest = GetOpsItemRequest.builder().opsItemId(opsID).build();
// Get SSM Parameters (you can define them in the AWS Management Console)
GetOpsItemResponse opsItem = ssmClient.getOpsItem(opsRequest);
OpsItem item = opsItem.opsItem();
System.out.println(item.title());
System.out.println(item.description());
System.out.println(item.source());
} catch (SsmException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations