Class: AWSCDK::AppSync::AppsyncFunctionProps
- Inherits:
-
BaseAppsyncFunctionProps
- Object
- BaseAppsyncFunctionProps
- AWSCDK::AppSync::AppsyncFunctionProps
- Defined in:
- app_sync/appsync_function_props.rb
Overview
the CDK properties for AppSync Functions.
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::AppSync::IGraphqlAPI
readonly
the GraphQL Api linked to this AppSync Function.
-
#code ⇒ AWSCDK::AppSync::Code?
readonly
The function code.
-
#data_source ⇒ AWSCDK::AppSync::BaseDataSource
readonly
the data source linked to this AppSync Function.
-
#description ⇒ String?
readonly
the description for this AppSync Function.
-
#max_batch_size ⇒ Numeric?
readonly
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
-
#name ⇒ String
readonly
the name of the AppSync Function.
-
#request_mapping_template ⇒ AWSCDK::AppSync::MappingTemplate?
readonly
the request mapping template for the AppSync Function.
-
#response_mapping_template ⇒ AWSCDK::AppSync::MappingTemplate?
readonly
the response mapping template for the AppSync Function.
-
#runtime ⇒ AWSCDK::AppSync::FunctionRuntime?
readonly
The functions runtime.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, code: nil, description: nil, max_batch_size: nil, request_mapping_template: nil, response_mapping_template: nil, runtime: nil, api:, data_source:) ⇒ AppsyncFunctionProps
constructor
A new instance of AppsyncFunctionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, code: nil, description: nil, max_batch_size: nil, request_mapping_template: nil, response_mapping_template: nil, runtime: nil, api:, data_source:) ⇒ AppsyncFunctionProps
Returns a new instance of AppsyncFunctionProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app_sync/appsync_function_props.rb', line 16 def initialize(name:, code: nil, description: nil, max_batch_size: nil, request_mapping_template: nil, response_mapping_template: nil, runtime: nil, api:, data_source:) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @code = code Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Db2RlIn0=")), "code") unless @code.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @max_batch_size = max_batch_size Jsii::Type.check_type(@max_batch_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxBatchSize") unless @max_batch_size.nil? @request_mapping_template = request_mapping_template Jsii::Type.check_type(@request_mapping_template, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5NYXBwaW5nVGVtcGxhdGUifQ==")), "requestMappingTemplate") unless @request_mapping_template.nil? @response_mapping_template = response_mapping_template Jsii::Type.check_type(@response_mapping_template, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5NYXBwaW5nVGVtcGxhdGUifQ==")), "responseMappingTemplate") unless @response_mapping_template.nil? @runtime = runtime Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5GdW5jdGlvblJ1bnRpbWUifQ==")), "runtime") unless @runtime.nil? @api = api Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5JR3JhcGhxbEFwaSJ9")), "api") @data_source = data_source Jsii::Type.check_type(@data_source, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5CYXNlRGF0YVNvdXJjZSJ9")), "dataSource") end |
Instance Attribute Details
#api ⇒ AWSCDK::AppSync::IGraphqlAPI (readonly)
the GraphQL Api linked to this AppSync Function.
76 77 78 |
# File 'app_sync/appsync_function_props.rb', line 76 def api @api end |
#code ⇒ AWSCDK::AppSync::Code? (readonly)
Default: - no code is used
The function code.
45 46 47 |
# File 'app_sync/appsync_function_props.rb', line 45 def code @code end |
#data_source ⇒ AWSCDK::AppSync::BaseDataSource (readonly)
the data source linked to this AppSync Function.
80 81 82 |
# File 'app_sync/appsync_function_props.rb', line 80 def data_source @data_source end |
#description ⇒ String? (readonly)
Default: - no description
the description for this AppSync Function.
50 51 52 |
# File 'app_sync/appsync_function_props.rb', line 50 def description @description end |
#max_batch_size ⇒ Numeric? (readonly)
Default: - No max batch size
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
Can only be set when using LambdaDataSource.
57 58 59 |
# File 'app_sync/appsync_function_props.rb', line 57 def max_batch_size @max_batch_size end |
#name ⇒ String (readonly)
the name of the AppSync Function.
40 41 42 |
# File 'app_sync/appsync_function_props.rb', line 40 def name @name end |
#request_mapping_template ⇒ AWSCDK::AppSync::MappingTemplate? (readonly)
Default: - no request mapping template
the request mapping template for the AppSync Function.
62 63 64 |
# File 'app_sync/appsync_function_props.rb', line 62 def request_mapping_template @request_mapping_template end |
#response_mapping_template ⇒ AWSCDK::AppSync::MappingTemplate? (readonly)
Default: - no response mapping template
the response mapping template for the AppSync Function.
67 68 69 |
# File 'app_sync/appsync_function_props.rb', line 67 def response_mapping_template @response_mapping_template end |
#runtime ⇒ AWSCDK::AppSync::FunctionRuntime? (readonly)
Default: - no function runtime, VTL mapping templates used
The functions runtime.
72 73 74 |
# File 'app_sync/appsync_function_props.rb', line 72 def runtime @runtime end |
Class Method Details
.jsii_properties ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'app_sync/appsync_function_props.rb', line 82 def self.jsii_properties { :name => "name", :code => "code", :description => "description", :max_batch_size => "maxBatchSize", :request_mapping_template => "requestMappingTemplate", :response_mapping_template => "responseMappingTemplate", :runtime => "runtime", :api => "api", :data_source => "dataSource", } end |
Instance Method Details
#to_jsii ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'app_sync/appsync_function_props.rb', line 96 def to_jsii result = {} result.merge!(super) result.merge!({ "name" => @name, "code" => @code, "description" => @description, "maxBatchSize" => @max_batch_size, "requestMappingTemplate" => @request_mapping_template, "responseMappingTemplate" => @response_mapping_template, "runtime" => @runtime, "api" => @api, "dataSource" => @data_source, }) result.compact end |