com.cloudsnorkel.cdk.github.runners.IRunnerProvider Maven / Gradle / Ivy
Show all versions of cdk.github.runners Show documentation
package com.cloudsnorkel.cdk.github.runners;
/**
* (experimental) Interface for all runner providers.
*
* Implementations create all required resources and return a step function task that starts those resources from {@link getStepFunctionTask}.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.514Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.IRunnerProvider")
@software.amazon.jsii.Jsii.Proxy(IRunnerProvider.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface IRunnerProvider extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.ec2.IConnectable, software.amazon.awscdk.services.iam.IGrantable, software.constructs.IConstruct {
/**
* (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 use 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.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.List getLabels();
/**
* (experimental) Log group where provided runners will save their logs.
*
* Note that this is not the job log, but the runner itself. It will not contain output from the GitHub Action but only metadata on its execution.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.ILogGroup getLogGroup();
/**
* (deprecated) List of step functions errors that should be retried.
*
* @deprecated do not use
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@org.jetbrains.annotations.NotNull java.util.List getRetryableErrors();
/**
* (experimental) Generate step function tasks that execute the runner.
*
* Called by GithubRunners and shouldn't be called manually.
*
* @param parameters specific build parameters. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.IChainable getStepFunctionTask(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerRuntimeParameters parameters);
/**
* (experimental) An optional method that modifies the role of the state machine after all the tasks have been generated.
*
* This can be used to add additional policy
* statements to the state machine role that are not automatically added by the task returned from {@link getStepFunctionTask}.
*
* @param stateMachineRole role for the state machine that executes the task returned from {@link getStepFunctionTask}. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
void grantStateMachine(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable stateMachineRole);
/**
* (experimental) Return status of the runner provider to be used in the main status function.
*
* Also gives the status function any needed permissions to query the Docker image or AMI.
*
* @param statusFunctionRole grantable for the status function. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.IRunnerProviderStatus status(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable statusFunctionRole);
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements com.cloudsnorkel.cdk.github.runners.IRunnerProvider.Jsii$Default {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
/**
* The network connections associated with this resource.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Connections getConnections() {
return software.amazon.jsii.Kernel.get(this, "connections", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.Connections.class));
}
/**
* The principal to grant permissions to.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() {
return software.amazon.jsii.Kernel.get(this, "grantPrincipal", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IPrincipal.class));
}
/**
* The tree node.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final @org.jetbrains.annotations.NotNull software.constructs.Node getNode() {
return software.amazon.jsii.Kernel.get(this, "node", software.amazon.jsii.NativeType.forClass(software.constructs.Node.class));
}
/**
* (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 use 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.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.util.List getLabels() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "labels", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* (experimental) Log group where provided runners will save their logs.
*
* Note that this is not the job log, but the runner itself. It will not contain output from the GitHub Action but only metadata on its execution.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.ILogGroup getLogGroup() {
return software.amazon.jsii.Kernel.get(this, "logGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.ILogGroup.class));
}
/**
* (deprecated) List of step functions errors that should be retried.
*
* @deprecated do not use
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final @org.jetbrains.annotations.NotNull java.util.List getRetryableErrors() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "retryableErrors", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* (experimental) Generate step function tasks that execute the runner.
*
* Called by GithubRunners and shouldn't be called manually.
*
* @param parameters specific build parameters. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.IChainable getStepFunctionTask(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerRuntimeParameters parameters) {
return software.amazon.jsii.Kernel.call(this, "getStepFunctionTask", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.IChainable.class), new Object[] { java.util.Objects.requireNonNull(parameters, "parameters is required") });
}
/**
* (experimental) An optional method that modifies the role of the state machine after all the tasks have been generated.
*
* This can be used to add additional policy
* statements to the state machine role that are not automatically added by the task returned from {@link getStepFunctionTask}.
*
* @param stateMachineRole role for the state machine that executes the task returned from {@link getStepFunctionTask}. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public final void grantStateMachine(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable stateMachineRole) {
software.amazon.jsii.Kernel.call(this, "grantStateMachine", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(stateMachineRole, "stateMachineRole is required") });
}
/**
* (experimental) Return status of the runner provider to be used in the main status function.
*
* Also gives the status function any needed permissions to query the Docker image or AMI.
*
* @param statusFunctionRole grantable for the status function. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.IRunnerProviderStatus status(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable statusFunctionRole) {
return software.amazon.jsii.Kernel.call(this, "status", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.IRunnerProviderStatus.class), new Object[] { java.util.Objects.requireNonNull(statusFunctionRole, "statusFunctionRole is required") });
}
}
/**
* Internal default implementation for {@link IRunnerProvider}.
*/
@software.amazon.jsii.Internal
interface Jsii$Default extends IRunnerProvider, software.amazon.awscdk.services.ec2.IConnectable.Jsii$Default, software.amazon.awscdk.services.iam.IGrantable.Jsii$Default, software.constructs.IConstruct.Jsii$Default {
/**
* The network connections associated with this resource.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Connections getConnections() {
return software.amazon.jsii.Kernel.get(this, "connections", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.Connections.class));
}
/**
* The principal to grant permissions to.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() {
return software.amazon.jsii.Kernel.get(this, "grantPrincipal", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IPrincipal.class));
}
/**
* The tree node.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.NotNull software.constructs.Node getNode() {
return software.amazon.jsii.Kernel.get(this, "node", software.amazon.jsii.NativeType.forClass(software.constructs.Node.class));
}
/**
* (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 use 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.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.NotNull java.util.List getLabels() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "labels", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* (experimental) Log group where provided runners will save their logs.
*
* Note that this is not the job log, but the runner itself. It will not contain output from the GitHub Action but only metadata on its execution.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.ILogGroup getLogGroup() {
return software.amazon.jsii.Kernel.get(this, "logGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.ILogGroup.class));
}
/**
* (deprecated) List of step functions errors that should be retried.
*
* @deprecated do not use
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
default @org.jetbrains.annotations.NotNull java.util.List getRetryableErrors() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "retryableErrors", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* (experimental) Generate step function tasks that execute the runner.
*
* Called by GithubRunners and shouldn't be called manually.
*
* @param parameters specific build parameters. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.IChainable getStepFunctionTask(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerRuntimeParameters parameters) {
return software.amazon.jsii.Kernel.call(this, "getStepFunctionTask", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.IChainable.class), new Object[] { java.util.Objects.requireNonNull(parameters, "parameters is required") });
}
/**
* (experimental) An optional method that modifies the role of the state machine after all the tasks have been generated.
*
* This can be used to add additional policy
* statements to the state machine role that are not automatically added by the task returned from {@link getStepFunctionTask}.
*
* @param stateMachineRole role for the state machine that executes the task returned from {@link getStepFunctionTask}. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
default void grantStateMachine(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable stateMachineRole) {
software.amazon.jsii.Kernel.call(this, "grantStateMachine", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(stateMachineRole, "stateMachineRole is required") });
}
/**
* (experimental) Return status of the runner provider to be used in the main status function.
*
* Also gives the status function any needed permissions to query the Docker image or AMI.
*
* @param statusFunctionRole grantable for the status function. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
default @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.IRunnerProviderStatus status(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable statusFunctionRole) {
return software.amazon.jsii.Kernel.call(this, "status", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.IRunnerProviderStatus.class), new Object[] { java.util.Objects.requireNonNull(statusFunctionRole, "statusFunctionRole is required") });
}
}
}