com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent Maven / Gradle / Ivy
Show all versions of cdk.github.runners Show documentation
package com.cloudsnorkel.cdk.github.runners;
/**
* (deprecated) Components are a set of commands to run and optional files to add to an image.
*
* Components are the building blocks of images built by Image Builder.
*
* Example:
*
*
* new ImageBuilderComponent(this, 'AWS CLI', {
* platform: 'Windows',
* displayName: 'AWS CLI',
* description: 'Install latest version of AWS CLI',
* commands: [
* '$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList \'/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn\'',
* 'if ($p.ExitCode -ne 0) { throw "Exit code is $p.ExitCode" }',
* ],
* }
*
*
* @deprecated Use RunnerImageComponent
instead as this be internal soon.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.518Z")
@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.ImageBuilderComponent")
public class ImageBuilderComponent extends software.amazon.awscdk.Resource {
protected ImageBuilderComponent(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ImageBuilderComponent(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.Deprecated)
@Deprecated
public ImageBuilderComponent(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties 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") });
}
/**
* @param type This parameter is required.
* @param name This parameter is required.
* @param data This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
protected @org.jetbrains.annotations.NotNull java.lang.String generateVersion(final @org.jetbrains.annotations.NotNull java.lang.String type, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull java.lang.Object data) {
return software.amazon.jsii.Kernel.call(this, "generateVersion", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(type, "type is required"), java.util.Objects.requireNonNull(name, "name is required"), data });
}
/**
* (deprecated) Grants read permissions to the principal on the assets buckets.
*
* @param grantee This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public void grantAssetsRead(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable grantee) {
software.amazon.jsii.Kernel.call(this, "grantAssetsRead", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(grantee, "grantee is required") });
}
/**
* @param platform This parameter is required.
* @param commands This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public @org.jetbrains.annotations.NotNull java.util.List prefixCommandsWithErrorHandling(final @org.jetbrains.annotations.NotNull java.lang.String platform, final @org.jetbrains.annotations.NotNull java.util.List commands) {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "prefixCommandsWithErrorHandling", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)), new Object[] { java.util.Objects.requireNonNull(platform, "platform is required"), java.util.Objects.requireNonNull(commands, "commands is required") }));
}
/**
* (deprecated) Component ARN.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public @org.jetbrains.annotations.NotNull java.lang.String getArn() {
return software.amazon.jsii.Kernel.get(this, "arn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (deprecated) Supported platform for the component.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public @org.jetbrains.annotations.NotNull java.lang.String getPlatform() {
return software.amazon.jsii.Kernel.get(this, "platform", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (deprecated) A fluent builder for {@link com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
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.Deprecated)
@Deprecated
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.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new com.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties.Builder();
}
/**
* (experimental) Shell commands to run when adding this component to the image.
*
* On Linux, these are bash commands. On Windows, there are PowerShell commands.
*
* @return {@code this}
* @param commands Shell commands to run when adding this component to the image. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder commands(final java.util.List commands) {
this.props.commands(commands);
return this;
}
/**
* (experimental) Component description.
*
* @return {@code this}
* @param description Component description. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder description(final java.lang.String description) {
this.props.description(description);
return this;
}
/**
* (experimental) Component display name.
*
* @return {@code this}
* @param displayName Component display name. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder displayName(final java.lang.String displayName) {
this.props.displayName(displayName);
return this;
}
/**
* (experimental) Component platform.
*
* Must match the builder platform.
*
* @return {@code this}
* @param platform Component platform. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder platform(final java.lang.String platform) {
this.props.platform(platform);
return this;
}
/**
* (experimental) Optional assets to add to the built image.
*
* @return {@code this}
* @param assets Optional assets to add to the built image. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder assets(final java.util.List extends com.cloudsnorkel.cdk.github.runners.ImageBuilderAsset> assets) {
this.props.assets(assets);
return this;
}
/**
* (experimental) Require a reboot after installing this component.
*
* Default: false
*
* @return {@code this}
* @param reboot Require a reboot after installing this component. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder reboot(final java.lang.Boolean reboot) {
this.props.reboot(reboot);
return this;
}
/**
* @return a newly built instance of {@link com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@Override
public com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent build() {
return new com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent(
this.scope,
this.id,
this.props.build()
);
}
}
}