alicloud.hbr.getRestoreJobs
Explore with Pulumi AI
This data source provides the Hbr Restore Jobs of the current Alibaba Cloud user.
NOTE: Available in v1.133.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultEcsBackupPlans = AliCloud.Hbr.GetEcsBackupPlans.Invoke(new()
{
NameRegex = "plan-name",
});
var defaultRestoreJobs = AliCloud.Hbr.GetRestoreJobs.Invoke(new()
{
RestoreType = "ECS_FILE",
VaultIds = new[]
{
defaultEcsBackupPlans.Apply(getEcsBackupPlansResult => getEcsBackupPlansResult.Plans[0]?.VaultId),
},
TargetInstanceIds = new[]
{
defaultEcsBackupPlans.Apply(getEcsBackupPlansResult => getEcsBackupPlansResult.Plans[0]?.InstanceId),
},
});
});
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-name"),
}, nil);
if err != nil {
return err
}
_, err = hbr.GetRestoreJobs(ctx, &hbr.GetRestoreJobsArgs{
RestoreType: "ECS_FILE",
VaultIds: interface{}{
defaultEcsBackupPlans.Plans[0].VaultId,
},
TargetInstanceIds: interface{}{
defaultEcsBackupPlans.Plans[0].InstanceId,
},
}, nil);
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.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:
- Restore
Type string The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- Output
File string File name where to save data source results (after running
pulumi preview
).- Restore
Ids List<string> The list of restore job IDs.
- Source
Types 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.
- Target
Buckets List<string> The name of target ofo OSS bucket.
- Target
File List<string>System Ids The ID of destination file system.
- Target
Instance List<string>Ids The ID of target ECS instance.
- Vault
Ids List<string> The ID of backup vault.
- Restore
Type string The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- Output
File string File name where to save data source results (after running
pulumi preview
).- Restore
Ids []string The list of restore job IDs.
- Source
Types []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.
- Target
Buckets []string The name of target ofo OSS bucket.
- Target
File []stringSystem Ids The ID of destination file system.
- Target
Instance []stringIds The ID of target ECS instance.
- Vault
Ids []string The ID of backup vault.
- restore
Type String The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- output
File String File name where to save data source results (after running
pulumi preview
).- restore
Ids List<String> The list of restore job IDs.
- source
Types 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.
- target
Buckets List<String> The name of target ofo OSS bucket.
- target
File List<String>System Ids The ID of destination file system.
- target
Instance List<String>Ids The ID of target ECS instance.
- vault
Ids List<String> The ID of backup vault.
- restore
Type string The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- output
File string File name where to save data source results (after running
pulumi preview
).- restore
Ids string[] The list of restore job IDs.
- source
Types 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.
- target
Buckets string[] The name of target ofo OSS bucket.
- target
File string[]System Ids The ID of destination file system.
- target
Instance string[]Ids The ID of target ECS instance.
- vault
Ids string[] The ID of backup vault.
- restore_
type str The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- output_
file str File name where to save data source results (after running
pulumi preview
).- 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_ Sequence[str]system_ ids The ID of destination file system.
- target_
instance_ Sequence[str]ids The ID of target ECS instance.
- vault_
ids Sequence[str] The ID of backup vault.
- restore
Type String The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- output
File String File name where to save data source results (after running
pulumi preview
).- restore
Ids List<String> The list of restore job IDs.
- source
Types 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.
- target
Buckets List<String> The name of target ofo OSS bucket.
- target
File List<String>System Ids The ID of destination file system.
- target
Instance List<String>Ids The ID of target ECS instance.
- vault
Ids 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.
Ali Cloud. Hbr. Outputs. Get Restore Jobs Job> - Restore
Type string - Output
File string - Restore
Ids List<string> - Source
Types List<string> - Status string
- Target
Buckets List<string> - Target
File List<string>System Ids - Target
Instance List<string>Ids - Vault
Ids List<string>
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Jobs
[]Get
Restore Jobs Job - Restore
Type string - Output
File string - Restore
Ids []string - Source
Types []string - Status string
- Target
Buckets []string - Target
File []stringSystem Ids - Target
Instance []stringIds - Vault
Ids []string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- jobs
List<Get
Restore Jobs Job> - restore
Type String - output
File String - restore
Ids List<String> - source
Types List<String> - status String
- target
Buckets List<String> - target
File List<String>System Ids - target
Instance List<String>Ids - vault
Ids List<String>
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- jobs
Get
Restore Jobs Job[] - restore
Type string - output
File string - restore
Ids string[] - source
Types string[] - status string
- target
Buckets string[] - target
File string[]System Ids - target
Instance string[]Ids - vault
Ids string[]
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- jobs
Sequence[Get
Restore Jobs Job] - restore_
type str - output_
file str - restore_
ids Sequence[str] - source_
types Sequence[str] - status str
- target_
buckets Sequence[str] - target_
file_ Sequence[str]system_ ids - target_
instance_ Sequence[str]ids - vault_
ids Sequence[str]
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- jobs List<Property Map>
- restore
Type String - output
File String - restore
Ids List<String> - source
Types List<String> - status String
- target
Buckets List<String> - target
File List<String>System Ids - target
Instance List<String>Ids - vault
Ids List<String>
Supporting Types
GetRestoreJobsJob
- Actual
Bytes string The actual size of Snapshot.
- Actual
Items string The actual number of files.
- Bytes
Done string The size of restore job recovered.
- Bytes
Total string The total size of restore job recovered.
- Complete
Time string The completion time of restore Job.
- Create
Time string The creation time of restore job.
- Error
File string - Error
Message string The error message of recovery task execution.
- Expire
Time string The expiration time of restore job. Unix Time in seconds.
- Id string
The ID of the restore job.
- Items
Done string The number of items restore job recovered.
- Items
Total string The total number of items restore job recovered.
- Options string
Recovery Options.
- Parent
Id string - Progress int
The recovery progress.
- Restore
Job stringId The ID of restore job.
- Restore
Type string The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- Snapshot
Hash string The hashcode of Snapshot.
- Snapshot
Id string The ID of Snapshot.
- Source
Type string The list of data source types. Valid values:
ECS_FILE
,NAS
,OSS
,OTS_TABLE
,UDM_ECS_ROLLBACK
.- Start
Time string The start time of restore job. Unix Time in Seconds.
- Status string
The status of restore job.
- Target
Bucket string The name of target ofo OSS bucket.
- Target
Client stringId - Target
Create stringTime The creation time of destination file system.
- Target
Data stringSource Id - Target
File stringSystem Id The ID of destination file system.
- Target
Instance stringId The ID of target ECS instance.
- Target
Path string The target file path of ECS instance.
- Target
Prefix string The file prefix of target OSS object.
- Updated
Time string The update Time of restore job. Unix Time in Seconds.
- Vault
Id string The ID of backup vault.
- Actual
Bytes string The actual size of Snapshot.
- Actual
Items string The actual number of files.
- Bytes
Done string The size of restore job recovered.
- Bytes
Total string The total size of restore job recovered.
- Complete
Time string The completion time of restore Job.
- Create
Time string The creation time of restore job.
- Error
File string - Error
Message string The error message of recovery task execution.
- Expire
Time string The expiration time of restore job. Unix Time in seconds.
- Id string
The ID of the restore job.
- Items
Done string The number of items restore job recovered.
- Items
Total string The total number of items restore job recovered.
- Options string
Recovery Options.
- Parent
Id string - Progress int
The recovery progress.
- Restore
Job stringId The ID of restore job.
- Restore
Type string The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- Snapshot
Hash string The hashcode of Snapshot.
- Snapshot
Id string The ID of Snapshot.
- Source
Type string The list of data source types. Valid values:
ECS_FILE
,NAS
,OSS
,OTS_TABLE
,UDM_ECS_ROLLBACK
.- Start
Time string The start time of restore job. Unix Time in Seconds.
- Status string
The status of restore job.
- Target
Bucket string The name of target ofo OSS bucket.
- Target
Client stringId - Target
Create stringTime The creation time of destination file system.
- Target
Data stringSource Id - Target
File stringSystem Id The ID of destination file system.
- Target
Instance stringId The ID of target ECS instance.
- Target
Path string The target file path of ECS instance.
- Target
Prefix string The file prefix of target OSS object.
- Updated
Time string The update Time of restore job. Unix Time in Seconds.
- Vault
Id string The ID of backup vault.
- actual
Bytes String The actual size of Snapshot.
- actual
Items String The actual number of files.
- bytes
Done String The size of restore job recovered.
- bytes
Total String The total size of restore job recovered.
- complete
Time String The completion time of restore Job.
- create
Time String The creation time of restore job.
- error
File String - error
Message String The error message of recovery task execution.
- expire
Time String The expiration time of restore job. Unix Time in seconds.
- id String
The ID of the restore job.
- items
Done String The number of items restore job recovered.
- items
Total String The total number of items restore job recovered.
- options String
Recovery Options.
- parent
Id String - progress Integer
The recovery progress.
- restore
Job StringId The ID of restore job.
- restore
Type String The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- snapshot
Hash String The hashcode of Snapshot.
- snapshot
Id String The ID of Snapshot.
- source
Type String The list of data source types. Valid values:
ECS_FILE
,NAS
,OSS
,OTS_TABLE
,UDM_ECS_ROLLBACK
.- start
Time String The start time of restore job. Unix Time in Seconds.
- status String
The status of restore job.
- target
Bucket String The name of target ofo OSS bucket.
- target
Client StringId - target
Create StringTime The creation time of destination file system.
- target
Data StringSource Id - target
File StringSystem Id The ID of destination file system.
- target
Instance StringId The ID of target ECS instance.
- target
Path String The target file path of ECS instance.
- target
Prefix String The file prefix of target OSS object.
- updated
Time String The update Time of restore job. Unix Time in Seconds.
- vault
Id String The ID of backup vault.
- actual
Bytes string The actual size of Snapshot.
- actual
Items string The actual number of files.
- bytes
Done string The size of restore job recovered.
- bytes
Total string The total size of restore job recovered.
- complete
Time string The completion time of restore Job.
- create
Time string The creation time of restore job.
- error
File string - error
Message string The error message of recovery task execution.
- expire
Time string The expiration time of restore job. Unix Time in seconds.
- id string
The ID of the restore job.
- items
Done string The number of items restore job recovered.
- items
Total string The total number of items restore job recovered.
- options string
Recovery Options.
- parent
Id string - progress number
The recovery progress.
- restore
Job stringId The ID of restore job.
- restore
Type string The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- snapshot
Hash string The hashcode of Snapshot.
- snapshot
Id string The ID of Snapshot.
- source
Type string The list of data source types. Valid values:
ECS_FILE
,NAS
,OSS
,OTS_TABLE
,UDM_ECS_ROLLBACK
.- start
Time string The start time of restore job. Unix Time in Seconds.
- status string
The status of restore job.
- target
Bucket string The name of target ofo OSS bucket.
- target
Client stringId - target
Create stringTime The creation time of destination file system.
- target
Data stringSource Id - target
File stringSystem Id The ID of destination file system.
- target
Instance stringId The ID of target ECS instance.
- target
Path string The target file path of ECS instance.
- target
Prefix string The file prefix of target OSS object.
- updated
Time string The update Time of restore job. Unix Time in Seconds.
- vault
Id 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_ strid 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_ strid - target_
create_ strtime The creation time of destination file system.
- target_
data_ strsource_ id - target_
file_ strsystem_ id The ID of destination file system.
- target_
instance_ strid 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.
- actual
Bytes String The actual size of Snapshot.
- actual
Items String The actual number of files.
- bytes
Done String The size of restore job recovered.
- bytes
Total String The total size of restore job recovered.
- complete
Time String The completion time of restore Job.
- create
Time String The creation time of restore job.
- error
File String - error
Message String The error message of recovery task execution.
- expire
Time String The expiration time of restore job. Unix Time in seconds.
- id String
The ID of the restore job.
- items
Done String The number of items restore job recovered.
- items
Total String The total number of items restore job recovered.
- options String
Recovery Options.
- parent
Id String - progress Number
The recovery progress.
- restore
Job StringId The ID of restore job.
- restore
Type String The type of recovery destination. Valid Values:
ECS_FILE
,OSS
,NAS
.- snapshot
Hash String The hashcode of Snapshot.
- snapshot
Id String The ID of Snapshot.
- source
Type String The list of data source types. Valid values:
ECS_FILE
,NAS
,OSS
,OTS_TABLE
,UDM_ECS_ROLLBACK
.- start
Time String The start time of restore job. Unix Time in Seconds.
- status String
The status of restore job.
- target
Bucket String The name of target ofo OSS bucket.
- target
Client StringId - target
Create StringTime The creation time of destination file system.
- target
Data StringSource Id - target
File StringSystem Id The ID of destination file system.
- target
Instance StringId The ID of target ECS instance.
- target
Path String The target file path of ECS instance.
- target
Prefix String The file prefix of target OSS object.
- updated
Time String The update Time of restore job. Unix Time in Seconds.
- vault
Id String The ID of backup vault.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.