Class AuroraPostgresEngineVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.rds.AuroraPostgresEngineVersion
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:12.482Z") @Stability(Stable) public class AuroraPostgresEngineVersion extends software.amazon.jsii.JsiiObject
The versions for the Aurora PostgreSQL cluster engine (those returned by DatabaseClusterEngine.auroraPostgres).

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/AuroraPostgreSQL.Updates.html

Example:

 // Build a data source for AppSync to access the database.
 GraphqlApi api;
 // Create username and password secret for DB Cluster
 DatabaseSecret secret = DatabaseSecret.Builder.create(this, "AuroraSecret")
         .username("clusteradmin")
         .build();
 // The VPC to place the cluster in
 Vpc vpc = new Vpc(this, "AuroraVpc");
 // Create the serverless cluster, provide all values needed to customise the database.
 DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "AuroraClusterV2")
         .engine(DatabaseClusterEngine.auroraPostgres(AuroraPostgresClusterEngineProps.builder().version(AuroraPostgresEngineVersion.VER_15_5).build()))
         .credentials(Map.of("username", "clusteradmin"))
         .clusterIdentifier("db-endpoint-test")
         .writer(ClusterInstance.serverlessV2("writer"))
         .serverlessV2MinCapacity(2)
         .serverlessV2MaxCapacity(10)
         .vpc(vpc)
         .defaultDatabaseName("demos")
         .enableDataApi(true)
         .build();
 RdsDataSource rdsDS = api.addRdsDataSourceV2("rds", cluster, secret, "demos");
 // Set up a resolver for an RDS query.
 rdsDS.createResolver("QueryGetDemosRdsResolver", BaseResolverProps.builder()
         .typeName("Query")
         .fieldName("getDemosRds")
         .requestMappingTemplate(MappingTemplate.fromString("\n  {\n    \"version\": \"2018-05-29\",\n    \"statements\": [\n      \"SELECT * FROM demos\"\n    ]\n  }\n  "))
         .responseMappingTemplate(MappingTemplate.fromString("\n    $utils.toJson($utils.rds.toJsonObject($ctx.result)[0])\n  "))
         .build());
 // Set up a resolver for an RDS mutation.
 rdsDS.createResolver("MutationAddDemoRdsResolver", BaseResolverProps.builder()
         .typeName("Mutation")
         .fieldName("addDemoRds")
         .requestMappingTemplate(MappingTemplate.fromString("\n  {\n    \"version\": \"2018-05-29\",\n    \"statements\": [\n      \"INSERT INTO demos VALUES (:id, :version)\",\n      \"SELECT * WHERE id = :id\"\n    ],\n    \"variableMap\": {\n      \":id\": $util.toJson($util.autoId()),\n      \":version\": $util.toJson($ctx.args.version)\n    }\n  }\n  "))
         .responseMappingTemplate(MappingTemplate.fromString("\n    $utils.toJson($utils.rds.toJsonObject($ctx.result)[1][0])\n  "))
         .build());
 
  • Field Details

  • Constructor Details

    • AuroraPostgresEngineVersion

      protected AuroraPostgresEngineVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • AuroraPostgresEngineVersion

      protected AuroraPostgresEngineVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • of

      @Stability(Stable) @NotNull public static AuroraPostgresEngineVersion of(@NotNull String auroraPostgresFullVersion, @NotNull String auroraPostgresMajorVersion, @Nullable AuroraPostgresEngineFeatures auroraPostgresFeatures)
      Create a new AuroraPostgresEngineVersion with an arbitrary version.

      Parameters:
      auroraPostgresFullVersion - the full version string, for example "9.6.25.1". This parameter is required.
      auroraPostgresMajorVersion - the major version of the engine, for example "9.6". This parameter is required.
      auroraPostgresFeatures -
    • of

      @Stability(Stable) @NotNull public static AuroraPostgresEngineVersion of(@NotNull String auroraPostgresFullVersion, @NotNull String auroraPostgresMajorVersion)
      Create a new AuroraPostgresEngineVersion with an arbitrary version.

      Parameters:
      auroraPostgresFullVersion - the full version string, for example "9.6.25.1". This parameter is required.
      auroraPostgresMajorVersion - the major version of the engine, for example "9.6". This parameter is required.
    • getAuroraPostgresFullVersion

      @Stability(Stable) @NotNull public String getAuroraPostgresFullVersion()
      The full version string, for example, "9.6.25.1".
    • getAuroraPostgresMajorVersion

      @Stability(Stable) @NotNull public String getAuroraPostgresMajorVersion()
      The major version of the engine, for example, "9.6".