listInferenceComponents method
- DateTime? creationTimeAfter,
- DateTime? creationTimeBefore,
- String? endpointNameEquals,
- DateTime? lastModifiedTimeAfter,
- DateTime? lastModifiedTimeBefore,
- int? maxResults,
- String? nameContains,
- String? nextToken,
- InferenceComponentSortKey? sortBy,
- OrderKey? sortOrder,
- InferenceComponentStatus? statusEquals,
- String? variantNameEquals,
Lists the inference components in your account and their properties.
Parameter creationTimeAfter :
Filters the results to only those inference components that were created
after the specified time.
Parameter creationTimeBefore :
Filters the results to only those inference components that were created
before the specified time.
Parameter endpointNameEquals :
An endpoint name to filter the listed inference components. The response
includes only those inference components that are hosted at the specified
endpoint.
Parameter lastModifiedTimeAfter :
Filters the results to only those inference components that were updated
after the specified time.
Parameter lastModifiedTimeBefore :
Filters the results to only those inference components that were updated
before the specified time.
Parameter maxResults :
The maximum number of inference components to return in the response. This
value defaults to 10.
Parameter nameContains :
Filters the results to only those inference components with a name that
contains the specified string.
Parameter nextToken :
A token that you use to get the next set of results following a truncated
response. If the response to the previous request was truncated, that
response provides the value for this token.
Parameter sortBy :
The field by which to sort the inference components in the response. The
default is CreationTime.
Parameter sortOrder :
The sort order for results. The default is Descending.
Parameter statusEquals :
Filters the results to only those inference components with the specified
status.
Parameter variantNameEquals :
A production variant name to filter the listed inference components. The
response includes only those inference components that are hosted at the
specified variant.
Implementation
Future<ListInferenceComponentsOutput> listInferenceComponents({
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
String? endpointNameEquals,
DateTime? lastModifiedTimeAfter,
DateTime? lastModifiedTimeBefore,
int? maxResults,
String? nameContains,
String? nextToken,
InferenceComponentSortKey? sortBy,
OrderKey? sortOrder,
InferenceComponentStatus? statusEquals,
String? variantNameEquals,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.ListInferenceComponents'
};
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 (endpointNameEquals != null)
'EndpointNameEquals': endpointNameEquals,
if (lastModifiedTimeAfter != null)
'LastModifiedTimeAfter': unixTimestampToJson(lastModifiedTimeAfter),
if (lastModifiedTimeBefore != null)
'LastModifiedTimeBefore': unixTimestampToJson(lastModifiedTimeBefore),
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 (statusEquals != null) 'StatusEquals': statusEquals.value,
if (variantNameEquals != null) 'VariantNameEquals': variantNameEquals,
},
);
return ListInferenceComponentsOutput.fromJson(jsonResponse.body);
}