software.amazon.awscdk.services.neptune.alpha.DatabaseInstance Maven / Gradle / Ivy
Show all versions of neptune-alpha Show documentation
package software.amazon.awscdk.services.neptune.alpha;
/**
* (experimental) A database instance.
*
* Example:
*
*
* DatabaseInstance replica1 = DatabaseInstance.Builder.create(this, "Instance")
* .cluster(cluster)
* .instanceType(InstanceType.R5_LARGE)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.94.0 (build b380f01)", date = "2024-02-23T02:06:41.981Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.neptune.alpha.$Module.class, fqn = "@aws-cdk/aws-neptune-alpha.DatabaseInstance")
public class DatabaseInstance extends software.amazon.awscdk.services.neptune.alpha.DatabaseInstanceBase implements software.amazon.awscdk.services.neptune.alpha.IDatabaseInstance {
protected DatabaseInstance(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected DatabaseInstance(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public DatabaseInstance(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.neptune.alpha.DatabaseInstanceProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) The instance's database cluster.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.neptune.alpha.IDatabaseCluster getCluster() {
return software.amazon.jsii.Kernel.get(this, "cluster", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.neptune.alpha.IDatabaseCluster.class));
}
/**
* (experimental) The instance endpoint address.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getDbInstanceEndpointAddress() {
return software.amazon.jsii.Kernel.get(this, "dbInstanceEndpointAddress", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) The instance endpoint port.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getDbInstanceEndpointPort() {
return software.amazon.jsii.Kernel.get(this, "dbInstanceEndpointPort", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) The instance endpoint.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.neptune.alpha.Endpoint getInstanceEndpoint() {
return software.amazon.jsii.Kernel.get(this, "instanceEndpoint", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.neptune.alpha.Endpoint.class));
}
/**
* (experimental) The instance identifier.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getInstanceIdentifier() {
return software.amazon.jsii.Kernel.get(this, "instanceIdentifier", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) A fluent builder for {@link software.amazon.awscdk.services.neptune.alpha.DatabaseInstance}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final software.amazon.awscdk.services.neptune.alpha.DatabaseInstanceProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awscdk.services.neptune.alpha.DatabaseInstanceProps.Builder();
}
/**
* (experimental) The Neptune database cluster the instance should launch into.
*
* @return {@code this}
* @param cluster The Neptune database cluster the instance should launch into. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cluster(final software.amazon.awscdk.services.neptune.alpha.IDatabaseCluster cluster) {
this.props.cluster(cluster);
return this;
}
/**
* (experimental) What type of instance to start for the replicas.
*
* @return {@code this}
* @param instanceType What type of instance to start for the replicas. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder instanceType(final software.amazon.awscdk.services.neptune.alpha.InstanceType instanceType) {
this.props.instanceType(instanceType);
return this;
}
/**
* (experimental) The name of the Availability Zone where the DB instance will be located.
*
* Default: - no preference
*
* @return {@code this}
* @param availabilityZone The name of the Availability Zone where the DB instance will be located. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder availabilityZone(final java.lang.String availabilityZone) {
this.props.availabilityZone(availabilityZone);
return this;
}
/**
* (experimental) A name for the DB instance.
*
* If you specify a name, AWS CloudFormation
* converts it to lowercase.
*
* Default: - a CloudFormation generated name
*
* @return {@code this}
* @param dbInstanceName A name for the DB instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dbInstanceName(final java.lang.String dbInstanceName) {
this.props.dbInstanceName(dbInstanceName);
return this;
}
/**
* (experimental) The DB parameter group to associate with the instance.
*
* Default: no parameter group
*
* @return {@code this}
* @param parameterGroup The DB parameter group to associate with the instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder parameterGroup(final software.amazon.awscdk.services.neptune.alpha.IParameterGroup parameterGroup) {
this.props.parameterGroup(parameterGroup);
return this;
}
/**
* (experimental) The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.
*
* Default: RemovalPolicy.Retain
*
* @return {@code this}
* @param removalPolicy The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder removalPolicy(final software.amazon.awscdk.RemovalPolicy removalPolicy) {
this.props.removalPolicy(removalPolicy);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awscdk.services.neptune.alpha.DatabaseInstance}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public software.amazon.awscdk.services.neptune.alpha.DatabaseInstance build() {
return new software.amazon.awscdk.services.neptune.alpha.DatabaseInstance(
this.scope,
this.id,
this.props.build()
);
}
}
}