model_copy_jobs
Creates, updates, deletes, gets or lists a model_copy_jobs resource.
Overview
| Name | model_copy_jobs |
| Type | Resource |
| Id | aws.bedrock.model_copy_jobs |
Fields
The following fields are returned by SELECT queries:
- get_model_copy_job
- list_model_copy_jobs
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time at which the model copy job was created. |
failure_message | string | An error message for why the model copy job failed. |
job_arn | string | The 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_id | string | The unique identifier of the account that the model being copied originated from. (pattern: <code>[0-9]{12}</code>) |
source_model_arn | string | The 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_name | string | The name of the original model being copied. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>) |
status | string | The status of the model copy job. (InProgress, Completed, Failed) |
target_model_arn | string | The 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_arn | string | The 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_name | string | The name of the copied model. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>) |
target_model_tags | array | The tags associated with the copied model. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time that the model copy job was created. |
failure_message | string | If a model fails to be copied, a message describing why the job failed is included here. |
job_arn | string | The Amazon Resoource 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_id | string | The unique identifier of the account that the model being copied originated from. (pattern: <code>[0-9]{12}</code>) |
source_model_arn | string | The 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_name | string | The name of the original model being copied. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>) |
status | string | The status of the model copy job. (InProgress, Completed, Failed) |
target_model_arn | string | The 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_arn | string | The Amazon Resource Name (ARN) of the KMS key used to encrypt the copied model. (pattern: <code>arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>) |
target_model_name | string | The name of the copied model. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>) |
target_model_tags | array | Tags associated with the copied model. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_model_copy_job | select | job_arn, region | 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. | |
list_model_copy_jobs | select | region | creationTimeAfter, creationTimeBefore, statusEquals, sourceAccountEquals, sourceModelArnEquals, outputModelNameContains, maxResults, nextToken, sortBy, sortOrder | Returns 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_job | insert | region, sourceModelArn, targetModelName | 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. |
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_arn | string | The Amazon Resource Name (ARN) of the model copy job. |
region | string | AWS region (default: us-east-1) |
creationTimeAfter | string (date-time) | Filters for model copy jobs created after the specified time. |
creationTimeBefore | string (date-time) | Filters for model copy jobs 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. |
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. |
outputModelNameContains | string | Filters for model copy jobs in which the name of the copied model contains the string that you specify. |
sortBy | string | The field to sort by in the returned list of model copy jobs. |
sortOrder | string | Specifies whether to sort the results in ascending or descending order. |
sourceAccountEquals | string | Filters for model copy jobs in which the account that the source model belongs to is equal to the value that you specify. |
sourceModelArnEquals | string | Filters for model copy jobs in which the Amazon Resource Name (ARN) of the source model to is equal to the value that you specify. |
statusEquals | string | Filters for model copy jobs whose status matches the value that you specify. |
SELECT examples
- get_model_copy_job
- list_model_copy_jobs
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
;
Returns 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.
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 region = '{{ region }}' -- required
AND creationTimeAfter = '{{ creationTimeAfter }}'
AND creationTimeBefore = '{{ creationTimeBefore }}'
AND statusEquals = '{{ statusEquals }}'
AND sourceAccountEquals = '{{ sourceAccountEquals }}'
AND sourceModelArnEquals = '{{ sourceModelArnEquals }}'
AND outputModelNameContains = '{{ outputModelNameContains }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
;
INSERT examples
- create_model_copy_job
- Manifest
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
;
# Description fields are for documentation purposes
- name: model_copy_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the model_copy_jobs resource.
- name: sourceModelArn
value: "{{ sourceModelArn }}"
- name: targetModelName
value: "{{ targetModelName }}"
- name: modelKmsKeyId
value: "{{ modelKmsKeyId }}"
- name: targetModelTags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: clientRequestToken
value: "{{ clientRequestToken }}"