Class: AWSCDK::AppSync::AppSyncLambdaDataSourceProps
- Inherits:
-
AppSyncBackedDataSourceProps
- Object
- AppSyncBackedDataSourceProps
- AWSCDK::AppSync::AppSyncLambdaDataSourceProps
- Defined in:
- app_sync/app_sync_lambda_data_source_props.rb
Overview
Properties for an AppSync Lambda datasource.
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IAPIRef
readonly
The API to attach this data source to.
-
#description ⇒ String?
readonly
The description of the data source.
-
#lambda_function ⇒ AWSCDK::Lambda::IFunction
readonly
The Lambda function to call to interact with this data source.
-
#name ⇒ String?
readonly
The name of the data source.
-
#service_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM service role to be assumed by AppSync to interact with the data source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api:, description: nil, name: nil, service_role: nil, lambda_function:) ⇒ AppSyncLambdaDataSourceProps
constructor
A new instance of AppSyncLambdaDataSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api:, description: nil, name: nil, service_role: nil, lambda_function:) ⇒ AppSyncLambdaDataSourceProps
Returns a new instance of AppSyncLambdaDataSourceProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 12 def initialize(api:, description: nil, name: nil, service_role: nil, lambda_function:) @api = api Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcHBzeW5jLklBcGlSZWYifQ==")), "api") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @service_role = service_role Jsii::Type.check_type(@service_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "serviceRole") unless @service_role.nil? @lambda_function = lambda_function Jsii::Type.check_type(@lambda_function, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "lambdaFunction") end |
Instance Attribute Details
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IAPIRef (readonly)
The API to attach this data source to.
28 29 30 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 28 def api @api end |
#description ⇒ String? (readonly)
Default: - None
The description of the data source.
33 34 35 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 33 def description @description end |
#lambda_function ⇒ AWSCDK::Lambda::IFunction (readonly)
The Lambda function to call to interact with this data source.
50 51 52 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 50 def lambda_function @lambda_function end |
#name ⇒ String? (readonly)
Default: - id of data source
The name of the data source.
The only allowed pattern is: [_A-Za-z][_0-9A-Za-z]*. Any invalid characters will be automatically removed.
41 42 43 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 41 def name @name end |
#service_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - Create a new role
The IAM service role to be assumed by AppSync to interact with the data source.
46 47 48 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 46 def service_role @service_role end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 52 def self.jsii_properties { :api => "api", :description => "description", :name => "name", :service_role => "serviceRole", :lambda_function => "lambdaFunction", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'app_sync/app_sync_lambda_data_source_props.rb', line 62 def to_jsii result = {} result.merge!(super) result.merge!({ "api" => @api, "description" => @description, "name" => @name, "serviceRole" => @service_role, "lambdaFunction" => @lambda_function, }) result.compact end |