listProspectingFromEngagementTasks method
Lists all prospecting tasks initiated by the caller's account. Supports
optional filters by task identifier, task name, or start time range.
Results can be sorted using configurable options. The response is
paginated. Use the NextToken value from each response to
retrieve subsequent pages.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
Specifies the catalog to list tasks from. Specify AWS for
production environments and Sandbox for testing and
development purposes.
Parameter maxResults :
The maximum number of results to return in a single page. If additional
results exist, the response includes a NextToken value for
retrieving the next page. If omitted, the API uses a service-defined
default page size.
Parameter nextToken :
The pagination token from a previous call to this API. Include this value
to retrieve the next page of results. If omitted, the first page is
returned.
Parameter sort :
Specifies the field and order used to sort the returned tasks. If omitted,
tasks are returned in the default sort order.
Parameter startAfter :
Filters tasks to include only those that started after the specified
timestamp. Use this with StartBefore to define a start-time
range for your query. The format follows ISO 8601 date-time notation.
Parameter startBefore :
Filters tasks to include only those that started before the specified
timestamp. Use this with StartAfter to define a start-time
range for your query. The format follows ISO 8601 date-time notation.
Parameter taskIdentifier :
Filters the results to include only the tasks with the specified
identifiers. Provide up to 10 task IDs to narrow the list to specific
tasks. If omitted, tasks are not filtered by identifier.
Parameter taskName :
Filters the results to include only tasks with the specified names.
Provide up to 10 task names to narrow the list. If omitted, tasks are not
filtered by name.
Implementation
Future<ListProspectingFromEngagementTasksResponse>
listProspectingFromEngagementTasks({
required String catalog,
int? maxResults,
String? nextToken,
ProspectingFromEngagementTaskSort? sort,
DateTime? startAfter,
DateTime? startBefore,
List<String>? taskIdentifier,
List<String>? taskName,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'AWSPartnerCentralSelling.ListProspectingFromEngagementTasks'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (sort != null) 'Sort': sort,
if (startAfter != null) 'StartAfter': iso8601ToJson(startAfter),
if (startBefore != null) 'StartBefore': iso8601ToJson(startBefore),
if (taskIdentifier != null) 'TaskIdentifier': taskIdentifier,
if (taskName != null) 'TaskName': taskName,
},
);
return ListProspectingFromEngagementTasksResponse.fromJson(
jsonResponse.body);
}