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

com.cloudsnorkel.cdk.github.runners.FargateRunner Maven / Gradle / Ivy

package com.cloudsnorkel.cdk.github.runners;

/**
 * @deprecated use {@link FargateRunnerProvider }
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.80.0 (build bce6a1d)", date = "2023-04-23T18:13:40.322Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.FargateRunner")
public class FargateRunner extends com.cloudsnorkel.cdk.github.runners.FargateRunnerProvider {

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

    protected FargateRunner(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.Experimental)
    public FargateRunner(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.FargateRunnerProviderProps 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.Experimental)
    public FargateRunner(final @org.jetbrains.annotations.NotNull software.constructs.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") });
    }

    /**
     * (experimental) A fluent builder for {@link com.cloudsnorkel.cdk.github.runners.FargateRunner}.
     */
    @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 com.cloudsnorkel.cdk.github.runners.FargateRunnerProviderProps.Builder props;

        private Builder(final software.constructs.Construct scope, final java.lang.String id) {
            this.scope = scope;
            this.id = id;
        }

        /**
         * (experimental) The number of days log events are kept in CloudWatch Logs.
         * 

* When updating * this property, unsetting it doesn't remove the log retention policy. To * remove the retention policy, set the value to INFINITE. *

* Default: logs.RetentionDays.ONE_MONTH *

* @return {@code this} * @param logRetention The number of days log events are kept in CloudWatch Logs. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder logRetention(final software.amazon.awscdk.services.logs.RetentionDays logRetention) { this.props().logRetention(logRetention); return this; } /** * (experimental) Options to retry operation in case of failure like missing capacity, or API quota issues. *

* Default: retry 10 times up to about 45 minutes *

* @return {@code this} * @param retryOptions Options to retry operation in case of failure like missing capacity, or API quota issues. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder retryOptions(final com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions) { this.props().retryOptions(retryOptions); return this; } /** * (experimental) Assign public IP to the runner task. *

* Make sure the task will have access to GitHub. A public IP might be required unless you have NAT gateway. *

* Default: true *

* @return {@code this} * @param assignPublicIp Assign public IP to the runner task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder assignPublicIp(final java.lang.Boolean assignPublicIp) { this.props().assignPublicIp(assignPublicIp); return this; } /** * (experimental) Existing Fargate cluster to use. *

* Default: a new cluster *

* @return {@code this} * @param cluster Existing Fargate cluster to use. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder cluster(final software.amazon.awscdk.services.ecs.Cluster cluster) { this.props().cluster(cluster); return this; } /** * (experimental) 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: 1024 *

* @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.Experimental) public Builder cpu(final java.lang.Number cpu) { this.props().cpu(cpu); return this; } /** * (experimental) The amount (in GiB) of ephemeral storage to be allocated to the task. *

* The maximum supported value is 200 GiB. *

* NOTE: This parameter is only supported for tasks hosted on AWS Fargate using platform version 1.4.0 or later. *

* Default: 20 *

* @return {@code this} * @param ephemeralStorageGiB The amount (in GiB) of ephemeral storage to be allocated to the task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ephemeralStorageGiB(final java.lang.Number ephemeralStorageGiB) { this.props().ephemeralStorageGiB(ephemeralStorageGiB); return this; } /** * (experimental) Runner image builder used to build Docker images containing GitHub Runner and all requirements. *

* The image builder determines the OS and architecture of the runner. *

* Default: FargateRunnerProvider.imageBuilder() *

* @return {@code this} * @param imageBuilder Runner image builder used to build Docker images containing GitHub Runner and all requirements. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder imageBuilder(final com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder imageBuilder) { this.props().imageBuilder(imageBuilder); return this; } /** * (deprecated) GitHub Actions label used for this provider. *

* Default: undefined *

* @return {@code this} * @deprecated use {@link labels } instead * @param label GitHub Actions label used for this provider. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder label(final java.lang.String label) { this.props().label(label); return this; } /** * (experimental) GitHub Actions labels used for this provider. *

* These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for * based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the * job's labels, this provider will be chosen and spawn a new runner. *

* Default: ['fargate'] *

* @return {@code this} * @param labels GitHub Actions labels used for this provider. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder labels(final java.util.List labels) { this.props().labels(labels); return this; } /** * (experimental) 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: 2048 *

* @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.Experimental) public Builder memoryLimitMiB(final java.lang.Number memoryLimitMiB) { this.props().memoryLimitMiB(memoryLimitMiB); return this; } /** * (deprecated) Security group to assign to the task. *

* Default: a new security group *

* @return {@code this} * @deprecated use {@link securityGroups } * @param securityGroup Security group to assign to the task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder securityGroup(final software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup) { this.props().securityGroup(securityGroup); return this; } /** * (experimental) Security groups to assign to the task. *

* Default: a new security group *

* @return {@code this} * @param securityGroups Security groups to assign to the task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder securityGroups(final java.util.List securityGroups) { this.props().securityGroups(securityGroups); return this; } /** * (experimental) Use Fargate spot capacity provider to save money. *

*

    *
  • Runners may fail to start due to missing capacity.
  • *
  • Runners might be stopped prematurely with spot pricing.
  • *
*

* Default: false *

* @return {@code this} * @param spot Use Fargate spot capacity provider to save money. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder spot(final java.lang.Boolean spot) { this.props().spot(spot); return this; } /** * (experimental) Subnets to run the runners in. *

* Default: Fargate default *

* @return {@code this} * @param subnetSelection Subnets to run the runners in. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder subnetSelection(final software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection) { this.props().subnetSelection(subnetSelection); return this; } /** * (experimental) VPC to launch the runners in. *

* Default: default account VPC *

* @return {@code this} * @param vpc VPC to launch the runners in. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpc(final software.amazon.awscdk.services.ec2.IVpc vpc) { this.props().vpc(vpc); return this; } /** * @returns a newly built instance of {@link com.cloudsnorkel.cdk.github.runners.FargateRunner}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public com.cloudsnorkel.cdk.github.runners.FargateRunner build() { return new com.cloudsnorkel.cdk.github.runners.FargateRunner( this.scope, this.id, this.props != null ? this.props.build() : null ); } private com.cloudsnorkel.cdk.github.runners.FargateRunnerProviderProps.Builder props() { if (this.props == null) { this.props = new com.cloudsnorkel.cdk.github.runners.FargateRunnerProviderProps.Builder(); } return this.props; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy