Class Definition
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.Definition
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2025-01-04T09:06:17.710Z")
@Stability(Stable)
public abstract class Definition
extends software.amazon.jsii.JsiiObject
AppSync definition.
Specify how you want to define your AppSync API.
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
Definition
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Definition
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic Definition
Schema from file, allows schema definition through schema.graphql file.static Definition
fromSchema
(ISchema schema) Schema from schema object.static Definition
fromSourceApis
(SourceApiOptions sourceApiOptions) Schema from existing AppSync APIs - used for creating a AppSync Merged API.Schema, when AppSync API is created from schema file.Source APIs for Merged API.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Definition
protected Definition(software.amazon.jsii.JsiiObjectRef objRef) -
Definition
protected Definition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Definition
@Stability(Stable) protected Definition()
-
-
Method Details
-
fromFile
Schema from file, allows schema definition through schema.graphql file.- Parameters:
filePath
- the file path of the schema file. This parameter is required.- Returns:
- Definition with schema from file
-
fromSchema
Schema from schema object.- Parameters:
schema
- SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file. This parameter is required.- Returns:
- Definition with schema from file
-
fromSourceApis
@Stability(Stable) @NotNull public static Definition fromSourceApis(@NotNull SourceApiOptions sourceApiOptions) Schema from existing AppSync APIs - used for creating a AppSync Merged API.- Parameters:
sourceApiOptions
- Configuration for AppSync Merged API. This parameter is required.- Returns:
- Definition with for AppSync Merged API
-
getSchema
Schema, when AppSync API is created from schema file. -
getSourceApiOptions
Source APIs for Merged API.
-