Personalize / Client / create_batch_segment_job

create_batch_segment_job#

Personalize.Client.create_batch_segment_job(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.create_batch_segment_job(
    jobName='string',
    solutionVersionArn='string',
    filterArn='string',
    numResults=123,
    jobInput={
        's3DataSource': {
            'path': 'string',
            'kmsKeyArn': 'string'
        }
    },
    jobOutput={
        's3DataDestination': {
            'path': 'string',
            'kmsKeyArn': 'string'
        }
    },
    roleArn='string',
    tags=[
        {
            'tagKey': 'string',
            'tagValue': 'string'
        },
    ]
)
Parameters:
  • jobName (string) –

    [REQUIRED]

    The name of the batch segment job to create.

  • solutionVersionArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the solution version you want the batch segment job to use to generate batch segments.

  • filterArn (string) – The ARN of the filter to apply to the batch segment job. For more information on using filters, see Filtering batch recommendations.

  • numResults (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.

  • jobInput (dict) –

    [REQUIRED]

    The Amazon S3 path for the input data used to generate the batch segment job.

    • s3DataSource (dict) – [REQUIRED]

      The configuration details of an Amazon S3 input or output bucket.

      • path (string) – [REQUIRED]

        The file path of the Amazon S3 bucket.

      • kmsKeyArn (string) –

        The Amazon Resource Name (ARN) of the Key Management Service (KMS) key that Amazon Personalize uses to encrypt or decrypt the input and output files.

  • jobOutput (dict) –

    [REQUIRED]

    The Amazon S3 path for the bucket where the job’s output will be stored.

    • s3DataDestination (dict) – [REQUIRED]

      The configuration details of an Amazon S3 input or output bucket.

      • path (string) – [REQUIRED]

        The file path of the Amazon S3 bucket.

      • kmsKeyArn (string) –

        The Amazon Resource Name (ARN) of the Key Management Service (KMS) key that Amazon Personalize uses to encrypt or decrypt the input and output files.

  • roleArn (string) –

    [REQUIRED]

    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.

  • tags (list) –

    A list of tags to apply to the batch segment job.

    • (dict) –

      The optional metadata that you apply to resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information see Tagging Amazon Personalize recources.

      • tagKey (string) – [REQUIRED]

        One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

      • tagValue (string) – [REQUIRED]

        The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key).

Return type:

dict

Returns:

Response Syntax

{
    'batchSegmentJobArn': 'string'
}

Response Structure

  • (dict) –

    • batchSegmentJobArn (string) –

      The ARN of the batch segment job.

Exceptions

  • Personalize.Client.exceptions.InvalidInputException

  • Personalize.Client.exceptions.ResourceAlreadyExistsException

  • Personalize.Client.exceptions.LimitExceededException

  • Personalize.Client.exceptions.ResourceNotFoundException

  • Personalize.Client.exceptions.ResourceInUseException

  • Personalize.Client.exceptions.TooManyTagsException