model_import_jobs
Creates, updates, deletes, gets or lists a model_import_jobs resource.
Overview
| Name | model_import_jobs |
| Type | Resource |
| Id | aws.bedrock.model_import_jobs |
Fields
The following fields are returned by SELECT queries:
- get_model_import_job
- list_model_import_jobs
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time the resource was created. |
end_time | string (date-time) | Time that the resource transitioned to terminal state. |
failure_message | string | Information about why the import job failed. |
imported_model_arn | string | The 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_arn | string | The 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_name | string | The name of the imported model. (pattern: <code>([0-9a-zA-Z][_-]?)+</code>) |
job_arn | string | The 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_name | string | The name of the import job. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9+-.])</code>) |
last_modified_time | string (date-time) | Time the resource was last modified. |
model_data_source | object | The data source of the model to import. |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role associated with this job. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>) |
status | string | The 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_config | object | The configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time import job was created. |
end_time | string (date-time) | The time when import job ended. |
imported_model_arn | string | The 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_name | string | The name of the imported model. (pattern: <code>([0-9a-zA-Z][_-]?)+</code>) |
job_arn | string | The 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_name | string | The name of the import job. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9+-.])</code>) |
last_modified_time | string (date-time) | The time when the import job was last modified. |
status | string | The status of the imported job. (InProgress, Completed, Failed) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_model_import_job | select | job_identifier, region | 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. | |
list_model_import_jobs | select | region | creationTimeAfter, creationTimeBefore, statusEquals, nameContains, maxResults, nextToken, sortBy, sortOrder | Returns 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_job | insert | region, jobName, importedModelName, roleArn, modelDataSource | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
job_identifier | string | The identifier of the import job. |
region | string | AWS region (default: us-east-1) |
creationTimeAfter | string (date-time) | Return import jobs that were created after the specified time. |
creationTimeBefore | string (date-time) | Return import jobs that were created before the specified time. |
maxResults | integer | The 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. |
nameContains | string | Return imported jobs only if the job name contains these characters. |
nextToken | string | If 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. |
sortBy | string | The field to sort by in the returned list of imported jobs. |
sortOrder | string | Specifies whether to sort the results in ascending or descending order. |
statusEquals | string | Return imported jobs with the specified status. |
SELECT examples
- get_model_import_job
- list_model_import_jobs
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
;
Returns 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.
SELECT
creation_time,
end_time,
imported_model_arn,
imported_model_name,
job_arn,
job_name,
last_modified_time,
status
FROM aws.bedrock.model_import_jobs
WHERE region = '{{ region }}' -- required
AND creationTimeAfter = '{{ creationTimeAfter }}'
AND creationTimeBefore = '{{ creationTimeBefore }}'
AND statusEquals = '{{ statusEquals }}'
AND nameContains = '{{ nameContains }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
;
INSERT examples
- create_model_import_job
- Manifest
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
;
# Description fields are for documentation purposes
- name: model_import_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the model_import_jobs resource.
- name: jobName
value: "{{ jobName }}"
- name: importedModelName
value: "{{ importedModelName }}"
- name: roleArn
value: "{{ roleArn }}"
- name: modelDataSource
description: |
The data source of the model to import.
value:
s3DataSource:
s3Uri: "{{ s3Uri }}"
- name: jobTags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: importedModelTags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: clientRequestToken
value: "{{ clientRequestToken }}"
- name: vpcConfig
description: |
The configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink.
value:
subnetIds:
- "{{ subnetIds }}"
securityGroupIds:
- "{{ securityGroupIds }}"
- name: importedModelKmsKeyId
value: "{{ importedModelKmsKeyId }}"