SourceApiOptions
- class aws_cdk.aws_appsync.SourceApiOptions(*, source_apis, merged_api_execution_role=None)
Bases:
object
Additional API configuration for creating a AppSync Merged API.
- Parameters:
source_apis (
Sequence
[Union
[SourceApi
,Dict
[str
,Any
]]]) – Definition of source APIs associated with this Merged API.merged_api_execution_role (
Optional
[Role
]) – IAM Role used to validate access to source APIs at runtime and to update the merged API endpoint with the source API changes. Default: - An IAM Role with acccess to source schemas will be created
- ExampleMetadata:
infused
Example:
import aws_cdk as cdk # first source API first_api = appsync.GraphqlApi(self, "FirstSourceAPI", name="FirstSourceAPI", definition=appsync.Definition.from_file(path.join(__dirname, "appsync.merged-api-1.graphql")) ) # second source API second_api = appsync.GraphqlApi(self, "SecondSourceAPI", name="SecondSourceAPI", definition=appsync.Definition.from_file(path.join(__dirname, "appsync.merged-api-2.graphql")) ) # Merged API merged_api = appsync.GraphqlApi(self, "MergedAPI", name="MergedAPI", definition=appsync.Definition.from_source_apis( source_apis=[appsync.SourceApi( source_api=first_api, merge_type=appsync.MergeType.MANUAL_MERGE ), appsync.SourceApi( source_api=second_api, merge_type=appsync.MergeType.AUTO_MERGE ) ] ) )
Attributes
- merged_api_execution_role
IAM Role used to validate access to source APIs at runtime and to update the merged API endpoint with the source API changes.
- Default:
An IAM Role with acccess to source schemas will be created
- source_apis
Definition of source APIs associated with this Merged API.