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

alicloud.hbr.getHanaBackupPlans

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 Hana Backup Plans of the current Alibaba Cloud user.

    NOTE: Available in v1.179.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.hbr.getHanaBackupPlans({
        clusterId: "example_value",
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const hbrHanaBackupPlanId1 = ids.then(ids => ids.plans?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.hbr.get_hana_backup_plans(cluster_id="example_value",
        ids=[
            "example_value-1",
            "example_value-2",
        ])
    pulumi.export("hbrHanaBackupPlanId1", 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.GetHanaBackupPlans(ctx, &hbr.GetHanaBackupPlansArgs{
    			ClusterId: "example_value",
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("hbrHanaBackupPlanId1", 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.GetHanaBackupPlans.Invoke(new()
        {
            ClusterId = "example_value",
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["hbrHanaBackupPlanId1"] = ids.Apply(getHanaBackupPlansResult => getHanaBackupPlansResult.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.GetHanaBackupPlansArgs;
    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.getHanaBackupPlans(GetHanaBackupPlansArgs.builder()
                .clusterId("example_value")
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("hbrHanaBackupPlanId1", ids.applyValue(getHanaBackupPlansResult -> getHanaBackupPlansResult.plans()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:hbr:getHanaBackupPlans
          Arguments:
            clusterId: example_value
            ids:
              - example_value-1
              - example_value-2
    outputs:
      hbrHanaBackupPlanId1: ${ids.plans[0].id}
    

    Using getHanaBackupPlans

    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 getHanaBackupPlans(args: GetHanaBackupPlansArgs, opts?: InvokeOptions): Promise<GetHanaBackupPlansResult>
    function getHanaBackupPlansOutput(args: GetHanaBackupPlansOutputArgs, opts?: InvokeOptions): Output<GetHanaBackupPlansResult>
    def get_hana_backup_plans(cluster_id: Optional[str] = None,
                              database_name: Optional[str] = None,
                              ids: Optional[Sequence[str]] = None,
                              name_regex: Optional[str] = None,
                              output_file: Optional[str] = None,
                              page_number: Optional[int] = None,
                              page_size: Optional[int] = None,
                              vault_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetHanaBackupPlansResult
    def get_hana_backup_plans_output(cluster_id: Optional[pulumi.Input[str]] = None,
                              database_name: 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,
                              page_number: Optional[pulumi.Input[int]] = None,
                              page_size: Optional[pulumi.Input[int]] = None,
                              vault_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetHanaBackupPlansResult]
    func GetHanaBackupPlans(ctx *Context, args *GetHanaBackupPlansArgs, opts ...InvokeOption) (*GetHanaBackupPlansResult, error)
    func GetHanaBackupPlansOutput(ctx *Context, args *GetHanaBackupPlansOutputArgs, opts ...InvokeOption) GetHanaBackupPlansResultOutput

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

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

    The following arguments are supported:

    ClusterId string
    DatabaseName string
    The name of the database.
    Ids List<string>
    A list of Hana Backup Plan IDs.
    NameRegex string
    A regex string to filter results by Hana Backup Plan name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    VaultId string
    The id of the vault.
    ClusterId string
    DatabaseName string
    The name of the database.
    Ids []string
    A list of Hana Backup Plan IDs.
    NameRegex string
    A regex string to filter results by Hana Backup Plan name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    VaultId string
    The id of the vault.
    clusterId String
    databaseName String
    The name of the database.
    ids List<String>
    A list of Hana Backup Plan IDs.
    nameRegex String
    A regex string to filter results by Hana Backup Plan name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    vaultId String
    The id of the vault.
    clusterId string
    databaseName string
    The name of the database.
    ids string[]
    A list of Hana Backup Plan IDs.
    nameRegex string
    A regex string to filter results by Hana Backup Plan name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    vaultId string
    The id of the vault.
    cluster_id str
    database_name str
    The name of the database.
    ids Sequence[str]
    A list of Hana Backup Plan IDs.
    name_regex str
    A regex string to filter results by Hana Backup Plan name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    vault_id str
    The id of the vault.
    clusterId String
    databaseName String
    The name of the database.
    ids List<String>
    A list of Hana Backup Plan IDs.
    nameRegex String
    A regex string to filter results by Hana Backup Plan name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number
    vaultId String
    The id of the vault.

    getHanaBackupPlans Result

    The following output properties are available:

    ClusterId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Plans List<Pulumi.AliCloud.Hbr.Outputs.GetHanaBackupPlansPlan>
    DatabaseName string
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    VaultId string
    ClusterId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Plans []GetHanaBackupPlansPlan
    DatabaseName string
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    VaultId string
    clusterId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    plans List<GetHanaBackupPlansPlan>
    databaseName String
    nameRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    vaultId String
    clusterId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    plans GetHanaBackupPlansPlan[]
    databaseName string
    nameRegex string
    outputFile string
    pageNumber number
    pageSize number
    vaultId string
    cluster_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    plans Sequence[GetHanaBackupPlansPlan]
    database_name str
    name_regex str
    output_file str
    page_number int
    page_size int
    vault_id str
    clusterId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    plans List<Property Map>
    databaseName String
    nameRegex String
    outputFile String
    pageNumber Number
    pageSize Number
    vaultId String

    Supporting Types

    GetHanaBackupPlansPlan

    BackupPrefix string
    The backup prefix.
    BackupType string
    The backup type.
    ClusterId string
    The ID of the SAP HANA instance.
    DatabaseName string
    The name of the database.
    Id string
    The ID of the resource.
    PageTotal string
    PlanId string
    The ID of the backup plan.
    PlanName string
    The name of the backup plan.
    Schedule string
    The backup policy.
    Status string
    The status of the resource.
    VaultId string
    The ID of the backup vault.
    BackupPrefix string
    The backup prefix.
    BackupType string
    The backup type.
    ClusterId string
    The ID of the SAP HANA instance.
    DatabaseName string
    The name of the database.
    Id string
    The ID of the resource.
    PageTotal string
    PlanId string
    The ID of the backup plan.
    PlanName string
    The name of the backup plan.
    Schedule string
    The backup policy.
    Status string
    The status of the resource.
    VaultId string
    The ID of the backup vault.
    backupPrefix String
    The backup prefix.
    backupType String
    The backup type.
    clusterId String
    The ID of the SAP HANA instance.
    databaseName String
    The name of the database.
    id String
    The ID of the resource.
    pageTotal String
    planId String
    The ID of the backup plan.
    planName String
    The name of the backup plan.
    schedule String
    The backup policy.
    status String
    The status of the resource.
    vaultId String
    The ID of the backup vault.
    backupPrefix string
    The backup prefix.
    backupType string
    The backup type.
    clusterId string
    The ID of the SAP HANA instance.
    databaseName string
    The name of the database.
    id string
    The ID of the resource.
    pageTotal string
    planId string
    The ID of the backup plan.
    planName string
    The name of the backup plan.
    schedule string
    The backup policy.
    status string
    The status of the resource.
    vaultId string
    The ID of the backup vault.
    backup_prefix str
    The backup prefix.
    backup_type str
    The backup type.
    cluster_id str
    The ID of the SAP HANA instance.
    database_name str
    The name of the database.
    id str
    The ID of the resource.
    page_total str
    plan_id str
    The ID of the backup plan.
    plan_name str
    The name of the backup plan.
    schedule str
    The backup policy.
    status str
    The status of the resource.
    vault_id str
    The ID of the backup vault.
    backupPrefix String
    The backup prefix.
    backupType String
    The backup type.
    clusterId String
    The ID of the SAP HANA instance.
    databaseName String
    The name of the database.
    id String
    The ID of the resource.
    pageTotal String
    planId String
    The ID of the backup plan.
    planName String
    The name of the backup plan.
    schedule String
    The backup policy.
    status String
    The status of the resource.
    vaultId String
    The ID of the 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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi