Class: AWSCDK::AppSync::SourceAPIOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppSync::SourceAPIOptions
- Defined in:
- app_sync/source_api_options.rb
Overview
Additional API configuration for creating a AppSync Merged API.
Instance Attribute Summary collapse
-
#merged_api_execution_role ⇒ AWSCDK::IAM::Role?
readonly
IAM Role used to validate access to source APIs at runtime and to update the merged API endpoint with the source API changes.
-
#source_apis ⇒ Array<AWSCDK::AppSync::SourceAPI>
readonly
Definition of source APIs associated with this Merged API.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(source_apis:, merged_api_execution_role: nil) ⇒ SourceAPIOptions
constructor
A new instance of SourceAPIOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(source_apis:, merged_api_execution_role: nil) ⇒ SourceAPIOptions
Returns a new instance of SourceAPIOptions.
9 10 11 12 13 14 |
# File 'app_sync/source_api_options.rb', line 9 def initialize(source_apis:, merged_api_execution_role: nil) @source_apis = source_apis.is_a?(Array) ? source_apis.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::AppSync::SourceAPI.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : source_apis Jsii::Type.check_type(@source_apis, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLlNvdXJjZUFwaSJ9LCJraW5kIjoiYXJyYXkifX0=")), "sourceApis") @merged_api_execution_role = merged_api_execution_role Jsii::Type.check_type(@merged_api_execution_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlJvbGUifQ==")), "mergedApiExecutionRole") unless @merged_api_execution_role.nil? end |
Instance Attribute Details
#merged_api_execution_role ⇒ AWSCDK::IAM::Role? (readonly)
Note:
Default: - An IAM Role with acccess to source schemas will be created
IAM Role used to validate access to source APIs at runtime and to update the merged API endpoint with the source API changes.
24 25 26 |
# File 'app_sync/source_api_options.rb', line 24 def merged_api_execution_role @merged_api_execution_role end |
#source_apis ⇒ Array<AWSCDK::AppSync::SourceAPI> (readonly)
Definition of source APIs associated with this Merged API.
19 20 21 |
# File 'app_sync/source_api_options.rb', line 19 def source_apis @source_apis end |
Class Method Details
.jsii_properties ⇒ Object
26 27 28 29 30 31 |
# File 'app_sync/source_api_options.rb', line 26 def self.jsii_properties { :source_apis => "sourceApis", :merged_api_execution_role => "mergedApiExecutionRole", } end |
Instance Method Details
#to_jsii ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'app_sync/source_api_options.rb', line 33 def to_jsii result = {} result.merge!({ "sourceApis" => @source_apis, "mergedApiExecutionRole" => @merged_api_execution_role, }) result.compact end |