Skip to content

PersonalizeClient#

Index > Personalize > PersonalizeClient

Auto-generated documentation for Personalize type annotations stubs module mypy-boto3-personalize.

PersonalizeClient#

Type annotations and code completion for boto3.client("personalize"). boto3 documentation

# PersonalizeClient usage example

from boto3.session import Session
from mypy_boto3_personalize.client import PersonalizeClient

def get_personalize_client() -> PersonalizeClient:
    return Session().client("personalize")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("personalize").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("personalize")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InvalidInputException,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.LimitExceededException,
    client.exceptions.ResourceAlreadyExistsException,
    client.exceptions.ResourceInUseException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.TooManyTagKeysException,
    client.exceptions.TooManyTagsException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_personalize.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("personalize").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("personalize").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_batch_inference_job#

Generates batch recommendations based on a list of items or users stored in Amazon S3 and exports the recommendations to an Amazon S3 bucket.

Type annotations and code completion for boto3.client("personalize").create_batch_inference_job method. boto3 documentation

# create_batch_inference_job method definition

def create_batch_inference_job(
    self,
    *,
    jobName: str,
    solutionVersionArn: str,
    jobInput: BatchInferenceJobInputTypeDef,  # (1)
    jobOutput: BatchInferenceJobOutputTypeDef,  # (2)
    roleArn: str,
    filterArn: str = ...,
    numResults: int = ...,
    batchInferenceJobConfig: BatchInferenceJobConfigTypeDef = ...,  # (3)
    tags: Sequence[TagTypeDef] = ...,  # (4)
    batchInferenceJobMode: BatchInferenceJobModeType = ...,  # (5)
    themeGenerationConfig: ThemeGenerationConfigTypeDef = ...,  # (6)
) -> CreateBatchInferenceJobResponseTypeDef:  # (7)
    ...
  1. See BatchInferenceJobInputTypeDef
  2. See BatchInferenceJobOutputTypeDef
  3. See BatchInferenceJobConfigTypeDef
  4. See TagTypeDef
  5. See BatchInferenceJobModeType
  6. See ThemeGenerationConfigTypeDef
  7. See CreateBatchInferenceJobResponseTypeDef
# create_batch_inference_job method usage example with argument unpacking

kwargs: CreateBatchInferenceJobRequestRequestTypeDef = {  # (1)
    "jobName": ...,
    "solutionVersionArn": ...,
    "jobInput": ...,
    "jobOutput": ...,
    "roleArn": ...,
}

parent.create_batch_inference_job(**kwargs)
  1. See CreateBatchInferenceJobRequestRequestTypeDef

create_batch_segment_job#

Creates a batch segment job.

Type annotations and code completion for boto3.client("personalize").create_batch_segment_job method. boto3 documentation

# create_batch_segment_job method definition

def create_batch_segment_job(
    self,
    *,
    jobName: str,
    solutionVersionArn: str,
    jobInput: BatchSegmentJobInputTypeDef,  # (1)
    jobOutput: BatchSegmentJobOutputTypeDef,  # (2)
    roleArn: str,
    filterArn: str = ...,
    numResults: int = ...,
    tags: Sequence[TagTypeDef] = ...,  # (3)
) -> CreateBatchSegmentJobResponseTypeDef:  # (4)
    ...
  1. See BatchSegmentJobInputTypeDef
  2. See BatchSegmentJobOutputTypeDef
  3. See TagTypeDef
  4. See CreateBatchSegmentJobResponseTypeDef
# create_batch_segment_job method usage example with argument unpacking

kwargs: CreateBatchSegmentJobRequestRequestTypeDef = {  # (1)
    "jobName": ...,
    "solutionVersionArn": ...,
    "jobInput": ...,
    "jobOutput": ...,
    "roleArn": ...,
}

parent.create_batch_segment_job(**kwargs)
  1. See CreateBatchSegmentJobRequestRequestTypeDef

create_campaign#

Creates a campaign that deploys a solution version.

Type annotations and code completion for boto3.client("personalize").create_campaign method. boto3 documentation

# create_campaign method definition

def create_campaign(
    self,
    *,
    name: str,
    solutionVersionArn: str,
    minProvisionedTPS: int = ...,
    campaignConfig: CampaignConfigTypeDef = ...,  # (1)
    tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateCampaignResponseTypeDef:  # (3)
    ...
  1. See CampaignConfigTypeDef
  2. See TagTypeDef
  3. See CreateCampaignResponseTypeDef
# create_campaign method usage example with argument unpacking

kwargs: CreateCampaignRequestRequestTypeDef = {  # (1)
    "name": ...,
    "solutionVersionArn": ...,
}

parent.create_campaign(**kwargs)
  1. See CreateCampaignRequestRequestTypeDef

create_dataset#

Creates an empty dataset and adds it to the specified dataset group.

Type annotations and code completion for boto3.client("personalize").create_dataset method. boto3 documentation

# create_dataset method definition

def create_dataset(
    self,
    *,
    name: str,
    schemaArn: str,
    datasetGroupArn: str,
    datasetType: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateDatasetResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateDatasetResponseTypeDef
# create_dataset method usage example with argument unpacking

kwargs: CreateDatasetRequestRequestTypeDef = {  # (1)
    "name": ...,
    "schemaArn": ...,
    "datasetGroupArn": ...,
    "datasetType": ...,
}

parent.create_dataset(**kwargs)
  1. See CreateDatasetRequestRequestTypeDef

create_dataset_export_job#

Creates a job that exports data from your dataset to an Amazon S3 bucket.

Type annotations and code completion for boto3.client("personalize").create_dataset_export_job method. boto3 documentation

# create_dataset_export_job method definition

def create_dataset_export_job(
    self,
    *,
    jobName: str,
    datasetArn: str,
    roleArn: str,
    jobOutput: DatasetExportJobOutputTypeDef,  # (1)
    ingestionMode: IngestionModeType = ...,  # (2)
    tags: Sequence[TagTypeDef] = ...,  # (3)
) -> CreateDatasetExportJobResponseTypeDef:  # (4)
    ...
  1. See DatasetExportJobOutputTypeDef
  2. See IngestionModeType
  3. See TagTypeDef
  4. See CreateDatasetExportJobResponseTypeDef
# create_dataset_export_job method usage example with argument unpacking

kwargs: CreateDatasetExportJobRequestRequestTypeDef = {  # (1)
    "jobName": ...,
    "datasetArn": ...,
    "roleArn": ...,
    "jobOutput": ...,
}

parent.create_dataset_export_job(**kwargs)
  1. See CreateDatasetExportJobRequestRequestTypeDef

create_dataset_group#

Creates an empty dataset group.

Type annotations and code completion for boto3.client("personalize").create_dataset_group method. boto3 documentation

# create_dataset_group method definition

def create_dataset_group(
    self,
    *,
    name: str,
    roleArn: str = ...,
    kmsKeyArn: str = ...,
    domain: DomainType = ...,  # (1)
    tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateDatasetGroupResponseTypeDef:  # (3)
    ...
  1. See DomainType
  2. See TagTypeDef
  3. See CreateDatasetGroupResponseTypeDef
# create_dataset_group method usage example with argument unpacking

kwargs: CreateDatasetGroupRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_dataset_group(**kwargs)
  1. See CreateDatasetGroupRequestRequestTypeDef

create_dataset_import_job#

Creates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset.

Type annotations and code completion for boto3.client("personalize").create_dataset_import_job method. boto3 documentation

# create_dataset_import_job method definition

def create_dataset_import_job(
    self,
    *,
    jobName: str,
    datasetArn: str,
    dataSource: DataSourceTypeDef,  # (1)
    roleArn: str,
    tags: Sequence[TagTypeDef] = ...,  # (2)
    importMode: ImportModeType = ...,  # (3)
    publishAttributionMetricsToS3: bool = ...,
) -> CreateDatasetImportJobResponseTypeDef:  # (4)
    ...
  1. See