Skip to main content

model_import_jobs

Creates, updates, deletes, gets or lists a model_import_jobs resource.

Overview

Namemodel_import_jobs
TypeResource
Idaws.bedrock.model_import_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The time the resource was created.
end_timestring (date-time)Time that the resource transitioned to terminal state.
failure_messagestringInformation about why the import job failed.
imported_model_arnstringThe Amazon Resource Name (ARN) of the imported model. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:imported-model/[a-z0-9]{12}</code>)
imported_model_kms_key_arnstringThe imported model is encrypted at rest using this key. (pattern: <code>arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>)
imported_model_namestringThe name of the imported model. (pattern: <code>([0-9a-zA-Z][_-]?)+</code>)
job_arnstringThe Amazon Resource Name (ARN) of the import job. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-import-job/[a-z0-9]{12}</code>)
job_namestringThe name of the import job. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9+-.])</code>)
last_modified_timestring (date-time)Time the resource was last modified.
model_data_sourceobjectThe data source of the model to import.
role_arnstringThe Amazon Resource Name (ARN) of the IAM role associated with this job. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>)
statusstringThe status of the job. A successful job transitions from in-progress to completed when the imported model is ready to use. If the job failed, the failure message contains information about why the job failed. (InProgress, Completed, Failed)
vpc_configobjectThe configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_model_import_jobselectjob_identifier, regionRetrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide.
list_model_import_jobsselectregioncreationTimeAfter, creationTimeBefore, statusEquals, nameContains, maxResults, nextToken, sortBy, sortOrderReturns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
create_model_import_jobinsertregion, jobName, importedModelName, roleArn, modelDataSourceCreates 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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
job_identifierstringThe identifier of the import job.
regionstringAWS region (default: us-east-1)
creationTimeAfterstring (date-time)Return import jobs that were created after the specified time.
creationTimeBeforestring (date-time)Return import jobs that were created before the specified time.
maxResultsintegerThe maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.
nameContainsstringReturn imported jobs only if the job name contains these characters.
nextTokenstringIf the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.
sortBystringThe field to sort by in the returned list of imported jobs.
sortOrderstringSpecifies whether to sort the results in ascending or descending order.
statusEqualsstringReturn imported jobs with the specified status.

SELECT examples

Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide.

SELECT
creation_time,
end_time,
failure_message,
imported_model_arn,
imported_model_kms_key_arn,
imported_model_name,
job_arn,
job_name,
last_modified_time,
model_data_source,
role_arn,
status,
vpc_config
FROM aws.bedrock.model_import_jobs
WHERE job_identifier = '{{ job_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.bedrock.model_import_jobs (
jobName,
importedModelName,
roleArn,
modelDataSource,
jobTags,
importedModelTags,
clientRequestToken,
vpcConfig,
importedModelKmsKeyId,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ importedModelName }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ modelDataSource }}' /* required */,
'{{ jobTags }}',
'{{ importedModelTags }}',
'{{ clientRequestToken }}',
'{{ vpcConfig }}',
'{{ importedModelKmsKeyId }}',
'{{ region }}'
RETURNING
job_arn
;