Class AppSyncRdsDataSource
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.AppSyncRdsDataSource
- All Implemented Interfaces:
IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:45.371Z")
@Stability(Stable)
public class AppSyncRdsDataSource
extends AppSyncBackedDataSource
An AppSync datasource backed by RDS.
Example:
import software.amazon.awscdk.services.secretsmanager.*;
Vpc vpc;
String databaseName = "mydb";
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Cluster")
.engine(DatabaseClusterEngine.auroraPostgres(AuroraPostgresClusterEngineProps.builder().version(AuroraPostgresEngineVersion.VER_16_6).build()))
.writer(ClusterInstance.serverlessV2("writer"))
.vpc(vpc)
.credentials(Map.of("username", "clusteradmin"))
.defaultDatabaseName(databaseName)
.enableDataApi(true)
.build();
ISecret secret = Secret.fromSecretNameV2(this, "Secret", "db-secretName");
EventApi api = EventApi.Builder.create(this, "EventApiRds")
.apiName("RdsEventApi")
.build();
AppSyncRdsDataSource dataSource = api.addRdsDataSource("rdsds", cluster, secret, databaseName);
-
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
ConstructorsModifierConstructorDescriptionprotectedAppSyncRdsDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAppSyncRdsDataSource(software.amazon.jsii.JsiiObjectRef objRef) AppSyncRdsDataSource(software.constructs.Construct scope, String id, AppSyncRdsDataSourceProps 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
-
AppSyncRdsDataSource
protected AppSyncRdsDataSource(software.amazon.jsii.JsiiObjectRef objRef) -
AppSyncRdsDataSource
protected AppSyncRdsDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AppSyncRdsDataSource
@Stability(Stable) public AppSyncRdsDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AppSyncRdsDataSourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-