1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. hbr
  5. getOssBackupPlans
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.hbr.getOssBackupPlans

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available in v1.131.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.hbr.getOssBackupPlans({
    nameRegex: "^my-OssBackupPlan",
});
export const hbrOssBackupPlanId = ids.then(ids => ids.plans?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.hbr.get_oss_backup_plans(name_regex="^my-OssBackupPlan")
pulumi.export("hbrOssBackupPlanId", ids.plans[0].id)
Copy
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.GetOssBackupPlans(ctx, &hbr.GetOssBackupPlansArgs{
			NameRegex: pulumi.StringRef("^my-OssBackupPlan"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("hbrOssBackupPlanId", ids.Plans[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Hbr.GetOssBackupPlans.Invoke(new()
    {
        NameRegex = "^my-OssBackupPlan",
    });

    return new Dictionary<string, object?>
    {
        ["hbrOssBackupPlanId"] = ids.Apply(getOssBackupPlansResult => getOssBackupPlansResult.Plans[0]?.Id),
    };
});
Copy
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.GetOssBackupPlansArgs;
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.getOssBackupPlans(GetOssBackupPlansArgs.builder()
            .nameRegex("^my-OssBackupPlan")
            .build());

        ctx.export("hbrOssBackupPlanId", ids.applyValue(getOssBackupPlansResult -> getOssBackupPlansResult.plans()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:hbr:getOssBackupPlans
      arguments:
        nameRegex: ^my-OssBackupPlan
outputs:
  hbrOssBackupPlanId: ${ids.plans[0].id}
Copy

Using getOssBackupPlans

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 getOssBackupPlans(args: GetOssBackupPlansArgs, opts?: InvokeOptions): Promise<GetOssBackupPlansResult>
function getOssBackupPlansOutput(args: GetOssBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetOssBackupPlansResult>
Copy
def get_oss_backup_plans(bucket: 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) -> GetOssBackupPlansResult
def get_oss_backup_plans_output(bucket: 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[GetOssBackupPlansResult]
Copy
func GetOssBackupPlans(ctx *Context, args *GetOssBackupPlansArgs, opts ...InvokeOption) (*GetOssBackupPlansResult, error)
func GetOssBackupPlansOutput(ctx *Context, args *GetOssBackupPlansOutputArgs, opts ...InvokeOption) GetOssBackupPlansResultOutput
Copy

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

public static class GetOssBackupPlans 
{
    public static Task<GetOssBackupPlansResult> InvokeAsync(GetOssBackupPlansArgs args, InvokeOptions? opts = null)
    public static Output<GetOssBackupPlansResult> Invoke(GetOssBackupPlansInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOssBackupPlansResult> getOssBackupPlans(GetOssBackupPlansArgs args, InvokeOptions options)
public static Output<GetOssBackupPlansResult> getOssBackupPlans(GetOssBackupPlansArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:hbr/getOssBackupPlans:getOssBackupPlans
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Bucket Changes to this property will trigger replacement. string
The name of OSS bucket.
Ids Changes to this property will trigger replacement. List<string>
A list of OssBackupPlan IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by OssBackupPlan name.
OutputFile string
File name where to save data source results (after running pulumi preview).
VaultId Changes to this property will trigger replacement. string
The ID of backup vault the OssBackupPlan used.
Bucket Changes to this property will trigger replacement. string
The name of OSS bucket.
Ids Changes to this property will trigger replacement. []string
A list of OssBackupPlan IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by OssBackupPlan name.
OutputFile string
File name where to save data source results (after running pulumi preview).
VaultId Changes to this property will trigger replacement. string
The ID of backup vault the OssBackupPlan used.
bucket Changes to this property will trigger replacement. String
The name of OSS bucket.
ids Changes to this property will trigger replacement. List<String>
A list of OssBackupPlan IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by OssBackupPlan name.
outputFile String
File name where to save data source results (after running pulumi preview).
vaultId Changes to this property will trigger replacement. String
The ID of backup vault the OssBackupPlan used.
bucket Changes to this property will trigger replacement. string
The name of OSS bucket.
ids Changes to this property will trigger replacement. string[]
A list of OssBackupPlan IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by OssBackupPlan name.
outputFile string
File name where to save data source results (after running pulumi preview).
vaultId Changes to this property will trigger replacement. string
The ID of backup vault the OssBackupPlan used.
bucket Changes to this property will trigger replacement. str
The name of OSS bucket.
ids Changes to this property will trigger replacement. Sequence[str]
A list of OssBackupPlan IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by OssBackupPlan name.
output_file str
File name where to save data source results (after running pulumi preview).
vault_id Changes to this property will trigger replacement. str
The ID of backup vault the OssBackupPlan used.
bucket Changes to this property will trigger replacement. String
The name of OSS bucket.
ids Changes to this property will trigger replacement. List<String>
A list of OssBackupPlan IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by OssBackupPlan name.
outputFile String
File name where to save data source results (after running pulumi preview).
vaultId Changes to this property will trigger replacement. String
The ID of backup vault the OssBackupPlan used.

getOssBackupPlans 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.AliCloud.Hbr.Outputs.GetOssBackupPlansPlan>
Bucket string
NameRegex string
OutputFile string
VaultId string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
Plans []GetOssBackupPlansPlan
Bucket string
NameRegex string
OutputFile string
VaultId string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
plans List<GetOssBackupPlansPlan>
bucket String
nameRegex String
outputFile String
vaultId String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
plans GetOssBackupPlansPlan[]
bucket string
nameRegex string
outputFile string
vaultId string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
plans Sequence[GetOssBackupPlansPlan]
bucket 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>
bucket String
nameRegex String
outputFile String
vaultId String

Supporting Types

GetOssBackupPlansPlan

BackupType This property is required. string
Backup type. Valid values: COMPLETE.
Bucket This property is required. string
The name of OSS bucket.
CreatedTime This property is required. string
The creation time of the backup plan. UNIX time in seconds.
Disabled This property is required. bool
Whether to be suspended. Valid values: true, false.
Id This property is required. string
The ID of Oss backup plan.
OssBackupPlanId This property is required. string
The ID of Oss backup plan.
OssBackupPlanName This property is required. string
The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
Prefix This property is required. string
Backup prefix.
Retention This property is required. string
Backup retention days, the minimum is 1.
Schedule This property is required. 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 is not completed yet, the next backup task will not be triggered.

  • startTime Backup start time, UNIX time seconds.
UpdatedTime This property is required. string
The update time of the backup plan. UNIX time in seconds.
VaultId This property is required. string
The ID of backup vault.
BackupType This property is required. string
Backup type. Valid values: COMPLETE.
Bucket This property is required. string
The name of OSS bucket.
CreatedTime This property is required. string
The creation time of the backup plan. UNIX time in seconds.
Disabled This property is required. bool
Whether to be suspended. Valid values: true, false.
Id This property is required. string
The ID of Oss backup plan.
OssBackupPlanId This property is required. string
The ID of Oss backup plan.
OssBackupPlanName This property is required. string
The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
Prefix This property is required. string
Backup prefix.
Retention This property is required. string
Backup retention days, the minimum is 1.
Schedule This property is required. 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 is not completed yet, the next backup task will not be triggered.

  • startTime Backup start time, UNIX time seconds.
UpdatedTime This property is required. string
The update time of the backup plan. UNIX time in seconds.
VaultId This property is required. string
The ID of backup vault.
backupType This property is required. String
Backup type. Valid values: COMPLETE.
bucket This property is required. String
The name of OSS bucket.
createdTime This property is required. String
The creation time of the backup plan. UNIX time in seconds.
disabled This property is required. Boolean
Whether to be suspended. Valid values: true, false.
id This property is required. String
The ID of Oss backup plan.
ossBackupPlanId This property is required. String
The ID of Oss backup plan.
ossBackupPlanName This property is required. String
The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
prefix This property is required. String
Backup prefix.
retention This property is required. String
Backup retention days, the minimum is 1.
schedule This property is required. 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 is not completed yet, the next backup task will not be triggered.

  • startTime Backup start time, UNIX time seconds.
updatedTime This property is required. String
The update time of the backup plan. UNIX time in seconds.
vaultId This property is required. String
The ID of backup vault.
backupType This property is required. string
Backup type. Valid values: COMPLETE.
bucket This property is required. string
The name of OSS bucket.
createdTime This property is required. string
The creation time of the backup plan. UNIX time in seconds.
disabled This property is required. boolean
Whether to be suspended. Valid values: true, false.
id This property is required. string
The ID of Oss backup plan.
ossBackupPlanId This property is required. string
The ID of Oss backup plan.
ossBackupPlanName This property is required. string
The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
prefix This property is required. string
Backup prefix.
retention This property is required. string
Backup retention days, the minimum is 1.
schedule This property is required. 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 is not completed yet, the next backup task will not be triggered.

  • startTime Backup start time, UNIX time seconds.
updatedTime This property is required. string
The update time of the backup plan. UNIX time in seconds.
vaultId This property is required. string
The ID of backup vault.
backup_type This property is required. str
Backup type. Valid values: COMPLETE.
bucket This property is required. str
The name of OSS bucket.
created_time This property is required. str
The creation time of the backup plan. UNIX time in seconds.
disabled This property is required. bool
Whether to be suspended. Valid values: true, false.
id This property is required. str
The ID of Oss backup plan.
oss_backup_plan_id This property is required. str
The ID of Oss backup plan.
oss_backup_plan_name This property is required. str
The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
prefix This property is required. str
Backup prefix.
retention This property is required. str
Backup retention days, the minimum is 1.
schedule This property is required. 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 is not completed yet, the next backup task will not be triggered.

  • startTime Backup start time, UNIX time seconds.
updated_time This property is required. str
The update time of the backup plan. UNIX time in seconds.
vault_id This property is required. str
The ID of backup vault.
backupType This property is required. String
Backup type. Valid values: COMPLETE.
bucket This property is required. String
The name of OSS bucket.
createdTime This property is required. String
The creation time of the backup plan. UNIX time in seconds.
disabled This property is required. Boolean
Whether to be suspended. Valid values: true, false.
id This property is required. String
The ID of Oss backup plan.
ossBackupPlanId This property is required. String
The ID of Oss backup plan.
ossBackupPlanName This property is required. String
The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
prefix This property is required. String
Backup prefix.
retention This property is required. String
Backup retention days, the minimum is 1.
schedule This property is required. 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 is not completed yet, the next backup task will not be triggered.

  • startTime Backup start time, UNIX time seconds.
updatedTime This property is required. String
The update time of the backup plan. UNIX time in seconds.
vaultId This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi