software.amazon.awscdk.services.apprunner.alpha.GithubSource Maven / Gradle / Ivy
Show all versions of apprunner-alpha Show documentation
package software.amazon.awscdk.services.apprunner.alpha;
/**
* (experimental) Represents the service source from a Github repository.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.apprunner.alpha.*;
* GitHubConnection gitHubConnection;
* Runtime runtime;
* GithubSource githubSource = GithubSource.Builder.create()
* .configurationSource(ConfigurationSourceType.REPOSITORY)
* .connection(gitHubConnection)
* .repositoryUrl("repositoryUrl")
* // the properties below are optional
* .branch("branch")
* .codeConfigurationValues(CodeConfigurationValues.builder()
* .runtime(runtime)
* // the properties below are optional
* .buildCommand("buildCommand")
* .environment(Map.of(
* "environmentKey", "environment"))
* .port("port")
* .startCommand("startCommand")
* .build())
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.60.1 (build 2799dc8)", date = "2022-07-13T22:14:11.914Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.GithubSource")
public class GithubSource extends software.amazon.awscdk.services.apprunner.alpha.Source {
protected GithubSource(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected GithubSource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public GithubSource(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.GithubRepositoryProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) Called when the Job is initialized to allow this object to bind.
*
* @param _scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct _scope) {
return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.SourceConfig.class), new Object[] { java.util.Objects.requireNonNull(_scope, "_scope is required") });
}
/**
* (experimental) A fluent builder for {@link software.amazon.awscdk.services.apprunner.alpha.GithubSource}.
*/
@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}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create() {
return new Builder();
}
private final software.amazon.awscdk.services.apprunner.alpha.GithubRepositoryProps.Builder props;
private Builder() {
this.props = new software.amazon.awscdk.services.apprunner.alpha.GithubRepositoryProps.Builder();
}
/**
* (experimental) The source of the App Runner configuration.
*
* @return {@code this}
* @param configurationSource The source of the App Runner configuration. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder configurationSource(final software.amazon.awscdk.services.apprunner.alpha.ConfigurationSourceType configurationSource) {
this.props.configurationSource(configurationSource);
return this;
}
/**
* (experimental) ARN of the connection to Github.
*
* Only required for Github source.
*
* @return {@code this}
* @param connection ARN of the connection to Github. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder connection(final software.amazon.awscdk.services.apprunner.alpha.GitHubConnection connection) {
this.props.connection(connection);
return this;
}
/**
* (experimental) The location of the repository that contains the source code.
*
* @return {@code this}
* @param repositoryUrl The location of the repository that contains the source code. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder repositoryUrl(final java.lang.String repositoryUrl) {
this.props.repositoryUrl(repositoryUrl);
return this;
}
/**
* (experimental) The branch name that represents a specific version for the repository.
*
* Default: main
*
* @return {@code this}
* @param branch The branch name that represents a specific version for the repository. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder branch(final java.lang.String branch) {
this.props.branch(branch);
return this;
}
/**
* (experimental) The code configuration values.
*
* Will be ignored if configurationSource is REPOSITORY
.
*
* Default: - no values will be passed. The `apprunner.yaml` from the github reopsitory will be used instead.
*
* @return {@code this}
* @param codeConfigurationValues The code configuration values. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder codeConfigurationValues(final software.amazon.awscdk.services.apprunner.alpha.CodeConfigurationValues codeConfigurationValues) {
this.props.codeConfigurationValues(codeConfigurationValues);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.apprunner.alpha.GithubSource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public software.amazon.awscdk.services.apprunner.alpha.GithubSource build() {
return new software.amazon.awscdk.services.apprunner.alpha.GithubSource(
this.props.build()
);
}
}
}