software.amazon.awscdk.services.ecs.EcsOptimizedAmi Maven / Gradle / Ivy
Show all versions of ecs Show documentation
package software.amazon.awscdk.services.ecs;
/**
* (deprecated) Construct a Linux or Windows machine image from the latest ECS Optimized AMI published in SSM.
*
* @deprecated see {@link EcsOptimizedImage#amazonLinux}, {@link EcsOptimizedImage#amazonLinux} and {@link EcsOptimizedImage#windows}
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.29.0 (build 41df200)", date = "2021-05-25T18:24:57.050Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.EcsOptimizedAmi")
public class EcsOptimizedAmi extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.ec2.IMachineImage {
protected EcsOptimizedAmi(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EcsOptimizedAmi(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* (deprecated) Constructs a new instance of the EcsOptimizedAmi class.
*
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public EcsOptimizedAmi(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.EcsOptimizedAmiProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { props });
}
/**
* (deprecated) Constructs a new instance of the EcsOptimizedAmi class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public EcsOptimizedAmi() {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
}
/**
* (deprecated) Return the correct image.
*
* @param scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.MachineImageConfig getImage(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope) {
return software.amazon.jsii.Kernel.call(this, "getImage", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.MachineImageConfig.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") });
}
/**
* (deprecated) A fluent builder for {@link software.amazon.awscdk.services.ecs.EcsOptimizedAmi}.
*/
@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}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public static Builder create() {
return new Builder();
}
private software.amazon.awscdk.services.ecs.EcsOptimizedAmiProps.Builder props;
private Builder() {
}
/**
* (deprecated) The Amazon Linux generation to use.
*
* Default: AmazonLinuxGeneration.AmazonLinux2
*
* @return {@code this}
* @param generation The Amazon Linux generation to use. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder generation(final software.amazon.awscdk.services.ec2.AmazonLinuxGeneration generation) {
this.props().generation(generation);
return this;
}
/**
* (deprecated) The ECS-optimized AMI variant to use.
*
* Default: AmiHardwareType.Standard
*
* @return {@code this}
* @param hardwareType The ECS-optimized AMI variant to use. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder hardwareType(final software.amazon.awscdk.services.ecs.AmiHardwareType hardwareType) {
this.props().hardwareType(hardwareType);
return this;
}
/**
* (deprecated) The Windows Server version to use.
*
* Default: none, uses Linux generation
*
* @return {@code this}
* @param windowsVersion The Windows Server version to use. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder windowsVersion(final software.amazon.awscdk.services.ecs.WindowsOptimizedVersion windowsVersion) {
this.props().windowsVersion(windowsVersion);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.ecs.EcsOptimizedAmi}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@Override
public software.amazon.awscdk.services.ecs.EcsOptimizedAmi build() {
return new software.amazon.awscdk.services.ecs.EcsOptimizedAmi(
this.props != null ? this.props.build() : null
);
}
private software.amazon.awscdk.services.ecs.EcsOptimizedAmiProps.Builder props() {
if (this.props == null) {
this.props = new software.amazon.awscdk.services.ecs.EcsOptimizedAmiProps.Builder();
}
return this.props;
}
}
}