data_deletion_jobs
Creates, updates, deletes, gets or lists a data_deletion_jobs resource.
Overview
| Name | data_deletion_jobs |
| Type | Resource |
| Id | aws.personalize.data_deletion_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_data_deletion_job
- list_data_deletion_jobs
| Name | Datatype | Description |
|---|---|---|
creation_date_time | string (date-time) | The creation date and time (in Unix time) of the data deletion job. |
data_deletion_job_arn | string | The Amazon Resource Name (ARN) of the data deletion job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
data_source | object | Describes the data source that contains the data to upload to a dataset, or the list of records to delete from Amazon Personalize. |
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group the job deletes records from. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
failure_reason | string | If a data deletion job fails, provides the reason why. |
job_name | string | The name of the data deletion job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
last_updated_date_time | string (date-time) | The date and time (in Unix time) the data deletion job was last updated. |
num_deleted | integer | The number of records deleted by a COMPLETED job. |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role that has permissions to read from the Amazon S3 data source. (pattern: <code>arn:([a-z\d-]+):iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
status | string | The status of the data deletion job. A data deletion job can have one of the following statuses: PENDING > IN_PROGRESS > COMPLETED -or- FAILED |
| Name | Datatype | Description |
|---|---|---|
data_deletion_jobs | array | The list of data deletion jobs. |
next_token | string | A token for getting the next set of data deletion jobs (if they exist). (pattern: <code>\p{ASCII}{0,1500}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_data_deletion_job | select | region | Describes the data deletion job created by CreateDataDeletionJob, including the job status. | |
list_data_deletion_jobs | select | region | Returns a list of data deletion jobs for a dataset group ordered by creation time, with the most recent first. When a dataset group is not specified, all the data deletion jobs associated with the account are listed. The response provides the properties for each job, including the Amazon Resource Name (ARN). For more information on data deletion jobs, see Deleting users. | |
create_data_deletion_job | insert | region, jobName, datasetGroupArn, dataSource, roleArn | Creates a batch job that deletes all references to specific users from an Amazon Personalize dataset group in batches. You specify the users to delete in a CSV file of userIds in an Amazon S3 bucket. After a job completes, Amazon Personalize no longer trains on the users’ data and no longer considers the users when generating user segments. For more information about creating a data deletion job, see Deleting users. Your input file must be a CSV file with a single USER_ID column that lists the users IDs. For more information about preparing the CSV file, see Preparing your data deletion file and uploading it to Amazon S3. To give Amazon Personalize permission to access your input CSV file of userIds, you must specify an IAM service role that has permission to read from the data source. This role needs GetObject and ListBucket permissions for the bucket and its content. These permissions are the same as importing data. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources. After you create a job, it can take up to a day to delete all references to the users from datasets and models. Until the job completes, Amazon Personalize continues to use the data when training. And if you use a User Segmentation recipe, the users might appear in user segments. Status A data deletion job can have one of the following statuses: PENDING > IN_PROGRESS > COMPLETED -or- FAILED To get the status of the data deletion job, call DescribeDataDeletionJob API operation and specify the Amazon Resource Name (ARN) of the job. If the status is FAILED, the response includes a failureReason key, which describes why the job failed. Related APIs ListDataDeletionJobs DescribeDataDeletionJob |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_data_deletion_job
- list_data_deletion_jobs
Describes the data deletion job created by CreateDataDeletionJob, including the job status.
SELECT
creation_date_time,
data_deletion_job_arn,
data_source,
dataset_group_arn,
failure_reason,
job_name,
last_updated_date_time,
num_deleted,
role_arn,
status
FROM aws.personalize.data_deletion_jobs
WHERE region = '{{ region }}' -- required
;
Returns a list of data deletion jobs for a dataset group ordered by creation time, with the most recent first. When a dataset group is not specified, all the data deletion jobs associated with the account are listed. The response provides the properties for each job, including the Amazon Resource Name (ARN). For more information on data deletion jobs, see Deleting users.
SELECT
data_deletion_jobs,
next_token
FROM aws.personalize.data_deletion_jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_data_deletion_job
- Manifest
Creates a batch job that deletes all references to specific users from an Amazon Personalize dataset group in batches. You specify the users to delete in a CSV file of userIds in an Amazon S3 bucket. After a job completes, Amazon Personalize no longer trains on the users’ data and no longer considers the users when generating user segments. For more information about creating a data deletion job, see Deleting users. Your input file must be a CSV file with a single USER_ID column that lists the users IDs. For more information about preparing the CSV file, see Preparing your data deletion file and uploading it to Amazon S3. To give Amazon Personalize permission to access your input CSV file of userIds, you must specify an IAM service role that has permission to read from the data source. This role needs GetObject and ListBucket permissions for the bucket and its content. These permissions are the same as importing data. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources. After you create a job, it can take up to a day to delete all references to the users from datasets and models. Until the job completes, Amazon Personalize continues to use the data when training. And if you use a User Segmentation recipe, the users might appear in user segments. Status A data deletion job can have one of the following statuses: PENDING > IN_PROGRESS > COMPLETED -or- FAILED To get the status of the data deletion job, call DescribeDataDeletionJob API operation and specify the Amazon Resource Name (ARN) of the job. If the status is FAILED, the response includes a failureReason key, which describes why the job failed. Related APIs ListDataDeletionJobs DescribeDataDeletionJob
INSERT INTO aws.personalize.data_deletion_jobs (
jobName,
datasetGroupArn,
dataSource,
roleArn,
tags,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ datasetGroupArn }}' /* required */,
'{{ dataSource }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
data_deletion_job_arn
;
# Description fields are for documentation purposes
- name: data_deletion_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the data_deletion_jobs resource.
- name: jobName
value: "{{ jobName }}"
description: |
The name for the data deletion job.
- name: datasetGroupArn
value: "{{ datasetGroupArn }}"
description: |
The Amazon Resource Name (ARN) of the dataset group that has the datasets you want to delete records from.
- name: dataSource
description: |
The Amazon S3 bucket that contains the list of userIds of the users to delete.
value:
dataLocation: "{{ dataLocation }}"
- name: roleArn
value: "{{ roleArn }}"
description: |
The Amazon Resource Name (ARN) of the IAM role that has permissions to read from the Amazon S3 data source.
- name: tags
description: |
A list of tags to apply to the data deletion job.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"