# SourceApiAssociationProps

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

Extends: SourceApiAssociationProps
Used as props by: SourceApiAssociation

- Source: [`aws-appsync/lib/source-api-association.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts#L76)
- Type last changed: v2.97.0 · 22 Sep 2023

## 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

- `description`: string = None — The description of the source api association.

- `mergedApi`: [IGraphqlApi](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.IGraphqlApi.html) (required) — The merged api to associate.

- `mergedApiExecutionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) (required) — The merged api execution role for adding the access policy for the source api.

- `mergeType`: [MergeType](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.MergeType.html) = AUTO_MERGE — The merge type for the source.

- `sourceApi`: [IGraphqlApi](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.IGraphqlApi.html) (required) — The source api to associate.
