com.pulumi.azure.containerapp.outputs.AppTemplateContainerLivenessProbe Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.containerapp.outputs;
import com.pulumi.azure.containerapp.outputs.AppTemplateContainerLivenessProbeHeader;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class AppTemplateContainerLivenessProbe {
/**
* @return The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.
*
*/
private @Nullable Integer failureCountThreshold;
/**
* @return A `header` block as detailed below.
*
*/
private @Nullable List headers;
/**
* @return The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
*
*/
private @Nullable String host;
/**
* @return The time in seconds to wait after the container has started before the probe is started.
*
*/
private @Nullable Integer initialDelay;
/**
* @return How often, in seconds, the probe should run. Possible values are in the range `1` - `240`. Defaults to `10`.
*
*/
private @Nullable Integer intervalSeconds;
/**
* @return The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.
*
*/
private @Nullable String path;
/**
* @return The port number on which to connect. Possible values are between `1` and `65535`.
*
*/
private Integer port;
/**
* @return The time in seconds after the container is sent the termination signal before the process if forcibly killed.
*
*/
private @Nullable Integer terminationGracePeriodSeconds;
/**
* @return Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`.
*
*/
private @Nullable Integer timeout;
/**
* @return Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.
*
*/
private String transport;
private AppTemplateContainerLivenessProbe() {}
/**
* @return The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.
*
*/
public Optional failureCountThreshold() {
return Optional.ofNullable(this.failureCountThreshold);
}
/**
* @return A `header` block as detailed below.
*
*/
public List headers() {
return this.headers == null ? List.of() : this.headers;
}
/**
* @return The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
*
*/
public Optional host() {
return Optional.ofNullable(this.host);
}
/**
* @return The time in seconds to wait after the container has started before the probe is started.
*
*/
public Optional initialDelay() {
return Optional.ofNullable(this.initialDelay);
}
/**
* @return How often, in seconds, the probe should run. Possible values are in the range `1` - `240`. Defaults to `10`.
*
*/
public Optional intervalSeconds() {
return Optional.ofNullable(this.intervalSeconds);
}
/**
* @return The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.
*
*/
public Optional path() {
return Optional.ofNullable(this.path);
}
/**
* @return The port number on which to connect. Possible values are between `1` and `65535`.
*
*/
public Integer port() {
return this.port;
}
/**
* @return The time in seconds after the container is sent the termination signal before the process if forcibly killed.
*
*/
public Optional terminationGracePeriodSeconds() {
return Optional.ofNullable(this.terminationGracePeriodSeconds);
}
/**
* @return Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`.
*
*/
public Optional timeout() {
return Optional.ofNullable(this.timeout);
}
/**
* @return Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.
*
*/
public String transport() {
return this.transport;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AppTemplateContainerLivenessProbe defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer failureCountThreshold;
private @Nullable List headers;
private @Nullable String host;
private @Nullable Integer initialDelay;
private @Nullable Integer intervalSeconds;
private @Nullable String path;
private Integer port;
private @Nullable Integer terminationGracePeriodSeconds;
private @Nullable Integer timeout;
private String transport;
public Builder() {}
public Builder(AppTemplateContainerLivenessProbe defaults) {
Objects.requireNonNull(defaults);
this.failureCountThreshold = defaults.failureCountThreshold;
this.headers = defaults.headers;
this.host = defaults.host;
this.initialDelay = defaults.initialDelay;
this.intervalSeconds = defaults.intervalSeconds;
this.path = defaults.path;
this.port = defaults.port;
this.terminationGracePeriodSeconds = defaults.terminationGracePeriodSeconds;
this.timeout = defaults.timeout;
this.transport = defaults.transport;
}
@CustomType.Setter
public Builder failureCountThreshold(@Nullable Integer failureCountThreshold) {
this.failureCountThreshold = failureCountThreshold;
return this;
}
@CustomType.Setter
public Builder headers(@Nullable List headers) {
this.headers = headers;
return this;
}
public Builder headers(AppTemplateContainerLivenessProbeHeader... headers) {
return headers(List.of(headers));
}
@CustomType.Setter
public Builder host(@Nullable String host) {
this.host = host;
return this;
}
@CustomType.Setter
public Builder initialDelay(@Nullable Integer initialDelay) {
this.initialDelay = initialDelay;
return this;
}
@CustomType.Setter
public Builder intervalSeconds(@Nullable Integer intervalSeconds) {
this.intervalSeconds = intervalSeconds;
return this;
}
@CustomType.Setter
public Builder path(@Nullable String path) {
this.path = path;
return this;
}
@CustomType.Setter
public Builder port(Integer port) {
if (port == null) {
throw new MissingRequiredPropertyException("AppTemplateContainerLivenessProbe", "port");
}
this.port = port;
return this;
}
@CustomType.Setter
public Builder terminationGracePeriodSeconds(@Nullable Integer terminationGracePeriodSeconds) {
this.terminationGracePeriodSeconds = terminationGracePeriodSeconds;
return this;
}
@CustomType.Setter
public Builder timeout(@Nullable Integer timeout) {
this.timeout = timeout;
return this;
}
@CustomType.Setter
public Builder transport(String transport) {
if (transport == null) {
throw new MissingRequiredPropertyException("AppTemplateContainerLivenessProbe", "transport");
}
this.transport = transport;
return this;
}
public AppTemplateContainerLivenessProbe build() {
final var _resultValue = new AppTemplateContainerLivenessProbe();
_resultValue.failureCountThreshold = failureCountThreshold;
_resultValue.headers = headers;
_resultValue.host = host;
_resultValue.initialDelay = initialDelay;
_resultValue.intervalSeconds = intervalSeconds;
_resultValue.path = path;
_resultValue.port = port;
_resultValue.terminationGracePeriodSeconds = terminationGracePeriodSeconds;
_resultValue.timeout = timeout;
_resultValue.transport = transport;
return _resultValue;
}
}
}