/
getMonitor.go
221 lines (188 loc) · 8.4 KB
/
getMonitor.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
// 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 ltm
import (
"context"
"reflect"
"github.com/pulumi/pulumi-f5bigip/sdk/v3/go/f5bigip/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source (`ltm.Monitor`) to get the ltm monitor details available on BIG-IP
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-f5bigip/sdk/v3/go/f5bigip/ltm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ltm.LookupMonitor(ctx, <m.LookupMonitorArgs{
// Name: "test-monitor",
// Partition: "Common",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func LookupMonitor(ctx *pulumi.Context, args *LookupMonitorArgs, opts ...pulumi.InvokeOption) (*LookupMonitorResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupMonitorResult
err := ctx.Invoke("f5bigip:ltm/getMonitor:getMonitor", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMonitor.
type LookupMonitorArgs struct {
// Name of the ltm monitor
Name string `pulumi:"name"`
// partition of the ltm monitor
Partition string `pulumi:"partition"`
}
// A collection of values returned by getMonitor.
type LookupMonitorResult struct {
// Displays whether adaptive response time monitoring is enabled for this monitor.
Adaptive string `pulumi:"adaptive"`
// Displays whether adaptive response time monitoring is enabled for this monitor.
AdaptiveLimit int `pulumi:"adaptiveLimit"`
Database string `pulumi:"database"`
DefaultsFrom string `pulumi:"defaultsFrom"`
// id will be full path name of ltm monitor.
Destination string `pulumi:"destination"`
Filename string `pulumi:"filename"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Specifies, in seconds, the frequency at which the system issues the monitor check when either the resource is down or the status of the resource is unknown.
Interval int `pulumi:"interval"`
// Displays the differentiated services code point (DSCP). DSCP is a 6-bit value in the Differentiated Services (DS) field of the IP header.
IpDscp int `pulumi:"ipDscp"`
// Displays whether the system automatically changes the status of a resource to Enabled at the next successful monitor check.
ManualResume string `pulumi:"manualResume"`
Mode string `pulumi:"mode"`
Name string `pulumi:"name"`
Partition string `pulumi:"partition"`
ReceiveDisable string `pulumi:"receiveDisable"`
// Instructs the system to mark the target resource down when the test is successful.
Reverse string `pulumi:"reverse"`
TimeUntilUp int `pulumi:"timeUntilUp"`
Timeout int `pulumi:"timeout"`
// Displays whether the monitor operates in transparent mode.
Transparent string `pulumi:"transparent"`
Username string `pulumi:"username"`
}
func LookupMonitorOutput(ctx *pulumi.Context, args LookupMonitorOutputArgs, opts ...pulumi.InvokeOption) LookupMonitorResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupMonitorResult, error) {
args := v.(LookupMonitorArgs)
r, err := LookupMonitor(ctx, &args, opts...)
var s LookupMonitorResult
if r != nil {
s = *r
}
return s, err
}).(LookupMonitorResultOutput)
}
// A collection of arguments for invoking getMonitor.
type LookupMonitorOutputArgs struct {
// Name of the ltm monitor
Name pulumi.StringInput `pulumi:"name"`
// partition of the ltm monitor
Partition pulumi.StringInput `pulumi:"partition"`
}
func (LookupMonitorOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMonitorArgs)(nil)).Elem()
}
// A collection of values returned by getMonitor.
type LookupMonitorResultOutput struct{ *pulumi.OutputState }
func (LookupMonitorResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMonitorResult)(nil)).Elem()
}
func (o LookupMonitorResultOutput) ToLookupMonitorResultOutput() LookupMonitorResultOutput {
return o
}
func (o LookupMonitorResultOutput) ToLookupMonitorResultOutputWithContext(ctx context.Context) LookupMonitorResultOutput {
return o
}
// Displays whether adaptive response time monitoring is enabled for this monitor.
func (o LookupMonitorResultOutput) Adaptive() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Adaptive }).(pulumi.StringOutput)
}
// Displays whether adaptive response time monitoring is enabled for this monitor.
func (o LookupMonitorResultOutput) AdaptiveLimit() pulumi.IntOutput {
return o.ApplyT(func(v LookupMonitorResult) int { return v.AdaptiveLimit }).(pulumi.IntOutput)
}
func (o LookupMonitorResultOutput) Database() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Database }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) DefaultsFrom() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.DefaultsFrom }).(pulumi.StringOutput)
}
// id will be full path name of ltm monitor.
func (o LookupMonitorResultOutput) Destination() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Destination }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) Filename() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Filename }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupMonitorResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Id }).(pulumi.StringOutput)
}
// Specifies, in seconds, the frequency at which the system issues the monitor check when either the resource is down or the status of the resource is unknown.
func (o LookupMonitorResultOutput) Interval() pulumi.IntOutput {
return o.ApplyT(func(v LookupMonitorResult) int { return v.Interval }).(pulumi.IntOutput)
}
// Displays the differentiated services code point (DSCP). DSCP is a 6-bit value in the Differentiated Services (DS) field of the IP header.
func (o LookupMonitorResultOutput) IpDscp() pulumi.IntOutput {
return o.ApplyT(func(v LookupMonitorResult) int { return v.IpDscp }).(pulumi.IntOutput)
}
// Displays whether the system automatically changes the status of a resource to Enabled at the next successful monitor check.
func (o LookupMonitorResultOutput) ManualResume() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.ManualResume }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) Mode() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Mode }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) Partition() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Partition }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) ReceiveDisable() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.ReceiveDisable }).(pulumi.StringOutput)
}
// Instructs the system to mark the target resource down when the test is successful.
func (o LookupMonitorResultOutput) Reverse() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Reverse }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) TimeUntilUp() pulumi.IntOutput {
return o.ApplyT(func(v LookupMonitorResult) int { return v.TimeUntilUp }).(pulumi.IntOutput)
}
func (o LookupMonitorResultOutput) Timeout() pulumi.IntOutput {
return o.ApplyT(func(v LookupMonitorResult) int { return v.Timeout }).(pulumi.IntOutput)
}
// Displays whether the monitor operates in transparent mode.
func (o LookupMonitorResultOutput) Transparent() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Transparent }).(pulumi.StringOutput)
}
func (o LookupMonitorResultOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v LookupMonitorResult) string { return v.Username }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMonitorResultOutput{})
}