Alibaba Cloud

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

getRestoreJobs

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

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-name",
        }));
        var defaultRestoreJobs = Output.Tuple(defaultEcsBackupPlans, defaultEcsBackupPlans).Apply(values =>
        {
            var defaultEcsBackupPlans = values.Item1;
            var defaultEcsBackupPlans1 = values.Item2;
            return Output.Create(AliCloud.Hbr.GetRestoreJobs.InvokeAsync(new AliCloud.Hbr.GetRestoreJobsArgs
            {
                RestoreType = "ECS_FILE",
                VaultIds = 
                {
                    defaultEcsBackupPlans.Plans?[0]?.VaultId,
                },
                TargetInstanceIds = 
                {
                    defaultEcsBackupPlans1.Plans?[0]?.InstanceId,
                },
            }));
        });
    }

}

Coming soon!

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.GetRestoreJobsArgs;
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-name")
            .build());

        final var defaultRestoreJobs = HbrFunctions.getRestoreJobs(GetRestoreJobsArgs.builder()
            .restoreType("ECS_FILE")
            .vaultIds(defaultEcsBackupPlans.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].vaultId()))
            .targetInstanceIds(defaultEcsBackupPlans.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].instanceId()))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_ecs_backup_plans = alicloud.hbr.get_ecs_backup_plans(name_regex="plan-name")
default_restore_jobs = alicloud.hbr.get_restore_jobs(restore_type="ECS_FILE",
    vault_ids=[default_ecs_backup_plans.plans[0].vault_id],
    target_instance_ids=[default_ecs_backup_plans.plans[0].instance_id])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultEcsBackupPlans = alicloud.hbr.getEcsBackupPlans({
    nameRegex: "plan-name",
});
const defaultRestoreJobs = Promise.all([defaultEcsBackupPlans, defaultEcsBackupPlans]).then(([defaultEcsBackupPlans, defaultEcsBackupPlans1]) => alicloud.hbr.getRestoreJobs({
    restoreType: "ECS_FILE",
    vaultIds: [defaultEcsBackupPlans.plans?[0]?.vaultId],
    targetInstanceIds: [defaultEcsBackupPlans1.plans?[0]?.instanceId],
}));
variables:
  defaultEcsBackupPlans:
    Fn::Invoke:
      Function: alicloud:hbr:getEcsBackupPlans
      Arguments:
        nameRegex: plan-name
  defaultRestoreJobs:
    Fn::Invoke:
      Function: alicloud:hbr:getRestoreJobs
      Arguments:
        restoreType: ECS_FILE
        vaultIds:
          - ${defaultEcsBackupPlans.plans[0].vaultId}
        targetInstanceIds:
          - ${defaultEcsBackupPlans.plans[0].instanceId}

Using getRestoreJobs

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 getRestoreJobs(args: GetRestoreJobsArgs, opts?: InvokeOptions): Promise<GetRestoreJobsResult>
function getRestoreJobsOutput(args: GetRestoreJobsOutputArgs, opts?: InvokeOptions): Output<GetRestoreJobsResult>
def get_restore_jobs(output_file: Optional[str] = None,
                     restore_ids: Optional[Sequence[str]] = None,
                     restore_type: Optional[str] = None,
                     source_types: Optional[Sequence[str]] = None,
                     status: Optional[str] = None,
                     target_buckets: Optional[Sequence[str]] = None,
                     target_file_system_ids: Optional[Sequence[str]] = None,
                     target_instance_ids: Optional[Sequence[str]] = None,
                     vault_ids: Optional[Sequence[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> GetRestoreJobsResult
def get_restore_jobs_output(output_file: Optional[pulumi.Input[str]] = None,
                     restore_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     restore_type: Optional[pulumi.Input[str]] = None,
                     source_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     target_buckets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     target_file_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     target_instance_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     vault_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetRestoreJobsResult]
func GetRestoreJobs(ctx *Context, args *GetRestoreJobsArgs, opts ...InvokeOption) (*GetRestoreJobsResult, error)
func GetRestoreJobsOutput(ctx *Context, args *GetRestoreJobsOutputArgs, opts ...InvokeOption) GetRestoreJobsResultOutput

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

public static class GetRestoreJobs 
{
    public static Task<GetRestoreJobsResult> InvokeAsync(GetRestoreJobsArgs args, InvokeOptions? opts = null)
    public static Output<GetRestoreJobsResult> Invoke(GetRestoreJobsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRestoreJobsResult> getRestoreJobs(GetRestoreJobsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:hbr/getRestoreJobs:getRestoreJobs
  Arguments:
    # Arguments dictionary

The following arguments are supported:

RestoreType string

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

OutputFile string
RestoreIds List<string>

The list of restore job IDs.

SourceTypes List<string>

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

Status string

The status of restore job.

TargetBuckets List<string>

The name of target ofo OSS bucket.

TargetFileSystemIds List<string>

The ID of destination file system.

TargetInstanceIds List<string>

The ID of target ECS instance.

VaultIds List<string>

The ID of backup vault.

RestoreType string

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

OutputFile string
RestoreIds []string

The list of restore job IDs.

SourceTypes []string

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

Status string

The status of restore job.

TargetBuckets []string

The name of target ofo OSS bucket.

TargetFileSystemIds []string

The ID of destination file system.

TargetInstanceIds []string

The ID of target ECS instance.

VaultIds []string

The ID of backup vault.

restoreType String

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

outputFile String
restoreIds List<String>

The list of restore job IDs.

sourceTypes List<String>

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

status String

The status of restore job.

targetBuckets List<String>

The name of target ofo OSS bucket.

targetFileSystemIds List<String>

The ID of destination file system.

targetInstanceIds List<String>

The ID of target ECS instance.

vaultIds List<String>

The ID of backup vault.

restoreType string

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

outputFile string
restoreIds string[]

The list of restore job IDs.

sourceTypes string[]

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

status string

The status of restore job.

targetBuckets string[]

The name of target ofo OSS bucket.

targetFileSystemIds string[]

The ID of destination file system.

targetInstanceIds string[]

The ID of target ECS instance.

vaultIds string[]

The ID of backup vault.

restore_type str

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

output_file str
restore_ids Sequence[str]

The list of restore job IDs.

source_types Sequence[str]

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

status str

The status of restore job.

target_buckets Sequence[str]

The name of target ofo OSS bucket.

target_file_system_ids Sequence[str]

The ID of destination file system.

target_instance_ids Sequence[str]

The ID of target ECS instance.

vault_ids Sequence[str]

The ID of backup vault.

restoreType String

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

outputFile String
restoreIds List<String>

The list of restore job IDs.

sourceTypes List<String>

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

status String

The status of restore job.

targetBuckets List<String>

The name of target ofo OSS bucket.

targetFileSystemIds List<String>

The ID of destination file system.

targetInstanceIds List<String>

The ID of target ECS instance.

vaultIds List<String>

The ID of backup vault.

getRestoreJobs Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Jobs List<Pulumi.AliCloud.Hbr.Outputs.GetRestoreJobsJob>
RestoreType string
OutputFile string
RestoreIds List<string>
SourceTypes List<string>
Status string
TargetBuckets List<string>
TargetFileSystemIds List<string>
TargetInstanceIds List<string>
VaultIds List<string>
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Jobs []GetRestoreJobsJob
RestoreType string
OutputFile string
RestoreIds []string
SourceTypes []string
Status string
TargetBuckets []string
TargetFileSystemIds []string
TargetInstanceIds []string
VaultIds []string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
jobs List<GetRestoreJobsJob>
restoreType String
outputFile String
restoreIds List<String>
sourceTypes List<String>
status String
targetBuckets List<String>
targetFileSystemIds List<String>
targetInstanceIds List<String>
vaultIds List<String>
id string

The provider-assigned unique ID for this managed resource.

ids string[]
jobs GetRestoreJobsJob[]
restoreType string
outputFile string
restoreIds string[]
sourceTypes string[]
status string
targetBuckets string[]
targetFileSystemIds string[]
targetInstanceIds string[]
vaultIds string[]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
jobs Sequence[GetRestoreJobsJob]
restore_type str
output_file str
restore_ids Sequence[str]
source_types Sequence[str]
status str
target_buckets Sequence[str]
target_file_system_ids Sequence[str]
target_instance_ids Sequence[str]
vault_ids Sequence[str]
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
jobs List<Property Map>
restoreType String
outputFile String
restoreIds List<String>
sourceTypes List<String>
status String
targetBuckets List<String>
targetFileSystemIds List<String>
targetInstanceIds List<String>
vaultIds List<String>

Supporting Types

GetRestoreJobsJob

ActualBytes string

The actual size of Snapshot.

ActualItems string

The actual number of files.

BytesDone string

The size of restore job recovered.

BytesTotal string

The total size of restore job recovered.

CompleteTime string

The completion time of restore Job.

CreateTime string

The creation time of restore job.

ErrorFile string
ErrorMessage string

The error message of recovery task execution.

ExpireTime string

The expiration time of restore job. Unix Time in seconds.

Id string

The ID of the restore job.

ItemsDone string

The number of items restore job recovered.

ItemsTotal string

The total number of items restore job recovered.

Options string

Recovery Options.

ParentId string
Progress int

The recovery progress.

RestoreJobId string

The ID of restore job.

RestoreType string

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

SnapshotHash string

The hashcode of Snapshot.

SnapshotId string

The ID of Snapshot.

SourceType string

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

StartTime string

The start time of restore job. Unix Time in Seconds.

Status string

The status of restore job.

TargetBucket string

The name of target ofo OSS bucket.

TargetClientId string
TargetCreateTime string

The creation time of destination file system.

TargetDataSourceId string
TargetFileSystemId string

The ID of destination file system.

TargetInstanceId string

The ID of target ECS instance.

TargetPath string

The target file path of ECS instance.

TargetPrefix string

The file prefix of target OSS object.

UpdatedTime string

The update Time of restore job. Unix Time in Seconds.

VaultId string

The ID of backup vault.

ActualBytes string

The actual size of Snapshot.

ActualItems string

The actual number of files.

BytesDone string

The size of restore job recovered.

BytesTotal string

The total size of restore job recovered.

CompleteTime string

The completion time of restore Job.

CreateTime string

The creation time of restore job.

ErrorFile string
ErrorMessage string

The error message of recovery task execution.

ExpireTime string

The expiration time of restore job. Unix Time in seconds.

Id string

The ID of the restore job.

ItemsDone string

The number of items restore job recovered.

ItemsTotal string

The total number of items restore job recovered.

Options string

Recovery Options.

ParentId string
Progress int

The recovery progress.

RestoreJobId string

The ID of restore job.

RestoreType string

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

SnapshotHash string

The hashcode of Snapshot.

SnapshotId string

The ID of Snapshot.

SourceType string

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

StartTime string

The start time of restore job. Unix Time in Seconds.

Status string

The status of restore job.

TargetBucket string

The name of target ofo OSS bucket.

TargetClientId string
TargetCreateTime string

The creation time of destination file system.

TargetDataSourceId string
TargetFileSystemId string

The ID of destination file system.

TargetInstanceId string

The ID of target ECS instance.

TargetPath string

The target file path of ECS instance.

TargetPrefix string

The file prefix of target OSS object.

UpdatedTime string

The update Time of restore job. Unix Time in Seconds.

VaultId string

The ID of backup vault.

actualBytes String

The actual size of Snapshot.

actualItems String

The actual number of files.

bytesDone String

The size of restore job recovered.

bytesTotal String

The total size of restore job recovered.

completeTime String

The completion time of restore Job.

createTime String

The creation time of restore job.

errorFile String
errorMessage String

The error message of recovery task execution.

expireTime String

The expiration time of restore job. Unix Time in seconds.

id String

The ID of the restore job.

itemsDone String

The number of items restore job recovered.

itemsTotal String

The total number of items restore job recovered.

options String

Recovery Options.

parentId String
progress Integer

The recovery progress.

restoreJobId String

The ID of restore job.

restoreType String

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

snapshotHash String

The hashcode of Snapshot.

snapshotId String

The ID of Snapshot.

sourceType String

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

startTime String

The start time of restore job. Unix Time in Seconds.

status String

The status of restore job.

targetBucket String

The name of target ofo OSS bucket.

targetClientId String
targetCreateTime String

The creation time of destination file system.

targetDataSourceId String
targetFileSystemId String

The ID of destination file system.

targetInstanceId String

The ID of target ECS instance.

targetPath String

The target file path of ECS instance.

targetPrefix String

The file prefix of target OSS object.

updatedTime String

The update Time of restore job. Unix Time in Seconds.

vaultId String

The ID of backup vault.

actualBytes string

The actual size of Snapshot.

actualItems string

The actual number of files.

bytesDone string

The size of restore job recovered.

bytesTotal string

The total size of restore job recovered.

completeTime string

The completion time of restore Job.

createTime string

The creation time of restore job.

errorFile string
errorMessage string

The error message of recovery task execution.

expireTime string

The expiration time of restore job. Unix Time in seconds.

id string

The ID of the restore job.

itemsDone string

The number of items restore job recovered.

itemsTotal string

The total number of items restore job recovered.

options string

Recovery Options.

parentId string
progress number

The recovery progress.

restoreJobId string

The ID of restore job.

restoreType string

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

snapshotHash string

The hashcode of Snapshot.

snapshotId string

The ID of Snapshot.

sourceType string

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

startTime string

The start time of restore job. Unix Time in Seconds.

status string

The status of restore job.

targetBucket string

The name of target ofo OSS bucket.

targetClientId string
targetCreateTime string

The creation time of destination file system.

targetDataSourceId string
targetFileSystemId string

The ID of destination file system.

targetInstanceId string

The ID of target ECS instance.

targetPath string

The target file path of ECS instance.

targetPrefix string

The file prefix of target OSS object.

updatedTime string

The update Time of restore job. Unix Time in Seconds.

vaultId string

The ID of backup vault.

actual_bytes str

The actual size of Snapshot.

actual_items str

The actual number of files.

bytes_done str

The size of restore job recovered.

bytes_total str

The total size of restore job recovered.

complete_time str

The completion time of restore Job.

create_time str

The creation time of restore job.

error_file str
error_message str

The error message of recovery task execution.

expire_time str

The expiration time of restore job. Unix Time in seconds.

id str

The ID of the restore job.

items_done str

The number of items restore job recovered.

items_total str

The total number of items restore job recovered.

options str

Recovery Options.

parent_id str
progress int

The recovery progress.

restore_job_id str

The ID of restore job.

restore_type str

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

snapshot_hash str

The hashcode of Snapshot.

snapshot_id str

The ID of Snapshot.

source_type str

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

start_time str

The start time of restore job. Unix Time in Seconds.

status str

The status of restore job.

target_bucket str

The name of target ofo OSS bucket.

target_client_id str
target_create_time str

The creation time of destination file system.

target_data_source_id str
target_file_system_id str

The ID of destination file system.

target_instance_id str

The ID of target ECS instance.

target_path str

The target file path of ECS instance.

target_prefix str

The file prefix of target OSS object.

updated_time str

The update Time of restore job. Unix Time in Seconds.

vault_id str

The ID of backup vault.

actualBytes String

The actual size of Snapshot.

actualItems String

The actual number of files.

bytesDone String

The size of restore job recovered.

bytesTotal String

The total size of restore job recovered.

completeTime String

The completion time of restore Job.

createTime String

The creation time of restore job.

errorFile String
errorMessage String

The error message of recovery task execution.

expireTime String

The expiration time of restore job. Unix Time in seconds.

id String

The ID of the restore job.

itemsDone String

The number of items restore job recovered.

itemsTotal String

The total number of items restore job recovered.

options String

Recovery Options.

parentId String
progress Number

The recovery progress.

restoreJobId String

The ID of restore job.

restoreType String

The type of recovery destination. Valid Values: ECS_FILE, OSS, NAS.

snapshotHash String

The hashcode of Snapshot.

snapshotId String

The ID of Snapshot.

sourceType String

The list of data source types. Valid values: ECS_FILE, NAS, OSS, OTS_TABLE,UDM_ECS_ROLLBACK.

startTime String

The start time of restore job. Unix Time in Seconds.

status String

The status of restore job.

targetBucket String

The name of target ofo OSS bucket.

targetClientId String
targetCreateTime String

The creation time of destination file system.

targetDataSourceId String
targetFileSystemId String

The ID of destination file system.

targetInstanceId String

The ID of target ECS instance.

targetPath String

The target file path of ECS instance.

targetPrefix String

The file prefix of target OSS object.

updatedTime String

The update Time of restore job. 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.