Skip to content
v2.275.0

MultipartBodyOptions Struct ​

Options when creating MultipartBody.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const multipartBodyOptions: ec2.MultipartBodyOptions = {
  contentType: 'contentType',

  // the properties below are optional
  body: 'body',
  transferEncoding: 'transferEncoding',
};

Properties ​

bodyoptionalstringbodyoptionalstrbodyoptionalStringBodyoptionalstringBodyoptional*string#
The body of message.

Default: undefined - body will not be added to part

contentTypestringcontent_typestrcontentTypeStringContentTypestringContentType*stringrequired#
`Content-Type` header of this part.

Some examples of content types:

  • text/x-shellscript; charset="utf-8" (shell script)
  • text/cloud-boothook; charset="utf-8" (shell script executed during boot phase)

For Linux shell scripts use text/x-shellscript.

transferEncodingoptionalstringtransfer_encodingoptionalstrtransferEncodingoptionalStringTransferEncodingoptionalstringTransferEncodingoptional*string#
`Content-Transfer-Encoding` header specifying part encoding.

Default: undefined - body is not encoded