com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManager Maven / Gradle / Ivy
Show all versions of cdk-autoscaling-gitlab-runner Show documentation
package com.pepperize.cdk.autoscaling_gitlab_runner;
/**
* Settings for the manager (coordinator).
*
* Manager coordinates the placement of runner (job executor) instances
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T02:44:42.318Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.autoscaling_gitlab_runner.$Module.class, fqn = "@pepperize/cdk-autoscaling-gitlab-runner.GitlabRunnerAutoscalingManager")
public class GitlabRunnerAutoscalingManager extends software.constructs.Construct {
protected GitlabRunnerAutoscalingManager(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected GitlabRunnerAutoscalingManager(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.Stable)
public GitlabRunnerAutoscalingManager(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerProps 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") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.s3.IBucket getCacheBucket() {
return software.amazon.jsii.Kernel.get(this, "cacheBucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration getGlobalConfiguration() {
return software.amazon.jsii.Kernel.get(this, "globalConfiguration", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.CloudFormationInit getInitConfig() {
return software.amazon.jsii.Kernel.get(this, "initConfig", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.CloudFormationInit.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.InstanceType getInstanceType() {
return software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InstanceType.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.IMachineImage getMachineImage() {
return software.amazon.jsii.Kernel.get(this, "machineImage", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IMachineImage.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull com.pepperize.cdk.autoscaling_gitlab_runner.Network getNetwork() {
return software.amazon.jsii.Kernel.get(this, "network", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.Network.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IRole getRole() {
return software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.util.List getRunners() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "runners", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getRunnersSecurityGroupName() {
return software.amazon.jsii.Kernel.get(this, "runnersSecurityGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.UserData getUserData() {
return software.amazon.jsii.Kernel.get(this, "userData", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.UserData.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getKeyPairName() {
return software.amazon.jsii.Kernel.get(this, "keyPairName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* A fluent builder for {@link com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManager}.
*/
@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.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 com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerProps.Builder();
}
/**
* @return {@code this}
* @param dockerMachineVersion This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dockerMachineVersion(final com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion dockerMachineVersion) {
this.props.dockerMachineVersion(dockerMachineVersion);
return this;
}
/**
* Instance type for manager EC2 instance.
*
* It's a combination of a class and size.
*
* Default: InstanceType.of(InstanceClass.T3, InstanceSize.NANO)
*
* @return {@code this}
* @param instanceType Instance type for manager EC2 instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder instanceType(final software.amazon.awscdk.services.ec2.InstanceType instanceType) {
this.props.instanceType(instanceType);
return this;
}
/**
* A set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance.
*
* You won't be able to ssh into an instance without the Key Pair.
*
* @return {@code this}
* @param keyPairName A set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder keyPairName(final java.lang.String keyPairName) {
this.props.keyPairName(keyPairName);
return this;
}
/**
* An Amazon Machine Image ID for the Manager EC2 instance.
*
* If empty the latest Amazon 2 Image will be looked up.
*
* Should be RHEL flavor like Amazon Linux 2 with yum available for instance initialization.
*
* @return {@code this}
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-init.html
* @param machineImage An Amazon Machine Image ID for the Manager EC2 instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder machineImage(final software.amazon.awscdk.services.ec2.IMachineImage machineImage) {
this.props.machineImage(machineImage);
return this;
}
/**
* @return {@code this}
* @param cacheBucket This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cacheBucket(final software.amazon.awscdk.services.s3.IBucket cacheBucket) {
this.props.cacheBucket(cacheBucket);
return this;
}
/**
* @return {@code this}
* @param network This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder network(final com.pepperize.cdk.autoscaling_gitlab_runner.Network network) {
this.props.network(network);
return this;
}
/**
* @return {@code this}
* @param runners This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder runners(final java.util.List extends com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner> runners) {
this.props.runners(runners);
return this;
}
/**
* @return {@code this}
* @param runnersSecurityGroup This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder runnersSecurityGroup(final com.pepperize.cdk.security_group.SecurityGroup runnersSecurityGroup) {
this.props.runnersSecurityGroup(runnersSecurityGroup);
return this;
}
/**
* @return {@code this}
* @param globalConfiguration This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder globalConfiguration(final com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration globalConfiguration) {
this.props.globalConfiguration(globalConfiguration);
return this;
}
/**
* @return {@code this}
* @param role This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder role(final software.amazon.awscdk.services.iam.IRole role) {
this.props.role(role);
return this;
}
/**
* @return a newly built instance of {@link com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManager}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManager build() {
return new com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManager(
this.scope,
this.id,
this.props.build()
);
}
}
}