generated from pulumi/pulumi-tf-provider-boilerplate
/
getLogBackups.go
138 lines (116 loc) · 6.03 KB
/
getLogBackups.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package postgresql
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to query detailed information of postgresql logBackups
func GetLogBackups(ctx *pulumi.Context, args *GetLogBackupsArgs, opts ...pulumi.InvokeOption) (*GetLogBackupsResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv GetLogBackupsResult
err := ctx.Invoke("tencentcloud:Postgresql/getLogBackups:getLogBackups", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getLogBackups.
type GetLogBackupsArgs struct {
// Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
Filters []GetLogBackupsFilter `pulumi:"filters"`
// Maximum end time of a backup in the format of `2018-01-01 00:00:00`. It is the current time by default.
MaxFinishTime *string `pulumi:"maxFinishTime"`
// Minimum end time of a backup in the format of `2018-01-01 00:00:00`. It is 7 days ago by default.
MinFinishTime *string `pulumi:"minFinishTime"`
// Sorting field. Valid values: `StartTime`, `FinishTime`, `Size`.
OrderBy *string `pulumi:"orderBy"`
// Sorting order. Valid values: `asc` (ascending), `desc` (descending).
OrderByType *string `pulumi:"orderByType"`
// Used to save results.
ResultOutputFile *string `pulumi:"resultOutputFile"`
}
// A collection of values returned by getLogBackups.
type GetLogBackupsResult struct {
Filters []GetLogBackupsFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// List of log backup details.
LogBackupSets []GetLogBackupsLogBackupSet `pulumi:"logBackupSets"`
MaxFinishTime *string `pulumi:"maxFinishTime"`
MinFinishTime *string `pulumi:"minFinishTime"`
OrderBy *string `pulumi:"orderBy"`
OrderByType *string `pulumi:"orderByType"`
ResultOutputFile *string `pulumi:"resultOutputFile"`
}
func GetLogBackupsOutput(ctx *pulumi.Context, args GetLogBackupsOutputArgs, opts ...pulumi.InvokeOption) GetLogBackupsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetLogBackupsResult, error) {
args := v.(GetLogBackupsArgs)
r, err := GetLogBackups(ctx, &args, opts...)
var s GetLogBackupsResult
if r != nil {
s = *r
}
return s, err
}).(GetLogBackupsResultOutput)
}
// A collection of arguments for invoking getLogBackups.
type GetLogBackupsOutputArgs struct {
// Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
Filters GetLogBackupsFilterArrayInput `pulumi:"filters"`
// Maximum end time of a backup in the format of `2018-01-01 00:00:00`. It is the current time by default.
MaxFinishTime pulumi.StringPtrInput `pulumi:"maxFinishTime"`
// Minimum end time of a backup in the format of `2018-01-01 00:00:00`. It is 7 days ago by default.
MinFinishTime pulumi.StringPtrInput `pulumi:"minFinishTime"`
// Sorting field. Valid values: `StartTime`, `FinishTime`, `Size`.
OrderBy pulumi.StringPtrInput `pulumi:"orderBy"`
// Sorting order. Valid values: `asc` (ascending), `desc` (descending).
OrderByType pulumi.StringPtrInput `pulumi:"orderByType"`
// Used to save results.
ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
}
func (GetLogBackupsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetLogBackupsArgs)(nil)).Elem()
}
// A collection of values returned by getLogBackups.
type GetLogBackupsResultOutput struct{ *pulumi.OutputState }
func (GetLogBackupsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetLogBackupsResult)(nil)).Elem()
}
func (o GetLogBackupsResultOutput) ToGetLogBackupsResultOutput() GetLogBackupsResultOutput {
return o
}
func (o GetLogBackupsResultOutput) ToGetLogBackupsResultOutputWithContext(ctx context.Context) GetLogBackupsResultOutput {
return o
}
func (o GetLogBackupsResultOutput) Filters() GetLogBackupsFilterArrayOutput {
return o.ApplyT(func(v GetLogBackupsResult) []GetLogBackupsFilter { return v.Filters }).(GetLogBackupsFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetLogBackupsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetLogBackupsResult) string { return v.Id }).(pulumi.StringOutput)
}
// List of log backup details.
func (o GetLogBackupsResultOutput) LogBackupSets() GetLogBackupsLogBackupSetArrayOutput {
return o.ApplyT(func(v GetLogBackupsResult) []GetLogBackupsLogBackupSet { return v.LogBackupSets }).(GetLogBackupsLogBackupSetArrayOutput)
}
func (o GetLogBackupsResultOutput) MaxFinishTime() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetLogBackupsResult) *string { return v.MaxFinishTime }).(pulumi.StringPtrOutput)
}
func (o GetLogBackupsResultOutput) MinFinishTime() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetLogBackupsResult) *string { return v.MinFinishTime }).(pulumi.StringPtrOutput)
}
func (o GetLogBackupsResultOutput) OrderBy() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetLogBackupsResult) *string { return v.OrderBy }).(pulumi.StringPtrOutput)
}
func (o GetLogBackupsResultOutput) OrderByType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetLogBackupsResult) *string { return v.OrderByType }).(pulumi.StringPtrOutput)
}
func (o GetLogBackupsResultOutput) ResultOutputFile() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetLogBackupsResult) *string { return v.ResultOutputFile }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetLogBackupsResultOutput{})
}