Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data CreateCampaign = CreateCampaign' {}
- newCreateCampaign :: Text -> Text -> CreateCampaign
- createCampaign_campaignConfig :: Lens' CreateCampaign (Maybe CampaignConfig)
- createCampaign_minProvisionedTPS :: Lens' CreateCampaign (Maybe Natural)
- createCampaign_name :: Lens' CreateCampaign Text
- createCampaign_solutionVersionArn :: Lens' CreateCampaign Text
- data CreateCampaignResponse = CreateCampaignResponse' {
- campaignArn :: Maybe Text
- httpStatus :: Int
- newCreateCampaignResponse :: Int -> CreateCampaignResponse
- createCampaignResponse_campaignArn :: Lens' CreateCampaignResponse (Maybe Text)
- createCampaignResponse_httpStatus :: Lens' CreateCampaignResponse Int
Creating a Request
data CreateCampaign Source #
See: newCreateCampaign
smart constructor.
CreateCampaign' | |
|
Instances
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.
CreateCampaignResponse' | |
|
Instances
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.
createCampaignResponse_httpStatus :: Lens' CreateCampaignResponse Int Source #
The response's http status code.