Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.hbr.getNasBackupPlans
Explore with Pulumi AI
This data source provides the Hbr NasBackupPlans of the current Alibaba Cloud user.
NOTE: Available in v1.132.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.hbr.getNasBackupPlans({
nameRegex: "^my-NasBackupPlan",
});
export const hbrNasBackupPlanId = ids.then(ids => ids.plans?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.hbr.get_nas_backup_plans(name_regex="^my-NasBackupPlan")
pulumi.export("hbrNasBackupPlanId", ids.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.GetNasBackupPlans(ctx, &hbr.GetNasBackupPlansArgs{
NameRegex: pulumi.StringRef("^my-NasBackupPlan"),
}, nil)
if err != nil {
return err
}
ctx.Export("hbrNasBackupPlanId", ids.Plans[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Hbr.GetNasBackupPlans.Invoke(new()
{
NameRegex = "^my-NasBackupPlan",
});
return new Dictionary<string, object?>
{
["hbrNasBackupPlanId"] = ids.Apply(getNasBackupPlansResult => getNasBackupPlansResult.Plans[0]?.Id),
};
});
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.GetNasBackupPlansArgs;
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.getNasBackupPlans(GetNasBackupPlansArgs.builder()
.nameRegex("^my-NasBackupPlan")
.build());
ctx.export("hbrNasBackupPlanId", ids.applyValue(getNasBackupPlansResult -> getNasBackupPlansResult.plans()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:hbr:getNasBackupPlans
Arguments:
nameRegex: ^my-NasBackupPlan
outputs:
hbrNasBackupPlanId: ${ids.plans[0].id}
Using getNasBackupPlans
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 getNasBackupPlans(args: GetNasBackupPlansArgs, opts?: InvokeOptions): Promise<GetNasBackupPlansResult>
function getNasBackupPlansOutput(args: GetNasBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetNasBackupPlansResult>
def get_nas_backup_plans(file_system_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
vault_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNasBackupPlansResult
def get_nas_backup_plans_output(file_system_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[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[GetNasBackupPlansResult]
func GetNasBackupPlans(ctx *Context, args *GetNasBackupPlansArgs, opts ...InvokeOption) (*GetNasBackupPlansResult, error)
func GetNasBackupPlansOutput(ctx *Context, args *GetNasBackupPlansOutputArgs, opts ...InvokeOption) GetNasBackupPlansResultOutput
> Note: This function is named GetNasBackupPlans
in the Go SDK.
public static class GetNasBackupPlans
{
public static Task<GetNasBackupPlansResult> InvokeAsync(GetNasBackupPlansArgs args, InvokeOptions? opts = null)
public static Output<GetNasBackupPlansResult> Invoke(GetNasBackupPlansInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNasBackupPlansResult> getNasBackupPlans(GetNasBackupPlansArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:hbr/getNasBackupPlans:getNasBackupPlans
arguments:
# arguments dictionary
The following arguments are supported:
- File
System stringId - The Nas fileSystem instance ID of the EcsBackupPlan used.
- Ids List<string>
- A list of NasBackupPlan IDs.
- Name
Regex string - A regex string to filter results by NasBackupPlan name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Vault
Id string - The backup vault ID of the NasBackupPlan used.
- File
System stringId - The Nas fileSystem instance ID of the EcsBackupPlan used.
- Ids []string
- A list of NasBackupPlan IDs.
- Name
Regex string - A regex string to filter results by NasBackupPlan name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Vault
Id string - The backup vault ID of the NasBackupPlan used.
- file
System StringId - The Nas fileSystem instance ID of the EcsBackupPlan used.
- ids List<String>
- A list of NasBackupPlan IDs.
- name
Regex String - A regex string to filter results by NasBackupPlan name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - vault
Id String - The backup vault ID of the NasBackupPlan used.
- file
System stringId - The Nas fileSystem instance ID of the EcsBackupPlan used.
- ids string[]
- A list of NasBackupPlan IDs.
- name
Regex string - A regex string to filter results by NasBackupPlan name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - vault
Id string - The backup vault ID of the NasBackupPlan used.
- file_
system_ strid - The Nas fileSystem instance ID of the EcsBackupPlan used.
- ids Sequence[str]
- A list of NasBackupPlan IDs.
- name_
regex str - A regex string to filter results by NasBackupPlan name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - vault_
id str - The backup vault ID of the NasBackupPlan used.
- file
System StringId - The Nas fileSystem instance ID of the EcsBackupPlan used.
- ids List<String>
- A list of NasBackupPlan IDs.
- name
Regex String - A regex string to filter results by NasBackupPlan name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - vault
Id String - The backup vault ID of the NasBackupPlan used.
getNasBackupPlans 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 Nas Backup Plans Plan> - File
System stringId - 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
Nas Backup Plans Plan - File
System stringId - 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
Nas Backup Plans Plan> - file
System StringId - 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
Nas Backup Plans Plan[] - file
System stringId - 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
Nas Backup Plans Plan] - file_
system_ strid - 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>
- file
System StringId - name
Regex String - output
File String - vault
Id String
Supporting Types
GetNasBackupPlansPlan
- Backup
Type string - Backup type. Valid values:
COMPLETE
. - Create
Time string - File System Creation Time. Note The time format of the API adopts the ISO 8601 format, such as
2021-07-09T15:45:30CST
. - Created
Time string - The creation time of the backup plan. UNIX time in seconds.
- Disabled bool
- Whether to be suspended. Valid values:
true
,false
. - File
System stringId - The File System ID of Nas.
- Id string
- The ID of Nas backup plan.
- Nas
Backup stringPlan Id - The ID of Nas backup plan.
- Nas
Backup stringPlan Name - The name of the resource.
- Options string
- Options field of Nas backup plan.
- Paths List<string>
- List of backup path. Up to 65536 Characters. 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.startTime
Backup start time, UNIX time seconds.
- 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 - File System Creation Time. Note The time format of the API adopts the ISO 8601 format, such as
2021-07-09T15:45:30CST
. - Created
Time string - The creation time of the backup plan. UNIX time in seconds.
- Disabled bool
- Whether to be suspended. Valid values:
true
,false
. - File
System stringId - The File System ID of Nas.
- Id string
- The ID of Nas backup plan.
- Nas
Backup stringPlan Id - The ID of Nas backup plan.
- Nas
Backup stringPlan Name - The name of the resource.
- Options string
- Options field of Nas backup plan.
- Paths []string
- List of backup path. Up to 65536 Characters. 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.startTime
Backup start time, UNIX time seconds.
- 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 - File System Creation Time. Note The time format of the API adopts the ISO 8601 format, such as
2021-07-09T15:45:30CST
. - created
Time String - The creation time of the backup plan. UNIX time in seconds.
- disabled Boolean
- Whether to be suspended. Valid values:
true
,false
. - file
System StringId - The File System ID of Nas.
- id String
- The ID of Nas backup plan.
- nas
Backup StringPlan Id - The ID of Nas backup plan.
- nas
Backup StringPlan Name - The name of the resource.
- options String
- Options field of Nas backup plan.
- paths List<String>
- List of backup path. Up to 65536 Characters. 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.startTime
Backup start time, UNIX time seconds.
- 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 - File System Creation Time. Note The time format of the API adopts the ISO 8601 format, such as
2021-07-09T15:45:30CST
. - created
Time string - The creation time of the backup plan. UNIX time in seconds.
- disabled boolean
- Whether to be suspended. Valid values:
true
,false
. - file
System stringId - The File System ID of Nas.
- id string
- The ID of Nas backup plan.
- nas
Backup stringPlan Id - The ID of Nas backup plan.
- nas
Backup stringPlan Name - The name of the resource.
- options string
- Options field of Nas backup plan.
- paths string[]
- List of backup path. Up to 65536 Characters. 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.startTime
Backup start time, UNIX time seconds.
- 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 - File System Creation Time. Note The time format of the API adopts the ISO 8601 format, such as
2021-07-09T15:45:30CST
. - created_
time str - The creation time of the backup plan. UNIX time in seconds.
- disabled bool
- Whether to be suspended. Valid values:
true
,false
. - file_
system_ strid - The File System ID of Nas.
- id str
- The ID of Nas backup plan.
- nas_
backup_ strplan_ id - The ID of Nas backup plan.
- nas_
backup_ strplan_ name - The name of the resource.
- options str
- Options field of Nas backup plan.
- paths Sequence[str]
- List of backup path. Up to 65536 Characters. 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.startTime
Backup start time, UNIX time seconds.
- 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 - File System Creation Time. Note The time format of the API adopts the ISO 8601 format, such as
2021-07-09T15:45:30CST
. - created
Time String - The creation time of the backup plan. UNIX time in seconds.
- disabled Boolean
- Whether to be suspended. Valid values:
true
,false
. - file
System StringId - The File System ID of Nas.
- id String
- The ID of Nas backup plan.
- nas
Backup StringPlan Id - The ID of Nas backup plan.
- nas
Backup StringPlan Name - The name of the resource.
- options String
- Options field of Nas backup plan.
- paths List<String>
- List of backup path. Up to 65536 Characters. 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.startTime
Backup start time, UNIX time seconds.
- 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.