All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.condense.cdkconstructs.DatabaseInstanceProps Maven / Gradle / Ivy

There is a newer version: 0.5.2
Show newest version
package tech.condense.cdkconstructs;

/**
 * (experimental) Properties for the DatabaseInstance construct.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-11T12:29:44.526Z")
@software.amazon.jsii.Jsii(module = tech.condense.cdkconstructs.$Module.class, fqn = "@condensetech/cdk-constructs.DatabaseInstanceProps")
@software.amazon.jsii.Jsii.Proxy(DatabaseInstanceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface DatabaseInstanceProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) The engine of the database instance.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.rds.IInstanceEngine getEngine();

    /**
     * (experimental) The networking configuration for the database instance.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull tech.condense.cdkconstructs.INetworking getNetworking();

    /**
     * (experimental) The allocated storage of the database instance.
     * 

* Default: 20 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getAllocatedStorage() { return null; } /** * (experimental) The backup retention period. *

* Default: - It uses the default applied by [rds.DatabaseInstanceProps#backupRetention]https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseInstanceProps.html#backupretention). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getBackupRetention() { return null; } /** * (experimental) The name of the secret that stores the credentials of the database. *

* Default: `${construct.node.path}/secret` */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getCredentialsSecretName() { return null; } /** * (experimental) The username of the database. *

* Default: db_user */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getCredentialsUsername() { return null; } /** * (experimental) The name of the database. *

* Default: - No default database is created. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getDatabaseName() { return null; } /** * (experimental) The identifier of the database instance. *

* Default: - No identifier is specified. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getInstanceIdentifier() { return null; } /** * (experimental) The instance type of the database instance. *

* Default: - db.t3.small. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.InstanceType getInstanceType() { return null; } /** * (experimental) If the database instance is multi-AZ. *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getMultiAz() { return null; } /** * (experimental) The removal policy to apply when the cluster is removed. *

* Default: RemovalPolicy.RETAIN */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.RemovalPolicy getRemovalPolicy() { return null; } /** * (experimental) The name of the security group. *

* Default: - `${construct.node.path}-sg`. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getSecurityGroupName() { return null; } /** * (experimental) The storage type of the database instance. *

* Default: rds.StorageType.GP3 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.rds.StorageType getStorageType() { return null; } /** * @return a {@link Builder} of {@link DatabaseInstanceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link DatabaseInstanceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.rds.IInstanceEngine engine; tech.condense.cdkconstructs.INetworking networking; java.lang.Number allocatedStorage; software.amazon.awscdk.Duration backupRetention; java.lang.String credentialsSecretName; java.lang.String credentialsUsername; java.lang.String databaseName; java.lang.String instanceIdentifier; software.amazon.awscdk.services.ec2.InstanceType instanceType; java.lang.Boolean multiAz; software.amazon.awscdk.RemovalPolicy removalPolicy; java.lang.String securityGroupName; software.amazon.awscdk.services.rds.StorageType storageType; /** * Sets the value of {@link DatabaseInstanceProps#getEngine} * @param engine The engine of the database instance. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder engine(software.amazon.awscdk.services.rds.IInstanceEngine engine) { this.engine = engine; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getNetworking} * @param networking The networking configuration for the database instance. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder networking(tech.condense.cdkconstructs.INetworking networking) { this.networking = networking; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getAllocatedStorage} * @param allocatedStorage The allocated storage of the database instance. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allocatedStorage(java.lang.Number allocatedStorage) { this.allocatedStorage = allocatedStorage; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getBackupRetention} * @param backupRetention The backup retention period. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder backupRetention(software.amazon.awscdk.Duration backupRetention) { this.backupRetention = backupRetention; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getCredentialsSecretName} * @param credentialsSecretName The name of the secret that stores the credentials of the database. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder credentialsSecretName(java.lang.String credentialsSecretName) { this.credentialsSecretName = credentialsSecretName; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getCredentialsUsername} * @param credentialsUsername The username of the database. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder credentialsUsername(java.lang.String credentialsUsername) { this.credentialsUsername = credentialsUsername; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getDatabaseName} * @param databaseName The name of the database. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder databaseName(java.lang.String databaseName) { this.databaseName = databaseName; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getInstanceIdentifier} * @param instanceIdentifier The identifier of the database instance. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder instanceIdentifier(java.lang.String instanceIdentifier) { this.instanceIdentifier = instanceIdentifier; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getInstanceType} * @param instanceType The instance type of the database instance. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder instanceType(software.amazon.awscdk.services.ec2.InstanceType instanceType) { this.instanceType = instanceType; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getMultiAz} * @param multiAz If the database instance is multi-AZ. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder multiAz(java.lang.Boolean multiAz) { this.multiAz = multiAz; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getRemovalPolicy} * @param removalPolicy The removal policy to apply when the cluster is removed. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder removalPolicy(software.amazon.awscdk.RemovalPolicy removalPolicy) { this.removalPolicy = removalPolicy; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getSecurityGroupName} * @param securityGroupName The name of the security group. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder securityGroupName(java.lang.String securityGroupName) { this.securityGroupName = securityGroupName; return this; } /** * Sets the value of {@link DatabaseInstanceProps#getStorageType} * @param storageType The storage type of the database instance. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder storageType(software.amazon.awscdk.services.rds.StorageType storageType) { this.storageType = storageType; return this; } /** * Builds the configured instance. * @return a new instance of {@link DatabaseInstanceProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public DatabaseInstanceProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link DatabaseInstanceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DatabaseInstanceProps { private final software.amazon.awscdk.services.rds.IInstanceEngine engine; private final tech.condense.cdkconstructs.INetworking networking; private final java.lang.Number allocatedStorage; private final software.amazon.awscdk.Duration backupRetention; private final java.lang.String credentialsSecretName; private final java.lang.String credentialsUsername; private final java.lang.String databaseName; private final java.lang.String instanceIdentifier; private final software.amazon.awscdk.services.ec2.InstanceType instanceType; private final java.lang.Boolean multiAz; private final software.amazon.awscdk.RemovalPolicy removalPolicy; private final java.lang.String securityGroupName; private final software.amazon.awscdk.services.rds.StorageType storageType; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.engine = software.amazon.jsii.Kernel.get(this, "engine", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.rds.IInstanceEngine.class)); this.networking = software.amazon.jsii.Kernel.get(this, "networking", software.amazon.jsii.NativeType.forClass(tech.condense.cdkconstructs.INetworking.class)); this.allocatedStorage = software.amazon.jsii.Kernel.get(this, "allocatedStorage", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.backupRetention = software.amazon.jsii.Kernel.get(this, "backupRetention", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class)); this.credentialsSecretName = software.amazon.jsii.Kernel.get(this, "credentialsSecretName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.credentialsUsername = software.amazon.jsii.Kernel.get(this, "credentialsUsername", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.databaseName = software.amazon.jsii.Kernel.get(this, "databaseName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.instanceIdentifier = software.amazon.jsii.Kernel.get(this, "instanceIdentifier", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InstanceType.class)); this.multiAz = software.amazon.jsii.Kernel.get(this, "multiAz", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.removalPolicy = software.amazon.jsii.Kernel.get(this, "removalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.RemovalPolicy.class)); this.securityGroupName = software.amazon.jsii.Kernel.get(this, "securityGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.storageType = software.amazon.jsii.Kernel.get(this, "storageType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.rds.StorageType.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.engine = java.util.Objects.requireNonNull(builder.engine, "engine is required"); this.networking = java.util.Objects.requireNonNull(builder.networking, "networking is required"); this.allocatedStorage = builder.allocatedStorage; this.backupRetention = builder.backupRetention; this.credentialsSecretName = builder.credentialsSecretName; this.credentialsUsername = builder.credentialsUsername; this.databaseName = builder.databaseName; this.instanceIdentifier = builder.instanceIdentifier; this.instanceType = builder.instanceType; this.multiAz = builder.multiAz; this.removalPolicy = builder.removalPolicy; this.securityGroupName = builder.securityGroupName; this.storageType = builder.storageType; } @Override public final software.amazon.awscdk.services.rds.IInstanceEngine getEngine() { return this.engine; } @Override public final tech.condense.cdkconstructs.INetworking getNetworking() { return this.networking; } @Override public final java.lang.Number getAllocatedStorage() { return this.allocatedStorage; } @Override public final software.amazon.awscdk.Duration getBackupRetention() { return this.backupRetention; } @Override public final java.lang.String getCredentialsSecretName() { return this.credentialsSecretName; } @Override public final java.lang.String getCredentialsUsername() { return this.credentialsUsername; } @Override public final java.lang.String getDatabaseName() { return this.databaseName; } @Override public final java.lang.String getInstanceIdentifier() { return this.instanceIdentifier; } @Override public final software.amazon.awscdk.services.ec2.InstanceType getInstanceType() { return this.instanceType; } @Override public final java.lang.Boolean getMultiAz() { return this.multiAz; } @Override public final software.amazon.awscdk.RemovalPolicy getRemovalPolicy() { return this.removalPolicy; } @Override public final java.lang.String getSecurityGroupName() { return this.securityGroupName; } @Override public final software.amazon.awscdk.services.rds.StorageType getStorageType() { return this.storageType; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("engine", om.valueToTree(this.getEngine())); data.set("networking", om.valueToTree(this.getNetworking())); if (this.getAllocatedStorage() != null) { data.set("allocatedStorage", om.valueToTree(this.getAllocatedStorage())); } if (this.getBackupRetention() != null) { data.set("backupRetention", om.valueToTree(this.getBackupRetention())); } if (this.getCredentialsSecretName() != null) { data.set("credentialsSecretName", om.valueToTree(this.getCredentialsSecretName())); } if (this.getCredentialsUsername() != null) { data.set("credentialsUsername", om.valueToTree(this.getCredentialsUsername())); } if (this.getDatabaseName() != null) { data.set("databaseName", om.valueToTree(this.getDatabaseName())); } if (this.getInstanceIdentifier() != null) { data.set("instanceIdentifier", om.valueToTree(this.getInstanceIdentifier())); } if (this.getInstanceType() != null) { data.set("instanceType", om.valueToTree(this.getInstanceType())); } if (this.getMultiAz() != null) { data.set("multiAz", om.valueToTree(this.getMultiAz())); } if (this.getRemovalPolicy() != null) { data.set("removalPolicy", om.valueToTree(this.getRemovalPolicy())); } if (this.getSecurityGroupName() != null) { data.set("securityGroupName", om.valueToTree(this.getSecurityGroupName())); } if (this.getStorageType() != null) { data.set("storageType", om.valueToTree(this.getStorageType())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@condensetech/cdk-constructs.DatabaseInstanceProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DatabaseInstanceProps.Jsii$Proxy that = (DatabaseInstanceProps.Jsii$Proxy) o; if (!engine.equals(that.engine)) return false; if (!networking.equals(that.networking)) return false; if (this.allocatedStorage != null ? !this.allocatedStorage.equals(that.allocatedStorage) : that.allocatedStorage != null) return false; if (this.backupRetention != null ? !this.backupRetention.equals(that.backupRetention) : that.backupRetention != null) return false; if (this.credentialsSecretName != null ? !this.credentialsSecretName.equals(that.credentialsSecretName) : that.credentialsSecretName != null) return false; if (this.credentialsUsername != null ? !this.credentialsUsername.equals(that.credentialsUsername) : that.credentialsUsername != null) return false; if (this.databaseName != null ? !this.databaseName.equals(that.databaseName) : that.databaseName != null) return false; if (this.instanceIdentifier != null ? !this.instanceIdentifier.equals(that.instanceIdentifier) : that.instanceIdentifier != null) return false; if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false; if (this.multiAz != null ? !this.multiAz.equals(that.multiAz) : that.multiAz != null) return false; if (this.removalPolicy != null ? !this.removalPolicy.equals(that.removalPolicy) : that.removalPolicy != null) return false; if (this.securityGroupName != null ? !this.securityGroupName.equals(that.securityGroupName) : that.securityGroupName != null) return false; return this.storageType != null ? this.storageType.equals(that.storageType) : that.storageType == null; } @Override public final int hashCode() { int result = this.engine.hashCode(); result = 31 * result + (this.networking.hashCode()); result = 31 * result + (this.allocatedStorage != null ? this.allocatedStorage.hashCode() : 0); result = 31 * result + (this.backupRetention != null ? this.backupRetention.hashCode() : 0); result = 31 * result + (this.credentialsSecretName != null ? this.credentialsSecretName.hashCode() : 0); result = 31 * result + (this.credentialsUsername != null ? this.credentialsUsername.hashCode() : 0); result = 31 * result + (this.databaseName != null ? this.databaseName.hashCode() : 0); result = 31 * result + (this.instanceIdentifier != null ? this.instanceIdentifier.hashCode() : 0); result = 31 * result + (this.instanceType != null ? this.instanceType.hashCode() : 0); result = 31 * result + (this.multiAz != null ? this.multiAz.hashCode() : 0); result = 31 * result + (this.removalPolicy != null ? this.removalPolicy.hashCode() : 0); result = 31 * result + (this.securityGroupName != null ? this.securityGroupName.hashCode() : 0); result = 31 * result + (this.storageType != null ? this.storageType.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy