listCustomModelDeployments method
Lists custom model deployments in your account. You can filter the results by creation time, name, status, and associated model. Use this operation to manage and monitor your custom model deployments.
We recommend using pagination to ensure that the operation returns quickly and successfully.
The following actions are related to the
ListCustomModelDeployments operation:
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter createdAfter :
Filters deployments created after the specified date and time.
Parameter createdBefore :
Filters deployments created before the specified date and time.
Parameter maxResults :
The maximum number of results to return in a single call.
Parameter modelArnEquals :
Filters deployments by the Amazon Resource Name (ARN) of the associated
custom model.
Parameter nameContains :
Filters deployments whose names contain the specified string.
Parameter nextToken :
The token for the next set of results. Use this token to retrieve
additional results when the response is truncated.
Parameter sortBy :
The field to sort the results by. The only supported value is
CreationTime.
Parameter sortOrder :
The sort order for the results. Valid values are Ascending
and Descending. Default is Descending.
Parameter statusEquals :
Filters deployments by status. Valid values are CREATING,
ACTIVE, and FAILED.
Implementation
Future<ListCustomModelDeploymentsResponse> listCustomModelDeployments({
DateTime? createdAfter,
DateTime? createdBefore,
int? maxResults,
String? modelArnEquals,
String? nameContains,
String? nextToken,
SortModelsBy? sortBy,
SortOrder? sortOrder,
CustomModelDeploymentStatus? statusEquals,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (createdAfter != null)
'createdAfter': [_s.iso8601ToJson(createdAfter).toString()],
if (createdBefore != null)
'createdBefore': [_s.iso8601ToJson(createdBefore).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (modelArnEquals != null) 'modelArnEquals': [modelArnEquals],
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],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/model-customization/custom-model-deployments',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListCustomModelDeploymentsResponse.fromJson(response);
}