EcsBackupClientArgs

data class EcsBackupClientArgs(val dataNetworkType: Output<String>? = null, val dataProxySetting: Output<String>? = null, val instanceId: Output<String>? = null, val maxCpuCore: Output<String>? = null, val maxWorker: Output<String>? = null, val proxyHost: Output<String>? = null, val proxyPassword: Output<String>? = null, val proxyPort: Output<String>? = null, val proxyUser: Output<String>? = null, val status: Output<String>? = null, val useHttps: Output<Boolean>? = null) : ConvertibleToJava<EcsBackupClientArgs>

Provides a Hybrid Backup Recovery (HBR) Ecs Backup Client resource. For information about Hybrid Backup Recovery (HBR) Ecs Backup Client and how to use it, see What is Ecs Backup Client.

NOTE: Available in v1.132.0+.

Example Usage

Basic Usage

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.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.hbr.EcsBackupClient;
import com.pulumi.alicloud.hbr.EcsBackupClientArgs;
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 exampleZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("Instance")
.build());
final var exampleInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.availabilityZone(exampleZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.cpuCoreCount(1)
.memorySize(2)
.build());
final var exampleImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
.owners("system")
.build());
var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.vpcName("terraform-example")
.cidrBlock("172.17.3.0/24")
.build());
var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
.vswitchName("terraform-example")
.cidrBlock("172.17.3.0/24")
.vpcId(exampleNetwork.id())
.zoneId(exampleZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.vpcId(exampleNetwork.id())
.build());
var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
.imageId(exampleImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(exampleInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.availabilityZone(exampleZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.securityGroups(exampleSecurityGroup.id())
.instanceName("terraform-example")
.internetChargeType("PayByBandwidth")
.vswitchId(exampleSwitch.id())
.build());
var exampleEcsBackupClient = new EcsBackupClient("exampleEcsBackupClient", EcsBackupClientArgs.builder()
.instanceId(exampleInstance.id())
.useHttps(false)
.dataNetworkType("VPC")
.maxCpuCore(2)
.maxWorker(4)
.dataProxySetting("USE_CONTROL_PROXY")
.proxyHost("192.168.11.101")
.proxyPort(80)
.proxyUser("user")
.proxyPassword("password")
.build());
}
}

Notice

Note: Please read the following precautions carefully before deleting a client:

  1. You cannot delete active clients that have received heartbeat packets within one hour.

  2. You can make the client inactive by change the status of client to STOPPED.

  3. The resources bound to the client will be deleted in cascade, including:

    • Backup plan

    • Backup task (Running in the background)

    • Snapshot

Import

Hybrid Backup Recovery (HBR) Ecs Backup Client can be imported using the id, e.g.

$ pulumi import alicloud:hbr/ecsBackupClient:EcsBackupClient example <id>

Constructors

Link copied to clipboard
fun EcsBackupClientArgs(dataNetworkType: Output<String>? = null, dataProxySetting: Output<String>? = null, instanceId: Output<String>? = null, maxCpuCore: Output<String>? = null, maxWorker: Output<String>? = null, proxyHost: Output<String>? = null, proxyPassword: Output<String>? = null, proxyPort: Output<String>? = null, proxyUser: Output<String>? = null, status: Output<String>? = null, useHttps: Output<Boolean>? = null)

Functions

Link copied to clipboard
open override fun toJava(): EcsBackupClientArgs

Properties

Link copied to clipboard
val dataNetworkType: Output<String>? = null

The data plane access point type. Valid values: CLASSIC, PUBLIC, VPC. NOTE: The value of CLASSIC has been deprecated in v1.161.0+.

Link copied to clipboard
val dataProxySetting: Output<String>? = null

The data plane proxy settings. Valid values: CUSTOM, DISABLE, USE_CONTROL_PROXY.

Link copied to clipboard
val instanceId: Output<String>? = null

The ID of ECS instance.

Link copied to clipboard
val maxCpuCore: Output<String>? = null

The number of CPU cores used by a single backup task, 0 means no restrictions.

Link copied to clipboard
val maxWorker: Output<String>? = null

The number of concurrent jobs for a single backup task, 0 means no restrictions.

Link copied to clipboard
val proxyHost: Output<String>? = null

Custom data plane proxy server host address.

Link copied to clipboard
val proxyPassword: Output<String>? = null

The password of custom data plane proxy server.

Link copied to clipboard
val proxyPort: Output<String>? = null

Custom data plane proxy server host port.

Link copied to clipboard
val proxyUser: Output<String>? = null

The username of custom data plane proxy server.

Link copied to clipboard
val status: Output<String>? = null

Status of client. Valid values: ACTIVATED, STOPPED. You can start or stop the client by specifying the status.

Link copied to clipboard
val useHttps: Output<Boolean>? = null

Indicates whether to use the HTTPS protocol. Valid values: true, false.