Package com.pulumi.alicloud.cen
Class VbrHealthCheck
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.alicloud.cen.VbrHealthCheck
-
public class VbrHealthCheck extends com.pulumi.resources.CustomResource
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 ```java 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.RandomInteger; import com.pulumi.random.RandomIntegerArgs; 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 defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder() .current(true) .build()); final var defaultPhysicalConnections = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder() .nameRegex("^preserved-NODELETING") .build()); var vlanId = new RandomInteger("vlanId", RandomIntegerArgs.builder() .max(2999) .min(1) .build()); var exampleVirtualBorderRouter = new VirtualBorderRouter("exampleVirtualBorderRouter", VirtualBorderRouterArgs.builder() .localGatewayIp("10.0.0.1") .peerGatewayIp("10.0.0.2") .peeringSubnetMask("255.255.255.252") .physicalConnectionId(defaultPhysicalConnections.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(exampleVirtualBorderRouter.id()) .childInstanceType("VBR") .childInstanceRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.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(exampleVirtualBorderRouter.id()) .vbrInstanceRegionId(exampleInstanceAttachment.childInstanceRegionId()) .healthCheckInterval(2) .healthyThreshold(8) .build()); } } ``` ## Import CEN VBR HealthCheck can be imported using the id, e.g. ```sh $ pulumi import alicloud:cen/vbrHealthCheck:VbrHealthCheck example vbr-xxxxx:cn-hangzhou ```
-
-
Constructor Summary
Constructors Constructor Description VbrHealthCheck(java.lang.String name)
VbrHealthCheck(java.lang.String name, VbrHealthCheckArgs args)
VbrHealthCheck(java.lang.String name, VbrHealthCheckArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
cenId()
static VbrHealthCheck
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VbrHealthCheckState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
healthCheckInterval()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
healthCheckSourceIp()
com.pulumi.core.Output<java.lang.String>
healthCheckTargetIp()
com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
healthyThreshold()
com.pulumi.core.Output<java.lang.String>
vbrInstanceId()
com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
vbrInstanceOwnerId()
com.pulumi.core.Output<java.lang.String>
vbrInstanceRegionId()
-
-
-
Constructor Detail
-
VbrHealthCheck
public VbrHealthCheck(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
VbrHealthCheck
public VbrHealthCheck(java.lang.String name, VbrHealthCheckArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
VbrHealthCheck
public VbrHealthCheck(java.lang.String name, VbrHealthCheckArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
cenId
public com.pulumi.core.Output<java.lang.String> cenId()
- Returns:
- The ID of the CEN instance.
-
healthCheckInterval
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> healthCheckInterval()
- Returns:
- Specifies the interval at which the health check sends continuous detection packets. Default value: 2. Value range: 2 to 3.
-
healthCheckSourceIp
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> healthCheckSourceIp()
- Returns:
- The source IP address of health checks.
-
healthCheckTargetIp
public com.pulumi.core.Output<java.lang.String> healthCheckTargetIp()
- Returns:
- The destination IP address of health checks.
-
healthyThreshold
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> healthyThreshold()
- Returns:
- Specifies the number of probe messages sent by the health check. Default value: 8. Value range: 3 to 8.
-
vbrInstanceId
public com.pulumi.core.Output<java.lang.String> vbrInstanceId()
- Returns:
- The ID of the VBR.
-
vbrInstanceOwnerId
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> vbrInstanceOwnerId()
- Returns:
- The ID of the account to which the VBR belongs.
-
vbrInstanceRegionId
public com.pulumi.core.Output<java.lang.String> vbrInstanceRegionId()
- Returns:
- The ID of the region to which the VBR belongs. ->**NOTE:** The `alicloud.cen.VbrHealthCheck` resource depends on the related `alicloud.cen.InstanceAttachment` resource.
-
get
public static VbrHealthCheck get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VbrHealthCheckState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-