getEcsBackupPlans

This data source provides the Hbr EcsBackupPlans of the current Alibaba Cloud user.

NOTE: Available in v1.132.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Hbr.GetEcsBackupPlans.InvokeAsync(new AliCloud.Hbr.GetEcsBackupPlansArgs
        {
            NameRegex = "plan-name",
        }));
        this.HbrEcsBackupPlanId = ids.Apply(ids => ids.Plans?[0]?.Id);
    }

    [Output("hbrEcsBackupPlanId")]
    public Output<string> HbrEcsBackupPlanId { get; set; }
}
package main

import (
	"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 {
		ids, err := hbr.GetEcsBackupPlans(ctx, &hbr.GetEcsBackupPlansArgs{
			NameRegex: pulumi.StringRef("plan-name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("hbrEcsBackupPlanId", ids.Plans[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.hbr.HbrFunctions;
import com.pulumi.alicloud.hbr.inputs.GetEcsBackupPlansArgs;
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 ids = HbrFunctions.getEcsBackupPlans(GetEcsBackupPlansArgs.builder()
            .nameRegex("plan-name")
            .build());

        ctx.export("hbrEcsBackupPlanId", ids.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.hbr.get_ecs_backup_plans(name_regex="plan-name")
pulumi.export("hbrEcsBackupPlanId", ids.plans[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.hbr.getEcsBackupPlans({
    nameRegex: "plan-name",
});
export const hbrEcsBackupPlanId = ids.then(ids => ids.plans?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:hbr:getEcsBackupPlans
      Arguments:
        nameRegex: plan-name
outputs:
  hbrEcsBackupPlanId: ${ids.plans[0].id}

Using getEcsBackupPlans

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEcsBackupPlans(args: GetEcsBackupPlansArgs, opts?: InvokeOptions): Promise<GetEcsBackupPlansResult>
function getEcsBackupPlansOutput(args: GetEcsBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetEcsBackupPlansResult>
def get_ecs_backup_plans(ids: Optional[Sequence[str]] = None,
                         instance_id: Optional[str] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         vault_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetEcsBackupPlansResult
def get_ecs_backup_plans_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         instance_id: Optional[pulumi.Input[str]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         vault_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetEcsBackupPlansResult]
func GetEcsBackupPlans(ctx *Context, args *GetEcsBackupPlansArgs, opts ...InvokeOption) (*GetEcsBackupPlansResult, error)
func GetEcsBackupPlansOutput(ctx *Context, args *GetEcsBackupPlansOutputArgs, opts ...InvokeOption) GetEcsBackupPlansResultOutput

> Note: This function is named GetEcsBackupPlans in the Go SDK.

public static class GetEcsBackupPlans 
{
    public static Task<GetEcsBackupPlansResult> InvokeAsync(GetEcsBackupPlansArgs args, InvokeOptions? opts = null)
    public static Output<GetEcsBackupPlansResult> Invoke(GetEcsBackupPlansInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsBackupPlansResult> getEcsBackupPlans(GetEcsBackupPlansArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:hbr/getEcsBackupPlans:getEcsBackupPlans
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of EcsBackupPlan IDs.

InstanceId string

The ID of ECS instance.

NameRegex string

A regex string to filter results by EcsBackupPlan name.

OutputFile string
VaultId string

The ID of Backup vault.

Ids []string

A list of EcsBackupPlan IDs.

InstanceId string

The ID of ECS instance.

NameRegex string

A regex string to filter results by EcsBackupPlan name.

OutputFile string
VaultId string

The ID of Backup vault.

ids List<String>

A list of EcsBackupPlan IDs.

instanceId String

The ID of ECS instance.

nameRegex String

A regex string to filter results by EcsBackupPlan name.

outputFile String
vaultId String

The ID of Backup vault.

ids string[]

A list of EcsBackupPlan IDs.

instanceId string

The ID of ECS instance.

nameRegex string

A regex string to filter results by EcsBackupPlan name.

outputFile string
vaultId string

The ID of Backup vault.

ids Sequence[str]

A list of EcsBackupPlan IDs.

instance_id str

The ID of ECS instance.

name_regex str

A regex string to filter results by EcsBackupPlan name.

output_file str
vault_id str

The ID of Backup vault.

ids List<String>

A list of EcsBackupPlan IDs.

instanceId String

The ID of ECS instance.

nameRegex String

A regex string to filter results by EcsBackupPlan name.

outputFile String
vaultId String

The ID of Backup vault.

getEcsBackupPlans Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
Plans List<Pulumi.AliCloud.Hbr.Outputs.GetEcsBackupPlansPlan>
InstanceId string
NameRegex string
OutputFile string
VaultId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
Plans []GetEcsBackupPlansPlan
InstanceId string
NameRegex string
OutputFile string
VaultId string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
plans List<GetEcsBackupPlansPlan>
instanceId String
nameRegex String
outputFile String
vaultId String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
plans GetEcsBackupPlansPlan[]
instanceId string
nameRegex string
outputFile string
vaultId string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
plans Sequence[GetEcsBackupPlansPlan]
instance_id str
name_regex str
output_file str
vault_id str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
plans List<Property Map>
instanceId String
nameRegex String
outputFile String
vaultId String

Supporting Types

GetEcsBackupPlansPlan

BackupType string

Backup type. Valid values: COMPLETE.

CreateTime string
CreatedTime string

The creation time of the backup plan. UNIX time in seconds.

Detail string
Disabled bool

Whether to be suspended. Valid values: true, false.

EcsBackupPlanId string

The ID of ecs backup plan.

EcsBackupPlanName string

The name of the backup plan.

Exclude string

Exclude path. String of Json list. Up to 255 characters. e.g. "[\"/home/work\"]"

Id string

The ID of ecs backup plan.

Include string

Include path. String of Json list. Up to 255 characters. e.g. "[\"/var\"]"

InstanceId string

The ID of ECS instance.

Options string

Windows operating system with application consistency using VSS. eg: {UseVSS:false}.

Paths List<string>

Backup path. e.g. ["/home", "/var"]

Retention string

Backup retention days, the minimum is 1.

Schedule string

Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

SourceType string

The type of backup source.

SpeedLimit string

Flow control. The format is: {start}|{end}|{bandwidth}. Use | to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.

UpdatedTime string

The update time of the backup plan. UNIX time in seconds.

VaultId string

The ID of Backup vault.

BackupType string

Backup type. Valid values: COMPLETE.

CreateTime string
CreatedTime string

The creation time of the backup plan. UNIX time in seconds.

Detail string
Disabled bool

Whether to be suspended. Valid values: true, false.

EcsBackupPlanId string

The ID of ecs backup plan.

EcsBackupPlanName string

The name of the backup plan.

Exclude string

Exclude path. String of Json list. Up to 255 characters. e.g. "[\"/home/work\"]"

Id string

The ID of ecs backup plan.

Include string

Include path. String of Json list. Up to 255 characters. e.g. "[\"/var\"]"

InstanceId string

The ID of ECS instance.

Options string

Windows operating system with application consistency using VSS. eg: {UseVSS:false}.

Paths []string

Backup path. e.g. ["/home", "/var"]

Retention string

Backup retention days, the minimum is 1.

Schedule string

Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

SourceType string

The type of backup source.

SpeedLimit string

Flow control. The format is: {start}|{end}|{bandwidth}. Use | to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.

UpdatedTime string

The update time of the backup plan. UNIX time in seconds.

VaultId string

The ID of Backup vault.

backupType String

Backup type. Valid values: COMPLETE.

createTime String
createdTime String

The creation time of the backup plan. UNIX time in seconds.

detail String
disabled Boolean

Whether to be suspended. Valid values: true, false.

ecsBackupPlanId String

The ID of ecs backup plan.

ecsBackupPlanName String

The name of the backup plan.

exclude String

Exclude path. String of Json list. Up to 255 characters. e.g. "[\"/home/work\"]"

id String

The ID of ecs backup plan.

include String

Include path. String of Json list. Up to 255 characters. e.g. "[\"/var\"]"

instanceId String

The ID of ECS instance.

options String

Windows operating system with application consistency using VSS. eg: {UseVSS:false}.

paths List<String>

Backup path. e.g. ["/home", "/var"]

retention String

Backup retention days, the minimum is 1.

schedule String

Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

sourceType String

The type of backup source.

speedLimit String

Flow control. The format is: {start}|{end}|{bandwidth}. Use | to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.

updatedTime String

The update time of the backup plan. UNIX time in seconds.

vaultId String

The ID of Backup vault.

backupType string

Backup type. Valid values: COMPLETE.

createTime string
createdTime string

The creation time of the backup plan. UNIX time in seconds.

detail string
disabled boolean

Whether to be suspended. Valid values: true, false.

ecsBackupPlanId string

The ID of ecs backup plan.

ecsBackupPlanName string

The name of the backup plan.

exclude string

Exclude path. String of Json list. Up to 255 characters. e.g. "[\"/home/work\"]"

id string

The ID of ecs backup plan.

include string

Include path. String of Json list. Up to 255 characters. e.g. "[\"/var\"]"

instanceId string

The ID of ECS instance.

options string

Windows operating system with application consistency using VSS. eg: {UseVSS:false}.

paths string[]

Backup path. e.g. ["/home", "/var"]

retention string

Backup retention days, the minimum is 1.

schedule string

Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

sourceType string

The type of backup source.

speedLimit string

Flow control. The format is: {start}|{end}|{bandwidth}. Use | to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.

updatedTime string

The update time of the backup plan. UNIX time in seconds.

vaultId string

The ID of Backup vault.

backup_type str

Backup type. Valid values: COMPLETE.

create_time str
created_time str

The creation time of the backup plan. UNIX time in seconds.

detail str
disabled bool

Whether to be suspended. Valid values: true, false.

ecs_backup_plan_id str

The ID of ecs backup plan.

ecs_backup_plan_name str

The name of the backup plan.

exclude str

Exclude path. String of Json list. Up to 255 characters. e.g. "[\"/home/work\"]"

id str

The ID of ecs backup plan.

include str

Include path. String of Json list. Up to 255 characters. e.g. "[\"/var\"]"

instance_id str

The ID of ECS instance.

options str

Windows operating system with application consistency using VSS. eg: {UseVSS:false}.

paths Sequence[str]

Backup path. e.g. ["/home", "/var"]

retention str

Backup retention days, the minimum is 1.

schedule str

Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

source_type str

The type of backup source.

speed_limit str

Flow control. The format is: {start}|{end}|{bandwidth}. Use | to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.

updated_time str

The update time of the backup plan. UNIX time in seconds.

vault_id str

The ID of Backup vault.

backupType String

Backup type. Valid values: COMPLETE.

createTime String
createdTime String

The creation time of the backup plan. UNIX time in seconds.

detail String
disabled Boolean

Whether to be suspended. Valid values: true, false.

ecsBackupPlanId String

The ID of ecs backup plan.

ecsBackupPlanName String

The name of the backup plan.

exclude String

Exclude path. String of Json list. Up to 255 characters. e.g. "[\"/home/work\"]"

id String

The ID of ecs backup plan.

include String

Include path. String of Json list. Up to 255 characters. e.g. "[\"/var\"]"

instanceId String

The ID of ECS instance.

options String

Windows operating system with application consistency using VSS. eg: {UseVSS:false}.

paths List<String>

Backup path. e.g. ["/home", "/var"]

retention String

Backup retention days, the minimum is 1.

schedule String

Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

sourceType String

The type of backup source.

speedLimit String

Flow control. The format is: {start}|{end}|{bandwidth}. Use | to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.

updatedTime String

The update time of the backup plan. UNIX time in seconds.

vaultId String

The ID of Backup vault.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.