io.github.cdklabs.cdkecsserviceextensions.InjectableTopic Maven / Gradle / Ivy
Show all versions of cdk-ecs-service-extensions Show documentation
package io.github.cdklabs.cdkecsserviceextensions;
/**
* (experimental) The InjectableTopic
class represents SNS Topic resource that can be published events to by the parent service.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-28T00:28:59.613Z")
@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.InjectableTopic")
public class InjectableTopic extends software.amazon.jsii.JsiiObject implements io.github.cdklabs.cdkecsserviceextensions.IGrantInjectable {
protected InjectableTopic(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected InjectableTopic(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 InjectableTopic(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkecsserviceextensions.InjectableTopicProps 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") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.util.Map environmentVariables() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "environmentVariables", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* @param taskDefinition This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void grant(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition) {
software.amazon.jsii.Kernel.call(this, "grant", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(taskDefinition, "taskDefinition is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sns.ITopic getTopic() {
return software.amazon.jsii.Kernel.get(this, "topic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.class));
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdkecsserviceextensions.InjectableTopic}.
*/
@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.InjectableTopicProps.Builder props;
private Builder() {
this.props = new io.github.cdklabs.cdkecsserviceextensions.InjectableTopicProps.Builder();
}
/**
* (experimental) The SNS Topic to publish events to.
*
* @return {@code this}
* @param topic The SNS Topic to publish events to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder topic(final software.amazon.awscdk.services.sns.ITopic topic) {
this.props.topic(topic);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdkecsserviceextensions.InjectableTopic}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdkecsserviceextensions.InjectableTopic build() {
return new io.github.cdklabs.cdkecsserviceextensions.InjectableTopic(
this.props.build()
);
}
}
}