software.amazon.awscdk.services.apprunner.alpha.ObservabilityConfigurationProps Maven / Gradle / Ivy
Show all versions of apprunner-alpha Show documentation
package software.amazon.awscdk.services.apprunner.alpha;
/**
* (experimental) Properties of the AppRunner Observability configuration.
*
* Example:
*
*
* ObservabilityConfiguration observabilityConfiguration = ObservabilityConfiguration.Builder.create(this, "ObservabilityConfiguration")
* .observabilityConfigurationName("MyObservabilityConfiguration")
* .traceConfigurationVendor(TraceConfigurationVendor.AWSXRAY)
* .build();
* Service.Builder.create(this, "DemoService")
* .source(Source.fromEcrPublic(EcrPublicProps.builder()
* .imageConfiguration(ImageConfiguration.builder().port(8000).build())
* .imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest")
* .build()))
* .observabilityConfiguration(observabilityConfiguration)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-22T02:24:11.373Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.ObservabilityConfigurationProps")
@software.amazon.jsii.Jsii.Proxy(ObservabilityConfigurationProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ObservabilityConfigurationProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The implementation provider chosen for tracing App Runner services.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.TraceConfigurationVendor getTraceConfigurationVendor();
/**
* (experimental) The name for the ObservabilityConfiguration.
*
* Default: - a name generated by CloudFormation
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getObservabilityConfigurationName() {
return null;
}
/**
* @return a {@link Builder} of {@link ObservabilityConfigurationProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ObservabilityConfigurationProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.apprunner.alpha.TraceConfigurationVendor traceConfigurationVendor;
java.lang.String observabilityConfigurationName;
/**
* Sets the value of {@link ObservabilityConfigurationProps#getTraceConfigurationVendor}
* @param traceConfigurationVendor The implementation provider chosen for tracing App Runner services. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder traceConfigurationVendor(software.amazon.awscdk.services.apprunner.alpha.TraceConfigurationVendor traceConfigurationVendor) {
this.traceConfigurationVendor = traceConfigurationVendor;
return this;
}
/**
* Sets the value of {@link ObservabilityConfigurationProps#getObservabilityConfigurationName}
* @param observabilityConfigurationName The name for the ObservabilityConfiguration.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder observabilityConfigurationName(java.lang.String observabilityConfigurationName) {
this.observabilityConfigurationName = observabilityConfigurationName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ObservabilityConfigurationProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public ObservabilityConfigurationProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ObservabilityConfigurationProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ObservabilityConfigurationProps {
private final software.amazon.awscdk.services.apprunner.alpha.TraceConfigurationVendor traceConfigurationVendor;
private final java.lang.String observabilityConfigurationName;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.traceConfigurationVendor = software.amazon.jsii.Kernel.get(this, "traceConfigurationVendor", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.TraceConfigurationVendor.class));
this.observabilityConfigurationName = software.amazon.jsii.Kernel.get(this, "observabilityConfigurationName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.traceConfigurationVendor = java.util.Objects.requireNonNull(builder.traceConfigurationVendor, "traceConfigurationVendor is required");
this.observabilityConfigurationName = builder.observabilityConfigurationName;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.TraceConfigurationVendor getTraceConfigurationVendor() {
return this.traceConfigurationVendor;
}
@Override
public final java.lang.String getObservabilityConfigurationName() {
return this.observabilityConfigurationName;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
data.set("traceConfigurationVendor", om.valueToTree(this.getTraceConfigurationVendor()));
if (this.getObservabilityConfigurationName() != null) {
data.set("observabilityConfigurationName", om.valueToTree(this.getObservabilityConfigurationName()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-apprunner-alpha.ObservabilityConfigurationProps"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ObservabilityConfigurationProps.Jsii$Proxy that = (ObservabilityConfigurationProps.Jsii$Proxy) o;
if (!traceConfigurationVendor.equals(that.traceConfigurationVendor)) return false;
return this.observabilityConfigurationName != null ? this.observabilityConfigurationName.equals(that.observabilityConfigurationName) : that.observabilityConfigurationName == null;
}
@Override
public final int hashCode() {
int result = this.traceConfigurationVendor.hashCode();
result = 31 * result + (this.observabilityConfigurationName != null ? this.observabilityConfigurationName.hashCode() : 0);
return result;
}
}
}