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

com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner Maven / Gradle / Ivy

There is a newer version: 0.2.627
Show newest version
package com.pepperize.cdk.autoscaling_gitlab_runner;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T02:44:42.314Z")
@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.GitlabRunnerAutoscalingJobRunner")
public class GitlabRunnerAutoscalingJobRunner extends software.constructs.Construct {

    protected GitlabRunnerAutoscalingJobRunner(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected GitlabRunnerAutoscalingJobRunner(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 GitlabRunnerAutoscalingJobRunner(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.GitlabRunnerAutoscalingJobRunnerProps 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 com.pepperize.cdk.autoscaling_gitlab_runner.RunnerConfiguration getConfiguration() {
        return software.amazon.jsii.Kernel.get(this, "configuration", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.RunnerConfiguration.class));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.CfnInstanceProfile getInstanceProfile() {
        return software.amazon.jsii.Kernel.get(this, "instanceProfile", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.CfnInstanceProfile.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 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.Nullable software.amazon.awscdk.services.secretsmanager.ISecret getKeyPair() {
        return software.amazon.jsii.Kernel.get(this, "keyPair", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.ISecret.class));
    }

    /**
     * A fluent builder for {@link com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner}.
     */
    @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.GitlabRunnerAutoscalingJobRunnerProps.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.GitlabRunnerAutoscalingJobRunnerProps.Builder();
        }

        /**
         * The runner EC2 instances configuration.
         * 

* If not set, the defaults will be used. *

* @return {@code this} * @param configuration The runner EC2 instances configuration. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder configuration(final com.pepperize.cdk.autoscaling_gitlab_runner.RunnerConfiguration configuration) { this.props.configuration(configuration); return this; } /** * The runner’s authentication token, which is obtained during runner registration. *

* Not the same as the registration token. *

* @return {@code this} * @see https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner * @param token The runner’s authentication token, which is obtained during runner registration. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder token(final software.amazon.awscdk.services.ssm.IStringParameter token) { this.props.token(token); return this; } /** * Instance type for runner EC2 instances. *

* It's a combination of a class and size. *

* Default: InstanceType.of(InstanceClass.T3, InstanceSize.MICRO) *

* @return {@code this} * @param instanceType Instance type for runner EC2 instances. 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; } /** * Optionally pass a custom EC2 KeyPair, that will be used by the manager to connect to the job runner instances. *

*

    *
  1. Example: aws secretsmanager create-secret --name AnyKeyPairSecret --secret-string "{\"theKeyPairName\":\"\",\"theKeyPairName.pub\":\"\"}"
  2. *
  3. Additionally configure an unique key pair configuration.machine.machineOptions.keypairName
  4. *
*

* @return {@code this} * @param keyPair Optionally pass a custom EC2 KeyPair, that will be used by the manager to connect to the job runner instances. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder keyPair(final software.amazon.awscdk.services.secretsmanager.ISecret keyPair) { this.props.keyPair(keyPair); return this; } /** * An Amazon Machine Image ID for the Runners EC2 instances. *

* If empty the latest Ubuntu 20.04 focal will be looked up. *

* Any operating system supported by Docker Machine's provisioner. *

* @return {@code this} * @see https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/tree/main/libmachine/provision * @param machineImage An Amazon Machine Image ID for the Runners EC2 instances. 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; } /** * Optionally pass an IAM role, that get's assigned to the EC2 runner instances via Instance Profile. *

* @return {@code this} * @param role Optionally pass an IAM role, that get's assigned to the EC2 runner instances via Instance Profile. 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.GitlabRunnerAutoscalingJobRunner}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner build() { return new com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy