# MessageProperty

A message input, or returned from, a call to [Converse](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or [ConverseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) .

- Source: Generated code
- Type last changed: v2.174.0 · 4 Jan 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const messageProperty: bedrock.CfnPrompt.MessageProperty = {
  content: [{
    cachePoint: {
      type: 'type',
    },
    text: 'text',
  }],
  role: 'role',
};
```

## Properties

- `content`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPrompt.ContentBlockProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnPrompt.ContentBlockProperty.html)[] (required) — The message content. Note the following restrictions:.

  - You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
  - You can include up to five documents. Each document's size must be no more than 4.5 MB.
  - If you include a `ContentBlock` with a `document` field in the array, you must also include a `ContentBlock` with a `text` field.
  - You can only include images and documents if the `role` is `user` .

- `role`: string (required) — The role that the message plays in the message.
