interface SourceApiOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppSync.SourceApiOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#SourceApiOptions |
![]() | software.amazon.awscdk.services.appsync.SourceApiOptions |
![]() | aws_cdk.aws_appsync.SourceApiOptions |
![]() | aws-cdk-lib » aws_appsync » SourceApiOptions |
Additional API configuration for creating a AppSync Merged API.
Example
import * as cdk from 'aws-cdk-lib';
// first source API
const firstApi = new appsync.GraphqlApi(this, 'FirstSourceAPI', {
name: 'FirstSourceAPI',
definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-1.graphql')),
});
// second source API
const secondApi = new appsync.GraphqlApi(this, 'SecondSourceAPI', {
name: 'SecondSourceAPI',
definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-2.graphql')),
});
// Merged API
const mergedApi = new appsync.GraphqlApi(this, 'MergedAPI', {
name: 'MergedAPI',
definition: appsync.Definition.fromSourceApis({
sourceApis: [
{
sourceApi: firstApi,
mergeType: appsync.MergeType.MANUAL_MERGE,
},
{
sourceApi: secondApi,
mergeType: appsync.MergeType.AUTO_MERGE,
}
],
}),
});
Properties
Name | Type | Description |
---|---|---|
source | Source [] | Definition of source APIs associated with this Merged API. |
merged | Role | IAM Role used to validate access to source APIs at runtime and to update the merged API endpoint with the source API changes. |
sourceApis
Type:
Source
[]
Definition of source APIs associated with this Merged API.
mergedApiExecutionRole?
Type:
Role
(optional, 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.