Interface SourceApiOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
SourceApiOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-11T23:26:28.952Z") @Stability(Stable) public interface SourceApiOptions extends software.amazon.jsii.JsiiSerializable
Additional API configuration for creating a AppSync Merged API.

Example:

 import software.amazon.awscdk.*;
 // first source API
 GraphqlApi firstApi = GraphqlApi.Builder.create(this, "FirstSourceAPI")
         .name("FirstSourceAPI")
         .definition(Definition.fromFile(join(__dirname, "appsync.merged-api-1.graphql")))
         .build();
 // second source API
 GraphqlApi secondApi = GraphqlApi.Builder.create(this, "SecondSourceAPI")
         .name("SecondSourceAPI")
         .definition(Definition.fromFile(join(__dirname, "appsync.merged-api-2.graphql")))
         .build();
 // Merged API
 GraphqlApi mergedApi = GraphqlApi.Builder.create(this, "MergedAPI")
         .name("MergedAPI")
         .definition(Definition.fromSourceApis(SourceApiOptions.builder()
                 .sourceApis(List.of(SourceApi.builder()
                         .sourceApi(firstApi)
                         .mergeType(MergeType.MANUAL_MERGE)
                         .build(), SourceApi.builder()
                         .sourceApi(secondApi)
                         .mergeType(MergeType.AUTO_MERGE)
                         .build()))
                 .build()))
         .build();
 
  • Method Details

    • getSourceApis

      @Stability(Stable) @NotNull List<SourceApi> getSourceApis()
      Definition of source APIs associated with this Merged API.
    • getMergedApiExecutionRole

      @Stability(Stable) @Nullable default Role getMergedApiExecutionRole()
      IAM Role used to validate access to source APIs at runtime and to update the merged API endpoint with the source API changes.

      Default: - An IAM Role with acccess to source schemas will be created

    • builder

      @Stability(Stable) static SourceApiOptions.Builder builder()
      Returns:
      a SourceApiOptions.Builder of SourceApiOptions