Skip to main content

export_tasks

Creates, updates, deletes, gets or lists an export_tasks resource.

Overview

Nameexport_tasks
TypeResource
Idaws.rds.export_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
export_onlystringThe data exported from the snapshot or cluster. Valid Values: database - Export all the data from a specified database. database.table table-name - Export a table of the snapshot or cluster. This format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL. database.schema schema-name - Export a database schema of the snapshot or cluster. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. database.schema.table table-name - Export a table of the database schema. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
export_task_identifierstringA unique identifier for the snapshot or cluster export task. This ID isn't an identifier for the Amazon S3 bucket where the data is exported.
failure_causestringThe reason the export failed, if it failed.
iam_role_arnstringThe name of the IAM role that is used to write to Amazon S3 when exporting a snapshot or cluster.
kms_key_idstringThe key identifier of the Amazon Web Services KMS key that is used to encrypt the data when it's exported to Amazon S3. The KMS key identifier is its key ARN, key ID, alias ARN, or alias name. The IAM role used for the export must have encryption and decryption permissions to use this KMS key.
percent_progressintegerThe progress of the snapshot or cluster export task as a percentage.
s3_bucketstringThe Amazon S3 bucket where the snapshot or cluster is exported to.
s3_prefixstringThe Amazon S3 bucket prefix that is the file name and path of the exported data.
snapshot_timestringThe time when the snapshot was created.
source_arnstringThe Amazon Resource Name (ARN) of the snapshot or cluster exported to Amazon S3.
source_typestringThe type of source for the export.
statusstringThe progress status of the export task. The status can be one of the following: CANCELED CANCELING COMPLETE FAILED IN_PROGRESS STARTING
task_end_timestringThe time when the snapshot or cluster export task ended.
task_start_timestringThe time when the snapshot or cluster export task started.
total_extracted_data_in_gbintegerThe total amount of data exported, in gigabytes.
warning_messagestringA warning about the snapshot or cluster export task.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_export_tasksselectregionExportTaskIdentifier, SourceArn, Filters, Marker, MaxRecords, SourceTypeReturns information about a snapshot or cluster export to Amazon S3. This API operation supports pagination.
cancel_export_taskexecExportTaskIdentifier, regionCancels an export task in progress that is exporting a snapshot or cluster to Amazon S3. Any data that has already been written to the S3 bucket isn't removed.
start_export_taskexecExportTaskIdentifier, SourceArn, S3BucketName, IamRoleArn, KmsKeyId, regionS3Prefix, ExportOnlyStarts an export of DB snapshot or DB cluster data to Amazon S3. The provided IAM role must have access to the S3 bucket. You can't export snapshot data from RDS Custom DB instances. For more information, see Supported Regions and DB engines for exporting snapshots to S3 in Amazon RDS. For more information on exporting DB snapshot data, see Exporting DB snapshot data to Amazon S3 in the Amazon RDS User Guide or Exporting DB cluster snapshot data to Amazon S3 in the Amazon Aurora User Guide. For more information on exporting DB cluster data, see Exporting DB cluster data to Amazon S3 in the Amazon Aurora 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
ExportTaskIdentifierstringA unique identifier for the export task. This ID isn't an identifier for the Amazon S3 bucket where the data is to be exported.
IamRoleArnstringThe name of the IAM role to use for writing to the Amazon S3 bucket when exporting a snapshot or cluster. In the IAM policy attached to your IAM role, include the following required actions to allow the transfer of files from Amazon RDS or Amazon Aurora to an S3 bucket: s3:PutObject* s3:GetObject* s3:ListBucket s3:DeleteObject* s3:GetBucketLocation In the policy, include the resources to identify the S3 bucket and objects in the bucket. The following list of resources shows the Amazon Resource Name (ARN) format for accessing S3: arn:aws:s3:::your-s3-bucket arn:aws:s3:::your-s3-bucket/*
KmsKeyIdstringThe ID of the Amazon Web Services KMS key to use to encrypt the data exported to Amazon S3. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. The caller of this operation must be authorized to run the following operations. These can be set in the Amazon Web Services KMS key policy: kms:CreateGrant kms:DescribeKey
S3BucketNamestringThe name of the Amazon S3 bucket to export the snapshot or cluster data to.
SourceArnstringThe Amazon Resource Name (ARN) of the snapshot or cluster to export to Amazon S3.
regionstringAWS region (default: us-east-1)
ExportOnlyarrayThe data to be exported from the snapshot or cluster. If this parameter isn't provided, all of the data is exported. Valid Values: database - Export all the data from a specified database. database.table table-name - Export a table of the snapshot or cluster. This format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL. database.schema schema-name - Export a database schema of the snapshot or cluster. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. database.schema.table table-name - Export a table of the database schema. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
ExportTaskIdentifierstringThe identifier of the snapshot or cluster export task to be described.
FiltersarrayFilters specify one or more snapshot or cluster exports to describe. The filters are specified as name-value pairs that define what to include in the output. Filter names and values are case-sensitive. Supported filters include the following: export-task-identifier - An identifier for the snapshot or cluster export task. s3-bucket - The Amazon S3 bucket the data is exported to. source-arn - The Amazon Resource Name (ARN) of the snapshot or cluster exported to Amazon S3. status - The status of the export task. Must be lowercase. Valid statuses are the following: canceled canceling complete failed in_progress starting
MarkerstringAn optional pagination token provided by a previous DescribeExportTasks request. If you specify this parameter, the response includes only records beyond the marker, up to the value specified by the MaxRecords parameter.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified value, a pagination token called a marker is included in the response. You can use the marker in a later DescribeExportTasks request to retrieve the remaining results. Default: 100 Constraints: Minimum 20, maximum 100.
S3PrefixstringThe Amazon S3 bucket prefix to use as the file name and path of the exported data.
SourceArnstringThe Amazon Resource Name (ARN) of the snapshot or cluster exported to Amazon S3.
SourceTypestringThe type of source for the export.

SELECT examples

Returns information about a snapshot or cluster export to Amazon S3. This API operation supports pagination.

SELECT
export_only,
export_task_identifier,
failure_cause,
iam_role_arn,
kms_key_id,
percent_progress,
s3_bucket,
s3_prefix,
snapshot_time,
source_arn,
source_type,
status,
task_end_time,
task_start_time,
total_extracted_data_in_gb,
warning_message
FROM aws.rds.export_tasks
WHERE region = '{{ region }}' -- required
AND ExportTaskIdentifier = '{{ ExportTaskIdentifier }}'
AND SourceArn = '{{ SourceArn }}'
AND Filters = '{{ Filters }}'
AND Marker = '{{ Marker }}'
AND MaxRecords = '{{ MaxRecords }}'
AND SourceType = '{{ SourceType }}'
;

Lifecycle Methods

Cancels an export task in progress that is exporting a snapshot or cluster to Amazon S3. Any data that has already been written to the S3 bucket isn't removed.

EXEC aws.rds.export_tasks.cancel_export_task
@ExportTaskIdentifier='{{ ExportTaskIdentifier }}' --required,
@region='{{ region }}' --required
;