alicloud.hbr.getEcsBackupPlans
Explore with Pulumi AI
This data source provides the Hbr EcsBackupPlans of the current Alibaba Cloud user.
NOTE: Available in v1.132.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Hbr.GetEcsBackupPlans.Invoke(new()
{
NameRegex = "plan-name",
});
return new Dictionary<string, object?>
{
["hbrEcsBackupPlanId"] = ids.Apply(getEcsBackupPlansResult => getEcsBackupPlansResult.Plans[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := hbr.GetEcsBackupPlans(ctx, &hbr.GetEcsBackupPlansArgs{
NameRegex: pulumi.StringRef("plan-name"),
}, nil)
if err != nil {
return err
}
ctx.Export("hbrEcsBackupPlanId", ids.Plans[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.hbr.HbrFunctions;
import com.pulumi.alicloud.hbr.inputs.GetEcsBackupPlansArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var ids = HbrFunctions.getEcsBackupPlans(GetEcsBackupPlansArgs.builder()
.nameRegex("plan-name")
.build());
ctx.export("hbrEcsBackupPlanId", ids.applyValue(getEcsBackupPlansResult -> getEcsBackupPlansResult.plans()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.hbr.get_ecs_backup_plans(name_regex="plan-name")
pulumi.export("hbrEcsBackupPlanId", ids.plans[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.hbr.getEcsBackupPlans({
nameRegex: "plan-name",
});
export const hbrEcsBackupPlanId = ids.then(ids => ids.plans?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:hbr:getEcsBackupPlans
Arguments:
nameRegex: plan-name
outputs:
hbrEcsBackupPlanId: ${ids.plans[0].id}
Using getEcsBackupPlans
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEcsBackupPlans(args: GetEcsBackupPlansArgs, opts?: InvokeOptions): Promise<GetEcsBackupPlansResult>
function getEcsBackupPlansOutput(args: GetEcsBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetEcsBackupPlansResult>
def get_ecs_backup_plans(ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
vault_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEcsBackupPlansResult
def get_ecs_backup_plans_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
vault_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEcsBackupPlansResult]
func GetEcsBackupPlans(ctx *Context, args *GetEcsBackupPlansArgs, opts ...InvokeOption) (*GetEcsBackupPlansResult, error)
func GetEcsBackupPlansOutput(ctx *Context, args *GetEcsBackupPlansOutputArgs, opts ...InvokeOption) GetEcsBackupPlansResultOutput
> Note: This function is named GetEcsBackupPlans
in the Go SDK.
public static class GetEcsBackupPlans
{
public static Task<GetEcsBackupPlansResult> InvokeAsync(GetEcsBackupPlansArgs args, InvokeOptions? opts = null)
public static Output<GetEcsBackupPlansResult> Invoke(GetEcsBackupPlansInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsBackupPlansResult> getEcsBackupPlans(GetEcsBackupPlansArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:hbr/getEcsBackupPlans:getEcsBackupPlans
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of EcsBackupPlan IDs.
- Instance
Id string The ID of ECS instance.
- Name
Regex string A regex string to filter results by EcsBackupPlan name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Vault
Id string The ID of Backup vault.
- Ids []string
A list of EcsBackupPlan IDs.
- Instance
Id string The ID of ECS instance.
- Name
Regex string A regex string to filter results by EcsBackupPlan name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Vault
Id string The ID of Backup vault.
- ids List<String>
A list of EcsBackupPlan IDs.
- instance
Id String The ID of ECS instance.
- name
Regex String A regex string to filter results by EcsBackupPlan name.
- output
File String File name where to save data source results (after running
pulumi preview
).- vault
Id String The ID of Backup vault.
- ids string[]
A list of EcsBackupPlan IDs.
- instance
Id string The ID of ECS instance.
- name
Regex string A regex string to filter results by EcsBackupPlan name.
- output
File string File name where to save data source results (after running
pulumi preview
).- vault
Id string The ID of Backup vault.
- ids Sequence[str]
A list of EcsBackupPlan IDs.
- instance_
id str The ID of ECS instance.
- name_
regex str A regex string to filter results by EcsBackupPlan name.
- output_
file str File name where to save data source results (after running
pulumi preview
).- vault_
id str The ID of Backup vault.
- ids List<String>
A list of EcsBackupPlan IDs.
- instance
Id String The ID of ECS instance.
- name
Regex String A regex string to filter results by EcsBackupPlan name.
- output
File String File name where to save data source results (after running
pulumi preview
).- vault
Id String The ID of Backup vault.
getEcsBackupPlans Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Plans
List<Pulumi.
Ali Cloud. Hbr. Outputs. Get Ecs Backup Plans Plan> - Instance
Id string - Name
Regex string - Output
File string - Vault
Id string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Plans
[]Get
Ecs Backup Plans Plan - Instance
Id string - Name
Regex string - Output
File string - Vault
Id string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plans
List<Get
Ecs Backup Plans Plan> - instance
Id String - name
Regex String - output
File String - vault
Id String
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- plans
Get
Ecs Backup Plans Plan[] - instance
Id string - name
Regex string - output
File string - vault
Id string
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- plans
Sequence[Get
Ecs Backup Plans Plan] - instance_
id str - name_
regex str - output_
file str - vault_
id str
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plans List<Property Map>
- instance
Id String - name
Regex String - output
File String - vault
Id String
Supporting Types
GetEcsBackupPlansPlan
- Backup
Type string Backup type. Valid values:
COMPLETE
.- Create
Time string - Created
Time string The creation time of the backup plan. UNIX time in seconds.
- Detail string
- Disabled bool
Whether to be suspended. Valid values:
true
,false
.- Ecs
Backup stringPlan Id The ID of ecs backup plan.
- Ecs
Backup stringPlan Name The name of the backup plan.
- Exclude string
Exclude path. String of Json list. Up to 255 characters. e.g.
"[\"/home/work\"]"
- Id string
The ID of ecs backup plan.
- Include string
Include path. String of Json list. Up to 255 characters. e.g.
"[\"/var\"]"
- Instance
Id string The ID of ECS instance.
- Options string
Windows operating system with application consistency using VSS. eg: {
UseVSS
:false}.- Paths List<string>
Backup path. e.g.
["/home", "/var"]
- Retention string
Backup retention days, the minimum is 1.
- Schedule string
Backup strategy. Optional format:
I|{startTime}|{interval}
. It means to execute a backup task every{interval}
starting from{startTime}
. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.- Source
Type string The type of backup source.
- Speed
Limit string Flow control. The format is: {start}|{end}|{bandwidth}. Use
|
to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.- Updated
Time string The update time of the backup plan. UNIX time in seconds.
- Vault
Id string The ID of Backup vault.
- Backup
Type string Backup type. Valid values:
COMPLETE
.- Create
Time string - Created
Time string The creation time of the backup plan. UNIX time in seconds.
- Detail string
- Disabled bool
Whether to be suspended. Valid values:
true
,false
.- Ecs
Backup stringPlan Id The ID of ecs backup plan.
- Ecs
Backup stringPlan Name The name of the backup plan.
- Exclude string
Exclude path. String of Json list. Up to 255 characters. e.g.
"[\"/home/work\"]"
- Id string
The ID of ecs backup plan.
- Include string
Include path. String of Json list. Up to 255 characters. e.g.
"[\"/var\"]"
- Instance
Id string The ID of ECS instance.
- Options string
Windows operating system with application consistency using VSS. eg: {
UseVSS
:false}.- Paths []string
Backup path. e.g.
["/home", "/var"]
- Retention string
Backup retention days, the minimum is 1.
- Schedule string
Backup strategy. Optional format:
I|{startTime}|{interval}
. It means to execute a backup task every{interval}
starting from{startTime}
. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.- Source
Type string The type of backup source.
- Speed
Limit string Flow control. The format is: {start}|{end}|{bandwidth}. Use
|
to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.- Updated
Time string The update time of the backup plan. UNIX time in seconds.
- Vault
Id string The ID of Backup vault.
- backup
Type String Backup type. Valid values:
COMPLETE
.- create
Time String - created
Time String The creation time of the backup plan. UNIX time in seconds.
- detail String
- disabled Boolean
Whether to be suspended. Valid values:
true
,false
.- ecs
Backup StringPlan Id The ID of ecs backup plan.
- ecs
Backup StringPlan Name The name of the backup plan.
- exclude String
Exclude path. String of Json list. Up to 255 characters. e.g.
"[\"/home/work\"]"
- id String
The ID of ecs backup plan.
- include String
Include path. String of Json list. Up to 255 characters. e.g.
"[\"/var\"]"
- instance
Id String The ID of ECS instance.
- options String
Windows operating system with application consistency using VSS. eg: {
UseVSS
:false}.- paths List<String>
Backup path. e.g.
["/home", "/var"]
- retention String
Backup retention days, the minimum is 1.
- schedule String
Backup strategy. Optional format:
I|{startTime}|{interval}
. It means to execute a backup task every{interval}
starting from{startTime}
. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.- source
Type String The type of backup source.
- speed
Limit String Flow control. The format is: {start}|{end}|{bandwidth}. Use
|
to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.- updated
Time String The update time of the backup plan. UNIX time in seconds.
- vault
Id String The ID of Backup vault.
- backup
Type string Backup type. Valid values:
COMPLETE
.- create
Time string - created
Time string The creation time of the backup plan. UNIX time in seconds.
- detail string
- disabled boolean
Whether to be suspended. Valid values:
true
,false
.- ecs
Backup stringPlan Id The ID of ecs backup plan.
- ecs
Backup stringPlan Name The name of the backup plan.
- exclude string
Exclude path. String of Json list. Up to 255 characters. e.g.
"[\"/home/work\"]"
- id string
The ID of ecs backup plan.
- include string
Include path. String of Json list. Up to 255 characters. e.g.
"[\"/var\"]"
- instance
Id string The ID of ECS instance.
- options string
Windows operating system with application consistency using VSS. eg: {
UseVSS
:false}.- paths string[]
Backup path. e.g.
["/home", "/var"]
- retention string
Backup retention days, the minimum is 1.
- schedule string
Backup strategy. Optional format:
I|{startTime}|{interval}
. It means to execute a backup task every{interval}
starting from{startTime}
. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.- source
Type string The type of backup source.
- speed
Limit string Flow control. The format is: {start}|{end}|{bandwidth}. Use
|
to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.- updated
Time string The update time of the backup plan. UNIX time in seconds.
- vault
Id string The ID of Backup vault.
- backup_
type str Backup type. Valid values:
COMPLETE
.- create_
time str - created_
time str The creation time of the backup plan. UNIX time in seconds.
- detail str
- disabled bool
Whether to be suspended. Valid values:
true
,false
.- ecs_
backup_ strplan_ id The ID of ecs backup plan.
- ecs_
backup_ strplan_ name The name of the backup plan.
- exclude str
Exclude path. String of Json list. Up to 255 characters. e.g.
"[\"/home/work\"]"
- id str
The ID of ecs backup plan.
- include str
Include path. String of Json list. Up to 255 characters. e.g.
"[\"/var\"]"
- instance_
id str The ID of ECS instance.
- options str
Windows operating system with application consistency using VSS. eg: {
UseVSS
:false}.- paths Sequence[str]
Backup path. e.g.
["/home", "/var"]
- retention str
Backup retention days, the minimum is 1.
- schedule str
Backup strategy. Optional format:
I|{startTime}|{interval}
. It means to execute a backup task every{interval}
starting from{startTime}
. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.- source_
type str The type of backup source.
- speed_
limit str Flow control. The format is: {start}|{end}|{bandwidth}. Use
|
to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.- updated_
time str The update time of the backup plan. UNIX time in seconds.
- vault_
id str The ID of Backup vault.
- backup
Type String Backup type. Valid values:
COMPLETE
.- create
Time String - created
Time String The creation time of the backup plan. UNIX time in seconds.
- detail String
- disabled Boolean
Whether to be suspended. Valid values:
true
,false
.- ecs
Backup StringPlan Id The ID of ecs backup plan.
- ecs
Backup StringPlan Name The name of the backup plan.
- exclude String
Exclude path. String of Json list. Up to 255 characters. e.g.
"[\"/home/work\"]"
- id String
The ID of ecs backup plan.
- include String
Include path. String of Json list. Up to 255 characters. e.g.
"[\"/var\"]"
- instance
Id String The ID of ECS instance.
- options String
Windows operating system with application consistency using VSS. eg: {
UseVSS
:false}.- paths List<String>
Backup path. e.g.
["/home", "/var"]
- retention String
Backup retention days, the minimum is 1.
- schedule String
Backup strategy. Optional format:
I|{startTime}|{interval}
. It means to execute a backup task every{interval}
starting from{startTime}
. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.- source
Type String The type of backup source.
- speed
Limit String Flow control. The format is: {start}|{end}|{bandwidth}. Use
|
to separate multiple flow control configurations, multiple flow control configurations not allowed to have overlapping times.- updated
Time String The update time of the backup plan. 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.