Class: AWSCDK::EC2::MultipartBodyOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::MultipartBodyOptions
- Defined in:
- ec2/multipart_body_options.rb
Overview
Options when creating MultipartBody.
Instance Attribute Summary collapse
-
#body ⇒ String?
readonly
The body of message.
-
#content_type ⇒ String
readonly
Content-Typeheader of this part. -
#transfer_encoding ⇒ String?
readonly
Content-Transfer-Encodingheader specifying part encoding.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_type:, body: nil, transfer_encoding: nil) ⇒ MultipartBodyOptions
constructor
A new instance of MultipartBodyOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_type:, body: nil, transfer_encoding: nil) ⇒ MultipartBodyOptions
Returns a new instance of MultipartBodyOptions.
10 11 12 13 14 15 16 17 |
# File 'ec2/multipart_body_options.rb', line 10 def initialize(content_type:, body: nil, transfer_encoding: nil) @content_type = content_type Jsii::Type.check_type(@content_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentType") @body = body Jsii::Type.check_type(@body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "body") unless @body.nil? @transfer_encoding = transfer_encoding Jsii::Type.check_type(@transfer_encoding, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transferEncoding") unless @transfer_encoding.nil? end |
Instance Attribute Details
#body ⇒ String? (readonly)
Note:
Default: undefined - body will not be added to part
The body of message.
34 35 36 |
# File 'ec2/multipart_body_options.rb', line 34 def body @body end |
#content_type ⇒ String (readonly)
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.
29 30 31 |
# File 'ec2/multipart_body_options.rb', line 29 def content_type @content_type end |
#transfer_encoding ⇒ String? (readonly)
Note:
Default: undefined - body is not encoded
Content-Transfer-Encoding header specifying part encoding.
39 40 41 |
# File 'ec2/multipart_body_options.rb', line 39 def transfer_encoding @transfer_encoding end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'ec2/multipart_body_options.rb', line 41 def self.jsii_properties { :content_type => "contentType", :body => "body", :transfer_encoding => "transferEncoding", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'ec2/multipart_body_options.rb', line 49 def to_jsii result = {} result.merge!({ "contentType" => @content_type, "body" => @body, "transferEncoding" => @transfer_encoding, }) result.compact end |