ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinition Maven / Gradle / Ivy
Show all versions of cdk-ecs-keycloak Show documentation
package ca.wheatstalk.cdkecskeycloak;
/**
* The details of a Keycloak task definition running on Fargate.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-04T07:10:04.636Z")
@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.KeycloakFargateTaskDefinition")
public class KeycloakFargateTaskDefinition extends software.amazon.awscdk.services.ecs.FargateTaskDefinition implements ca.wheatstalk.cdkecskeycloak.IKeycloakTaskDefinition {
protected KeycloakFargateTaskDefinition(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected KeycloakFargateTaskDefinition(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public KeycloakFargateTaskDefinition(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinitionProps 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"), props });
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public KeycloakFargateTaskDefinition(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
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") });
}
/**
* Configures the health check of the application target group.
*
* @param targetGroup This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void configureHealthCheck(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationTargetGroup targetGroup) {
software.amazon.jsii.Kernel.call(this, "configureHealthCheck", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(targetGroup, "targetGroup is required") });
}
/**
* Register the task definition with a cloudmap service.
*
* @param cloudMapService This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void useCloudMapService(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.servicediscovery.IService cloudMapService) {
software.amazon.jsii.Kernel.call(this, "useCloudMapService", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(cloudMapService, "cloudMapService is required") });
}
/**
* The Keycloak container extension.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtension getKeycloakContainerExtension() {
return software.amazon.jsii.Kernel.get(this, "keycloakContainerExtension", software.amazon.jsii.NativeType.forClass(ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtension.class));
}
/**
* A fluent builder for {@link ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinition}.
*/
@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}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinitionProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
}
/**
* The name of the IAM task execution role that grants the ECS agent to call AWS APIs on your behalf.
*
* The role will be used to retrieve container images from ECR and create CloudWatch log groups.
*
* Default: - An execution role will be automatically created if you use ECR images in your task definition.
*
* @return {@code this}
* @param executionRole The name of the IAM task execution role that grants the ECS agent to call AWS APIs on your behalf. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder executionRole(final software.amazon.awscdk.services.iam.IRole executionRole) {
this.props().executionRole(executionRole);
return this;
}
/**
* The name of a family that this task definition is registered to.
*
* A family groups multiple versions of a task definition.
*
* Default: - Automatically generated name.
*
* @return {@code this}
* @param family The name of a family that this task definition is registered to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder family(final java.lang.String family) {
this.props().family(family);
return this;
}
/**
* The configuration details for the App Mesh proxy.
*
* Default: - No proxy configuration.
*
* @return {@code this}
* @param proxyConfiguration The configuration details for the App Mesh proxy. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder proxyConfiguration(final software.amazon.awscdk.services.ecs.ProxyConfiguration proxyConfiguration) {
this.props().proxyConfiguration(proxyConfiguration);
return this;
}
/**
* The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
*
* Default: - A task role is automatically created for you.
*
* @return {@code this}
* @param taskRole The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder taskRole(final software.amazon.awscdk.services.iam.IRole taskRole) {
this.props().taskRole(taskRole);
return this;
}
/**
* The list of volume definitions for the task.
*
* For more information, see
* Task Definition Parameter Volumes.
*
* Default: - No volumes are passed to the Docker daemon on a container instance.
*
* @return {@code this}
* @param volumes The list of volume definitions for the task. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder volumes(final java.util.List extends software.amazon.awscdk.services.ecs.Volume> volumes) {
this.props().volumes(volumes);
return this;
}
/**
* The number of cpu units used by the task.
*
* For tasks using the Fargate launch type,
* this field is required and you must use one of the following values,
* which determines your range of valid values for the memory parameter:
*
* 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
* 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
* 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
*
* 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
*
* 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
* Default: 256
*
* @return {@code this}
* @param cpu The number of cpu units used by the task. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cpu(final java.lang.Number cpu) {
this.props().cpu(cpu);
return this;
}
/**
* The amount (in MiB) of memory used by the task.
*
* For tasks using the Fargate launch type,
* this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter:
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
*
* Default: 512
*
* @return {@code this}
* @param memoryLimitMiB The amount (in MiB) of memory used by the task. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder memoryLimitMiB(final java.lang.Number memoryLimitMiB) {
this.props().memoryLimitMiB(memoryLimitMiB);
return this;
}
/**
* Keycloak configuration.
*
* @return {@code this}
* @param keycloak Keycloak configuration. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder keycloak(final ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps keycloak) {
this.props().keycloak(keycloak);
return this;
}
/**
* @returns a newly built instance of {@link ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinition}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinition build() {
return new ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinition(
this.scope,
this.id,
this.props != null ? this.props.build() : null
);
}
private ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinitionProps.Builder props() {
if (this.props == null) {
this.props = new ca.wheatstalk.cdkecskeycloak.KeycloakFargateTaskDefinitionProps.Builder();
}
return this.props;
}
}
}