Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides Gpdb Logbackup available to the user.What is Log Backup
NOTE: Available since v1.231.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.gpdb.getInstances({
nameRegex: "^default-NODELETING$",
});
const defaultGetLogBackups = Promise.all([_default, _default]).then(([_default, _default1]) => alicloud.gpdb.getLogBackups({
startTime: "2022-12-12T02:00Z",
endTime: "2024-12-12T02:00Z",
dbInstanceId: _default.ids?.[0],
ids: [_default1.ids?.[0]],
}));
export const alicloudGpdbLogbackupExampleId = defaultGetLogBackups.then(defaultGetLogBackups => defaultGetLogBackups.logbackups?.[0]?.dbInstanceId);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.gpdb.get_instances(name_regex="^default-NODELETING$")
default_get_log_backups = alicloud.gpdb.get_log_backups(start_time="2022-12-12T02:00Z",
end_time="2024-12-12T02:00Z",
db_instance_id=default.ids[0],
ids=[default.ids[0]])
pulumi.export("alicloudGpdbLogbackupExampleId", default_get_log_backups.logbackups[0].db_instance_id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/gpdb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := gpdb.GetInstances(ctx, &gpdb.GetInstancesArgs{
NameRegex: pulumi.StringRef("^default-NODELETING$"),
}, nil);
if err != nil {
return err
}
defaultGetLogBackups, err := gpdb.GetLogBackups(ctx, &gpdb.GetLogBackupsArgs{
StartTime: pulumi.StringRef("2022-12-12T02:00Z"),
EndTime: pulumi.StringRef("2024-12-12T02:00Z"),
DbInstanceId: _default.Ids[0],
Ids: interface{}{
_default.Ids[0],
},
}, nil);
if err != nil {
return err
}
ctx.Export("alicloudGpdbLogbackupExampleId", defaultGetLogBackups.Logbackups[0].DbInstanceId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Gpdb.GetInstances.Invoke(new()
{
NameRegex = "^default-NODELETING$",
});
var defaultGetLogBackups = AliCloud.Gpdb.GetLogBackups.Invoke(new()
{
StartTime = "2022-12-12T02:00Z",
EndTime = "2024-12-12T02:00Z",
DbInstanceId = @default.Apply(getInstancesResult => getInstancesResult.Ids[0]),
Ids = new[]
{
@default.Apply(getInstancesResult => getInstancesResult.Ids[0]),
},
});
return new Dictionary<string, object?>
{
["alicloudGpdbLogbackupExampleId"] = defaultGetLogBackups.Apply(getLogBackupsResult => getLogBackupsResult.Logbackups[0]?.DbInstanceId),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.gpdb.GpdbFunctions;
import com.pulumi.alicloud.gpdb.inputs.GetInstancesArgs;
import com.pulumi.alicloud.gpdb.inputs.GetLogBackupsArgs;
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 default = GpdbFunctions.getInstances(GetInstancesArgs.builder()
.nameRegex("^default-NODELETING$")
.build());
final var defaultGetLogBackups = GpdbFunctions.getLogBackups(GetLogBackupsArgs.builder()
.startTime("2022-12-12T02:00Z")
.endTime("2024-12-12T02:00Z")
.dbInstanceId(default_.ids()[0])
.ids(default_.ids()[0])
.build());
ctx.export("alicloudGpdbLogbackupExampleId", defaultGetLogBackups.logbackups()[0].dbInstanceId());
}
}
variables:
default:
fn::invoke:
function: alicloud:gpdb:getInstances
arguments:
nameRegex: ^default-NODELETING$
defaultGetLogBackups:
fn::invoke:
function: alicloud:gpdb:getLogBackups
arguments:
startTime: 2022-12-12T02:00Z
endTime: 2024-12-12T02:00Z
dbInstanceId: ${default.ids[0]}
ids:
- ${default.ids[0]}
outputs:
alicloudGpdbLogbackupExampleId: ${defaultGetLogBackups.logbackups[0].dbInstanceId}
Using getLogBackups
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 getLogBackups(args: GetLogBackupsArgs, opts?: InvokeOptions): Promise<GetLogBackupsResult>
function getLogBackupsOutput(args: GetLogBackupsOutputArgs, opts?: InvokeOptions): Output<GetLogBackupsResult>def get_log_backups(db_instance_id: Optional[str] = None,
end_time: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
start_time: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLogBackupsResult
def get_log_backups_output(db_instance_id: Optional[pulumi.Input[str]] = None,
end_time: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[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,
start_time: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLogBackupsResult]func GetLogBackups(ctx *Context, args *GetLogBackupsArgs, opts ...InvokeOption) (*GetLogBackupsResult, error)
func GetLogBackupsOutput(ctx *Context, args *GetLogBackupsOutputArgs, opts ...InvokeOption) GetLogBackupsResultOutput> Note: This function is named GetLogBackups in the Go SDK.
public static class GetLogBackups
{
public static Task<GetLogBackupsResult> InvokeAsync(GetLogBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetLogBackupsResult> Invoke(GetLogBackupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLogBackupsResult> getLogBackups(GetLogBackupsArgs args, InvokeOptions options)
public static Output<GetLogBackupsResult> getLogBackups(GetLogBackupsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:gpdb/getLogBackups:getLogBackups
arguments:
# arguments dictionaryThe following arguments are supported:
- Db
Instance stringId - The ID of the Master node of the instance.
- End
Time string - The query end time, which must be greater than the query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- Ids List<string>
- A list of Logbackup IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Current page number.
- Page
Size int - Number of records per page.
- Start
Time string - The query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- Db
Instance stringId - The ID of the Master node of the instance.
- End
Time string - The query end time, which must be greater than the query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- Ids []string
- A list of Logbackup IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Current page number.
- Page
Size int - Number of records per page.
- Start
Time string - The query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- db
Instance StringId - The ID of the Master node of the instance.
- end
Time String - The query end time, which must be greater than the query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- ids List<String>
- A list of Logbackup IDs.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Integer - Current page number.
- page
Size Integer - Number of records per page.
- start
Time String - The query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- db
Instance stringId - The ID of the Master node of the instance.
- end
Time string - The query end time, which must be greater than the query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- ids string[]
- A list of Logbackup IDs.
- output
File string - File name where to save data source results (after running
pulumi preview). - page
Number number - Current page number.
- page
Size number - Number of records per page.
- start
Time string - The query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- db_
instance_ strid - The ID of the Master node of the instance.
- end_
time str - The query end time, which must be greater than the query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- ids Sequence[str]
- A list of Logbackup IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview). - page_
number int - Current page number.
- page_
size int - Number of records per page.
- start_
time str - The query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- db
Instance StringId - The ID of the Master node of the instance.
- end
Time String - The query end time, which must be greater than the query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
- ids List<String>
- A list of Logbackup IDs.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Number - Current page number.
- page
Size Number - Number of records per page.
- start
Time String - The query start time. Format: yyyy-MM-ddTHH:mmZ(UTC time).
getLogBackups Result
The following output properties are available:
- Db
Instance stringId - The ID of the Master node of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Logbackup IDs.
- Logbackups
List<Pulumi.
Ali Cloud. Gpdb. Outputs. Get Log Backups Logbackup> - A list of Logbackup Entries. Each element contains the following attributes:
- End
Time string - Output
File string - Page
Number int - Page
Size int - Start
Time string
- Db
Instance stringId - The ID of the Master node of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Logbackup IDs.
- Logbackups
[]Get
Log Backups Logbackup - A list of Logbackup Entries. Each element contains the following attributes:
- End
Time string - Output
File string - Page
Number int - Page
Size int - Start
Time string
- db
Instance StringId - The ID of the Master node of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Logbackup IDs.
- logbackups
List<Get
Log Backups Logbackup> - A list of Logbackup Entries. Each element contains the following attributes:
- end
Time String - output
File String - page
Number Integer - page
Size Integer - start
Time String
- db
Instance stringId - The ID of the Master node of the instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Logbackup IDs.
- logbackups
Get
Log Backups Logbackup[] - A list of Logbackup Entries. Each element contains the following attributes:
- end
Time string - output
File string - page
Number number - page
Size number - start
Time string
- db_
instance_ strid - The ID of the Master node of the instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Logbackup IDs.
- logbackups
Sequence[Get
Log Backups Logbackup] - A list of Logbackup Entries. Each element contains the following attributes:
- end_
time str - output_
file str - page_
number int - page_
size int - start_
time str
- db
Instance StringId - The ID of the Master node of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Logbackup IDs.
- logbackups List<Property Map>
- A list of Logbackup Entries. Each element contains the following attributes:
- end
Time String - output
File String - page
Number Number - page
Size Number - start
Time String
Supporting Types
GetLogBackupsLogbackup
- Db
Instance stringId - The ID of the Master node of the instance.
- Log
Backup stringId - The first ID of the resource
- Log
File stringName - Log file name (OSS path).
- Log
File intSize - Size of the backup log file. Unit: Byte.
- Log
Time string - The log timestamp.
- Record
Total int - Total number of records.
- Segment
Name string - The node name.
- Db
Instance stringId - The ID of the Master node of the instance.
- Log
Backup stringId - The first ID of the resource
- Log
File stringName - Log file name (OSS path).
- Log
File intSize - Size of the backup log file. Unit: Byte.
- Log
Time string - The log timestamp.
- Record
Total int - Total number of records.
- Segment
Name string - The node name.
- db
Instance StringId - The ID of the Master node of the instance.
- log
Backup StringId - The first ID of the resource
- log
File StringName - Log file name (OSS path).
- log
File IntegerSize - Size of the backup log file. Unit: Byte.
- log
Time String - The log timestamp.
- record
Total Integer - Total number of records.
- segment
Name String - The node name.
- db
Instance stringId - The ID of the Master node of the instance.
- log
Backup stringId - The first ID of the resource
- log
File stringName - Log file name (OSS path).
- log
File numberSize - Size of the backup log file. Unit: Byte.
- log
Time string - The log timestamp.
- record
Total number - Total number of records.
- segment
Name string - The node name.
- db_
instance_ strid - The ID of the Master node of the instance.
- log_
backup_ strid - The first ID of the resource
- log_
file_ strname - Log file name (OSS path).
- log_
file_ intsize - Size of the backup log file. Unit: Byte.
- log_
time str - The log timestamp.
- record_
total int - Total number of records.
- segment_
name str - The node name.
- db
Instance StringId - The ID of the Master node of the instance.
- log
Backup StringId - The first ID of the resource
- log
File StringName - Log file name (OSS path).
- log
File NumberSize - Size of the backup log file. Unit: Byte.
- log
Time String - The log timestamp.
- record
Total Number - Total number of records.
- segment
Name String - The node name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
