io.github.cdklabs.cdkecsserviceextensions.AliasedPortExtension Maven / Gradle / Ivy
Show all versions of cdk-ecs-service-extensions Show documentation
package io.github.cdklabs.cdkecsserviceextensions;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T00:29:58.974Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkecsserviceextensions.$Module.class, fqn = "@aws-cdk-containers/ecs-service-extensions.AliasedPortExtension")
public class AliasedPortExtension extends io.github.cdklabs.cdkecsserviceextensions.ServiceExtension {
protected AliasedPortExtension(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected AliasedPortExtension(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 AliasedPortExtension(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkecsserviceextensions.AliasedPortProps 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) A hook that allows the extension to add hooks to other extensions that are registered.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void addHooks() {
software.amazon.jsii.Kernel.call(this, "addHooks", software.amazon.jsii.NativeType.VOID);
}
/**
* (experimental) Prior to launching the task definition as a service, this hook is called on each extension to give it a chance to mutate the properties of the service to be created.
*
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkecsserviceextensions.ServiceBuild modifyServiceProps(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkecsserviceextensions.ServiceBuild props) {
return software.amazon.jsii.Kernel.call(this, "modifyServiceProps", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkecsserviceextensions.ServiceBuild.class), new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) A hook that is called for each extension ahead of time to allow for any initial setup, such as creating resources in advance.
*
* @param service This parameter is required.
* @param scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void prehook(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkecsserviceextensions.Service service, final @org.jetbrains.annotations.NotNull software.constructs.Construct scope) {
software.amazon.jsii.Kernel.call(this, "prehook", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(service, "service is required"), java.util.Objects.requireNonNull(scope, "scope is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.NotNull java.lang.String getAlias() {
return software.amazon.jsii.Kernel.get(this, "alias", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected void setAlias(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "alias", java.util.Objects.requireNonNull(value, "alias is required"));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.Nullable java.lang.Number getAliasPort() {
return software.amazon.jsii.Kernel.get(this, "aliasPort", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected void setAliasPort(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
software.amazon.jsii.Kernel.set(this, "aliasPort", value);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.AppProtocol getAppProtocol() {
return software.amazon.jsii.Kernel.get(this, "appProtocol", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.AppProtocol.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected void setAppProtocol(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.AppProtocol value) {
software.amazon.jsii.Kernel.set(this, "appProtocol", value);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.Nullable java.lang.String getNamespace() {
return software.amazon.jsii.Kernel.get(this, "namespace", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected void setNamespace(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "namespace", value);
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdkecsserviceextensions.AliasedPortExtension}.
*/
@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 io.github.cdklabs.cdkecsserviceextensions.AliasedPortProps.Builder props;
private Builder() {
this.props = new io.github.cdklabs.cdkecsserviceextensions.AliasedPortProps.Builder();
}
/**
* (experimental) The DNS alias to advertise for downstream clients.
*
* @return {@code this}
* @param alias The DNS alias to advertise for downstream clients. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder alias(final java.lang.String alias) {
this.props.alias(alias);
return this;
}
/**
* (experimental) The traffic port for clients to use to connect to the DNS alias.
*
* Default: - same as containerPort.
*
* @return {@code this}
* @param aliasPort The traffic port for clients to use to connect to the DNS alias. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder aliasPort(final java.lang.Number aliasPort) {
this.props.aliasPort(aliasPort);
return this;
}
/**
* (experimental) The protocol to use over the specified port.
*
* May be one of HTTP, HTTP2, or GRPC.
*
* Default: - none
*
* @return {@code this}
* @param appProtocol The protocol to use over the specified port. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder appProtocol(final software.amazon.awscdk.services.ecs.AppProtocol appProtocol) {
this.props.appProtocol(appProtocol);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdkecsserviceextensions.AliasedPortExtension}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdkecsserviceextensions.AliasedPortExtension build() {
return new io.github.cdklabs.cdkecsserviceextensions.AliasedPortExtension(
this.props.build()
);
}
}
}