Alibaba Cloud

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

RestoreJob

Provides a Hybrid Backup Recovery (HBR) Restore Job resource.

For information about Hybrid Backup Recovery (HBR) Restore Job and how to use it, see What is Restore Job.

NOTE: Available in v1.133.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultEcsBackupPlans = Output.Create(AliCloud.Hbr.GetEcsBackupPlans.InvokeAsync(new AliCloud.Hbr.GetEcsBackupPlansArgs
        {
            NameRegex = "plan-tf-used-dont-delete",
        }));
        var defaultOssBackupPlans = Output.Create(AliCloud.Hbr.GetOssBackupPlans.InvokeAsync(new AliCloud.Hbr.GetOssBackupPlansArgs
        {
            NameRegex = "plan-tf-used-dont-delete",
        }));
        var defaultNasBackupPlans = Output.Create(AliCloud.Hbr.GetNasBackupPlans.InvokeAsync(new AliCloud.Hbr.GetNasBackupPlansArgs
        {
            NameRegex = "plan-tf-used-dont-delete",
        }));
        var ecsSnapshots = Output.Tuple(defaultEcsBackupPlans, defaultEcsBackupPlans).Apply(values =>
        {
            var defaultEcsBackupPlans = values.Item1;
            var defaultEcsBackupPlans1 = values.Item2;
            return Output.Create(AliCloud.Hbr.GetSnapshots.InvokeAsync(new AliCloud.Hbr.GetSnapshotsArgs
            {
                SourceType = "ECS_FILE",
                VaultId = defaultEcsBackupPlans.Plans?[0]?.VaultId,
                InstanceId = defaultEcsBackupPlans1.Plans?[0]?.InstanceId,
            }));
        });
        var ossSnapshots = Output.Tuple(defaultOssBackupPlans, defaultOssBackupPlans).Apply(values =>
        {
            var defaultOssBackupPlans = values.Item1;
            var defaultOssBackupPlans1 = values.Item2;
            return Output.Create(AliCloud.Hbr.GetSnapshots.InvokeAsync(new AliCloud.Hbr.GetSnapshotsArgs
            {
                SourceType = "OSS",
                VaultId = defaultOssBackupPlans.Plans?[0]?.VaultId,
                Bucket = defaultOssBackupPlans1.Plans?[0]?.Bucket,
            }));
        });
        var nasSnapshots = Output.Tuple(defaultNasBackupPlans, defaultNasBackupPlans, defaultNasBackupPlans).Apply(values =>
        {
            var defaultNasBackupPlans = values.Item1;
            var defaultNasBackupPlans1 = values.Item2;
            var defaultNasBackupPlans2 = values.Item3;
            return Output.Create(AliCloud.Hbr.GetSnapshots.InvokeAsync(new AliCloud.Hbr.GetSnapshotsArgs
            {
                SourceType = "NAS",
                VaultId = defaultNasBackupPlans.Plans?[0]?.VaultId,
                FileSystemId = defaultNasBackupPlans1.Plans?[0]?.FileSystemId,
                CreateTime = defaultNasBackupPlans2.Plans?[0]?.CreateTime,
            }));
        });
        var nasJob = new AliCloud.Hbr.RestoreJob("nasJob", new AliCloud.Hbr.RestoreJobArgs
        {
            SnapshotHash = nasSnapshots.Apply(nasSnapshots => nasSnapshots.Snapshots?[0]?.SnapshotHash),
            VaultId = defaultNasBackupPlans.Apply(defaultNasBackupPlans => defaultNasBackupPlans.Plans?[0]?.VaultId),
            SourceType = "NAS",
            RestoreType = "NAS",
            SnapshotId = nasSnapshots.Apply(nasSnapshots => nasSnapshots.Snapshots?[0]?.SnapshotId),
            TargetFileSystemId = defaultNasBackupPlans.Apply(defaultNasBackupPlans => defaultNasBackupPlans.Plans?[0]?.FileSystemId),
            TargetCreateTime = defaultNasBackupPlans.Apply(defaultNasBackupPlans => defaultNasBackupPlans.Plans?[0]?.CreateTime),
            TargetPath = "/",
            Options = @"    {""includes"":[], ""excludes"":[]}
",
        });
        var ossJob = new AliCloud.Hbr.RestoreJob("ossJob", new AliCloud.Hbr.RestoreJobArgs
        {
            SnapshotHash = ossSnapshots.Apply(ossSnapshots => ossSnapshots.Snapshots?[0]?.SnapshotHash),
            VaultId = defaultOssBackupPlans.Apply(defaultOssBackupPlans => defaultOssBackupPlans.Plans?[0]?.VaultId),
            SourceType = "OSS",
            RestoreType = "OSS",
            SnapshotId = ossSnapshots.Apply(ossSnapshots => ossSnapshots.Snapshots?[0]?.SnapshotId),
            TargetBucket = defaultOssBackupPlans.Apply(defaultOssBackupPlans => defaultOssBackupPlans.Plans?[0]?.Bucket),
            TargetPrefix = "",
            Options = @"    {""includes"":[], ""excludes"":[]}
",
        });
        var ecsJob = new AliCloud.Hbr.RestoreJob("ecsJob", new AliCloud.Hbr.RestoreJobArgs
        {
            SnapshotHash = ecsSnapshots.Apply(ecsSnapshots => ecsSnapshots.Snapshots?[0]?.SnapshotHash),
            VaultId = defaultEcsBackupPlans.Apply(defaultEcsBackupPlans => defaultEcsBackupPlans.Plans?[0]?.VaultId),
            SourceType = "ECS_FILE",
            RestoreType = "ECS_FILE",
            SnapshotId = ecsSnapshots.Apply(ecsSnapshots => ecsSnapshots.Snapshots?[0]?.SnapshotId),
            TargetInstanceId = defaultEcsBackupPlans.Apply(defaultEcsBackupPlans => defaultEcsBackupPlans.Plans?[0]?.InstanceId),
            TargetPath = "/",
        });
    }

}
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 {
		defaultEcsBackupPlans, err := hbr.GetEcsBackupPlans(ctx, &hbr.GetEcsBackupPlansArgs{
			NameRegex: pulumi.StringRef("plan-tf-used-dont-delete"),
		}, nil)
		if err != nil {
			return err
		}
		defaultOssBackupPlans, err := hbr.GetOssBackupPlans(ctx, &hbr.GetOssBackupPlansArgs{
			NameRegex: pulumi.StringRef("plan-tf-used-dont-delete"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNasBackupPlans, err := hbr.GetNasBackupPlans(ctx, &hbr.GetNasBackupPlansArgs{
			NameRegex: pulumi.StringRef("plan-tf-used-dont-delete"),
		}, nil)
		if err != nil {
			return err
		}
		ecsSnapshots, err := hbr.GetSnapshots(ctx, &hbr.GetSnapshotsArgs{
			SourceType: "ECS_FILE",
			VaultId:    defaultEcsBackupPlans.Plans[0].VaultId,
			InstanceId: pulumi.StringRef(defaultEcsBackupPlans.Plans[0].InstanceId),
		}, nil)
		if err != nil {
			return err
		}
		ossSnapshots, err := hbr.GetSnapshots(ctx, &hbr.GetSnapshotsArgs{
			SourceType: "OSS",
			VaultId:    defaultOssBackupPlans.Plans[0].VaultId,
			Bucket:     pulumi.StringRef(defaultOssBackupPlans.Plans[0].Bucket),
		}, nil)
		if err != nil {
			return err
		}
		nasSnapshots, err := hbr.GetSnapshots(ctx, &hbr.GetSnapshotsArgs{
			SourceType:   "NAS",
			VaultId:      defaultNasBackupPlans.Plans[0].VaultId,
			FileSystemId: pulumi.StringRef(defaultNasBackupPlans.Plans[0].FileSystemId),
			CreateTime:   pulumi.StringRef(defaultNasBackupPlans.Plans[0].CreateTime),
		}, nil)
		if err != nil {
			return err
		}
		_, err = hbr.NewRestoreJob(ctx, "nasJob", &hbr.RestoreJobArgs{
			SnapshotHash:       pulumi.String(nasSnapshots.Snapshots[0].SnapshotHash),
			VaultId:            pulumi.String(defaultNasBackupPlans.Plans[0].VaultId),
			SourceType:         pulumi.String("NAS"),
			RestoreType:        pulumi.String("NAS"),
			SnapshotId:         pulumi.String(nasSnapshots.Snapshots[0].SnapshotId),
			TargetFileSystemId: pulumi.String(defaultNasBackupPlans.Plans[0].FileSystemId),
			TargetCreateTime:   pulumi.String(defaultNasBackupPlans.Plans[0].CreateTime),
			TargetPath:         pulumi.String("/"),
			Options:            pulumi.String("    {\"includes\":[], \"excludes\":[]}\n"),
		})
		if err != nil {
			return err
		}
		_, err = hbr.NewRestoreJob(ctx, "ossJob", &hbr.RestoreJobArgs{
			SnapshotHash: pulumi.String(ossSnapshots.Snapshots[0].SnapshotHash),
			VaultId:      pulumi.String(defaultOssBackupPlans.Plans[0].VaultId),
			SourceType:   pulumi.String("OSS"),
			RestoreType:  pulumi.String("OSS"),
			SnapshotId:   pulumi.String(ossSnapshots.Snapshots[0].SnapshotId),
			TargetBucket: pulumi.String(defaultOssBackupPlans.Plans[0].Bucket),
			TargetPrefix: pulumi.String(""),
			Options:      pulumi.String("    {\"includes\":[], \"excludes\":[]}\n"),
		})
		if err != nil {
			return err
		}
		_, err = hbr.NewRestoreJob(ctx, "ecsJob", &hbr.RestoreJobArgs{
			SnapshotHash:     pulumi.String(ecsSnapshots.Snapshots[0].SnapshotHash),
			VaultId:          pulumi.String(defaultEcsBackupPlans.Plans[0].VaultId),
			SourceType:       pulumi.String("ECS_FILE"),
			RestoreType:      pulumi.String("ECS_FILE"),
			SnapshotId:       pulumi.String(ecsSnapshots.Snapshots[0].SnapshotId),
			TargetInstanceId: pulumi.String(defaultEcsBackupPlans.Plans[0].InstanceId),
			TargetPath:       pulumi.String("/"),
		})
		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.hbr.HbrFunctions;
import com.pulumi.alicloud.hbr.inputs.GetEcsBackupPlansArgs;
import com.pulumi.alicloud.hbr.inputs.GetOssBackupPlansArgs;
import com.pulumi.alicloud.hbr.inputs.GetNasBackupPlansArgs;
import com.pulumi.alicloud.databasefilesystem.inputs.GetSnapshotsArgs;
import com.pulumi.alicloud.hbr.RestoreJob;
import com.pulumi.alicloud.hbr.RestoreJobArgs;
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 defaultEcsBackupPlans = HbrFunctions.getEcsBackupPlans(GetEcsBackupPlansArgs.builder()
            .nameRegex("plan-tf-used-dont-delete")
            .build());

        final var defaultOssBackupPlans = HbrFunctions.getOssBackupPlans(GetOssBackupPlansArgs.builder()
            .nameRegex("plan-tf-used-dont-delete")
            .build());

        final var defaultNasBackupPlans = HbrFunctions.getNasBackupPlans(GetNasBackupPlansArgs.builder()
            .nameRegex("plan-tf-used-dont-delete")
            .build());

        final var ecsSnapshots = HbrFunctions.getSnapshots(GetSnapshotsArgs.builder()
            .sourceType("ECS_FILE")
            .vaultId(defaultEcsBackupPlans.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].vaultId()))
            .instanceId(defaultEcsBackupPlans.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].instanceId()))
            .build());

        final var ossSnapshots = HbrFunctions.getSnapshots(GetSnapshotsArgs.builder()
            .sourceType("OSS")
            .vaultId(defaultOssBackupPlans.applyValue(getOssBackupPlansResult -> getOssBackupPlansResult.plans()[0].vaultId()))
            .bucket(defaultOssBackupPlans.applyValue(getOssBackupPlansResult -> getOssBackupPlansResult.plans()[0].bucket()))
            .build());

        final var nasSnapshots = HbrFunctions.getSnapshots(GetSnapshotsArgs.builder()
            .sourceType("NAS")
            .vaultId(defaultNasBackupPlans.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].vaultId()))
            .fileSystemId(defaultNasBackupPlans.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].fileSystemId()))
            .createTime(defaultNasBackupPlans.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].createTime()))
            .build());

        var nasJob = new RestoreJob("nasJob", RestoreJobArgs.builder()        
            .snapshotHash(nasSnapshots.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].snapshotHash()))
            .vaultId(defaultNasBackupPlans.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].vaultId()))
            .sourceType("NAS")
            .restoreType("NAS")
            .snapshotId(nasSnapshots.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].snapshotId()))
            .targetFileSystemId(defaultNasBackupPlans.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].fileSystemId()))
            .targetCreateTime(defaultNasBackupPlans.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].createTime()))
            .targetPath("/")
            .options("""
    {"includes":[], "excludes":[]}
            """)
            .build());

        var ossJob = new RestoreJob("ossJob", RestoreJobArgs.builder()        
            .snapshotHash(ossSnapshots.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].snapshotHash()))
            .vaultId(defaultOssBackupPlans.applyValue(getOssBackupPlansResult -> getOssBackupPlansResult.plans()[0].vaultId()))
            .sourceType("OSS")
            .restoreType("OSS")
            .snapshotId(ossSnapshots.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].snapshotId()))
            .targetBucket(defaultOssBackupPlans.applyValue(getOssBackupPlansResult -> getOssBackupPlansResult.plans()[0].bucket()))
            .targetPrefix("")
            .options("""
    {"includes":[], "excludes":[]}
            """)
            .build());

        var ecsJob = new RestoreJob("ecsJob", RestoreJobArgs.builder()        
            .snapshotHash(ecsSnapshots.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].snapshotHash()))
            .vaultId(defaultEcsBackupPlans.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].vaultId()))
            .sourceType("ECS_FILE")
            .restoreType("ECS_FILE")
            .snapshotId(ecsSnapshots.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].snapshotId()))
            .targetInstanceId(defaultEcsBackupPlans.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].instanceId()))
            .targetPath("/")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_ecs_backup_plans = alicloud.hbr.get_ecs_backup_plans(name_regex="plan-tf-used-dont-delete")
default_oss_backup_plans = alicloud.hbr.get_oss_backup_plans(name_regex="plan-tf-used-dont-delete")
default_nas_backup_plans = alicloud.hbr.get_nas_backup_plans(name_regex="plan-tf-used-dont-delete")
ecs_snapshots = alicloud.hbr.get_snapshots(source_type="ECS_FILE",
    vault_id=default_ecs_backup_plans.plans[0].vault_id,
    instance_id=default_ecs_backup_plans.plans[0].instance_id)
oss_snapshots = alicloud.hbr.get_snapshots(source_type="OSS",
    vault_id=default_oss_backup_plans.plans[0].vault_id,
    bucket=default_oss_backup_plans.plans[0].bucket)
nas_snapshots = alicloud.hbr.get_snapshots(source_type="NAS",
    vault_id=default_nas_backup_plans.plans[0].vault_id,
    file_system_id=default_nas_backup_plans.plans[0].file_system_id,
    create_time=default_nas_backup_plans.plans[0].create_time)
nas_job = alicloud.hbr.RestoreJob("nasJob",
    snapshot_hash=nas_snapshots.snapshots[0].snapshot_hash,
    vault_id=default_nas_backup_plans.plans[0].vault_id,
    source_type="NAS",
    restore_type="NAS",
    snapshot_id=nas_snapshots.snapshots[0].snapshot_id,
    target_file_system_id=default_nas_backup_plans.plans[0].file_system_id,
    target_create_time=default_nas_backup_plans.plans[0].create_time,
    target_path="/",
    options="    {\"includes\":[], \"excludes\":[]}\n")
oss_job = alicloud.hbr.RestoreJob("ossJob",
    snapshot_hash=oss_snapshots.snapshots[0].snapshot_hash,
    vault_id=default_oss_backup_plans.plans[0].vault_id,
    source_type="OSS",
    restore_type="OSS",
    snapshot_id=oss_snapshots.snapshots[0].snapshot_id,
    target_bucket=default_oss_backup_plans.plans[0].bucket,
    target_prefix="",
    options="    {\"includes\":[], \"excludes\":[]}\n")
ecs_job = alicloud.hbr.RestoreJob("ecsJob",
    snapshot_hash=ecs_snapshots.snapshots[0].snapshot_hash,
    vault_id=default_ecs_backup_plans.plans[0].vault_id,
    source_type="ECS_FILE",
    restore_type="ECS_FILE",
    snapshot_id=ecs_snapshots.snapshots[0].snapshot_id,
    target_instance_id=default_ecs_backup_plans.plans[0].instance_id,
    target_path="/")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultEcsBackupPlans = alicloud.hbr.getEcsBackupPlans({
    nameRegex: "plan-tf-used-dont-delete",
});
const defaultOssBackupPlans = alicloud.hbr.getOssBackupPlans({
    nameRegex: "plan-tf-used-dont-delete",
});
const defaultNasBackupPlans = alicloud.hbr.getNasBackupPlans({
    nameRegex: "plan-tf-used-dont-delete",
});
const ecsSnapshots = Promise.all([defaultEcsBackupPlans, defaultEcsBackupPlans]).then(([defaultEcsBackupPlans, defaultEcsBackupPlans1]) => alicloud.hbr.getSnapshots({
    sourceType: "ECS_FILE",
    vaultId: defaultEcsBackupPlans.plans?[0]?.vaultId,
    instanceId: defaultEcsBackupPlans1.plans?[0]?.instanceId,
}));
const ossSnapshots = Promise.all([defaultOssBackupPlans, defaultOssBackupPlans]).then(([defaultOssBackupPlans, defaultOssBackupPlans1]) => alicloud.hbr.getSnapshots({
    sourceType: "OSS",
    vaultId: defaultOssBackupPlans.plans?[0]?.vaultId,
    bucket: defaultOssBackupPlans1.plans?[0]?.bucket,
}));
const nasSnapshots = Promise.all([defaultNasBackupPlans, defaultNasBackupPlans, defaultNasBackupPlans]).then(([defaultNasBackupPlans, defaultNasBackupPlans1, defaultNasBackupPlans2]) => alicloud.hbr.getSnapshots({
    sourceType: "NAS",
    vaultId: defaultNasBackupPlans.plans?[0]?.vaultId,
    fileSystemId: defaultNasBackupPlans1.plans?[0]?.fileSystemId,
    createTime: defaultNasBackupPlans2.plans?[0]?.createTime,
}));
const nasJob = new alicloud.hbr.RestoreJob("nasJob", {
    snapshotHash: nasSnapshots.then(nasSnapshots => nasSnapshots.snapshots?[0]?.snapshotHash),
    vaultId: defaultNasBackupPlans.then(defaultNasBackupPlans => defaultNasBackupPlans.plans?[0]?.vaultId),
    sourceType: "NAS",
    restoreType: "NAS",
    snapshotId: nasSnapshots.then(nasSnapshots => nasSnapshots.snapshots?[0]?.snapshotId),
    targetFileSystemId: defaultNasBackupPlans.then(defaultNasBackupPlans => defaultNasBackupPlans.plans?[0]?.fileSystemId),
    targetCreateTime: defaultNasBackupPlans.then(defaultNasBackupPlans => defaultNasBackupPlans.plans?[0]?.createTime),
    targetPath: "/",
    options: "    {\"includes\":[], \"excludes\":[]}\n",
});
const ossJob = new alicloud.hbr.RestoreJob("ossJob", {
    snapshotHash: ossSnapshots.then(ossSnapshots => ossSnapshots.snapshots?[0]?.snapshotHash),
    vaultId: defaultOssBackupPlans.then(defaultOssBackupPlans => defaultOssBackupPlans.plans?[0]?.vaultId),
    sourceType: "OSS",
    restoreType: "OSS",
    snapshotId: ossSnapshots.then(ossSnapshots => ossSnapshots.snapshots?[0]?.snapshotId),
    targetBucket: defaultOssBackupPlans.then(defaultOssBackupPlans => defaultOssBackupPlans.plans?[0]?.bucket),
    targetPrefix: "",
    options: "    {\"includes\":[], \"excludes\":[]}\n",
});
const ecsJob = new alicloud.hbr.RestoreJob("ecsJob", {
    snapshotHash: ecsSnapshots.then(ecsSnapshots => ecsSnapshots.snapshots?[0]?.snapshotHash),
    vaultId: defaultEcsBackupPlans.then(defaultEcsBackupPlans => defaultEcsBackupPlans.plans?[0]?.vaultId),
    sourceType: "ECS_FILE",
    restoreType: "ECS_FILE",
    snapshotId: ecsSnapshots.then(ecsSnapshots => ecsSnapshots.snapshots?[0]?.snapshotId),
    targetInstanceId: defaultEcsBackupPlans.then(defaultEcsBackupPlans => defaultEcsBackupPlans.plans?[0]?.instanceId),
    targetPath: "/",
});
resources:
  nasJob:
    type: alicloud:hbr:RestoreJob
    properties:
      snapshotHash: ${nasSnapshots.snapshots[0].snapshotHash}
      vaultId: ${defaultNasBackupPlans.plans[0].vaultId}
      sourceType: NAS
      restoreType: NAS
      snapshotId: ${nasSnapshots.snapshots[0].snapshotId}
      targetFileSystemId: ${defaultNasBackupPlans.plans[0].fileSystemId}
      targetCreateTime: ${defaultNasBackupPlans.plans[0].createTime}
      targetPath: /
      options: |2
            {"includes":[], "excludes":[]}
  ossJob:
    type: alicloud:hbr:RestoreJob
    properties:
      snapshotHash: ${ossSnapshots.snapshots[0].snapshotHash}
      vaultId: ${defaultOssBackupPlans.plans[0].vaultId}
      sourceType: OSS
      restoreType: OSS
      snapshotId: ${ossSnapshots.snapshots[0].snapshotId}
      targetBucket: ${defaultOssBackupPlans.plans[0].bucket}
      targetPrefix:
      options: |2
            {"includes":[], "excludes":[]}
  ecsJob:
    type: alicloud:hbr:RestoreJob
    properties:
      snapshotHash: ${ecsSnapshots.snapshots[0].snapshotHash}
      vaultId: ${defaultEcsBackupPlans.plans[0].vaultId}
      sourceType: ECS_FILE
      restoreType: ECS_FILE
      snapshotId: ${ecsSnapshots.snapshots[0].snapshotId}
      targetInstanceId: ${defaultEcsBackupPlans.plans[0].instanceId}
      targetPath: /
variables:
  defaultEcsBackupPlans:
    Fn::Invoke:
      Function: alicloud:hbr:getEcsBackupPlans
      Arguments:
        nameRegex: plan-tf-used-dont-delete
  defaultOssBackupPlans:
    Fn::Invoke:
      Function: alicloud:hbr:getOssBackupPlans
      Arguments:
        nameRegex: plan-tf-used-dont-delete
  defaultNasBackupPlans:
    Fn::Invoke:
      Function: alicloud:hbr:getNasBackupPlans
      Arguments:
        nameRegex: plan-tf-used-dont-delete
  ecsSnapshots:
    Fn::Invoke:
      Function: alicloud:hbr:getSnapshots
      Arguments:
        sourceType: ECS_FILE
        vaultId: ${defaultEcsBackupPlans.plans[0].vaultId}
        instanceId: ${defaultEcsBackupPlans.plans[0].instanceId}
  ossSnapshots:
    Fn::Invoke:
      Function: alicloud:hbr:getSnapshots
      Arguments:
        sourceType: OSS
        vaultId: ${defaultOssBackupPlans.plans[0].vaultId}
        bucket: ${defaultOssBackupPlans.plans[0].bucket}
  nasSnapshots:
    Fn::Invoke:
      Function: alicloud:hbr:getSnapshots
      Arguments:
        sourceType: NAS
        vaultId: ${defaultNasBackupPlans.plans[0].vaultId}
        fileSystemId: ${defaultNasBackupPlans.plans[0].fileSystemId}
        createTime: ${defaultNasBackupPlans.plans[0].createTime}

Create a RestoreJob Resource

new RestoreJob(name: string, args: RestoreJobArgs, opts?: CustomResourceOptions);
@overload
def RestoreJob(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               exclude: Optional[str] = None,
               include: Optional[str] = None,
               options: Optional[str] = None,
               restore_job_id: Optional[str] = None,
               restore_type: Optional[str] = None,
               snapshot_hash: Optional[str] = None,
               snapshot_id: Optional[str] = None,
               source_type: Optional[str] = None,
               target_bucket: Optional[str] = None,
               target_client_id: Optional[str] = None,
               target_create_time: Optional[str] = None,
               target_data_source_id: Optional[str] = None,
               target_file_system_id: Optional[str] = None,
               target_instance_id: Optional[str] = None,
               target_instance_name: Optional[str] = None,
               target_path: Optional[str] = None,
               target_prefix: Optional[str] = None,
               target_table_name: Optional[str] = None,
               target_time: Optional[str] = None,
               udm_detail: Optional[str] = None,
               vault_id: Optional[str] = None)
@overload
def RestoreJob(resource_name: str,
               args: RestoreJobArgs,
               opts: Optional[ResourceOptions] = None)
func NewRestoreJob(ctx *Context, name string, args RestoreJobArgs, opts ...ResourceOption) (*RestoreJob, error)
public RestoreJob(string name, RestoreJobArgs args, CustomResourceOptions? opts = null)
public RestoreJob(String name, RestoreJobArgs args)
public RestoreJob(String name, RestoreJobArgs args, CustomResourceOptions options)
type: alicloud:hbr:RestoreJob
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args RestoreJobArgs
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 RestoreJobArgs
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 RestoreJobArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RestoreJobArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args RestoreJobArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

RestoreJob 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 RestoreJob resource accepts the following input properties:

RestoreType string

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

SnapshotHash string

The hashcode of Snapshot.

SnapshotId string

The ID of Snapshot.

SourceType string

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

VaultId string

The ID of backup vault.

Exclude string

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Include string

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Options string

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

RestoreJobId string

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

TargetBucket string

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

TargetClientId string

The target client ID.

TargetCreateTime string

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

TargetDataSourceId string

The target data source ID.

TargetFileSystemId string

The ID of destination File System. NOTE: Required while source_type equals NAS

TargetInstanceId string

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

TargetInstanceName string

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

TargetPath string

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetPrefix string

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetTableName string

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

TargetTime string

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

UdmDetail string

The full machine backup details.

RestoreType string

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

SnapshotHash string

The hashcode of Snapshot.

SnapshotId string

The ID of Snapshot.

SourceType string

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

VaultId string

The ID of backup vault.

Exclude string

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Include string

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Options string

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

RestoreJobId string

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

TargetBucket string

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

TargetClientId string

The target client ID.

TargetCreateTime string

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

TargetDataSourceId string

The target data source ID.

TargetFileSystemId string

The ID of destination File System. NOTE: Required while source_type equals NAS

TargetInstanceId string

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

TargetInstanceName string

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

TargetPath string

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetPrefix string

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetTableName string

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

TargetTime string

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

UdmDetail string

The full machine backup details.

restoreType String

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshotHash String

The hashcode of Snapshot.

snapshotId String

The ID of Snapshot.

sourceType String

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

vaultId String

The ID of backup vault.

exclude String

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include String

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options String

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restoreJobId String

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

targetBucket String

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

targetClientId String

The target client ID.

targetCreateTime String

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

targetDataSourceId String

The target data source ID.

targetFileSystemId String

The ID of destination File System. NOTE: Required while source_type equals NAS

targetInstanceId String

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

targetInstanceName String

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

targetPath String

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetPrefix String

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetTableName String

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

targetTime String

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udmDetail String

The full machine backup details.

restoreType string

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshotHash string

The hashcode of Snapshot.

snapshotId string

The ID of Snapshot.

sourceType string

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

vaultId string

The ID of backup vault.

exclude string

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include string

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options string

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restoreJobId string

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

targetBucket string

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

targetClientId string

The target client ID.

targetCreateTime string

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

targetDataSourceId string

The target data source ID.

targetFileSystemId string

The ID of destination File System. NOTE: Required while source_type equals NAS

targetInstanceId string

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

targetInstanceName string

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

targetPath string

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetPrefix string

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetTableName string

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

targetTime string

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udmDetail string

The full machine backup details.

restore_type str

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshot_hash str

The hashcode of Snapshot.

snapshot_id str

The ID of Snapshot.

source_type str

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

vault_id str

The ID of backup vault.

exclude str

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include str

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options str

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restore_job_id str

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

target_bucket str

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

target_client_id str

The target client ID.

target_create_time str

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

target_data_source_id str

The target data source ID.

target_file_system_id str

The ID of destination File System. NOTE: Required while source_type equals NAS

target_instance_id str

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

target_instance_name str

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

target_path str

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

target_prefix str

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

target_table_name str

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

target_time str

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udm_detail str

The full machine backup details.

restoreType String

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshotHash String

The hashcode of Snapshot.

snapshotId String

The ID of Snapshot.

sourceType String

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

vaultId String

The ID of backup vault.

exclude String

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include String

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options String

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restoreJobId String

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

targetBucket String

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

targetClientId String

The target client ID.

targetCreateTime String

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

targetDataSourceId String

The target data source ID.

targetFileSystemId String

The ID of destination File System. NOTE: Required while source_type equals NAS

targetInstanceId String

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

targetInstanceName String

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

targetPath String

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetPrefix String

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetTableName String

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

targetTime String

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udmDetail String

The full machine backup details.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Status string

The Restore Job Status.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The Restore Job Status.

id String

The provider-assigned unique ID for this managed resource.

status String

The Restore Job Status.

id string

The provider-assigned unique ID for this managed resource.

status string

The Restore Job Status.

id str

The provider-assigned unique ID for this managed resource.

status str

The Restore Job Status.

id String

The provider-assigned unique ID for this managed resource.

status String

The Restore Job Status.

Look up an Existing RestoreJob Resource

Get an existing RestoreJob 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?: RestoreJobState, opts?: CustomResourceOptions): RestoreJob
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        exclude: Optional[str] = None,
        include: Optional[str] = None,
        options: Optional[str] = None,
        restore_job_id: Optional[str] = None,
        restore_type: Optional[str] = None,
        snapshot_hash: Optional[str] = None,
        snapshot_id: Optional[str] = None,
        source_type: Optional[str] = None,
        status: Optional[str] = None,
        target_bucket: Optional[str] = None,
        target_client_id: Optional[str] = None,
        target_create_time: Optional[str] = None,
        target_data_source_id: Optional[str] = None,
        target_file_system_id: Optional[str] = None,
        target_instance_id: Optional[str] = None,
        target_instance_name: Optional[str] = None,
        target_path: Optional[str] = None,
        target_prefix: Optional[str] = None,
        target_table_name: Optional[str] = None,
        target_time: Optional[str] = None,
        udm_detail: Optional[str] = None,
        vault_id: Optional[str] = None) -> RestoreJob
func GetRestoreJob(ctx *Context, name string, id IDInput, state *RestoreJobState, opts ...ResourceOption) (*RestoreJob, error)
public static RestoreJob Get(string name, Input<string> id, RestoreJobState? state, CustomResourceOptions? opts = null)
public static RestoreJob get(String name, Output<String> id, RestoreJobState 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:
Exclude string

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Include string

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Options string

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

RestoreJobId string

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

RestoreType string

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

SnapshotHash string

The hashcode of Snapshot.

SnapshotId string

The ID of Snapshot.

SourceType string

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

Status string

The Restore Job Status.

TargetBucket string

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

TargetClientId string

The target client ID.

TargetCreateTime string

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

TargetDataSourceId string

The target data source ID.

TargetFileSystemId string

The ID of destination File System. NOTE: Required while source_type equals NAS

TargetInstanceId string

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

TargetInstanceName string

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

TargetPath string

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetPrefix string

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetTableName string

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

TargetTime string

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

UdmDetail string

The full machine backup details.

VaultId string

The ID of backup vault.

Exclude string

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Include string

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

Options string

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

RestoreJobId string

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

RestoreType string

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

SnapshotHash string

The hashcode of Snapshot.

SnapshotId string

The ID of Snapshot.

SourceType string

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

Status string

The Restore Job Status.

TargetBucket string

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

TargetClientId string

The target client ID.

TargetCreateTime string

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

TargetDataSourceId string

The target data source ID.

TargetFileSystemId string

The ID of destination File System. NOTE: Required while source_type equals NAS

TargetInstanceId string

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

TargetInstanceName string

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

TargetPath string

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetPrefix string

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

TargetTableName string

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

TargetTime string

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

UdmDetail string

The full machine backup details.

VaultId string

The ID of backup vault.

exclude String

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include String

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options String

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restoreJobId String

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

restoreType String

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshotHash String

The hashcode of Snapshot.

snapshotId String

The ID of Snapshot.

sourceType String

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

status String

The Restore Job Status.

targetBucket String

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

targetClientId String

The target client ID.

targetCreateTime String

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

targetDataSourceId String

The target data source ID.

targetFileSystemId String

The ID of destination File System. NOTE: Required while source_type equals NAS

targetInstanceId String

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

targetInstanceName String

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

targetPath String

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetPrefix String

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetTableName String

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

targetTime String

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udmDetail String

The full machine backup details.

vaultId String

The ID of backup vault.

exclude string

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include string

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options string

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restoreJobId string

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

restoreType string

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshotHash string

The hashcode of Snapshot.

snapshotId string

The ID of Snapshot.

sourceType string

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

status string

The Restore Job Status.

targetBucket string

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

targetClientId string

The target client ID.

targetCreateTime string

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

targetDataSourceId string

The target data source ID.

targetFileSystemId string

The ID of destination File System. NOTE: Required while source_type equals NAS

targetInstanceId string

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

targetInstanceName string

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

targetPath string

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetPrefix string

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetTableName string

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

targetTime string

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udmDetail string

The full machine backup details.

vaultId string

The ID of backup vault.

exclude str

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include str

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options str

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restore_job_id str

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

restore_type str

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshot_hash str

The hashcode of Snapshot.

snapshot_id str

The ID of Snapshot.

source_type str

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

status str

The Restore Job Status.

target_bucket str

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

target_client_id str

The target client ID.

target_create_time str

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

target_data_source_id str

The target data source ID.

target_file_system_id str

The ID of destination File System. NOTE: Required while source_type equals NAS

target_instance_id str

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

target_instance_name str

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

target_path str

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

target_prefix str

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

target_table_name str

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

target_time str

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udm_detail str

The full machine backup details.

vault_id str

The ID of backup vault.

exclude String

The exclude path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/excludePath], up to 255 characters. WARNING: If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

include String

The include path. NOTE: Invalid while source_type equals OSS or NAS. It's a json string with format:["/includePath"], Up to 255 characters. WARNING: The field is required while source_type equals OTS_TABLE which means source table name. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

options String

Recovery options. NOTE: Required while source_type equals OSS or NAS, invalid while source_type equals ECS_FILE. It's a json string with format:"{"includes":[],"excludes":[]}",. Recovery options. When restores OTS_TABLE and real target time is the rangEnd time of the snapshot, it should be a string with format: {"UI_TargetTime":1650032529018}.

restoreJobId String

Restore Job ID. It's the unique key of this resource, if you want to set this argument by yourself, you must specify a unique keyword that never appears.

restoreType String

The type of recovery destination. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS_ROLLBACK. Note: Currently, there is a one-to-one correspondence between the data source type with the recovery destination type.

snapshotHash String

The hashcode of Snapshot.

snapshotId String

The ID of Snapshot.

sourceType String

The type of data source. Valid values: ECS_FILE, NAS, OSS,OTS_TABLE,UDM_ECS.

status String

The Restore Job Status.

targetBucket String

The target name of OSS bucket. NOTE: Required while source_type equals OSS,

targetClientId String

The target client ID.

targetCreateTime String

The creation time of destination File System. NOTE: While source_type equals NAS, this parameter must be set. Note: The time format of the API adopts the ISO 8601 format, such as 2021-07-09T15:45:30CST or 2021-07-09T07:45:30Z.

targetDataSourceId String

The target data source ID.

targetFileSystemId String

The ID of destination File System. NOTE: Required while source_type equals NAS

targetInstanceId String

The target ID of ECS instance. NOTE: Required while source_type equals ECS_FILE

targetInstanceName String

The name of the Table store instance to which you want to restore data.WARNING: Required while source_type equals OTS_TABLE.

targetPath String

The target file path of (ECS) instance. WARNING: Required while source_type equals NAS or ECS_FILE, If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetPrefix String

The target prefix of the OSS object. WARNING: Required while source_type equals OSS. If this value filled in incorrectly, the task may not start correctly, so please check the parameters before executing the plan.

targetTableName String

The name of the table that stores the restored data. WARNING: Required while source_type equals OTS_TABLE.

targetTime String

The time when data is restored to the Table store instance. This value is a UNIX timestamp. Unit: seconds. WARNING: Required while source_type equals OTS_TABLE. Note: The time when data is restored to the Tablestore instance. It should be 0 if restores data at the End time of the snapshot.

udmDetail String

The full machine backup details.

vaultId String

The ID of backup vault.

Import

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

 $ pulumi import alicloud:hbr/restoreJob:RestoreJob example <restore_job_id>:<restore_type>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.