Class SourceApiAssociation

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.appsync.SourceApiAssociation
All Implemented Interfaces:
ISourceApiAssociationRef, IEnvironmentAware, IResource, ISourceApiAssociation, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-09T14:39:03.776Z") @Stability(Stable) public class SourceApiAssociation extends Resource implements ISourceApiAssociation
AppSync SourceApiAssociation which associates an AppSync source API to an AppSync Merged API.

The initial creation of the SourceApiAssociation merges the source API into the Merged API schema.

Example:

 GraphqlApi sourceApi = GraphqlApi.Builder.create(this, "FirstSourceAPI")
         .name("FirstSourceAPI")
         .definition(Definition.fromFile(join(__dirname, "appsync.merged-api-1.graphql")))
         .build();
 IGraphqlApi importedMergedApi = GraphqlApi.fromGraphqlApiAttributes(this, "ImportedMergedApi", GraphqlApiAttributes.builder()
         .graphqlApiId("MyApiId")
         .graphqlApiArn("MyApiArn")
         .build());
 IRole importedExecutionRole = Role.fromRoleArn(this, "ExecutionRole", "arn:aws:iam::ACCOUNT:role/MyExistingRole");
 SourceApiAssociation.Builder.create(this, "SourceApiAssociation2")
         .sourceApi(sourceApi)
         .mergedApi(importedMergedApi)
         .mergeType(MergeType.MANUAL_MERGE)
         .mergedApiExecutionRole(importedExecutionRole)
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String PROPERTY_INJECTION_ID
      Uniquely identifies this class.
  • Constructor Details

    • SourceApiAssociation

      protected SourceApiAssociation(software.amazon.jsii.JsiiObjectRef objRef)
    • SourceApiAssociation

      protected SourceApiAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • SourceApiAssociation

      @Stability(Stable) public SourceApiAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SourceApiAssociationProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details