Class: AWSCDK::Wisdom::CfnMessageTemplate::MessageTemplateAttachmentProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wisdom/cfn_message_template.rb

Overview

Information about the message template attachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attachment_name:, s3_presigned_url:, attachment_id: nil) ⇒ MessageTemplateAttachmentProperty

Returns a new instance of MessageTemplateAttachmentProperty.

Parameters:

  • attachment_name (String)

    The name of the attachment file being uploaded.

  • s3_presigned_url (String)

    The S3 Presigned URL for the attachment file.

  • attachment_id (String, nil) (defaults to: nil)

    The identifier of the attachment file.



1540
1541
1542
1543
1544
1545
1546
1547
# File 'wisdom/cfn_message_template.rb', line 1540

def initialize(attachment_name:, s3_presigned_url:, attachment_id: nil)
  @attachment_name = attachment_name
  Jsii::Type.check_type(@attachment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attachmentName")
  @s3_presigned_url = s3_presigned_url
  Jsii::Type.check_type(@s3_presigned_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3PresignedUrl")
  @attachment_id = attachment_id
  Jsii::Type.check_type(@attachment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attachmentId") unless @attachment_id.nil?
end

Instance Attribute Details

#attachment_idString? (readonly)

The identifier of the attachment file.



1567
1568
1569
# File 'wisdom/cfn_message_template.rb', line 1567

def attachment_id
  @attachment_id
end

#attachment_nameString (readonly)

The name of the attachment file being uploaded.

The name should include the file extension.



1555
1556
1557
# File 'wisdom/cfn_message_template.rb', line 1555

def attachment_name
  @attachment_name
end

#s3_presigned_urlString (readonly)

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 .



1562
1563
1564
# File 'wisdom/cfn_message_template.rb', line 1562

def s3_presigned_url
  @s3_presigned_url
end

Class Method Details

.jsii_propertiesObject



1569
1570
1571
1572
1573
1574
1575
# File 'wisdom/cfn_message_template.rb', line 1569

def self.jsii_properties
  {
    :attachment_name => "attachmentName",
    :s3_presigned_url => "s3PresignedUrl",
    :attachment_id => "attachmentId",
  }
end

Instance Method Details

#to_jsiiObject



1577
1578
1579
1580
1581
1582
1583
1584
1585
# File 'wisdom/cfn_message_template.rb', line 1577

def to_jsii
  result = {}
  result.merge!({
    "attachmentName" => @attachment_name,
    "s3PresignedUrl" => @s3_presigned_url,
    "attachmentId" => @attachment_id,
  })
  result.compact
end