batch_segment_jobs
Creates, updates, deletes, gets or lists a batch_segment_jobs resource.
Overview
| Name | batch_segment_jobs |
| Type | Resource |
| Id | aws.personalize.batch_segment_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_batch_segment_job
- list_batch_segment_jobs
| Name | Datatype | Description |
|---|---|---|
batch_segment_job_arn | string | The Amazon Resource Name (ARN) of the batch segment job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
creation_date_time | string (date-time) | The time at which the batch segment job was created. |
failure_reason | string | If the batch segment job failed, the reason for the failure. |
filter_arn | string | The ARN of the filter used on the batch segment job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
job_input | object | The Amazon S3 path that leads to the input data used to generate the batch segment job. |
job_name | string | The name of the batch segment job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
job_output | object | The Amazon S3 bucket that contains the output data generated by the batch segment job. |
last_updated_date_time | string (date-time) | The time at which the batch segment job last updated. |
num_results | integer | The number of predicted users generated by the batch segment job for each line of input data. The maximum number of users per segment is 5 million. |
role_arn | string | The ARN of the Amazon Identity and Access Management (IAM) role that requested the batch segment job. (pattern: <code>arn:([a-z\d-]+):iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
solution_version_arn | string | The Amazon Resource Name (ARN) of the solution version used by the batch segment job to generate batch segments. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the batch segment job. The status is one of the following values: PENDING IN PROGRESS ACTIVE CREATE FAILED |
| Name | Datatype | Description |
|---|---|---|
batch_segment_job_arn | string | The Amazon Resource Name (ARN) of the batch segment job. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
creation_date_time | string (date-time) | The time at which the batch segment job was created. |
failure_reason | string | If the batch segment job failed, the reason for the failure. |
job_name | string | The name of the batch segment job. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
last_updated_date_time | string (date-time) | The time at which the batch segment job was last updated. |
solution_version_arn | string | The Amazon Resource Name (ARN) of the solution version used by the batch segment job to generate batch segments. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the batch segment job. The status is one of the following values: PENDING IN PROGRESS ACTIVE CREATE FAILED |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_batch_segment_job | select | region | Gets the properties of a batch segment job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate segments. | |
list_batch_segment_jobs | select | region | Gets a list of the batch segment jobs that have been performed off of a solution version that you specify. | |
create_batch_segment_job | insert | region, jobName, solutionVersionArn, jobInput, jobOutput, roleArn | Creates a batch segment job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Getting batch recommendations and user segments. |
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_batch_segment_job
- list_batch_segment_jobs
Gets the properties of a batch segment job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate segments.
SELECT
batch_segment_job_arn,
creation_date_time,
failure_reason,
filter_arn,
job_input,
job_name,
job_output,
last_updated_date_time,
num_results,
role_arn,
solution_version_arn,
status
FROM aws.personalize.batch_segment_jobs
WHERE region = '{{ region }}' -- required
;
Gets a list of the batch segment jobs that have been performed off of a solution version that you specify.
SELECT
batch_segment_job_arn,
creation_date_time,
failure_reason,
job_name,
last_updated_date_time,
solution_version_arn,
status
FROM aws.personalize.batch_segment_jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_batch_segment_job
- Manifest
Creates a batch segment job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Getting batch recommendations and user segments.
INSERT INTO aws.personalize.batch_segment_jobs (
jobName,
solutionVersionArn,
filterArn,
numResults,
jobInput,
jobOutput,
roleArn,
tags,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ solutionVersionArn }}' /* required */,
'{{ filterArn }}',
{{ numResults }},
'{{ jobInput }}' /* required */,
'{{ jobOutput }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
batch_segment_job_arn
;
# Description fields are for documentation purposes
- name: batch_segment_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the batch_segment_jobs resource.
- name: jobName
value: "{{ jobName }}"
description: |
The name of the batch segment job to create.
- name: solutionVersionArn
value: "{{ solutionVersionArn }}"
description: |
The Amazon Resource Name (ARN) of the solution version you want the batch segment job to use to generate batch segments.
- name: filterArn
value: "{{ filterArn }}"
description: |
The ARN of the filter to apply to the batch segment job. For more information on using filters, see Filtering batch recommendations.
- name: numResults
value: {{ numResults }}
description: |
The number of predicted users generated by the batch segment job for each line of input data. The maximum number of users per segment is 5 million.
- name: jobInput
description: |
The Amazon S3 path for the input data used to generate the batch segment job.
value:
s3DataSource:
path: "{{ path }}"
kmsKeyArn: "{{ kmsKeyArn }}"
- name: jobOutput
description: |
The Amazon S3 path for the bucket where the job's output will be stored.
value:
s3DataDestination:
path: "{{ path }}"
kmsKeyArn: "{{ kmsKeyArn }}"
- name: roleArn
value: "{{ roleArn }}"
description: |
The ARN of the Amazon Identity and Access Management role that has permissions to read and write to your input and output Amazon S3 buckets respectively.
- name: tags
description: |
A list of tags to apply to the batch segment job.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"