listAppImageConfigs method

Future<ListAppImageConfigsResponse> listAppImageConfigs({
  1. DateTime? creationTimeAfter,
  2. DateTime? creationTimeBefore,
  3. int? maxResults,
  4. DateTime? modifiedTimeAfter,
  5. DateTime? modifiedTimeBefore,
  6. String? nameContains,
  7. String? nextToken,
  8. AppImageConfigSortKey? sortBy,
  9. SortOrder? sortOrder,
})

Lists the AppImageConfigs in your account and their properties. The list can be filtered by creation time or modified time, and whether the AppImageConfig name contains a specified string.

Parameter creationTimeAfter : A filter that returns only AppImageConfigs created on or after the specified time.

Parameter creationTimeBefore : A filter that returns only AppImageConfigs created on or before the specified time.

Parameter maxResults : The maximum number of AppImageConfigs to return in the response. The default value is 10.

Parameter modifiedTimeAfter : A filter that returns only AppImageConfigs modified on or after the specified time.

Parameter modifiedTimeBefore : A filter that returns only AppImageConfigs modified on or before the specified time.

Parameter nameContains : A filter that returns only AppImageConfigs whose name contains the specified string.

Parameter nextToken : If the previous call to ListImages didn't return the full set of AppImageConfigs, the call returns a token for getting the next set of AppImageConfigs.

Parameter sortBy : The property used to sort results. The default value is CreationTime.

Parameter sortOrder : The sort order. The default value is Descending.

Implementation

Future<ListAppImageConfigsResponse> listAppImageConfigs({
  DateTime? creationTimeAfter,
  DateTime? creationTimeBefore,
  int? maxResults,
  DateTime? modifiedTimeAfter,
  DateTime? modifiedTimeBefore,
  String? nameContains,
  String? nextToken,
  AppImageConfigSortKey? sortBy,
  SortOrder? sortOrder,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nameContains',
    nameContains,
    0,
    63,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    8192,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListAppImageConfigs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (creationTimeAfter != null)
        'CreationTimeAfter': unixTimestampToJson(creationTimeAfter),
      if (creationTimeBefore != null)
        'CreationTimeBefore': unixTimestampToJson(creationTimeBefore),
      if (maxResults != null) 'MaxResults': maxResults,
      if (modifiedTimeAfter != null)
        'ModifiedTimeAfter': unixTimestampToJson(modifiedTimeAfter),
      if (modifiedTimeBefore != null)
        'ModifiedTimeBefore': unixTimestampToJson(modifiedTimeBefore),
      if (nameContains != null) 'NameContains': nameContains,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortBy != null) 'SortBy': sortBy.toValue(),
      if (sortOrder != null) 'SortOrder': sortOrder.toValue(),
    },
  );

  return ListAppImageConfigsResponse.fromJson(jsonResponse.body);
}