Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

EcsBackupClient

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+.

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

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Ecs.GetInstances.InvokeAsync(new AliCloud.Ecs.GetInstancesArgs
        {
            NameRegex = "ecs_instance_name",
            Status = "Running",
        }));
        var example = new AliCloud.Hbr.EcsBackupClient("example", new AliCloud.Hbr.EcsBackupClientArgs
        {
            InstanceId = @default.Apply(@default => @default.Instances?[0]?.Id),
            UseHttps = false,
            DataNetworkType = "PUBLIC",
            MaxCpuCore = "2",
            MaxWorker = "4",
            DataProxySetting = "USE_CONTROL_PROXY",
            ProxyHost = "192.168.11.101",
            ProxyPort = "80",
            ProxyUser = "user",
            ProxyPassword = "password",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
			NameRegex: pulumi.StringRef("ecs_instance_name"),
			Status:    pulumi.StringRef("Running"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = hbr.NewEcsBackupClient(ctx, "example", &hbr.EcsBackupClientArgs{
			InstanceId:       pulumi.String(_default.Instances[0].Id),
			UseHttps:         pulumi.Bool(false),
			DataNetworkType:  pulumi.String("PUBLIC"),
			MaxCpuCore:       pulumi.String("2"),
			MaxWorker:        pulumi.String("4"),
			DataProxySetting: pulumi.String("USE_CONTROL_PROXY"),
			ProxyHost:        pulumi.String("192.168.11.101"),
			ProxyPort:        pulumi.String("80"),
			ProxyUser:        pulumi.String("user"),
			ProxyPassword:    pulumi.String("password"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.actiontrail.inputs.GetInstancesArgs;
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 default = EcsFunctions.getInstances(GetInstancesArgs.builder()
            .nameRegex("ecs_instance_name")
            .status("Running")
            .build());

        var example = new EcsBackupClient("example", EcsBackupClientArgs.builder()        
            .instanceId(default_.instances()[0].id())
            .useHttps(false)
            .dataNetworkType("PUBLIC")
            .maxCpuCore(2)
            .maxWorker(4)
            .dataProxySetting("USE_CONTROL_PROXY")
            .proxyHost("192.168.11.101")
            .proxyPort(80)
            .proxyUser("user")
            .proxyPassword("password")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ecs.get_instances(name_regex="ecs_instance_name",
    status="Running")
example = alicloud.hbr.EcsBackupClient("example",
    instance_id=default.instances[0].id,
    use_https=False,
    data_network_type="PUBLIC",
    max_cpu_core="2",
    max_worker="4",
    data_proxy_setting="USE_CONTROL_PROXY",
    proxy_host="192.168.11.101",
    proxy_port="80",
    proxy_user="user",
    proxy_password="password")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.ecs.getInstances({
    nameRegex: "ecs_instance_name",
    status: "Running",
});
const example = new alicloud.hbr.EcsBackupClient("example", {
    instanceId: _default.then(_default => _default.instances?[0]?.id),
    useHttps: false,
    dataNetworkType: "PUBLIC",
    maxCpuCore: "2",
    maxWorker: "4",
    dataProxySetting: "USE_CONTROL_PROXY",
    proxyHost: "192.168.11.101",
    proxyPort: "80",
    proxyUser: "user",
    proxyPassword: "password",
});
resources:
  example:
    type: alicloud:hbr:EcsBackupClient
    properties:
      instanceId: ${default.instances[0].id}
      useHttps: false
      dataNetworkType: PUBLIC
      maxCpuCore: 2
      maxWorker: 4
      dataProxySetting: USE_CONTROL_PROXY
      proxyHost: 192.168.11.101
      proxyPort: 80
      proxyUser: user
      proxyPassword: password
variables:
  default:
    Fn::Invoke:
      Function: alicloud:ecs:getInstances
      Arguments:
        nameRegex: ecs_instance_name
        status: Running

Create a EcsBackupClient Resource

new EcsBackupClient(name: string, args: EcsBackupClientArgs, opts?: CustomResourceOptions);
@overload
def EcsBackupClient(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    data_network_type: Optional[str] = None,
                    data_proxy_setting: Optional[str] = None,
                    instance_id: Optional[str] = None,
                    max_cpu_core: Optional[str] = None,
                    max_worker: Optional[str] = None,
                    proxy_host: Optional[str] = None,
                    proxy_password: Optional[str] = None,
                    proxy_port: Optional[str] = None,
                    proxy_user: Optional[str] = None,
                    status: Optional[str] = None,
                    use_https: Optional[bool] = None)
@overload
def EcsBackupClient(resource_name: str,
                    args: EcsBackupClientArgs,
                    opts: Optional[ResourceOptions] = None)
func NewEcsBackupClient(ctx *Context, name string, args EcsBackupClientArgs, opts ...ResourceOption) (*EcsBackupClient, error)
public EcsBackupClient(string name, EcsBackupClientArgs args, CustomResourceOptions? opts = null)
public EcsBackupClient(String name, EcsBackupClientArgs args)
public EcsBackupClient(String name, EcsBackupClientArgs args, CustomResourceOptions options)
type: alicloud:hbr:EcsBackupClient
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EcsBackupClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EcsBackupClientArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EcsBackupClientArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EcsBackupClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EcsBackupClientArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EcsBackupClient Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EcsBackupClient resource accepts the following input properties:

InstanceId string

The ID of ECS instance.

DataNetworkType string

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

DataProxySetting string

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

MaxCpuCore string

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

MaxWorker string

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

ProxyHost string

Custom data plane proxy server host address.

ProxyPassword string

The password of custom data plane proxy server.

ProxyPort string

Custom data plane proxy server host port.

ProxyUser string

The username of custom data plane proxy server.

Status string

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

UseHttps bool

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

InstanceId string

The ID of ECS instance.

DataNetworkType string

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

DataProxySetting string

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

MaxCpuCore string

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

MaxWorker string

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

ProxyHost string

Custom data plane proxy server host address.

ProxyPassword string

The password of custom data plane proxy server.

ProxyPort string

Custom data plane proxy server host port.

ProxyUser string

The username of custom data plane proxy server.

Status string

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

UseHttps bool

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

instanceId String

The ID of ECS instance.

dataNetworkType String

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

dataProxySetting String

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

maxCpuCore String

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

maxWorker String

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

proxyHost String

Custom data plane proxy server host address.

proxyPassword String

The password of custom data plane proxy server.

proxyPort String

Custom data plane proxy server host port.

proxyUser String

The username of custom data plane proxy server.

status String

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

useHttps Boolean

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

instanceId string

The ID of ECS instance.

dataNetworkType string

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

dataProxySetting string

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

maxCpuCore string

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

maxWorker string

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

proxyHost string

Custom data plane proxy server host address.

proxyPassword string

The password of custom data plane proxy server.

proxyPort string

Custom data plane proxy server host port.

proxyUser string

The username of custom data plane proxy server.

status string

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

useHttps boolean

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

instance_id str

The ID of ECS instance.

data_network_type str

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

data_proxy_setting str

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

max_cpu_core str

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

max_worker str

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

proxy_host str

Custom data plane proxy server host address.

proxy_password str

The password of custom data plane proxy server.

proxy_port str

Custom data plane proxy server host port.

proxy_user str

The username of custom data plane proxy server.

status str

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

use_https bool

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

instanceId String

The ID of ECS instance.

dataNetworkType String

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

dataProxySetting String

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

maxCpuCore String

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

maxWorker String

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

proxyHost String

Custom data plane proxy server host address.

proxyPassword String

The password of custom data plane proxy server.

proxyPort String

Custom data plane proxy server host port.

proxyUser String

The username of custom data plane proxy server.

status String

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

useHttps Boolean

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

Outputs

All input properties are implicitly available as output properties. Additionally, the EcsBackupClient resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing EcsBackupClient Resource

Get an existing EcsBackupClient resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EcsBackupClientState, opts?: CustomResourceOptions): EcsBackupClient
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        data_network_type: Optional[str] = None,
        data_proxy_setting: Optional[str] = None,
        instance_id: Optional[str] = None,
        max_cpu_core: Optional[str] = None,
        max_worker: Optional[str] = None,
        proxy_host: Optional[str] = None,
        proxy_password: Optional[str] = None,
        proxy_port: Optional[str] = None,
        proxy_user: Optional[str] = None,
        status: Optional[str] = None,
        use_https: Optional[bool] = None) -> EcsBackupClient
func GetEcsBackupClient(ctx *Context, name string, id IDInput, state *EcsBackupClientState, opts ...ResourceOption) (*EcsBackupClient, error)
public static EcsBackupClient Get(string name, Input<string> id, EcsBackupClientState? state, CustomResourceOptions? opts = null)
public static EcsBackupClient get(String name, Output<String> id, EcsBackupClientState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DataNetworkType string

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

DataProxySetting string

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

InstanceId string

The ID of ECS instance.

MaxCpuCore string

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

MaxWorker string

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

ProxyHost string

Custom data plane proxy server host address.

ProxyPassword string

The password of custom data plane proxy server.

ProxyPort string

Custom data plane proxy server host port.

ProxyUser string

The username of custom data plane proxy server.

Status string

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

UseHttps bool

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

DataNetworkType string

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

DataProxySetting string

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

InstanceId string

The ID of ECS instance.

MaxCpuCore string

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

MaxWorker string

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

ProxyHost string

Custom data plane proxy server host address.

ProxyPassword string

The password of custom data plane proxy server.

ProxyPort string

Custom data plane proxy server host port.

ProxyUser string

The username of custom data plane proxy server.

Status string

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

UseHttps bool

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

dataNetworkType String

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

dataProxySetting String

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

instanceId String

The ID of ECS instance.

maxCpuCore String

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

maxWorker String

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

proxyHost String

Custom data plane proxy server host address.

proxyPassword String

The password of custom data plane proxy server.

proxyPort String

Custom data plane proxy server host port.

proxyUser String

The username of custom data plane proxy server.

status String

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

useHttps Boolean

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

dataNetworkType string

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

dataProxySetting string

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

instanceId string

The ID of ECS instance.

maxCpuCore string

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

maxWorker string

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

proxyHost string

Custom data plane proxy server host address.

proxyPassword string

The password of custom data plane proxy server.

proxyPort string

Custom data plane proxy server host port.

proxyUser string

The username of custom data plane proxy server.

status string

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

useHttps boolean

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

data_network_type str

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

data_proxy_setting str

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

instance_id str

The ID of ECS instance.

max_cpu_core str

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

max_worker str

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

proxy_host str

Custom data plane proxy server host address.

proxy_password str

The password of custom data plane proxy server.

proxy_port str

Custom data plane proxy server host port.

proxy_user str

The username of custom data plane proxy server.

status str

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

use_https bool

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

dataNetworkType String

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

dataProxySetting String

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

instanceId String

The ID of ECS instance.

maxCpuCore String

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

maxWorker String

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

proxyHost String

Custom data plane proxy server host address.

proxyPassword String

The password of custom data plane proxy server.

proxyPort String

Custom data plane proxy server host port.

proxyUser String

The username of custom data plane proxy server.

status String

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

useHttps Boolean

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

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.