amazonka-personalize-2.0: Amazon Personalize SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Personalize.CreateCampaign

Description

Creates a campaign that deploys 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

Synopsis

Creating a Request

data CreateCampaign Source #

See: newCreateCampaign smart constructor.

Constructors

CreateCampaign' 

Fields

Instances

Instances details
ToJSON CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.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

AWSRequest CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Associated Types

type AWSResponse CreateCampaign #

Generic CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Associated Types

type Rep CreateCampaign :: Type -> Type #

Read CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Show CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

NFData CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Methods

rnf :: CreateCampaign -> () #

Eq CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Hashable CreateCampaign Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

type AWSResponse 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" "amazonka-personalize-2.0-9kdbGNMxU7zEIoXPqEwwTg" '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 "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "solutionVersionArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

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:

CreateCampaign, createCampaign_campaignConfig - The configuration details of a campaign.

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

$sel:tags:CreateCampaign', createCampaign_tags - A list of tags to apply to the campaign.

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

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_tags :: Lens' CreateCampaign (Maybe [Tag]) Source #

A list of tags to apply to the campaign.

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
Generic CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Associated Types

type Rep CreateCampaignResponse :: Type -> Type #

Read CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Show CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

NFData CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

Methods

rnf :: CreateCampaignResponse -> () #

Eq CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

type Rep CreateCampaignResponse Source # 
Instance details

Defined in Amazonka.Personalize.CreateCampaign

type Rep CreateCampaignResponse = D1 ('MetaData "CreateCampaignResponse" "Amazonka.Personalize.CreateCampaign" "amazonka-personalize-2.0-9kdbGNMxU7zEIoXPqEwwTg" '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:

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.