Class: AWSCDK::AppSync::CodeConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/code_config.rb

Overview

Result of binding Code into a Function.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inline_code: nil, s3_location: nil) ⇒ CodeConfig

Returns a new instance of CodeConfig.

Parameters:

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

    Inline code (mutually exclusive with s3Location).

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

    The location of the code in S3 (mutually exclusive with inlineCode.



9
10
11
12
13
14
# File 'app_sync/code_config.rb', line 9

def initialize(inline_code: nil, s3_location: nil)
  @inline_code = inline_code
  Jsii::Type.check_type(@inline_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inlineCode") unless @inline_code.nil?
  @s3_location = s3_location
  Jsii::Type.check_type(@s3_location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3Location") unless @s3_location.nil?
end

Instance Attribute Details

#inline_codeString? (readonly)

Note:

Default: - code is not inline code

Inline code (mutually exclusive with s3Location).

Returns:

  • (String, nil)


20
21
22
# File 'app_sync/code_config.rb', line 20

def inline_code
  @inline_code
end

#s3_locationString? (readonly)

Note:

Default: - code is not an s3 location

The location of the code in S3 (mutually exclusive with inlineCode.

Returns:

  • (String, nil)


25
26
27
# File 'app_sync/code_config.rb', line 25

def s3_location
  @s3_location
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'app_sync/code_config.rb', line 27

def self.jsii_properties
  {
    :inline_code => "inlineCode",
    :s3_location => "s3Location",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'app_sync/code_config.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "inlineCode" => @inline_code,
    "s3Location" => @s3_location,
  })
  result.compact
end