You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Personalize::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon Personalize. To construct a client, you need to configure a :region and :credentials.

personalize = Aws::Personalize::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::Personalize::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::Personalize::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Aws::Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Aws::Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Aws::Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Aws::Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Aws::Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Aws::Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Aws::Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Aws::Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Aws::Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Aws::Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Aws::Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Aws::Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Aws::Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Aws::Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Aws::Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Aws::Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Aws::Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Aws::Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Aws::Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Aws::Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Aws::Plugins::ParamValidator for more details.

Instance Method Details

#create_batch_inference_job(options = {}) ⇒ Types::CreateBatchInferenceJobResponse

Creates a batch inference job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see recommendations-batch.

Examples:

Request syntax with placeholder values


resp = client.create_batch_inference_job({
  job_name: "Name", # required
  solution_version_arn: "Arn", # required
  filter_arn: "Arn",
  num_results: 1,
  job_input: { # required
    s3_data_source: { # required
      path: "S3Location", # required
      kms_key_arn: "KmsKeyArn",
    },
  },
  job_output: { # required
    s3_data_destination: { # required
      path: "S3Location", # required
      kms_key_arn: "KmsKeyArn",
    },
  },
  role_arn: "RoleArn", # required
  batch_inference_job_config: {
    item_exploration_config: {
      "ParameterName" => "ParameterValue",
    },
  },
})

Response structure


resp.batch_inference_job_arn #=> String

Options Hash (options):

  • :job_name (required, String)

    The name of the batch inference job to create.

  • :solution_version_arn (required, String)

    The Amazon Resource Name (ARN) of the solution version that will be used to generate the batch inference recommendations.

  • :filter_arn (String)

    The ARN of the filter to apply to the batch inference job. For more information on using filters, see Using Filters with Amazon Personalize.

  • :num_results (Integer)

    The number of recommendations to retreive.

  • :job_input (required, Types::BatchInferenceJobInput)

    The Amazon S3 path that leads to the input file to base your recommendations on. The input material must be in JSON format.

  • :job_output (required, Types::BatchInferenceJobOutput)

    The path to the Amazon S3 bucket where the job\'s output will be stored.

  • :role_arn (required, String)

    The ARN of the Amazon Identity and Access Management role that has permissions to read and write to your input and out Amazon S3 buckets respectively.

  • :batch_inference_job_config (Types::BatchInferenceJobConfig)

    The configuration details of a batch inference job.

Returns:

See Also:

#create_campaign(options = {}) ⇒ Types::CreateCampaignResponse

Creates a campaign by deploying a solution version. When a client calls the GetRecommendations and GetPersonalizedRanking APIs, a campaign is specified in the request.

Minimum Provisioned TPS and Auto-Scaling

A transaction is a single GetRecommendations or GetPersonalizedRanking call. Transactions per second (TPS) is the throughput and unit of billing for Amazon Personalize. The minimum provisioned TPS (minProvisionedTPS) specifies the baseline throughput provisioned by Amazon Personalize, and thus, the minimum billing charge. If your TPS increases beyond minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS, to maintain a 70% utilization. There's a short time delay while the capacity is increased that might cause loss of transactions. It's recommended to start with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary.

Status

A campaign can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING > DELETE IN_PROGRESS

To get the campaign status, call DescribeCampaign.

Wait until the status of the campaign is ACTIVE before asking the campaign for recommendations.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_campaign({
  name: "Name", # required
  solution_version_arn: "Arn", # required
  min_provisioned_tps: 1, # required
  campaign_config: {
    item_exploration_config: {
      "ParameterName" => "ParameterValue",
    },
  },
})

Response structure


resp.campaign_arn #=> String

Options Hash (options):

  • :name (required, String)

    A name for the new campaign. The campaign name must be unique within your account.

  • :solution_version_arn (required, String)

    The Amazon Resource Name (ARN) of the solution version to deploy.

  • :min_provisioned_tps (required, Integer)

    Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support.

  • :campaign_config (Types::CampaignConfig)

    The configuration details of a campaign.

Returns:

See Also:

#create_dataset(options = {}) ⇒ Types::CreateDatasetResponse

Creates an empty dataset and adds it to the specified dataset group. Use CreateDatasetImportJob to import your training data to a dataset.

There are three types of datasets:

  • Interactions

  • Items

  • Users

Each dataset type has an associated schema with required field types. Only the Interactions dataset is required in order to train a model (also referred to as creating a solution).

A dataset can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING > DELETE IN_PROGRESS

To get the status of the dataset, call DescribeDataset.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_dataset({
  name: "Name", # required
  schema_arn: "Arn", # required
  dataset_group_arn: "Arn", # required
  dataset_type: "DatasetType", # required
})

Response structure


resp.dataset_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name for the dataset.

  • :schema_arn (required, String)

    The ARN of the schema to associate with the dataset. The schema defines the dataset fields.

  • :dataset_group_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset group to add the dataset to.

  • :dataset_type (required, String)

    The type of dataset.

    One of the following (case insensitive) values:

    • Interactions

    • Items

    • Users

Returns:

See Also:

#create_dataset_group(options = {}) ⇒ Types::CreateDatasetGroupResponse

Creates an empty dataset group. A dataset group contains related datasets that supply data for training a model. A dataset group can contain at most three datasets, one for each type of dataset:

  • Interactions

  • Items

  • Users

To train a model (create a solution), a dataset group that contains an Interactions dataset is required. Call CreateDataset to add a dataset to the group.

A dataset group can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING

To get the status of the dataset group, call DescribeDatasetGroup. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the creation failed.

You must wait until the status of the dataset group is ACTIVE before adding a dataset to the group.

You can specify an AWS Key Management Service (KMS) key to encrypt the datasets in the group. If you specify a KMS key, you must also include an AWS Identity and Access Management (IAM) role that has permission to access the key.

APIs that require a dataset group ARN in the request

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_dataset_group({
  name: "Name", # required
  role_arn: "RoleArn",
  kms_key_arn: "KmsKeyArn",
})

Response structure


resp.dataset_group_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name for the new dataset group.

  • :role_arn (String)

    The ARN of the IAM role that has permissions to access the KMS key. Supplying an IAM role is only valid when also specifying a KMS key.

  • :kms_key_arn (String)

    The Amazon Resource Name (ARN) of a KMS key used to encrypt the datasets.

Returns:

See Also:

#create_dataset_import_job(options = {}) ⇒ Types::CreateDatasetImportJobResponse

Creates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to import the training data, you must specify an AWS Identity and Access Management (IAM) role that has permission to read from the data source, as Amazon Personalize makes a copy of your data and processes it in an internal AWS system.

The dataset import job replaces any previous data in the dataset.

Status

A dataset import job can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

To get the status of the import job, call DescribeDatasetImportJob, providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Importing takes time. You must wait until the status shows as ACTIVE before training a model using the dataset.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_dataset_import_job({
  job_name: "Name", # required
  dataset_arn: "Arn", # required
  data_source: { # required
    data_location: "S3Location",
  },
  role_arn: "RoleArn", # required
})

Response structure


resp.dataset_import_job_arn #=> String

Options Hash (options):

  • :job_name (required, String)

    The name for the dataset import job.

  • :dataset_arn (required, String)

    The ARN of the dataset that receives the imported data.

  • :data_source (required, Types::DataSource)

    The Amazon S3 bucket that contains the training data to import.

  • :role_arn (required, String)

    The ARN of the IAM role that has permissions to read from the Amazon S3 data source.

Returns:

See Also:

#create_event_tracker(options = {}) ⇒ Types::CreateEventTrackerResponse

Creates an event tracker that you use when sending event data to the specified dataset group using the PutEvents API.

When Amazon Personalize creates an event tracker, it also creates an event-interactions dataset in the dataset group associated with the event tracker. The event-interactions dataset stores the event data from the PutEvents call. The contents of this dataset are not available to the user.

Only one event tracker can be associated with a dataset group. You will get an error if you call CreateEventTracker using the same dataset group as an existing event tracker.

When you send event data you include your tracking ID. The tracking ID identifies the customer and authorizes the customer to send the data.

The event tracker can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING > DELETE IN_PROGRESS

To get the status of the event tracker, call DescribeEventTracker.

The event tracker must be in the ACTIVE state before using the tracking ID.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_event_tracker({
  name: "Name", # required
  dataset_group_arn: "Arn", # required
})

Response structure


resp.event_tracker_arn #=> String
resp.tracking_id #=> String

Options Hash (options):

  • :name (required, String)

    The name for the event tracker.

  • :dataset_group_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset group that receives the event data.

Returns:

See Also:

#create_filter(options = {}) ⇒ Types::CreateFilterResponse

Creates a recommendation filter. For more information, see Using Filters with Amazon Personalize.

Examples:

Request syntax with placeholder values


resp = client.create_filter({
  name: "Name", # required
  dataset_group_arn: "Arn", # required
  filter_expression: "FilterExpression", # required
})

Response structure


resp.filter_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the filter to create.

  • :dataset_group_arn (required, String)

    The ARN of the dataset group that the filter will belong to.

  • :filter_expression (required, String)

    The filter expression that designates the interaction types that the filter will filter out. A filter expression must follow the following format:

    EXCLUDE itemId WHERE INTERACTIONS.event_type in ("EVENT_TYPE")

    Where \"EVENT_TYPE\" is the type of event to filter out. To filter out all items with any interactions history, set "*" as the EVENT_TYPE. For more information, see Using Filters with Amazon Personalize.

Returns:

See Also:

#create_schema(options = {}) ⇒ Types::CreateSchemaResponse

Creates an Amazon Personalize schema from the specified schema string. The schema you create must be in Avro JSON format.

Amazon Personalize recognizes three schema variants. Each schema is associated with a dataset type and has a set of required field and keywords. You specify a schema when you call CreateDataset.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_schema({
  name: "Name", # required
  schema: "AvroSchema", # required
})

Response structure


resp.schema_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name for the schema.

  • :schema (required, String)

    A schema in Avro JSON format.

Returns:

See Also:

#create_solution(options = {}) ⇒ Types::CreateSolutionResponse

Creates the configuration for training a model. A trained model is known as a solution. After the configuration is created, you train the model (create a solution) by calling the CreateSolutionVersion operation. Every time you call CreateSolutionVersion, a new version of the solution is created.

After creating a solution version, you check its accuracy by calling GetSolutionMetrics. When you are satisfied with the version, you deploy it using CreateCampaign. The campaign provides recommendations to a client through the GetRecommendations API.

To train a model, Amazon Personalize requires training data and a recipe. The training data comes from the dataset group that you provide in the request. A recipe specifies the training algorithm and a feature transformation. You can specify one of the predefined recipes provided by Amazon Personalize. Alternatively, you can specify performAutoML and Amazon Personalize will analyze your data and select the optimum USER_PERSONALIZATION recipe for you.

Status

A solution can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING > DELETE IN_PROGRESS

To get the status of the solution, call DescribeSolution. Wait until the status shows as ACTIVE before calling CreateSolutionVersion.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_solution({
  name: "Name", # required
  perform_hpo: false,
  perform_auto_ml: false,
  recipe_arn: "Arn",
  dataset_group_arn: "Arn", # required
  event_type: "EventType",
  solution_config: {
    event_value_threshold: "EventValueThreshold",
    hpo_config: {
      hpo_objective: {
        type: "HPOObjectiveType",
        metric_name: "MetricName",
        metric_regex: "MetricRegex",
      },
      hpo_resource_config: {
        max_number_of_training_jobs: "HPOResource",
        max_parallel_training_jobs: "HPOResource",
      },
      algorithm_hyper_parameter_ranges: {
        integer_hyper_parameter_ranges: [
          {
            name: "ParameterName",
            min_value: 1,
            max_value: 1,
          },
        ],
        continuous_hyper_parameter_ranges: [
          {
            name: "ParameterName",
            min_value: 1.0,
            max_value: 1.0,
          },
        ],
        categorical_hyper_parameter_ranges: [
          {
            name: "ParameterName",
            values: ["CategoricalValue"],
          },
        ],
      },
    },
    algorithm_hyper_parameters: {
      "ParameterName" => "ParameterValue",
    },
    feature_transformation_parameters: {
      "ParameterName" => "ParameterValue",
    },
    auto_ml_config: {
      metric_name: "MetricName",
      recipe_list: ["Arn"],
    },
  },
})

Response structure


resp.solution_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name for the solution.

  • :perform_hpo (Boolean)

    Whether to perform hyperparameter optimization (HPO) on the specified or selected recipe. The default is false.

    When performing AutoML, this parameter is always true and you should not set it to false.

  • :perform_auto_ml (Boolean)

    Whether to perform automated machine learning (AutoML). The default is false. For this case, you must specify recipeArn.

    When set to true, Amazon Personalize analyzes your training data and selects the optimal USER_PERSONALIZATION recipe and hyperparameters. In this case, you must omit recipeArn. Amazon Personalize determines the optimal recipe by running tests with different values for the hyperparameters. AutoML lengthens the training process as compared to selecting a specific recipe.

  • :recipe_arn (String)

    The ARN of the recipe to use for model training. Only specified when performAutoML is false.

  • :dataset_group_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset group that provides the training data.

  • :event_type (String)

    When your have multiple event types (using an EVENT_TYPE schema field), this parameter specifies which event type (for example, \'click\' or \'like\') is used for training the model.

  • :solution_config (Types::SolutionConfig)

    The configuration to use with the solution. When performAutoML is set to true, Amazon Personalize only evaluates the autoMLConfig section of the solution configuration.

Returns:

See Also:

#create_solution_version(options = {}) ⇒ Types::CreateSolutionVersionResponse

Trains or retrains an active solution. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion. A new version of the solution is created every time you call this operation.

Status

A solution version can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

To get the status of the version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling CreateCampaign.

If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Related APIs

Examples:

Request syntax with placeholder values


resp = client.create_solution_version({
  solution_arn: "Arn", # required
  training_mode: "FULL", # accepts FULL, UPDATE
})

Response structure


resp.solution_version_arn #=> String

Options Hash (options):

  • :solution_arn (required, String)

    The Amazon Resource Name (ARN) of the solution containing the training configuration information.

  • :training_mode (String)

    The scope of training to be performed when creating the solution version. The FULL option trains the solution version based on the entirety of the input solution\'s training data, while the UPDATE option processes only the data that has changed in comparison to the input solution. Choose UPDATE when you want to incrementally update your solution version instead of creating an entirely new one.

    The UPDATE option can only be used when you already have an active solution version created from the input solution using the FULL option and the input solution was trained with the native-recipe-hrnn-coldstart recipe.

Returns:

See Also:

#delete_campaign(options = {}) ⇒ Struct

Removes a campaign by deleting the solution deployment. The solution that the campaign is based on is not deleted and can be redeployed when needed. A deleted campaign can no longer be specified in a GetRecommendations request. For more information on campaigns, see CreateCampaign.

Examples:

Request syntax with placeholder values


resp = client.delete_campaign({
  campaign_arn: "Arn", # required
})

Options Hash (options):

  • :campaign_arn (required, String)

    The Amazon Resource Name (ARN) of the campaign to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_dataset(options = {}) ⇒ Struct

Deletes a dataset. You can't delete a dataset if an associated DatasetImportJob or SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information on datasets, see CreateDataset.

Examples:

Request syntax with placeholder values


resp = client.delete_dataset({
  dataset_arn: "Arn", # required
})

Options Hash (options):

  • :dataset_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_dataset_group(options = {}) ⇒ Struct

Deletes a dataset group. Before you delete a dataset group, you must delete the following:

  • All associated event trackers.

  • All associated solutions.

  • All datasets in the dataset group.

Examples:

Request syntax with placeholder values


resp = client.delete_dataset_group({
  dataset_group_arn: "Arn", # required
})

Options Hash (options):

  • :dataset_group_arn (required, String)

    The ARN of the dataset group to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_event_tracker(options = {}) ⇒ Struct

Deletes the event tracker. Does not delete the event-interactions dataset from the associated dataset group. For more information on event trackers, see CreateEventTracker.

Examples:

Request syntax with placeholder values


resp = client.delete_event_tracker({
  event_tracker_arn: "Arn", # required
})

Options Hash (options):

  • :event_tracker_arn (required, String)

    The Amazon Resource Name (ARN) of the event tracker to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_filter(options = {}) ⇒ Struct

Deletes a filter.

Examples:

Request syntax with placeholder values


resp = client.delete_filter({
  filter_arn: "Arn", # required
})

Options Hash (options):

  • :filter_arn (required, String)

    The ARN of the filter to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_schema(options = {}) ⇒ Struct

Deletes a schema. Before deleting a schema, you must delete all datasets referencing the schema. For more information on schemas, see CreateSchema.

Examples:

Request syntax with placeholder values


resp = client.delete_schema({
  schema_arn: "Arn", # required
})

Options Hash (options):

  • :schema_arn (required, String)

    The Amazon Resource Name (ARN) of the schema to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_solution(options = {}) ⇒ Struct

Deletes all versions of a solution and the Solution object itself. Before deleting a solution, you must delete all campaigns based on the solution. To determine what campaigns are using the solution, call ListCampaigns and supply the Amazon Resource Name (ARN) of the solution. You can't delete a solution if an associated SolutionVersion is in the CREATE PENDING or IN PROGRESS state. For more information on solutions, see CreateSolution.

Examples:

Request syntax with placeholder values


resp = client.delete_solution({
  solution_arn: "Arn", # required
})

Options Hash (options):

  • :solution_arn (required, String)

    The ARN of the solution to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#describe_algorithm(options = {}) ⇒ Types::DescribeAlgorithmResponse

Describes the given algorithm.

Examples:

Request syntax with placeholder values


resp = client.describe_algorithm({
  algorithm_arn: "Arn", # required
})

Response structure


resp.algorithm.name #=> String
resp.algorithm.algorithm_arn #=> String
resp.algorithm.algorithm_image.name #=> String
resp.algorithm.algorithm_image.docker_uri #=> String
resp.algorithm.default_hyper_parameters #=> Hash
resp.algorithm.default_hyper_parameters["ParameterName"] #=> String
resp.algorithm.default_hyper_parameter_ranges.integer_hyper_parameter_ranges #=> Array
resp.algorithm.default_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].name #=> String
resp.algorithm.default_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].min_value #=> Integer
resp.algorithm.default_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].max_value #=> Integer
resp.algorithm.default_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].is_tunable #=> true/false
resp.algorithm.default_hyper_parameter_ranges.continuous_hyper_parameter_ranges #=> Array
resp.algorithm.default_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].name #=> String
resp.algorithm.default_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].min_value #=> Float
resp.algorithm.default_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].max_value #=> Float
resp.algorithm.default_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].is_tunable #=> true/false
resp.algorithm.default_hyper_parameter_ranges.categorical_hyper_parameter_ranges #=> Array
resp.algorithm.default_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].name #=> String
resp.algorithm.default_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].values #=> Array
resp.algorithm.default_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].values[0] #=> String
resp.algorithm.default_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].is_tunable #=> true/false
resp.algorithm.default_resource_config #=> Hash
resp.algorithm.default_resource_config["ParameterName"] #=> String
resp.algorithm.training_input_mode #=> String
resp.algorithm.role_arn #=> String
resp.algorithm.creation_date_time #=> Time
resp.algorithm.last_updated_date_time #=> Time

Options Hash (options):

  • :algorithm_arn (required, String)

    The Amazon Resource Name (ARN) of the algorithm to describe.

Returns:

See Also:

#describe_batch_inference_job(options = {}) ⇒ Types::DescribeBatchInferenceJobResponse

Gets the properties of a batch inference job including name, Amazon Resource Name (ARN), status, input and output configurations, and the ARN of the solution version used to generate the recommendations.

Examples:

Request syntax with placeholder values


resp = client.describe_batch_inference_job({
  batch_inference_job_arn: "Arn", # required
})

Response structure


resp.batch_inference_job.job_name #=> String
resp.batch_inference_job.batch_inference_job_arn #=> String
resp.batch_inference_job.filter_arn #=> String
resp.batch_inference_job.failure_reason #=> String
resp.batch_inference_job.solution_version_arn #=> String
resp.batch_inference_job.num_results #=> Integer
resp.batch_inference_job.job_input.s3_data_source.path #=> String
resp.batch_inference_job.job_input.s3_data_source.kms_key_arn #=> String
resp.batch_inference_job.job_output.s3_data_destination.path #=> String
resp.batch_inference_job.job_output.s3_data_destination.kms_key_arn #=> String
resp.batch_inference_job.batch_inference_job_config.item_exploration_config #=> Hash
resp.batch_inference_job.batch_inference_job_config.item_exploration_config["ParameterName"] #=> String
resp.batch_inference_job.role_arn #=> String
resp.batch_inference_job.status #=> String
resp.batch_inference_job.creation_date_time #=> Time
resp.batch_inference_job.last_updated_date_time #=> Time

Options Hash (options):

  • :batch_inference_job_arn (required, String)

    The ARN of the batch inference job to describe.

Returns:

See Also:

#describe_campaign(options = {}) ⇒ Types::DescribeCampaignResponse

Describes the given campaign, including its status.

A campaign can be in one of the following states:

  • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

  • DELETE PENDING > DELETE IN_PROGRESS

When the status is CREATE FAILED, the response includes the failureReason key, which describes why.

For more information on campaigns, see CreateCampaign.

Examples:

Request syntax with placeholder values


resp = client.describe_campaign({
  campaign_arn: "Arn", # required
})

Response structure


resp.campaign.name #=> String
resp.campaign.campaign_arn #=> String
resp.campaign.solution_version_arn #=> String
resp.campaign.min_provisioned_tps #=> Integer
resp.campaign.campaign_config.item_exploration_config #=> Hash
resp.campaign.campaign_config.item_exploration_config["ParameterName"] #=> String
resp.campaign.status #=> String
resp.campaign.failure_reason #=> String
resp.campaign.creation_date_time #=> Time
resp.campaign.last_updated_date_time #=> Time
resp.campaign.latest_campaign_update.solution_version_arn #=> String
resp.campaign.latest_campaign_update.min_provisioned_tps #=> Integer
resp.campaign.latest_campaign_update.campaign_config.item_exploration_config #=> Hash
resp.campaign.latest_campaign_update.campaign_config.item_exploration_config["ParameterName"] #=> String
resp.campaign.latest_campaign_update.status #=> String
resp.campaign.latest_campaign_update.failure_reason #=> String
resp.campaign.latest_campaign_update.creation_date_time #=> Time
resp.campaign.latest_campaign_update.last_updated_date_time #=> Time

Options Hash (options):

  • :campaign_arn (required, String)

    The Amazon Resource Name (ARN) of the campaign.

Returns:

See Also:

#describe_dataset(options = {}) ⇒ Types::DescribeDatasetResponse

Describes the given dataset. For more information on datasets, see CreateDataset.

Examples:

Request syntax with placeholder values


resp = client.describe_dataset({
  dataset_arn: "Arn", # required
})

Response structure


resp.dataset.name #=> String
resp.dataset.dataset_arn #=> String
resp.dataset.dataset_group_arn #=> String
resp.dataset.dataset_type #=> String
resp.dataset.schema_arn #=> String
resp.dataset.status #=> String
resp.dataset.creation_date_time #=> Time
resp.dataset.last_updated_date_time #=> Time

Options Hash (options):

  • :dataset_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset to describe.

Returns:

See Also:

#describe_dataset_group(options = {}) ⇒ Types::DescribeDatasetGroupResponse

Describes the given dataset group. For more information on dataset groups, see CreateDatasetGroup.

Examples:

Request syntax with placeholder values


resp = client.describe_dataset_group({
  dataset_group_arn: "Arn", # required
})

Response structure


resp.dataset_group.name #=> String
resp.dataset_group.dataset_group_arn #=> String
resp.dataset_group.status #=> String
resp.dataset_group.role_arn #=> String
resp.dataset_group.kms_key_arn #=> String
resp.dataset_group.creation_date_time #=> Time
resp.dataset_group.last_updated_date_time #=> Time
resp.dataset_group.failure_reason #=> String

Options Hash (options):

  • :dataset_group_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset group to describe.

Returns:

See Also:

#describe_dataset_import_job(options = {}) ⇒ Types::DescribeDatasetImportJobResponse

Describes the dataset import job created by CreateDatasetImportJob, including the import job status.

Examples:

Request syntax with placeholder values


resp = client.describe_dataset_import_job({
  dataset_import_job_arn: "Arn", # required
})

Response structure


resp.dataset_import_job.job_name #=> String
resp.dataset_import_job.dataset_import_job_arn #=> String
resp.dataset_import_job.dataset_arn #=> String
resp.dataset_import_job.data_source.data_location #=> String
resp.dataset_import_job.role_arn #=> String
resp.dataset_import_job.status #=> String
resp.dataset_import_job.creation_date_time #=> Time
resp.dataset_import_job.last_updated_date_time #=> Time
resp.dataset_import_job.failure_reason #=> String

Options Hash (options):

  • :dataset_import_job_arn (required, String)

    The Amazon Resource Name (ARN) of the dataset import job to describe.

Returns:

See Also:

#describe_event_tracker(options = {}) ⇒ Types::DescribeEventTrackerResponse

Describes an event tracker. The response includes the trackingId and status of the event tracker. For more information on event trackers, see CreateEventTracker.

Examples:

Request syntax with placeholder values


resp = client.describe_event_tracker({
  event_tracker_arn: "Arn", # required
})

Response structure


resp.event_tracker.name #=> String
resp.event_tracker.event_tracker_arn #=> String
resp.event_tracker. #=> String
resp.event_tracker.tracking_id #=> String
resp.event_tracker.dataset_group_arn #=> String
resp.event_tracker.status #=> String
resp.event_tracker.creation_date_time #=> Time
resp.event_tracker.last_updated_date_time #=> Time

Options Hash (options):

  • :event_tracker_arn (required, String)

    The Amazon Resource Name (ARN) of the event tracker to describe.

Returns:

See Also:

#describe_feature_transformation(options = {}) ⇒ Types::DescribeFeatureTransformationResponse

Describes the given feature transformation.

Examples:

Request syntax with placeholder values


resp = client.describe_feature_transformation({
  feature_transformation_arn: "Arn", # required
})

Response structure


resp.feature_transformation.name #=> String
resp.feature_transformation.feature_transformation_arn #=> String
resp.feature_transformation.default_parameters #=> Hash
resp.feature_transformation.default_parameters["ParameterName"] #=> String
resp.feature_transformation.creation_date_time #=> Time
resp.feature_transformation.last_updated_date_time #=> Time
resp.feature_transformation.status #=> String

Options Hash (options):

  • :feature_transformation_arn (required, String)

    The Amazon Resource Name (ARN) of the feature transformation to describe.

Returns:

See Also:

#describe_filter(options = {}) ⇒ Types::DescribeFilterResponse

Describes a filter's properties.

Examples:

Request syntax with placeholder values


resp = client.describe_filter({
  filter_arn: "Arn", # required
})

Response structure


resp.filter.name #=> String
resp.filter.filter_arn #=> String
resp.filter.creation_date_time #=> Time
resp.filter.last_updated_date_time #=> Time
resp.filter.dataset_group_arn #=> String
resp.filter.failure_reason #=> String
resp.filter.filter_expression #=> String
resp.filter.status #=> String

Options Hash (options):

  • :filter_arn (required, String)

    The ARN of the filter to describe.

Returns:

See Also:

#describe_recipe(options = {}) ⇒ Types::DescribeRecipeResponse

Describes a recipe.

A recipe contains three items:

  • An algorithm that trains a model.

  • Hyperparameters that govern the training.

  • Feature transformation information for modifying the input data before training.

Amazon Personalize provides a set of predefined recipes. You specify a recipe when you create a solution with the CreateSolution API. CreateSolution trains a model by using the algorithm in the specified recipe and a training dataset. The solution, when deployed as a campaign, can provide recommendations using the GetRecommendations API.

Examples:

Request syntax with placeholder values


resp = client.describe_recipe({
  recipe_arn: "Arn", # required
})

Response structure


resp.recipe.name #=> String
resp.recipe.recipe_arn #=> String
resp.recipe.algorithm_arn #=> String
resp.recipe.feature_transformation_arn #=> String
resp.recipe.status #=> String
resp.recipe.description #=> String
resp.recipe.creation_date_time #=> Time
resp.recipe.recipe_type #=> String
resp.recipe.last_updated_date_time #=> Time

Options Hash (options):

  • :recipe_arn (required, String)

    The Amazon Resource Name (ARN) of the recipe to describe.

Returns:

See Also:

#describe_schema(options = {}) ⇒ Types::DescribeSchemaResponse

Describes a schema. For more information on schemas, see CreateSchema.

Examples:

Request syntax with placeholder values


resp = client.describe_schema({
  schema_arn: "Arn", # required
})

Response structure


resp.schema.name #=> String
resp.schema.schema_arn #=> String
resp.schema.schema #=> String
resp.schema.creation_date_time #=> Time
resp.schema.last_updated_date_time #=> Time

Options Hash (options):

  • :schema_arn (required, String)

    The Amazon Resource Name (ARN) of the schema to retrieve.

Returns:

See Also:

#describe_solution(options = {}) ⇒ Types::DescribeSolutionResponse

Describes a solution. For more information on solutions, see CreateSolution.

Examples:

Request syntax with placeholder values


resp = client.describe_solution({
  solution_arn: "Arn", # required
})

Response structure


resp.solution.name #=> String
resp.solution.solution_arn #=> String
resp.solution.perform_hpo #=> true/false
resp.solution.perform_auto_ml #=> true/false
resp.solution.recipe_arn #=> String
resp.solution.dataset_group_arn #=> String
resp.solution.event_type #=> String
resp.solution.solution_config.event_value_threshold #=> String
resp.solution.solution_config.hpo_config.hpo_objective.type #=> String
resp.solution.solution_config.hpo_config.hpo_objective.metric_name #=> String
resp.solution.solution_config.hpo_config.hpo_objective.metric_regex #=> String
resp.solution.solution_config.hpo_config.hpo_resource_config.max_number_of_training_jobs #=> String
resp.solution.solution_config.hpo_config.hpo_resource_config.max_parallel_training_jobs #=> String
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges #=> Array
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].name #=> String
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].min_value #=> Integer
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].max_value #=> Integer
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges #=> Array
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].name #=> String
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].min_value #=> Float
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].max_value #=> Float
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges #=> Array
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].name #=> String
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].values #=> Array
resp.solution.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].values[0] #=> String
resp.solution.solution_config.algorithm_hyper_parameters #=> Hash
resp.solution.solution_config.algorithm_hyper_parameters["ParameterName"] #=> String
resp.solution.solution_config.feature_transformation_parameters #=> Hash
resp.solution.solution_config.feature_transformation_parameters["ParameterName"] #=> String
resp.solution.solution_config.auto_ml_config.metric_name #=> String
resp.solution.solution_config.auto_ml_config.recipe_list #=> Array
resp.solution.solution_config.auto_ml_config.recipe_list[0] #=> String
resp.solution.auto_ml_result.best_recipe_arn #=> String
resp.solution.status #=> String
resp.solution.creation_date_time #=> Time
resp.solution.last_updated_date_time #=> Time
resp.solution.latest_solution_version.solution_version_arn #=> String
resp.solution.latest_solution_version.status #=> String
resp.solution.latest_solution_version.creation_date_time #=> Time
resp.solution.latest_solution_version.last_updated_date_time #=> Time
resp.solution.latest_solution_version.failure_reason #=> String

Options Hash (options):

  • :solution_arn (required, String)

    The Amazon Resource Name (ARN) of the solution to describe.

Returns:

See Also:

#describe_solution_version(options = {}) ⇒ Types::DescribeSolutionVersionResponse

Describes a specific version of a solution. For more information on solutions, see CreateSolution.

Examples:

Request syntax with placeholder values


resp = client.describe_solution_version({
  solution_version_arn: "Arn", # required
})

Response structure


resp.solution_version.solution_version_arn #=> String
resp.solution_version.solution_arn #=> String
resp.solution_version.perform_hpo #=> true/false
resp.solution_version.perform_auto_ml #=> true/false
resp.solution_version.recipe_arn #=> String
resp.solution_version.event_type #=> String
resp.solution_version.dataset_group_arn #=> String
resp.solution_version.solution_config.event_value_threshold #=> String
resp.solution_version.solution_config.hpo_config.hpo_objective.type #=> String
resp.solution_version.solution_config.hpo_config.hpo_objective.metric_name #=> String
resp.solution_version.solution_config.hpo_config.hpo_objective.metric_regex #=> String
resp.solution_version.solution_config.hpo_config.hpo_resource_config.max_number_of_training_jobs #=> String
resp.solution_version.solution_config.hpo_config.hpo_resource_config.max_parallel_training_jobs #=> String
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges #=> Array
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].name #=> String
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].min_value #=> Integer
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.integer_hyper_parameter_ranges[0].max_value #=> Integer
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges #=> Array
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].name #=> String
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].min_value #=> Float
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.continuous_hyper_parameter_ranges[0].max_value #=> Float
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges #=> Array
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].name #=> String
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].values #=> Array
resp.solution_version.solution_config.hpo_config.algorithm_hyper_parameter_ranges.categorical_hyper_parameter_ranges[0].values[0] #=> String
resp.solution_version.solution_config.algorithm_hyper_parameters #=> Hash
resp.solution_version.solution_config.algorithm_hyper_parameters["ParameterName"] #=> String
resp.solution_version.solution_config.feature_transformation_parameters #=> Hash
resp.solution_version.solution_config.feature_transformation_parameters["ParameterName"] #=> String
resp.solution_version.solution_config.auto_ml_config.metric_name #=> String
resp.solution_version.solution_config.auto_ml_config.recipe_list #=> Array
resp.solution_version.solution_config.auto_ml_config.recipe_list[0] #=> String
resp.solution_version.training_hours #=> Float
resp.solution_version.training_mode #=> String, one of "FULL", "UPDATE"
resp.solution_version.tuned_hpo_params.algorithm_hyper_parameters #=> Hash
resp.solution_version.tuned_hpo_params.algorithm_hyper_parameters["ParameterName"] #=> String
resp.solution_version.status #=> String
resp.solution_version.failure_reason #=> String
resp.solution_version.creation_date_time #=> Time
resp.solution_version.last_updated_date_time #=> Time

Options Hash (options):

  • :solution_version_arn (required, String)

    The Amazon Resource Name (ARN) of the solution version.

Returns:

See Also:

#get_solution_metrics(options = {}) ⇒ Types::GetSolutionMetricsResponse

Gets the metrics for the specified solution version.

Examples:

Request syntax with placeholder values


resp = client.get_solution_metrics({
  solution_version_arn: "Arn", # required
})

Response structure


resp.solution_version_arn #=> String
resp.metrics #=> Hash
resp.metrics["MetricName"] #=> Float

Options Hash (options):

  • :solution_version_arn (required, String)

    The Amazon Resource Name (ARN) of the solution version for which to get metrics.

Returns:

See Also:

#list_batch_inference_jobs(options = {}) ⇒ Types::ListBatchInferenceJobsResponse

Gets a list of the batch inference jobs that have been performed off of a solution version.

Examples:

Request syntax with placeholder values


resp = client.list_batch_inference_jobs({
  solution_version_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.batch_inference_jobs #=> Array
resp.batch_inference_jobs[0].batch_inference_job_arn #=> String
resp.batch_inference_jobs[0].job_name #=> String
resp.batch_inference_jobs[0].status #=> String
resp.batch_inference_jobs[0].creation_date_time #=> Time
resp.batch_inference_jobs[0].last_updated_date_time #=> Time
resp.batch_inference_jobs[0].failure_reason #=> String
resp.batch_inference_jobs[0].solution_version_arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :solution_version_arn (String)

    The Amazon Resource Name (ARN) of the solution version from which the batch inference jobs were created.

  • :next_token (String)

    The token to request the next page of results.

  • :max_results (Integer)

    The maximum number of batch inference job results to return in each page. The default value is 100.

Returns:

See Also:

#list_campaigns(options = {}) ⇒ Types::ListCampaignsResponse

Returns a list of campaigns that use the given solution. When a solution is not specified, all the campaigns associated with the account are listed. The response provides the properties for each campaign, including the Amazon Resource Name (ARN). For more information on campaigns, see CreateCampaign.

Examples:

Request syntax with placeholder values


resp = client.list_campaigns({
  solution_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.campaigns #=> Array
resp.campaigns[0].name #=> String
resp.campaigns[0].campaign_arn #=> String
resp.campaigns[0].status #=> String
resp.campaigns[0].creation_date_time #=> Time
resp.campaigns[0].last_updated_date_time #=> Time
resp.campaigns[0].failure_reason #=> String
resp.next_token #=> String

Options Hash (options):

  • :solution_arn (String)

    The Amazon Resource Name (ARN) of the solution to list the campaigns for. When a solution is not specified, all the campaigns associated with the account are listed.

  • :next_token (String)

    A token returned from the previous call to ListCampaigns for getting the next set of campaigns (if they exist).

  • :max_results (Integer)

    The maximum number of campaigns to return.

Returns:

See Also:

#list_dataset_groups(options = {}) ⇒ Types::ListDatasetGroupsResponse

Returns a list of dataset groups. The response provides the properties for each dataset group, including the Amazon Resource Name (ARN). For more information on dataset groups, see CreateDatasetGroup.

Examples:

Request syntax with placeholder values


resp = client.list_dataset_groups({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.dataset_groups #=> Array
resp.dataset_groups[0].name #=> String
resp.dataset_groups[0].dataset_group_arn #=> String
resp.dataset_groups[0].status #=> String
resp.dataset_groups[0].creation_date_time #=> Time
resp.dataset_groups[0].last_updated_date_time #=> Time
resp.dataset_groups[0].failure_reason #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from the previous call to ListDatasetGroups for getting the next set of dataset groups (if they exist).

  • :max_results (Integer)

    The maximum number of dataset groups to return.

Returns:

See Also:

#list_dataset_import_jobs(options = {}) ⇒ Types::ListDatasetImportJobsResponse

Returns a list of dataset import jobs that use the given dataset. When a dataset is not specified, all the dataset import jobs associated with the account are listed. The response provides the properties for each dataset import job, including the Amazon Resource Name (ARN). For more information on dataset import jobs, see CreateDatasetImportJob. For more information on datasets, see CreateDataset.

Examples:

Request syntax with placeholder values


resp = client.list_dataset_import_jobs({
  dataset_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.dataset_import_jobs #=> Array
resp.dataset_import_jobs[0].dataset_import_job_arn #=> String
resp.dataset_import_jobs[0].job_name #=> String
resp.dataset_import_jobs[0].status #=> String
resp.dataset_import_jobs[0].creation_date_time #=> Time
resp.dataset_import_jobs[0].last_updated_date_time #=> Time
resp.dataset_import_jobs[0].failure_reason #=> String
resp.next_token #=> String

Options Hash (options):

  • :dataset_arn (String)

    The Amazon Resource Name (ARN) of the dataset to list the dataset import jobs for.

  • :next_token (String)

    A token returned from the previous call to ListDatasetImportJobs for getting the next set of dataset import jobs (if they exist).

  • :max_results (Integer)

    The maximum number of dataset import jobs to return.

Returns:

See Also:

#list_datasets(options = {}) ⇒ Types::ListDatasetsResponse

Returns the list of datasets contained in the given dataset group. The response provides the properties for each dataset, including the Amazon Resource Name (ARN). For more information on datasets, see CreateDataset.

Examples:

Request syntax with placeholder values


resp = client.list_datasets({
  dataset_group_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.datasets #=> Array
resp.datasets[0].name #=> String
resp.datasets[0].dataset_arn #=> String
resp.datasets[0].dataset_type #=> String
resp.datasets[0].status #=> String
resp.datasets[0].creation_date_time #=> Time
resp.datasets[0].last_updated_date_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :dataset_group_arn (String)

    The Amazon Resource Name (ARN) of the dataset group that contains the datasets to list.

  • :next_token (String)

    A token returned from the previous call to ListDatasetImportJobs for getting the next set of dataset import jobs (if they exist).

  • :max_results (Integer)

    The maximum number of datasets to return.

Returns:

See Also:

#list_event_trackers(options = {}) ⇒ Types::ListEventTrackersResponse

Returns the list of event trackers associated with the account. The response provides the properties for each event tracker, including the Amazon Resource Name (ARN) and tracking ID. For more information on event trackers, see CreateEventTracker.

Examples:

Request syntax with placeholder values


resp = client.list_event_trackers({
  dataset_group_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.event_trackers #=> Array
resp.event_trackers[0].name #=> String
resp.event_trackers[0].event_tracker_arn #=> String
resp.event_trackers[0].status #=> String
resp.event_trackers[0].creation_date_time #=> Time
resp.event_trackers[0].last_updated_date_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :dataset_group_arn (String)

    The ARN of a dataset group used to filter the response.

  • :next_token (String)

    A token returned from the previous call to ListEventTrackers for getting the next set of event trackers (if they exist).

  • :max_results (Integer)

    The maximum number of event trackers to return.

Returns:

See Also:

#list_filters(options = {}) ⇒ Types::ListFiltersResponse

Lists all filters that belong to a given dataset group.

Examples:

Request syntax with placeholder values


resp = client.list_filters({
  dataset_group_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.filters #=> Array
resp.filters[0].name #=> String
resp.filters[0].filter_arn #=> String
resp.filters[0].creation_date_time #=> Time
resp.filters[0].last_updated_date_time #=> Time
resp.filters[0].dataset_group_arn #=> String
resp.filters[0].failure_reason #=> String
resp.filters[0].status #=> String
resp.next_token #=> String

Options Hash (options):

  • :dataset_group_arn (String)

    The ARN of the dataset group that contains the filters.

  • :next_token (String)

    A token returned from the previous call to ListFilters for getting the next set of filters (if they exist).

  • :max_results (Integer)

    The maximum number of filters to return.

Returns:

See Also:

#list_recipes(options = {}) ⇒ Types::ListRecipesResponse

Returns a list of available recipes. The response provides the properties for each recipe, including the recipe's Amazon Resource Name (ARN).

Examples:

Request syntax with placeholder values


resp = client.list_recipes({
  recipe_provider: "SERVICE", # accepts SERVICE
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.recipes #=> Array
resp.recipes[0].name #=> String
resp.recipes[0].recipe_arn #=> String
resp.recipes[0].status #=> String
resp.recipes[0].creation_date_time #=> Time
resp.recipes[0].last_updated_date_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :recipe_provider (String)

    The default is SERVICE.

  • :next_token (String)

    A token returned from the previous call to ListRecipes for getting the next set of recipes (if they exist).

  • :max_results (Integer)

    The maximum number of recipes to return.

Returns:

See Also:

#list_schemas(options = {}) ⇒ Types::ListSchemasResponse

Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see CreateSchema.

Examples:

Request syntax with placeholder values


resp = client.list_schemas({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.schemas #=> Array
resp.schemas[0].name #=> String
resp.schemas[0].schema_arn #=> String
resp.schemas[0].creation_date_time #=> Time
resp.schemas[0].last_updated_date_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from the previous call to ListSchemas for getting the next set of schemas (if they exist).

  • :max_results (Integer)

    The maximum number of schemas to return.

Returns:

See Also:

#list_solution_versions(options = {}) ⇒ Types::ListSolutionVersionsResponse

Returns a list of solution versions for the given solution. When a solution is not specified, all the solution versions associated with the account are listed. The response provides the properties for each solution version, including the Amazon Resource Name (ARN). For more information on solutions, see CreateSolution.

Examples:

Request syntax with placeholder values


resp = client.list_solution_versions({
  solution_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.solution_versions #=> Array
resp.solution_versions[0].solution_version_arn #=> String
resp.solution_versions[0].status #=> String
resp.solution_versions[0].creation_date_time #=> Time
resp.solution_versions[0].last_updated_date_time #=> Time
resp.solution_versions[0].failure_reason #=> String
resp.next_token #=> String

Options Hash (options):

  • :solution_arn (String)

    The Amazon Resource Name (ARN) of the solution.

  • :next_token (String)

    A token returned from the previous call to ListSolutionVersions for getting the next set of solution versions (if they exist).

  • :max_results (Integer)

    The maximum number of solution versions to return.

Returns:

See Also:

#list_solutions(options = {}) ⇒ Types::ListSolutionsResponse

Returns a list of solutions that use the given dataset group. When a dataset group is not specified, all the solutions associated with the account are listed. The response provides the properties for each solution, including the Amazon Resource Name (ARN). For more information on solutions, see CreateSolution.

Examples:

Request syntax with placeholder values


resp = client.list_solutions({
  dataset_group_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.solutions #=> Array
resp.solutions[0].name #=> String
resp.solutions[0].solution_arn #=> String
resp.solutions[0].status #=> String
resp.solutions[0].creation_date_time #=> Time
resp.solutions[0].last_updated_date_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :dataset_group_arn (String)

    The Amazon Resource Name (ARN) of the dataset group.

  • :next_token (String)

    A token returned from the previous call to ListSolutions for getting the next set of solutions (if they exist).

  • :max_results (Integer)

    The maximum number of solutions to return.

Returns:

See Also:

#update_campaign(options = {}) ⇒ Types::UpdateCampaignResponse

Updates a campaign by either deploying a new solution or changing the value of the campaign's minProvisionedTPS parameter.

To update a campaign, the campaign status must be ACTIVE or CREATE FAILED. Check the campaign status using the DescribeCampaign API.

You must wait until the status of the updated campaign is ACTIVE before asking the campaign for recommendations.

For more information on campaigns, see CreateCampaign.

Examples:

Request syntax with placeholder values


resp = client.update_campaign({
  campaign_arn: "Arn", # required
  solution_version_arn: "Arn",
  min_provisioned_tps: 1,
  campaign_config: {
    item_exploration_config: {
      "ParameterName" => "ParameterValue",
    },
  },
})

Response structure


resp.campaign_arn #=> String

Options Hash (options):

  • :campaign_arn (required, String)

    The Amazon Resource Name (ARN) of the campaign.

  • :solution_version_arn (String)

    The ARN of a new solution version to deploy.

  • :min_provisioned_tps (Integer)

    Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support.

  • :campaign_config (Types::CampaignConfig)

    The configuration details of a campaign.

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.