createModelImportJob method

Future<CreateModelImportJobResponse> createModelImportJob({
  1. required String importedModelName,
  2. required String jobName,
  3. required ModelDataSource modelDataSource,
  4. required String roleArn,
  5. String? clientRequestToken,
  6. String? importedModelKmsKeyId,
  7. List<Tag>? importedModelTags,
  8. List<Tag>? jobTags,
  9. VpcConfig? vpcConfig,
})

Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw TooManyTagsException. May throw ValidationException.

Parameter importedModelName : The name of the imported model.

Parameter jobName : The name of the import job.

Parameter modelDataSource : The data source for the imported model.

Parameter roleArn : The Amazon Resource Name (ARN) of the model import job.

Parameter clientRequestToken : A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

Parameter importedModelKmsKeyId : The imported model is encrypted at rest using this key.

Parameter importedModelTags : Tags to attach to the imported model.

Parameter jobTags : Tags to attach to this import job.

Parameter vpcConfig : VPC configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for the import job.

Implementation

Future<CreateModelImportJobResponse> createModelImportJob({
  required String importedModelName,
  required String jobName,
  required ModelDataSource modelDataSource,
  required String roleArn,
  String? clientRequestToken,
  String? importedModelKmsKeyId,
  List<Tag>? importedModelTags,
  List<Tag>? jobTags,
  VpcConfig? vpcConfig,
}) async {
  final $payload = <String, dynamic>{
    'importedModelName': importedModelName,
    'jobName': jobName,
    'modelDataSource': modelDataSource,
    'roleArn': roleArn,
    if (clientRequestToken != null) 'clientRequestToken': clientRequestToken,
    if (importedModelKmsKeyId != null)
      'importedModelKmsKeyId': importedModelKmsKeyId,
    if (importedModelTags != null) 'importedModelTags': importedModelTags,
    if (jobTags != null) 'jobTags': jobTags,
    if (vpcConfig != null) 'vpcConfig': vpcConfig,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/model-import-jobs',
    exceptionFnMap: _exceptionFns,
  );
  return CreateModelImportJobResponse.fromJson(response);
}