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

com.pulumi.alicloud.cen.VbrHealthCheck 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.cen;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cen.VbrHealthCheckArgs;
import com.pulumi.alicloud.cen.inputs.VbrHealthCheckState;
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.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * This topic describes how to configure the health check feature for a Cloud Enterprise Network (CEN) instance.
 * After you attach a Virtual Border Router (VBR) to the CEN instance and configure the health check feature, you can monitor the network conditions of the on-premises data center connected to the VBR.
 * 
 * For information about CEN VBR HealthCheck and how to use it, see [Manage CEN VBR HealthCheck](https://www.alibabacloud.com/help/en/cen/developer-reference/api-cbn-2017-09-12-enablecenvbrhealthcheck).
 * 
 * > **NOTE:** Available since v1.88.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.AlicloudFunctions;
 * import com.pulumi.alicloud.inputs.GetRegionsArgs;
 * import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
 * import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs;
 * import com.pulumi.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * import com.pulumi.alicloud.expressconnect.VirtualBorderRouter;
 * import com.pulumi.alicloud.expressconnect.VirtualBorderRouterArgs;
 * import com.pulumi.alicloud.cen.Instance;
 * import com.pulumi.alicloud.cen.InstanceArgs;
 * import com.pulumi.alicloud.cen.InstanceAttachment;
 * import com.pulumi.alicloud.cen.InstanceAttachmentArgs;
 * import com.pulumi.alicloud.cen.VbrHealthCheck;
 * import com.pulumi.alicloud.cen.VbrHealthCheckArgs;
 * 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");
 *         final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
 *             .current(true)
 *             .build());
 * 
 *         final var defaultGetPhysicalConnections = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder()
 *             .nameRegex("^preserved-NODELETING")
 *             .build());
 * 
 *         var vlanId = new Integer("vlanId", IntegerArgs.builder()
 *             .max(2999)
 *             .min(1)
 *             .build());
 * 
 *         var example = new VirtualBorderRouter("example", VirtualBorderRouterArgs.builder()
 *             .localGatewayIp("10.0.0.1")
 *             .peerGatewayIp("10.0.0.2")
 *             .peeringSubnetMask("255.255.255.252")
 *             .physicalConnectionId(defaultGetPhysicalConnections.applyValue(getPhysicalConnectionsResult -> getPhysicalConnectionsResult.connections()[0].id()))
 *             .virtualBorderRouterName(name)
 *             .vlanId(vlanId.id())
 *             .minRxInterval(1000)
 *             .minTxInterval(1000)
 *             .detectMultiplier(10)
 *             .build());
 * 
 *         var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
 *             .cenInstanceName(name)
 *             .protectionLevel("REDUCED")
 *             .build());
 * 
 *         var exampleInstanceAttachment = new InstanceAttachment("exampleInstanceAttachment", InstanceAttachmentArgs.builder()
 *             .instanceId(exampleInstance.id())
 *             .childInstanceId(example.id())
 *             .childInstanceType("VBR")
 *             .childInstanceRegionId(default_.regions()[0].id())
 *             .build());
 * 
 *         var exampleVbrHealthCheck = new VbrHealthCheck("exampleVbrHealthCheck", VbrHealthCheckArgs.builder()
 *             .cenId(exampleInstance.id())
 *             .healthCheckSourceIp("192.168.1.2")
 *             .healthCheckTargetIp("10.0.0.2")
 *             .vbrInstanceId(example.id())
 *             .vbrInstanceRegionId(exampleInstanceAttachment.childInstanceRegionId())
 *             .healthCheckInterval(2)
 *             .healthyThreshold(8)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * CEN VBR HealthCheck can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:cen/vbrHealthCheck:VbrHealthCheck example vbr-xxxxx:cn-hangzhou * ``` * */ @ResourceType(type="alicloud:cen/vbrHealthCheck:VbrHealthCheck") public class VbrHealthCheck extends com.pulumi.resources.CustomResource { /** * The ID of the CEN instance. * */ @Export(name="cenId", refs={String.class}, tree="[0]") private Output cenId; /** * @return The ID of the CEN instance. * */ public Output cenId() { return this.cenId; } /** * Specifies the interval at which the health check sends continuous detection packets. Default value: 2. Value range: 2 to 3. * */ @Export(name="healthCheckInterval", refs={Integer.class}, tree="[0]") private Output healthCheckInterval; /** * @return Specifies the interval at which the health check sends continuous detection packets. Default value: 2. Value range: 2 to 3. * */ public Output> healthCheckInterval() { return Codegen.optional(this.healthCheckInterval); } /** * The source IP address of health checks. * */ @Export(name="healthCheckSourceIp", refs={String.class}, tree="[0]") private Output healthCheckSourceIp; /** * @return The source IP address of health checks. * */ public Output healthCheckSourceIp() { return this.healthCheckSourceIp; } /** * The destination IP address of health checks. * */ @Export(name="healthCheckTargetIp", refs={String.class}, tree="[0]") private Output healthCheckTargetIp; /** * @return The destination IP address of health checks. * */ public Output healthCheckTargetIp() { return this.healthCheckTargetIp; } /** * Specifies the number of probe messages sent by the health check. Default value: 8. Value range: 3 to 8. * */ @Export(name="healthyThreshold", refs={Integer.class}, tree="[0]") private Output healthyThreshold; /** * @return Specifies the number of probe messages sent by the health check. Default value: 8. Value range: 3 to 8. * */ public Output> healthyThreshold() { return Codegen.optional(this.healthyThreshold); } /** * The ID of the VBR. * */ @Export(name="vbrInstanceId", refs={String.class}, tree="[0]") private Output vbrInstanceId; /** * @return The ID of the VBR. * */ public Output vbrInstanceId() { return this.vbrInstanceId; } /** * The ID of the account to which the VBR belongs. * */ @Export(name="vbrInstanceOwnerId", refs={Integer.class}, tree="[0]") private Output vbrInstanceOwnerId; /** * @return The ID of the account to which the VBR belongs. * */ public Output> vbrInstanceOwnerId() { return Codegen.optional(this.vbrInstanceOwnerId); } /** * The ID of the region to which the VBR belongs. * * ->**NOTE:** The `alicloud.cen.VbrHealthCheck` resource depends on the related `alicloud.cen.InstanceAttachment` resource. * */ @Export(name="vbrInstanceRegionId", refs={String.class}, tree="[0]") private Output vbrInstanceRegionId; /** * @return The ID of the region to which the VBR belongs. * * ->**NOTE:** The `alicloud.cen.VbrHealthCheck` resource depends on the related `alicloud.cen.InstanceAttachment` resource. * */ public Output vbrInstanceRegionId() { return this.vbrInstanceRegionId; } /** * * @param name The _unique_ name of the resulting resource. */ public VbrHealthCheck(java.lang.String name) { this(name, VbrHealthCheckArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public VbrHealthCheck(java.lang.String name, VbrHealthCheckArgs 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 VbrHealthCheck(java.lang.String name, VbrHealthCheckArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cen/vbrHealthCheck:VbrHealthCheck", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private VbrHealthCheck(java.lang.String name, Output id, @Nullable VbrHealthCheckState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cen/vbrHealthCheck:VbrHealthCheck", name, state, makeResourceOptions(options, id), false); } private static VbrHealthCheckArgs makeArgs(VbrHealthCheckArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? VbrHealthCheckArgs.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 VbrHealthCheck get(java.lang.String name, Output id, @Nullable VbrHealthCheckState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new VbrHealthCheck(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy