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:
IResource, ISourceApiAssociation, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-19T18:11:56.020Z") @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();
 
  • 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

    • fromSourceApiAssociationAttributes

      @Stability(Stable) @NotNull public static ISourceApiAssociation fromSourceApiAssociationAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SourceApiAssociationAttributes attrs)
      Import Appsync Source Api Association from source API, merged api, and merge type.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • getAssociation

      @Stability(Stable) @NotNull public CfnSourceApiAssociation getAssociation()
      The underlying CFN source api association resource.
    • getAssociationArn

      @Stability(Stable) @NotNull public String getAssociationArn()
      The association arn.
      Specified by:
      getAssociationArn in interface ISourceApiAssociation
    • getAssociationId

      @Stability(Stable) @NotNull public String getAssociationId()
      The association id.
      Specified by:
      getAssociationId in interface ISourceApiAssociation
    • getMergedApi

      @Stability(Stable) @NotNull public IGraphqlApi getMergedApi()
      The merged api in the association.
      Specified by:
      getMergedApi in interface ISourceApiAssociation
    • getMergeType

      @Stability(Stable) @NotNull public MergeType getMergeType()
      The merge type for the source api association.
    • getSourceApi

      @Stability(Stable) @NotNull public IGraphqlApi getSourceApi()
      The source api in the association.
      Specified by:
      getSourceApi in interface ISourceApiAssociation