# MessageTemplateAttachmentProperty

Information about the message template attachment.

- Source: Generated at build time
- Type last changed: v2.208.0 · 29 Jul 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wisdom as wisdom } from 'aws-cdk-lib';
const messageTemplateAttachmentProperty: wisdom.CfnMessageTemplate.MessageTemplateAttachmentProperty = {
  attachmentName: 'attachmentName',
  s3PresignedUrl: 's3PresignedUrl',

  // the properties below are optional
  attachmentId: 'attachmentId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wisdom as wisdom

message_template_attachment_property = wisdom.CfnMessageTemplate.MessageTemplateAttachmentProperty(
    attachment_name="attachmentName",
    s3_presigned_url="s3PresignedUrl",

    # the properties below are optional
    attachment_id="attachmentId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wisdom.*;

MessageTemplateAttachmentProperty messageTemplateAttachmentProperty = MessageTemplateAttachmentProperty.builder()
        .attachmentName("attachmentName")
        .s3PresignedUrl("s3PresignedUrl")

        // the properties below are optional
        .attachmentId("attachmentId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Wisdom;

var messageTemplateAttachmentProperty = new MessageTemplateAttachmentProperty {
    AttachmentName = "attachmentName",
    S3PresignedUrl = "s3PresignedUrl",

    // the properties below are optional
    AttachmentId = "attachmentId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

messageTemplateAttachmentProperty := &MessageTemplateAttachmentProperty{
	AttachmentName: jsii.String("attachmentName"),
	S3PresignedUrl: jsii.String("s3PresignedUrl"),

	// the properties below are optional
	AttachmentId: jsii.String("attachmentId"),
}
```

## Properties

- `attachmentId`: string — The identifier of the attachment file.

- `attachmentName`: string (required) — The name of the attachment file being uploaded.

  The name should include the file extension.

- `s3PresignedUrl`: string (required) — The S3 Presigned URL for the attachment file.

  When generating the PreSignedUrl, please ensure that the expires-in time is set to 30 minutes. The URL can be generated through the AWS Console or through the AWS CLI. For more information, see [Sharing objects with presigned URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html) .
