Skip to content
v2.274.0

SourceApiAssociationProps Struct ​

Properties for SourceApiAssociation which associates an AppSync Source API with an AppSync Merged API.

Example ​

ts
const sourceApi = new appsync.GraphqlApi(this, 'FirstSourceAPI', {
  name: 'FirstSourceAPI',
  definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-1.graphql')),
});

const importedMergedApi = appsync.GraphqlApi.fromGraphqlApiAttributes(this, 'ImportedMergedApi', {
  graphqlApiId: 'MyApiId',
  graphqlApiArn: 'MyApiArn',
});

const importedExecutionRole = iam.Role.fromRoleArn(this, 'ExecutionRole', 'arn:aws:iam::ACCOUNT:role/MyExistingRole');
new appsync.SourceApiAssociation(this, 'SourceApiAssociation2', {
   sourceApi: sourceApi,
   mergedApi: importedMergedApi,
   mergeType: appsync.MergeType.MANUAL_MERGE,
   mergedApiExecutionRole: importedExecutionRole,
});

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= None#
The description of the source api association.
mergedApiIGraphqlApimerged_apiIGraphqlApimergedApiIGraphqlApiMergedApiIGraphqlApiMergedApiIGraphqlApirequired#
The merged api to associate.
mergedApiExecutionRoleIRolemerged_api_execution_roleIRolemergedApiExecutionRoleIRoleMergedApiExecutionRoleIRoleMergedApiExecutionRoleIRolerequired#
The merged api execution role for adding the access policy for the source api.
mergeTypeoptionalMergeTypemerge_typeoptionalMergeTypemergeTypeoptionalMergeTypeMergeTypeoptionalMergeTypeMergeTypeoptionalMergeType= AUTO_MERGE#
The merge type for the source.
sourceApiIGraphqlApisource_apiIGraphqlApisourceApiIGraphqlApiSourceApiIGraphqlApiSourceApiIGraphqlApirequired#
The source api to associate.