listResourceSnapshotJobs method
Lists resource snapshot jobs owned by the customer. This operation supports various filtering scenarios, including listing all jobs owned by the caller, jobs for a specific engagement, jobs with a specific status, or any combination of these filters.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
Specifies the catalog related to the request.
Parameter engagementIdentifier :
The identifier of the engagement to filter the response.
Parameter maxResults :
The maximum number of results to return in a single call. If omitted,
defaults to 50.
Parameter nextToken :
The token for the next set of results.
Parameter sort :
Configures the sorting of the response. If omitted, results are sorted by
CreatedDate in descending order.
Parameter status :
The status of the jobs to filter the response.
Implementation
Future<ListResourceSnapshotJobsResponse> listResourceSnapshotJobs({
required String catalog,
String? engagementIdentifier,
int? maxResults,
String? nextToken,
SortObject? sort,
ResourceSnapshotJobStatus? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSPartnerCentralSelling.ListResourceSnapshotJobs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
if (engagementIdentifier != null)
'EngagementIdentifier': engagementIdentifier,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (sort != null) 'Sort': sort,
if (status != null) 'Status': status.value,
},
);
return ListResourceSnapshotJobsResponse.fromJson(jsonResponse.body);
}