@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:54.698Z") @Stability(value=Experimental) public interface ServerlessClusterProps extends software.amazon.jsii.JsiiSerializable
Example:
Vpc vpc;
Code code;
ServerlessCluster cluster = ServerlessCluster.Builder.create(this, "AnotherCluster")
.engine(DatabaseClusterEngine.AURORA_MYSQL)
.vpc(vpc) // this parameter is optional for serverless Clusters
.enableDataApi(true)
.build();
Function fn = Function.Builder.create(this, "MyFunction")
.runtime(Runtime.NODEJS_14_X)
.handler("index.handler")
.code(code)
.environment(Map.of(
"CLUSTER_ARN", cluster.getClusterArn(),
"SECRET_ARN", cluster.getSecret().getSecretArn()))
.build();
cluster.grantDataApiAccess(fn);
| Modifier and Type | Interface and Description |
|---|---|
static class |
ServerlessClusterProps.Builder
A builder for
ServerlessClusterProps |
static class |
ServerlessClusterProps.Jsii$Proxy
An implementation for
ServerlessClusterProps |
| Modifier and Type | Method and Description |
|---|---|
static ServerlessClusterProps.Builder |
builder() |
default Duration |
getBackupRetention()
(experimental) The number of days during which automatic DB snapshots are retained.
|
default String |
getClusterIdentifier()
(experimental) An optional identifier for the cluster.
|
default Credentials |
getCredentials()
(experimental) Credentials for the administrative user.
|
default String |
getDefaultDatabaseName()
(experimental) Name of a database which is automatically created inside the cluster.
|
default Boolean |
getDeletionProtection()
(experimental) Indicates whether the DB cluster should have deletion protection enabled.
|
default Boolean |
getEnableDataApi()
(experimental) Whether to enable the Data API.
|
IClusterEngine |
getEngine()
(experimental) What kind of database to start.
|
default IParameterGroup |
getParameterGroup()
(experimental) Additional parameters to pass to the database engine.
|
default RemovalPolicy |
getRemovalPolicy()
(experimental) The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
|
default ServerlessScalingOptions |
getScaling()
(experimental) Scaling configuration of an Aurora Serverless database cluster.
|
default List<ISecurityGroup> |
getSecurityGroups()
(experimental) Security group.
|
default IKey |
getStorageEncryptionKey()
(experimental) The KMS key for storage encryption.
|
default ISubnetGroup |
getSubnetGroup()
(experimental) Existing subnet group for the cluster.
|
default IVpc |
getVpc()
(experimental) The VPC that this Aurora Serverless cluster has been created in.
|
default SubnetSelection |
getVpcSubnets()
(experimental) Where to place the instances within the VPC.
|
@Stability(value=Experimental) @NotNull IClusterEngine getEngine()
@Stability(value=Experimental) @Nullable default Duration getBackupRetention()
Automatic backup retention cannot be disabled on serverless clusters. Must be a value from 1 day to 35 days.
Default: Duration.days(1)
@Stability(value=Experimental) @Nullable default String getClusterIdentifier()
Default: - A name is automatically generated.
@Stability(value=Experimental) @Nullable default Credentials getCredentials()
Default: - A username of 'admin' and SecretsManager-generated password
@Stability(value=Experimental) @Nullable default String getDefaultDatabaseName()
Default: - Database is not created in cluster.
@Stability(value=Experimental) @Nullable default Boolean getDeletionProtection()
Default: - true if removalPolicy is RETAIN, false otherwise
@Stability(value=Experimental) @Nullable default Boolean getEnableDataApi()
Default: false
@Stability(value=Experimental) @Nullable default IParameterGroup getParameterGroup()
Default: - no parameter group.
@Stability(value=Experimental) @Nullable default RemovalPolicy getRemovalPolicy()
Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
@Stability(value=Experimental) @Nullable default ServerlessScalingOptions getScaling()
Default: - Serverless cluster is automatically paused after 5 minutes of being idle. minimum capacity: 2 ACU maximum capacity: 16 ACU
@Stability(value=Experimental) @Nullable default List<ISecurityGroup> getSecurityGroups()
Default: - a new security group is created if `vpc` was provided. If the `vpc` property was not provided, no VPC security groups will be associated with the DB cluster.
@Stability(value=Experimental) @Nullable default IKey getStorageEncryptionKey()
Default: - the default master key will be used for storage encryption
@Stability(value=Experimental) @Nullable default ISubnetGroup getSubnetGroup()
Default: - a new subnet group is created if `vpc` was provided. If the `vpc` property was not provided, no subnet group will be associated with the DB cluster
@Stability(value=Experimental) @Nullable default IVpc getVpc()
Default: - the default VPC in the account and region will be used
@Stability(value=Experimental) @Nullable default SubnetSelection getVpcSubnets()
If provided, the vpc property must also be specified.
Default: - the VPC default strategy if not specified.
@Stability(value=Experimental) static ServerlessClusterProps.Builder builder()
ServerlessClusterProps.Builder of ServerlessClusterPropsCopyright © 2022. All rights reserved.