All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.alb.HealthCheckTemplate Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** 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.alicloud.alb;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.alb.HealthCheckTemplateArgs;
import com.pulumi.alicloud.alb.inputs.HealthCheckTemplateState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides an Application Load Balancer (ALB) Health Check Template resource.
 * 
 * For information about Application Load Balancer (ALB) Health Check Template and how to use it, see [What is Health Check Template](https://www.alibabacloud.com/help/en/slb/application-load-balancer/developer-reference/api-alb-2020-06-16-createhealthchecktemplate).
 * 
 * > **NOTE:** Available since v1.134.0.
 * 
 * ## Example Usage
 * 
 * Basic Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.alicloud.alb.HealthCheckTemplate;
 * import com.pulumi.alicloud.alb.HealthCheckTemplateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         final var config = ctx.config();
 *         final var name = config.get("name").orElse("terraform-example");
 *         var example = new HealthCheckTemplate("example", HealthCheckTemplateArgs.builder()
 *             .healthCheckTemplateName(name)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Application Load Balancer (ALB) Health Check Template can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:alb/healthCheckTemplate:HealthCheckTemplate example <id> * ``` * */ @ResourceType(type="alicloud:alb/healthCheckTemplate:HealthCheckTemplate") public class HealthCheckTemplate extends com.pulumi.resources.CustomResource { /** * Whether to precheck the API request. * */ @Export(name="dryRun", refs={Boolean.class}, tree="[0]") private Output dryRun; /** * @return Whether to precheck the API request. * */ public Output> dryRun() { return Codegen.optional(this.dryRun); } /** * The HTTP status codes that are used to indicate whether the backend server passes the health check. Default value: `http_2xx`. Valid values: `http_2xx`, `http_3xx`, `http_4xx`, and `http_5xx`. **NOTE:** `health_check_codes` takes effect only if `health_check_protocol` is set to `HTTP`. * */ @Export(name="healthCheckCodes", refs={List.class,String.class}, tree="[0,1]") private Output> healthCheckCodes; /** * @return The HTTP status codes that are used to indicate whether the backend server passes the health check. Default value: `http_2xx`. Valid values: `http_2xx`, `http_3xx`, `http_4xx`, and `http_5xx`. **NOTE:** `health_check_codes` takes effect only if `health_check_protocol` is set to `HTTP`. * */ public Output> healthCheckCodes() { return this.healthCheckCodes; } /** * The port that is used for health checks. Default value: `0`. Valid values: `0` to `65535`. * */ @Export(name="healthCheckConnectPort", refs={Integer.class}, tree="[0]") private Output healthCheckConnectPort; /** * @return The port that is used for health checks. Default value: `0`. Valid values: `0` to `65535`. * */ public Output healthCheckConnectPort() { return this.healthCheckConnectPort; } /** * The domain name that is used for health checks. **NOTE:** `health_check_host` takes effect only if `health_check_protocol` is set to `HTTP`. * */ @Export(name="healthCheckHost", refs={String.class}, tree="[0]") private Output healthCheckHost; /** * @return The domain name that is used for health checks. **NOTE:** `health_check_host` takes effect only if `health_check_protocol` is set to `HTTP`. * */ public Output healthCheckHost() { return this.healthCheckHost; } /** * The version of the HTTP protocol. Default value: `HTTP1.1`. Valid values: `HTTP1.0`, `HTTP1.1`. **NOTE:** `health_check_http_version` takes effect only if `health_check_protocol` is set to `HTTP`. * */ @Export(name="healthCheckHttpVersion", refs={String.class}, tree="[0]") private Output healthCheckHttpVersion; /** * @return The version of the HTTP protocol. Default value: `HTTP1.1`. Valid values: `HTTP1.0`, `HTTP1.1`. **NOTE:** `health_check_http_version` takes effect only if `health_check_protocol` is set to `HTTP`. * */ public Output healthCheckHttpVersion() { return this.healthCheckHttpVersion; } /** * The interval at which health checks are performed. Unit: seconds. Default value: `2`. Valid values: `1` to `50`. * */ @Export(name="healthCheckInterval", refs={Integer.class}, tree="[0]") private Output healthCheckInterval; /** * @return The interval at which health checks are performed. Unit: seconds. Default value: `2`. Valid values: `1` to `50`. * */ public Output healthCheckInterval() { return this.healthCheckInterval; } /** * The HTTP method that is used for health checks. Default value: `HEAD`. Valid values: `HEAD`, `GET`. **NOTE:** `health_check_method` takes effect only if `health_check_protocol` is set to `HTTP`. * */ @Export(name="healthCheckMethod", refs={String.class}, tree="[0]") private Output healthCheckMethod; /** * @return The HTTP method that is used for health checks. Default value: `HEAD`. Valid values: `HEAD`, `GET`. **NOTE:** `health_check_method` takes effect only if `health_check_protocol` is set to `HTTP`. * */ public Output healthCheckMethod() { return this.healthCheckMethod; } /** * The URL that is used for health checks. **NOTE:** `health_check_path` takes effect only if `health_check_protocol` is set to `HTTP`. * */ @Export(name="healthCheckPath", refs={String.class}, tree="[0]") private Output healthCheckPath; /** * @return The URL that is used for health checks. **NOTE:** `health_check_path` takes effect only if `health_check_protocol` is set to `HTTP`. * */ public Output healthCheckPath() { return this.healthCheckPath; } /** * The protocol that is used for health checks. Default value: `HTTP`. Valid values: `HTTP`, `TCP`. * */ @Export(name="healthCheckProtocol", refs={String.class}, tree="[0]") private Output healthCheckProtocol; /** * @return The protocol that is used for health checks. Default value: `HTTP`. Valid values: `HTTP`, `TCP`. * */ public Output healthCheckProtocol() { return this.healthCheckProtocol; } /** * The name of the health check template. The name must be `2` to `128` characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. * */ @Export(name="healthCheckTemplateName", refs={String.class}, tree="[0]") private Output healthCheckTemplateName; /** * @return The name of the health check template. The name must be `2` to `128` characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. * */ public Output healthCheckTemplateName() { return this.healthCheckTemplateName; } /** * The timeout period of a health check. Default value: `5`. Valid values: `1` to `300`. * */ @Export(name="healthCheckTimeout", refs={Integer.class}, tree="[0]") private Output healthCheckTimeout; /** * @return The timeout period of a health check. Default value: `5`. Valid values: `1` to `300`. * */ public Output healthCheckTimeout() { return this.healthCheckTimeout; } /** * The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: `3`. Valid values: `2` to `10`. * */ @Export(name="healthyThreshold", refs={Integer.class}, tree="[0]") private Output healthyThreshold; /** * @return The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: `3`. Valid values: `2` to `10`. * */ public Output healthyThreshold() { return this.healthyThreshold; } /** * The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: `3`. Valid values: `2` to `10`. * */ @Export(name="unhealthyThreshold", refs={Integer.class}, tree="[0]") private Output unhealthyThreshold; /** * @return The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: `3`. Valid values: `2` to `10`. * */ public Output unhealthyThreshold() { return this.unhealthyThreshold; } /** * * @param name The _unique_ name of the resulting resource. */ public HealthCheckTemplate(java.lang.String name) { this(name, HealthCheckTemplateArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public HealthCheckTemplate(java.lang.String name, HealthCheckTemplateArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public HealthCheckTemplate(java.lang.String name, HealthCheckTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:alb/healthCheckTemplate:HealthCheckTemplate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private HealthCheckTemplate(java.lang.String name, Output id, @Nullable HealthCheckTemplateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:alb/healthCheckTemplate:HealthCheckTemplate", name, state, makeResourceOptions(options, id), false); } private static HealthCheckTemplateArgs makeArgs(HealthCheckTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? HealthCheckTemplateArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static HealthCheckTemplate get(java.lang.String name, Output id, @Nullable HealthCheckTemplateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new HealthCheckTemplate(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy