software.amazon.awscdk.services.apprunner.alpha.EcrSource Maven / Gradle / Ivy
Show all versions of apprunner-alpha Show documentation
package software.amazon.awscdk.services.apprunner.alpha;
/**
* (experimental) Represents the service source from ECR.
*
* 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.*;
* import software.amazon.awscdk.services.ecr.*;
* Repository repository;
* Secret secret;
* EcrSource ecrSource = EcrSource.Builder.create()
* .repository(repository)
* // the properties below are optional
* .imageConfiguration(ImageConfiguration.builder()
* .environment(Map.of(
* "environmentKey", "environment"))
* .environmentSecrets(Map.of(
* "environmentSecretsKey", secret))
* .environmentVariables(Map.of(
* "environmentVariablesKey", "environmentVariables"))
* .port(123)
* .startCommand("startCommand")
* .build())
* .tag("tag")
* .tagOrDigest("tagOrDigest")
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-17T21:37:41.214Z")
@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.EcrSource")
public class EcrSource extends software.amazon.awscdk.services.apprunner.alpha.Source {
protected EcrSource(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EcrSource(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 EcrSource(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.EcrProps 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.EcrSource}.
*/
@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.EcrProps.Builder props;
private Builder() {
this.props = new software.amazon.awscdk.services.apprunner.alpha.EcrProps.Builder();
}
/**
* (experimental) Represents the ECR repository.
*
* @return {@code this}
* @param repository Represents the ECR repository. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder repository(final software.amazon.awscdk.services.ecr.IRepository repository) {
this.props.repository(repository);
return this;
}
/**
* (experimental) The image configuration for the image from ECR.
*
* Default: - no image configuration will be passed. The default `port` will be 8080.
*
* @return {@code this}
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-port
* @param imageConfiguration The image configuration for the image from ECR. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder imageConfiguration(final software.amazon.awscdk.services.apprunner.alpha.ImageConfiguration imageConfiguration) {
this.props.imageConfiguration(imageConfiguration);
return this;
}
/**
* (deprecated) Image tag.
*
* Default: - 'latest'
*
* @return {@code this}
* @deprecated use tagOrDigest
* @param tag Image tag. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder tag(final java.lang.String tag) {
this.props.tag(tag);
return this;
}
/**
* (experimental) Image tag or digest (digests must start with sha256:
).
*
* Default: - 'latest'
*
* @return {@code this}
* @param tagOrDigest Image tag or digest (digests must start with sha256:
). This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder tagOrDigest(final java.lang.String tagOrDigest) {
this.props.tagOrDigest(tagOrDigest);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awscdk.services.apprunner.alpha.EcrSource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public software.amazon.awscdk.services.apprunner.alpha.EcrSource build() {
return new software.amazon.awscdk.services.apprunner.alpha.EcrSource(
this.props.build()
);
}
}
}