listReplacePermissionAssociationsWork method

Future<ListReplacePermissionAssociationsWorkResponse> listReplacePermissionAssociationsWork({
  1. int? maxResults,
  2. String? nextToken,
  3. ReplacePermissionAssociationsWorkStatus? status,
  4. List<String>? workIds,
})

Retrieves the current status of the asynchronous tasks performed by RAM when you perform the ReplacePermissionAssociationsWork operation.

May throw InvalidNextTokenException. May throw InvalidParameterException. May throw ServerInternalException. May throw ServiceUnavailableException.

Parameter maxResults : Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

Parameter nextToken : Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

Parameter status : Specifies that you want to see only the details about requests with a status that matches this value.

Parameter workIds : A list of IDs. These values come from the idfield of the replacePermissionAssociationsWorkstructure returned by the ReplacePermissionAssociations operation.

Implementation

Future<ListReplacePermissionAssociationsWorkResponse>
    listReplacePermissionAssociationsWork({
  int? maxResults,
  String? nextToken,
  ReplacePermissionAssociationsWorkStatus? status,
  List<String>? workIds,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (status != null) 'status': status.value,
    if (workIds != null) 'workIds': workIds,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/listreplacepermissionassociationswork',
    exceptionFnMap: _exceptionFns,
  );
  return ListReplacePermissionAssociationsWorkResponse.fromJson(response);
}