1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. hbr
  5. getOtsBackupPlans
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.hbr.getOtsBackupPlans

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

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

    NOTE: Available in v1.163.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.hbr.getOtsBackupPlans({
        nameRegex: "^my-otsBackupPlan",
    });
    export const hbrOtsBackupPlanId = plans[0].id;
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.hbr.get_ots_backup_plans(name_regex="^my-otsBackupPlan")
    pulumi.export("hbrOtsBackupPlanId", 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 {
    		_, err := hbr.GetOtsBackupPlans(ctx, &hbr.GetOtsBackupPlansArgs{
    			NameRegex: pulumi.StringRef("^my-otsBackupPlan"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("hbrOtsBackupPlanId", 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.GetOtsBackupPlans.Invoke(new()
        {
            NameRegex = "^my-otsBackupPlan",
        });
    
        return new Dictionary<string, object?>
        {
            ["hbrOtsBackupPlanId"] = 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.GetOtsBackupPlansArgs;
    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.getOtsBackupPlans(GetOtsBackupPlansArgs.builder()
                .nameRegex("^my-otsBackupPlan")
                .build());
    
            ctx.export("hbrOtsBackupPlanId", plans[0].id());
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:hbr:getOtsBackupPlans
          Arguments:
            nameRegex: ^my-otsBackupPlan
    outputs:
      hbrOtsBackupPlanId: ${plans[0].id}
    

    Using getOtsBackupPlans

    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 getOtsBackupPlans(args: GetOtsBackupPlansArgs, opts?: InvokeOptions): Promise<GetOtsBackupPlansResult>
    function getOtsBackupPlansOutput(args: GetOtsBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetOtsBackupPlansResult>
    def get_ots_backup_plans(ids: Optional[Sequence[str]] = None,
                             name_regex: Optional[str] = None,
                             output_file: Optional[str] = None,
                             plan_id: Optional[str] = None,
                             plan_name: Optional[str] = None,
                             vault_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetOtsBackupPlansResult
    def get_ots_backup_plans_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             name_regex: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             plan_id: Optional[pulumi.Input[str]] = None,
                             plan_name: Optional[pulumi.Input[str]] = None,
                             vault_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetOtsBackupPlansResult]
    func GetOtsBackupPlans(ctx *Context, args *GetOtsBackupPlansArgs, opts ...InvokeOption) (*GetOtsBackupPlansResult, error)
    func GetOtsBackupPlansOutput(ctx *Context, args *GetOtsBackupPlansOutputArgs, opts ...InvokeOption) GetOtsBackupPlansResultOutput

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

    public static class GetOtsBackupPlans 
    {
        public static Task<GetOtsBackupPlansResult> InvokeAsync(GetOtsBackupPlansArgs args, InvokeOptions? opts = null)
        public static Output<GetOtsBackupPlansResult> Invoke(GetOtsBackupPlansInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOtsBackupPlansResult> getOtsBackupPlans(GetOtsBackupPlansArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:hbr/getOtsBackupPlans:getOtsBackupPlans
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of OtsBackupPlan IDs.
    NameRegex string
    A regex string to filter results by OtsBackupPlan name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PlanId string
    The ID of the backup plan.
    PlanName string
    The ID of the backup plan.
    VaultId string
    The ID of backup vault the OtsBackupPlan used.
    Ids []string
    A list of OtsBackupPlan IDs.
    NameRegex string
    A regex string to filter results by OtsBackupPlan name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PlanId string
    The ID of the backup plan.
    PlanName string
    The ID of the backup plan.
    VaultId string
    The ID of backup vault the OtsBackupPlan used.
    ids List<String>
    A list of OtsBackupPlan IDs.
    nameRegex String
    A regex string to filter results by OtsBackupPlan name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    planId String
    The ID of the backup plan.
    planName String
    The ID of the backup plan.
    vaultId String
    The ID of backup vault the OtsBackupPlan used.
    ids string[]
    A list of OtsBackupPlan IDs.
    nameRegex string
    A regex string to filter results by OtsBackupPlan name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    planId string
    The ID of the backup plan.
    planName string
    The ID of the backup plan.
    vaultId string
    The ID of backup vault the OtsBackupPlan used.
    ids Sequence[str]
    A list of OtsBackupPlan IDs.
    name_regex str
    A regex string to filter results by OtsBackupPlan name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    plan_id str
    The ID of the backup plan.
    plan_name str
    The ID of the backup plan.
    vault_id str
    The ID of backup vault the OtsBackupPlan used.
    ids List<String>
    A list of OtsBackupPlan IDs.
    nameRegex String
    A regex string to filter results by OtsBackupPlan name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    planId String
    The ID of the backup plan.
    planName String
    The ID of the backup plan.
    vaultId String
    The ID of backup vault the OtsBackupPlan used.

    getOtsBackupPlans 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.GetOtsBackupPlansPlan>
    NameRegex string
    OutputFile string
    PlanId string
    PlanName string
    VaultId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Plans []GetOtsBackupPlansPlan
    NameRegex string
    OutputFile string
    PlanId string
    PlanName string
    VaultId string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    plans List<GetOtsBackupPlansPlan>
    nameRegex String
    outputFile String
    planId String
    planName String
    vaultId String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    plans GetOtsBackupPlansPlan[]
    nameRegex string
    outputFile string
    planId string
    planName string
    vaultId string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    plans Sequence[GetOtsBackupPlansPlan]
    name_regex str
    output_file str
    plan_id str
    plan_name 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>
    nameRegex String
    outputFile String
    planId String
    planName String
    vaultId String

    Supporting Types

    GetOtsBackupPlansPlan

    BackupType string
    The Backup type. Valid values: COMPLETE.
    CreatedTime string
    The creation time of the backup plan. UNIX time in seconds.
    Disabled bool
    Whether to be suspended. Valid values: true, false.
    Id string
    The ID of ots backup plan.
    OtsBackupPlanId string
    The ID of ots backup plan.
    OtsBackupPlanName 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.
    OtsDetails List<Pulumi.AliCloud.Hbr.Inputs.GetOtsBackupPlansPlanOtsDetail>
    Retention string
    The Backup retention days, the minimum is 1.
    Schedule string
    The 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.
    SourceType string
    The type of the data source.
    UpdatedTime string
    The update time of the backup plan. UNIX time in seconds. *ots_detail - The details about the Tablestore instance.
    VaultId string
    The ID of backup vault.
    BackupType string
    The Backup type. Valid values: COMPLETE.
    CreatedTime string
    The creation time of the backup plan. UNIX time in seconds.
    Disabled bool
    Whether to be suspended. Valid values: true, false.
    Id string
    The ID of ots backup plan.
    OtsBackupPlanId string
    The ID of ots backup plan.
    OtsBackupPlanName 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.
    OtsDetails []GetOtsBackupPlansPlanOtsDetail
    Retention string
    The Backup retention days, the minimum is 1.
    Schedule string
    The 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.
    SourceType string
    The type of the data source.
    UpdatedTime string
    The update time of the backup plan. UNIX time in seconds. *ots_detail - The details about the Tablestore instance.
    VaultId string
    The ID of backup vault.
    backupType String
    The Backup type. Valid values: COMPLETE.
    createdTime String
    The creation time of the backup plan. UNIX time in seconds.
    disabled Boolean
    Whether to be suspended. Valid values: true, false.
    id String
    The ID of ots backup plan.
    otsBackupPlanId String
    The ID of ots backup plan.
    otsBackupPlanName 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.
    otsDetails List<GetOtsBackupPlansPlanOtsDetail>
    retention String
    The Backup retention days, the minimum is 1.
    schedule String
    The 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.
    sourceType String
    The type of the data source.
    updatedTime String
    The update time of the backup plan. UNIX time in seconds. *ots_detail - The details about the Tablestore instance.
    vaultId String
    The ID of backup vault.
    backupType string
    The Backup type. Valid values: COMPLETE.
    createdTime string
    The creation time of the backup plan. UNIX time in seconds.
    disabled boolean
    Whether to be suspended. Valid values: true, false.
    id string
    The ID of ots backup plan.
    otsBackupPlanId string
    The ID of ots backup plan.
    otsBackupPlanName 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.
    otsDetails GetOtsBackupPlansPlanOtsDetail[]
    retention string
    The Backup retention days, the minimum is 1.
    schedule string
    The 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.
    sourceType string
    The type of the data source.
    updatedTime string
    The update time of the backup plan. UNIX time in seconds. *ots_detail - The details about the Tablestore instance.
    vaultId string
    The ID of backup vault.
    backup_type str
    The Backup type. Valid values: COMPLETE.
    created_time str
    The creation time of the backup plan. UNIX time in seconds.
    disabled bool
    Whether to be suspended. Valid values: true, false.
    id str
    The ID of ots backup plan.
    ots_backup_plan_id str
    The ID of ots backup plan.
    ots_backup_plan_name 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.
    ots_details Sequence[GetOtsBackupPlansPlanOtsDetail]
    retention str
    The Backup retention days, the minimum is 1.
    schedule str
    The 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.
    source_type str
    The type of the data source.
    updated_time str
    The update time of the backup plan. UNIX time in seconds. *ots_detail - The details about the Tablestore instance.
    vault_id str
    The ID of backup vault.
    backupType String
    The Backup type. Valid values: COMPLETE.
    createdTime String
    The creation time of the backup plan. UNIX time in seconds.
    disabled Boolean
    Whether to be suspended. Valid values: true, false.
    id String
    The ID of ots backup plan.
    otsBackupPlanId String
    The ID of ots backup plan.
    otsBackupPlanName 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.
    otsDetails List<Property Map>
    retention String
    The Backup retention days, the minimum is 1.
    schedule String
    The 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.
    sourceType String
    The type of the data source.
    updatedTime String
    The update time of the backup plan. UNIX time in seconds. *ots_detail - The details about the Tablestore instance.
    vaultId String
    The ID of backup vault.

    GetOtsBackupPlansPlanOtsDetail

    TableNames List<string>
    TableNames []string
    tableNames List<String>
    tableNames string[]
    table_names Sequence[str]
    tableNames List<String>

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi