listClusterSchedulerConfigs method

Future<ListClusterSchedulerConfigsResponse> listClusterSchedulerConfigs({
  1. String? clusterArn,
  2. DateTime? createdAfter,
  3. DateTime? createdBefore,
  4. int? maxResults,
  5. String? nameContains,
  6. String? nextToken,
  7. SortClusterSchedulerConfigBy? sortBy,
  8. SortOrder? sortOrder,
  9. SchedulerResourceStatus? status,
})

List the cluster policy configurations.

Parameter clusterArn : Filter for ARN of the cluster.

Parameter createdAfter : Filter for after this creation time. The input for this parameter is a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter.

Parameter createdBefore : Filter for before this creation time. The input for this parameter is a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter.

Parameter maxResults : The maximum number of cluster policies to list.

Parameter nameContains : Filter for name containing this string.

Parameter nextToken : If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.

Parameter sortBy : Filter for sorting the list by a given value. For example, sort by name, creation time, or status.

Parameter sortOrder : The order of the list. By default, listed in Descending order according to by SortBy. To change the list order, you can specify SortOrder to be Ascending.

Parameter status : Filter for status.

Implementation

Future<ListClusterSchedulerConfigsResponse> listClusterSchedulerConfigs({
  String? clusterArn,
  DateTime? createdAfter,
  DateTime? createdBefore,
  int? maxResults,
  String? nameContains,
  String? nextToken,
  SortClusterSchedulerConfigBy? sortBy,
  SortOrder? sortOrder,
  SchedulerResourceStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListClusterSchedulerConfigs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (clusterArn != null) 'ClusterArn': clusterArn,
      if (createdAfter != null)
        'CreatedAfter': unixTimestampToJson(createdAfter),
      if (createdBefore != null)
        'CreatedBefore': unixTimestampToJson(createdBefore),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nameContains != null) 'NameContains': nameContains,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortBy != null) 'SortBy': sortBy.value,
      if (sortOrder != null) 'SortOrder': sortOrder.value,
      if (status != null) 'Status': status.value,
    },
  );

  return ListClusterSchedulerConfigsResponse.fromJson(jsonResponse.body);
}