AgentsforBedrock / Client / list_prompts

list_prompts#

AgentsforBedrock.Client.list_prompts(**kwargs)#

Returns either information about the working draft ( DRAFT version) of each prompt in an account, or information about of all versions of a prompt, depending on whether you include the promptIdentifier field or not. For more information, see View information about prompts using Prompt management in the Amazon Bedrock User Guide.

See also: AWS API Documentation

Request Syntax

response = client.list_prompts(
    maxResults=123,
    nextToken='string',
    promptIdentifier='string'
)
Parameters:
  • maxResults (integer) – The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

  • nextToken (string) – If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

  • promptIdentifier (string) – The unique identifier of the prompt for whose versions you want to return information. Omit this field to list information about all prompts in an account.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'promptSummaries': [
        {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'description': 'string',
            'id': 'string',
            'name': 'string',
            'updatedAt': datetime(2015, 1, 1),
            'version': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

    • promptSummaries (list) –

      A list, each member of which contains information about a prompt using Prompt management.

      • (dict) –

        Contains information about a prompt in your Prompt management tool.

        This data type is used in the following API operations:

        • arn (string) –

          The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request).

        • createdAt (datetime) –

          The time at which the prompt was created.

        • description (string) –

          The description of the prompt.

        • id (string) –

          The unique identifier of the prompt.

        • name (string) –

          The name of the prompt.

        • updatedAt (datetime) –

          The time at which the prompt was last updated.

        • version (string) –

          The version of the prompt that this summary applies to.

Exceptions