Skip to main content

copy_jobs

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

Overview

Namecopy_jobs
TypeResource
Idaws.backup.copy_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe account ID that owns the copy job. (pattern: <code>^[0-9]{12}$</code>)
backup_size_in_bytesinteger (int64)The size, in bytes, of a copy job.
child_jobs_in_stateobjectThis returns the statistics of the included child (nested) copy jobs.
completion_datestring (date-time)The date and time a copy job is completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
composite_member_identifierstringThe identifier of a resource within a composite group, such as nested (child) recovery point belonging to a composite (parent) stack. The ID is transferred from the logical ID within a stack.
copy_job_idstringUniquely identifies a copy job.
created_byobjectContains information about the backup plan and rule that Backup used to initiate the recovery point backup.
created_by_backup_job_idstringThe backup job ID that initiated this copy job. Only applicable to scheduled copy jobs and automatic copy jobs to logically air-gapped vault.
creation_datestring (date-time)The date and time a copy job is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
destination_backup_vault_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a destination copy vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.
destination_encryption_key_arnstringThe Amazon Resource Name (ARN) of the KMS key used to encrypt the copied backup in the destination vault. This can be a customer-managed key or an Amazon Web Services managed key.
destination_recovery_point_arnstringAn ARN that uniquely identifies a destination recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
destination_recovery_point_lifecycleobjectSpecifies the time period, in days, before a recovery point transitions to cold storage or is deleted. Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the retention setting must be 90 days greater than the transition to cold after days setting. The transition to cold after days setting can't be changed after a backup has been transitioned to cold. Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types. To remove the existing lifecycle and retention periods and keep your recovery points indefinitely, specify -1 for MoveToColdStorageAfterDays and DeleteAfterDays.
destination_vault_lock_statestringThe lock state of the destination backup vault. For logically air-gapped vaults, this indicates whether the vault is locked in compliance mode. Valid values include LOCKED and UNLOCKED.
destination_vault_typestringThe type of destination backup vault where the copied recovery point is stored. Valid values are BACKUP_VAULT for standard backup vaults and LOGICALLY_AIR_GAPPED_BACKUP_VAULT for logically air-gapped vaults.
iam_role_arnstringSpecifies the IAM role ARN used to copy the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
is_parentbooleanThis is a boolean value indicating this is a parent (composite) copy job.
message_categorystringThis parameter is the job count for the specified message category. Example strings may include AccessDenied, SUCCESS, AGGREGATE_ALL, and InvalidParameters. See Monitoring for a list of MessageCategory strings. The the value ANY returns count of all message categories. AGGREGATE_ALL aggregates job counts for all message categories and returns the sum
number_of_child_jobsinteger (int64)The number of child (nested) copy jobs.
parent_job_idstringThis uniquely identifies a request to Backup to copy a resource. The return will be the parent (composite) job ID.
resource_arnstringThe Amazon Web Services resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
resource_namestringThe non-unique name of the resource that belongs to the specified backup.
resource_typestringThe type of Amazon Web Services resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. (pattern: <code>^[a-zA-Z0-9-_.]{1,50}$</code>)
source_backup_vault_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a source copy vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.
source_recovery_point_arnstringAn ARN that uniquely identifies a source recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
statestringThe current state of a copy job. (CREATED, RUNNING, COMPLETED, FAILED, PARTIAL)
status_messagestringA detailed message explaining the status of the job to copy a resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_copy_jobselectcopy_job_id, regionReturns metadata associated with creating a copy of a resource.
list_copy_jobsselectregionnextToken, maxResults, resourceArn, state, createdBefore, createdAfter, resourceType, destinationVaultArn, accountId, completeBefore, completeAfter, parentJobId, messageCategory, sourceRecoveryPointArnReturns metadata about your copy jobs.

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
copy_job_idstringUniquely identifies a copy job.
regionstringAWS region (default: us-east-1)
accountIdstringThe account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.
completeAfterstring (date-time)Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).
completeBeforestring (date-time)Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).
createdAfterstring (date-time)Returns only copy jobs that were created after the specified date.
createdBeforestring (date-time)Returns only copy jobs that were created before the specified date.
destinationVaultArnstringAn Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.
maxResultsintegerThe maximum number of items to be returned.
messageCategorystringThis is an optional parameter that can be used to filter out jobs with a MessageCategory which matches the value you input. Example strings may include AccessDenied, SUCCESS, AGGREGATE_ALL, and INVALIDPARAMETERS. View Monitoring for a list of accepted strings. The the value ANY returns count of all message categories. AGGREGATE_ALL aggregates job counts for all message categories and returns the sum.
nextTokenstringThe next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
parentJobIdstringThis is a filter to list child (nested) jobs based on parent job ID.
resourceArnstringReturns only copy jobs that match the specified resource Amazon Resource Name (ARN).
resourceTypestringReturns only backup jobs for the specified resources: Aurora for Amazon Aurora CloudFormation for CloudFormation DocumentDB for Amazon DocumentDB (with MongoDB compatibility) DynamoDB for Amazon DynamoDB EBS for Amazon Elastic Block Store EC2 for Amazon Elastic Compute Cloud EFS for Amazon Elastic File System EKS for Amazon Elastic Kubernetes Service FSx for Amazon FSx Neptune for Amazon Neptune RDS for Amazon Relational Database Service Redshift for Amazon Redshift S3 for Amazon Simple Storage Service (Amazon S3) SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute Cloud instances Storage Gateway for Storage Gateway Timestream for Amazon Timestream VirtualMachine for VMware virtual machines
sourceRecoveryPointArnstringFilters copy jobs by the specified source recovery point ARN.
statestringReturns only copy jobs that are in the specified state.

SELECT examples

Returns metadata associated with creating a copy of a resource.

SELECT
account_id,
backup_size_in_bytes,
child_jobs_in_state,
completion_date,
composite_member_identifier,
copy_job_id,
created_by,
created_by_backup_job_id,
creation_date,
destination_backup_vault_arn,
destination_encryption_key_arn,
destination_recovery_point_arn,
destination_recovery_point_lifecycle,
destination_vault_lock_state,
destination_vault_type,
iam_role_arn,
is_parent,
message_category,
number_of_child_jobs,
parent_job_id,
resource_arn,
resource_name,
resource_type,
source_backup_vault_arn,
source_recovery_point_arn,
state,
status_message
FROM aws.backup.copy_jobs
WHERE copy_job_id = '{{ copy_job_id }}' -- required
AND region = '{{ region }}' -- required
;