ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtension Maven / Gradle / Ivy
Show all versions of cdk-ecs-keycloak Show documentation
package ca.wheatstalk.cdkecskeycloak;
/**
* Ensures a Postgresql database exists by adding an init container.
*
* Makes the
* default container depend on the successful completion of this container.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.29.0 (build 41df200)", date = "2021-04-28T04:27:48.342Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = ca.wheatstalk.cdkecskeycloak.$Module.class, fqn = "@wheatstalk/cdk-ecs-keycloak.EnsurePostgresqlDatabaseExtension")
public class EnsurePostgresqlDatabaseExtension extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.ecs.ITaskDefinitionExtension {
protected EnsurePostgresqlDatabaseExtension(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EnsurePostgresqlDatabaseExtension(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public EnsurePostgresqlDatabaseExtension(final @org.jetbrains.annotations.NotNull ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtensionProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Apply the extension to the given TaskDefinition.
*
* @param taskDefinition This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void extend(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition) {
software.amazon.jsii.Kernel.call(this, "extend", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(taskDefinition, "taskDefinition is required") });
}
/**
* A fluent builder for {@link ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtension}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create() {
return new Builder();
}
private final ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtensionProps.Builder props;
private Builder() {
this.props = new ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtensionProps.Builder();
}
/**
* RDS credentials.
*
* @return {@code this}
* @param databaseCredentials RDS credentials. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder databaseCredentials(final software.amazon.awscdk.services.secretsmanager.ISecret databaseCredentials) {
this.props.databaseCredentials(databaseCredentials);
return this;
}
/**
* Name of the database to create.
*
* @return {@code this}
* @param databaseName Name of the database to create. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder databaseName(final java.lang.String databaseName) {
this.props.databaseName(databaseName);
return this;
}
/**
* Name of the container to add to do this work.
*
* Default: 'ensure-postgresql-database'
*
* @return {@code this}
* @param containerName Name of the container to add to do this work. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder containerName(final java.lang.String containerName) {
this.props.containerName(containerName);
return this;
}
/**
* Logging driver.
*
* @return {@code this}
* @param logging Logging driver. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logging(final software.amazon.awscdk.services.ecs.LogDriver logging) {
this.props.logging(logging);
return this;
}
/**
* @returns a newly built instance of {@link ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtension}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtension build() {
return new ca.wheatstalk.cdkecskeycloak.EnsurePostgresqlDatabaseExtension(
this.props.build()
);
}
}
}