libZSservicesZSamazonka-personalizeZSamazonka-personalize
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Personalize.CreateCampaign

Description

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. There's a short time delay while the capacity is increased that might cause loss of transactions.

The actual TPS used is calculated as the average requests/second within a 5-minute window. You pay for maximum of either the minimum provisioned TPS or the actual TPS. We recommend starting 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

  • ListCampaigns
  • DescribeCampaign
  • UpdateCampaign
  • DeleteCampaign
Synopsis

Creating a Request

data CreateCampaign Source #

See: newCreateCampaign smart constructor.

Constructors

CreateCampaign' 

Fields

Instances

Instances details
Eq CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Read CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Show CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Generic CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Associated Types

type Rep CreateCampaign :: Type -> Type #

NFData CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Methods

rnf :: CreateCampaign -> () #

Hashable CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

ToJSON CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

AWSRequest CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Associated Types

type AWSResponse CreateCampaign #

ToHeaders CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

ToPath CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

ToQuery CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

type Rep CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

type Rep CreateCampaign = D1 ('MetaData "CreateCampaign" "Amazonka.Personalize.CreateCampaign" "libZSservicesZSamazonka-personalizeZSamazonka-personalize" 'False) (C1 ('MetaCons "CreateCampaign'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "campaignConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CampaignConfig)) :*: S1 ('MetaSel ('Just "minProvisionedTPS") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "solutionVersionArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

newCreateCampaign Source #

Create a value of CreateCampaign with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:campaignConfig:CreateCampaign', createCampaign_campaignConfig - The configuration details of a campaign.

$sel:minProvisionedTPS:CreateCampaign', createCampaign_minProvisionedTPS - Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support.

$sel:name:CreateCampaign', createCampaign_name - A name for the new campaign. The campaign name must be unique within your account.

$sel:solutionVersionArn:CreateCampaign', createCampaign_solutionVersionArn - The Amazon Resource Name (ARN) of the solution version to deploy.

Request Lenses

createCampaign_campaignConfig :: Lens' CreateCampaign (Maybe CampaignConfig) Source #

The configuration details of a campaign.

createCampaign_minProvisionedTPS :: Lens' CreateCampaign (Maybe Natural) Source #

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

createCampaign_name :: Lens' CreateCampaign Text Source #

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

createCampaign_solutionVersionArn :: Lens' CreateCampaign Text Source #

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

Destructuring the Response

data CreateCampaignResponse Source #

See: newCreateCampaignResponse smart constructor.

Constructors

CreateCampaignResponse' 

Fields

Instances

Instances details
Eq CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Read CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Show CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Generic CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Associated Types

type Rep CreateCampaignResponse :: Type -> Type #

NFData CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Methods

rnf :: CreateCampaignResponse -> () #

type Rep CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

type Rep CreateCampaignResponse = D1 ('MetaData "CreateCampaignResponse" "Amazonka.Personalize.CreateCampaign" "libZSservicesZSamazonka-personalizeZSamazonka-personalize" 'False) (C1 ('MetaCons "CreateCampaignResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "campaignArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateCampaignResponse Source #

Create a value of CreateCampaignResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:campaignArn:CreateCampaignResponse', createCampaignResponse_campaignArn - The Amazon Resource Name (ARN) of the campaign.

$sel:httpStatus:CreateCampaignResponse', createCampaignResponse_httpStatus - The response's http status code.

Response Lenses

createCampaignResponse_campaignArn :: Lens' CreateCampaignResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the campaign.