Personalize / Client / list_campaigns

list_campaigns#

Personalize.Client.list_campaigns(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.list_campaigns(
    solutionArn='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • solutionArn (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.

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

  • maxResults (integer) – The maximum number of campaigns to return.

Return type:

dict

Returns:

Response Syntax

{
    'campaigns': [
        {
            'name': 'string',
            'campaignArn': 'string',
            'status': 'string',
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1),
            'failureReason': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • campaigns (list) –

      A list of the campaigns.

      • (dict) –

        Provides a summary of the properties of a campaign. For a complete listing, call the DescribeCampaign API.

        • name (string) –

          The name of the campaign.

        • campaignArn (string) –

          The Amazon Resource Name (ARN) of the campaign.

        • status (string) –

          The status of the campaign.

          A campaign can be in one of the following states:

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

          • DELETE PENDING > DELETE IN_PROGRESS

        • creationDateTime (datetime) –

          The date and time (in Unix time) that the campaign was created.

        • lastUpdatedDateTime (datetime) –

          The date and time (in Unix time) that the campaign was last updated.

        • failureReason (string) –

          If a campaign fails, the reason behind the failure.

    • nextToken (string) –

      A token for getting the next set of campaigns (if they exist).

Exceptions

  • Personalize.Client.exceptions.InvalidInputException

  • Personalize.Client.exceptions.InvalidNextTokenException