listOpsItemRelatedItems method
Lists all related-item resources associated with a Systems Manager OpsCenter OpsItem. OpsCenter is a tool in Amazon Web Services Systems Manager.
May throw InternalServerError.
May throw OpsItemInvalidParameterException.
Parameter filters :
One or more OpsItem filters. Use a filter to return a more specific list
of results.
Parameter maxResults :
The maximum number of items to return for this call. The call also returns
a token that you can specify in a subsequent call to get the next set of
results.
Parameter nextToken :
The token for the next set of items to return. (You received this token
from a previous call.)
Parameter opsItemId :
The ID of the OpsItem for which you want to list all related-item
resources.
Implementation
Future<ListOpsItemRelatedItemsResponse> listOpsItemRelatedItems({
List<OpsItemRelatedItemsFilter>? filters,
int? maxResults,
String? nextToken,
String? opsItemId,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.ListOpsItemRelatedItems'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (opsItemId != null) 'OpsItemId': opsItemId,
},
);
return ListOpsItemRelatedItemsResponse.fromJson(jsonResponse.body);
}