getOpsItem method
Get information about an OpsItem by using the ID. You must have permission in AWS Identity and Access Management (IAM) to view information about an OpsItem. For more information, see Getting started with OpsCenter in the AWS Systems Manager User Guide.
Operations engineers and IT professionals use OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their AWS resources. For more information, see AWS Systems Manager OpsCenter in the AWS Systems Manager User Guide.
May throw InternalServerError. May throw OpsItemNotFoundException.
Parameter opsItemId
:
The ID of the OpsItem that you want to get.
Implementation
Future<GetOpsItemResponse> getOpsItem({
required String opsItemId,
}) async {
ArgumentError.checkNotNull(opsItemId, 'opsItemId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.GetOpsItem'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OpsItemId': opsItemId,
},
);
return GetOpsItemResponse.fromJson(jsonResponse.body);
}