Class AppSyncHttpDataSource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.appsync.AppSyncBaseDataSource
software.amazon.awscdk.services.appsync.AppSyncBackedDataSource
software.amazon.awscdk.services.appsync.AppSyncHttpDataSource
- All Implemented Interfaces:
IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:34.462Z")
@Stability(Stable)
public class AppSyncHttpDataSource
extends AppSyncBackedDataSource
An AppSync datasource backed by a http endpoint.
Example:
import software.amazon.awscdk.services.apigateway.*;
EventApi api = EventApi.Builder.create(this, "EventApiHttp")
.apiName("HttpEventApi")
.build();
RestApi randomApi = new RestApi(this, "RandomApi");
Resource randomRoute = randomApi.root.addResource("random");
randomRoute.addMethod("GET", MockIntegration.Builder.create()
.integrationResponses(List.of(IntegrationResponse.builder()
.statusCode("200")
.responseTemplates(Map.of(
"application/json", "my-random-value"))
.build()))
.passthroughBehavior(PassthroughBehavior.NEVER)
.requestTemplates(Map.of(
"application/json", "{ \"statusCode\": 200 }"))
.build(), MethodOptions.builder()
.methodResponses(List.of(MethodResponse.builder().statusCode("200").build()))
.build());
AppSyncHttpDataSource dataSource = api.addHttpDataSource("httpsource", String.format("https://%s.execute-api.%s.amazonaws.com", randomApi.getRestApiId(), this.region));
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IGrantable
IGrantable.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAppSyncHttpDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAppSyncHttpDataSource(software.amazon.jsii.JsiiObjectRef objRef) AppSyncHttpDataSource(software.constructs.Construct scope, String id, AppSyncHttpDataSourceProps props) -
Method Summary
Methods inherited from class software.amazon.awscdk.services.appsync.AppSyncBackedDataSource
getGrantPrincipalMethods inherited from class software.amazon.awscdk.services.appsync.AppSyncBaseDataSource
getApi, getName, getResource, getServiceRole, setApi, setServiceRoleMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
AppSyncHttpDataSource
protected AppSyncHttpDataSource(software.amazon.jsii.JsiiObjectRef objRef) -
AppSyncHttpDataSource
protected AppSyncHttpDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AppSyncHttpDataSource
@Stability(Stable) public AppSyncHttpDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AppSyncHttpDataSourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-