Skip to main content

model_copy_jobs

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

Overview

Namemodel_copy_jobs
TypeResource
Idaws.bedrock.model_copy_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The time at which the model copy job was created.
failure_messagestringAn error message for why the model copy job failed.
job_arnstringThe Amazon Resource Name (ARN) of the model copy job. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-copy-job/[a-z0-9]{12}</code>)
source_account_idstringThe unique identifier of the account that the model being copied originated from. (pattern: <code>[0-9]{12}</code>)
source_model_arnstringThe Amazon Resource Name (ARN) of the original model being copied. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/((imported)|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}))(([:][a-z0-9-]{1,63}){0,2})?/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}))</code>)
source_model_namestringThe name of the original model being copied. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>)
statusstringThe status of the model copy job. (InProgress, Completed, Failed)
target_model_arnstringThe Amazon Resource Name (ARN) of the copied model. (pattern: <code>arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:[a-z0-9-]{1,20}:[0-9]{12}:custom-model/(imported|[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2})/[a-z0-9]{12}</code>)
target_model_kms_key_arnstringThe Amazon Resource Name (ARN) of the KMS key encrypting the copied model. (pattern: <code>arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>)
target_model_namestringThe name of the copied model. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>)
target_model_tagsarrayThe tags associated with the copied model.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_model_copy_jobselectjob_arn, regionRetrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
list_model_copy_jobsselectregioncreationTimeAfter, creationTimeBefore, statusEquals, sourceAccountEquals, sourceModelArnEquals, outputModelNameContains, maxResults, nextToken, sortBy, sortOrderReturns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
create_model_copy_jobinsertregion, sourceModelArn, targetModelNameCopies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.

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_arnstringThe Amazon Resource Name (ARN) of the model copy job.
regionstringAWS region (default: us-east-1)
creationTimeAfterstring (date-time)Filters for model copy jobs created after the specified time.
creationTimeBeforestring (date-time)Filters for model copy jobs 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.
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.
outputModelNameContainsstringFilters for model copy jobs in which the name of the copied model contains the string that you specify.
sortBystringThe field to sort by in the returned list of model copy jobs.
sortOrderstringSpecifies whether to sort the results in ascending or descending order.
sourceAccountEqualsstringFilters for model copy jobs in which the account that the source model belongs to is equal to the value that you specify.
sourceModelArnEqualsstringFilters for model copy jobs in which the Amazon Resource Name (ARN) of the source model to is equal to the value that you specify.
statusEqualsstringFilters for model copy jobs whose status matches the value that you specify.

SELECT examples

Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.

SELECT
creation_time,
failure_message,
job_arn,
source_account_id,
source_model_arn,
source_model_name,
status,
target_model_arn,
target_model_kms_key_arn,
target_model_name,
target_model_tags
FROM aws.bedrock.model_copy_jobs
WHERE job_arn = '{{ job_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.

INSERT INTO aws.bedrock.model_copy_jobs (
sourceModelArn,
targetModelName,
modelKmsKeyId,
targetModelTags,
clientRequestToken,
region
)
SELECT
'{{ sourceModelArn }}' /* required */,
'{{ targetModelName }}' /* required */,
'{{ modelKmsKeyId }}',
'{{ targetModelTags }}',
'{{ clientRequestToken }}',
'{{ region }}'
RETURNING
job_arn
;