generated from pulumi/pulumi-tf-provider-boilerplate
/
getStaticResource.go
327 lines (287 loc) · 15.5 KB
/
getStaticResource.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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
// 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 rum
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to query detailed information of rum staticResource
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Rum"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Rum"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := Rum.GetStaticResource(ctx, &rum.GetStaticResourceArgs{
// EndTime: 1625454840,
// ProjectId: 1,
// StartTime: 1625444040,
// Type: "top",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func GetStaticResource(ctx *pulumi.Context, args *GetStaticResourceArgs, opts ...pulumi.InvokeOption) (*GetStaticResourceResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv GetStaticResourceResult
err := ctx.Invoke("tencentcloud:Rum/getStaticResource:getStaticResource", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getStaticResource.
type GetStaticResourceArgs struct {
// The region where the data reporting takes place.
Area *string `pulumi:"area"`
// The mobile phone brand used for data reporting.
Brand *string `pulumi:"brand"`
// The browser type used for data reporting.
Browser *string `pulumi:"browser"`
// The method used for calculating the elapsed time `50`: 50th percentile, `75`: 75th percentile., `90`: 90th percentile., `95`: 95th percentile., `99`: 99th percentile., `99.5`: 99.5th percentile., `avg`: Mean.
CostType *string `pulumi:"costType"`
// The device used for data reporting.
Device *string `pulumi:"device"`
// End time but is represented using a timestamp in seconds.
EndTime int `pulumi:"endTime"`
// The browser engine used for data reporting.
Engine *string `pulumi:"engine"`
// The code environment where the data reporting takes place.(`production`: production env, `development`: development env, `gray`: gray env, `pre`: pre env, `daily`: daily env, `local`: local env, `others`: others env).
Env *string `pulumi:"env"`
// First Expansion parameter.
ExtFirst *string `pulumi:"extFirst"`
// Second Expansion parameter.
ExtSecond *string `pulumi:"extSecond"`
// Third Expansion parameter.
ExtThird *string `pulumi:"extThird"`
// The source page of the data reporting.
From *string `pulumi:"from"`
// Whether it is non-China region.`1`: yes; `0`: no.
IsAbroad *string `pulumi:"isAbroad"`
// The internet service provider used for data reporting.
Isp *string `pulumi:"isp"`
// Log level for data reporting(`1`: whitelist, `2`: normal, `4`: error, `8`: promise error, `16`: ajax request error, `32`: js resource load error, `64`: image resource load error, `128`: css resource load error, `256`: console.error, `512`: video resource load error, `1024`: request retcode error, `2048`: sdk self monitor error, `4096`: pv log, `8192`: event log).
Level *string `pulumi:"level"`
// The network type used for data reporting.(`1`: Wifi, `2`: 2G, `3`: 3G, `4`: 4G, `5`: 5G, `6`: 6G, `100`: Unknown).
NetType *string `pulumi:"netType"`
// The operating system used for data reporting.
Os *string `pulumi:"os"`
// The platform where the data reporting takes place.(`1`: Android, `2`: IOS, `3`: Windows, `4`: Mac, `5`: Linux, `100`: Other).
Platform *string `pulumi:"platform"`
// Project ID.
ProjectId int `pulumi:"projectId"`
// Used to save results.
ResultOutputFile *string `pulumi:"resultOutputFile"`
// Start time but is represented using a timestamp in seconds.
StartTime int `pulumi:"startTime"`
// Query Data Type. `top`: CostType Sorting order by top, `count40x`: CostType Sorting order by statusCode(40x) count, `nettype`: CostType Sorting order by nettype, `allcount`: CostType allcount, `day`: CostType group by day, `condition`: CostType Sorting in condition, `pagepv`: CostType Sorting order by pagepv, `area`: CostType query in area, `version`: CostType sort by version, `platform`: CostType sort by platform, `isp`: CostType sort by isp, `region`: region, `device`: CostType sort by device, `browser`: CostType sort by browser, `ext1`: CostType sort by ext1, `ext2`: CostType sort by ext2, `ext3`: CostType sort by ext3, `ret`: CostType sort by ret, `status`: CostType sort by status, `from`: CostType sort by from, `url`: CostType sort by url, `env`: CostType sort by env.
Type string `pulumi:"type"`
// The URL Key where the data reporting takes place.
Url *string `pulumi:"url"`
// The SDK version used for data reporting.
VersionNum *string `pulumi:"versionNum"`
}
// A collection of values returned by getStaticResource.
type GetStaticResourceResult struct {
Area *string `pulumi:"area"`
Brand *string `pulumi:"brand"`
Browser *string `pulumi:"browser"`
CostType *string `pulumi:"costType"`
Device *string `pulumi:"device"`
EndTime int `pulumi:"endTime"`
Engine *string `pulumi:"engine"`
Env *string `pulumi:"env"`
ExtFirst *string `pulumi:"extFirst"`
ExtSecond *string `pulumi:"extSecond"`
ExtThird *string `pulumi:"extThird"`
From *string `pulumi:"from"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
IsAbroad *string `pulumi:"isAbroad"`
Isp *string `pulumi:"isp"`
Level *string `pulumi:"level"`
NetType *string `pulumi:"netType"`
Os *string `pulumi:"os"`
Platform *string `pulumi:"platform"`
ProjectId int `pulumi:"projectId"`
// Return value.
Result string `pulumi:"result"`
ResultOutputFile *string `pulumi:"resultOutputFile"`
StartTime int `pulumi:"startTime"`
Type string `pulumi:"type"`
Url *string `pulumi:"url"`
VersionNum *string `pulumi:"versionNum"`
}
func GetStaticResourceOutput(ctx *pulumi.Context, args GetStaticResourceOutputArgs, opts ...pulumi.InvokeOption) GetStaticResourceResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetStaticResourceResult, error) {
args := v.(GetStaticResourceArgs)
r, err := GetStaticResource(ctx, &args, opts...)
var s GetStaticResourceResult
if r != nil {
s = *r
}
return s, err
}).(GetStaticResourceResultOutput)
}
// A collection of arguments for invoking getStaticResource.
type GetStaticResourceOutputArgs struct {
// The region where the data reporting takes place.
Area pulumi.StringPtrInput `pulumi:"area"`
// The mobile phone brand used for data reporting.
Brand pulumi.StringPtrInput `pulumi:"brand"`
// The browser type used for data reporting.
Browser pulumi.StringPtrInput `pulumi:"browser"`
// The method used for calculating the elapsed time `50`: 50th percentile, `75`: 75th percentile., `90`: 90th percentile., `95`: 95th percentile., `99`: 99th percentile., `99.5`: 99.5th percentile., `avg`: Mean.
CostType pulumi.StringPtrInput `pulumi:"costType"`
// The device used for data reporting.
Device pulumi.StringPtrInput `pulumi:"device"`
// End time but is represented using a timestamp in seconds.
EndTime pulumi.IntInput `pulumi:"endTime"`
// The browser engine used for data reporting.
Engine pulumi.StringPtrInput `pulumi:"engine"`
// The code environment where the data reporting takes place.(`production`: production env, `development`: development env, `gray`: gray env, `pre`: pre env, `daily`: daily env, `local`: local env, `others`: others env).
Env pulumi.StringPtrInput `pulumi:"env"`
// First Expansion parameter.
ExtFirst pulumi.StringPtrInput `pulumi:"extFirst"`
// Second Expansion parameter.
ExtSecond pulumi.StringPtrInput `pulumi:"extSecond"`
// Third Expansion parameter.
ExtThird pulumi.StringPtrInput `pulumi:"extThird"`
// The source page of the data reporting.
From pulumi.StringPtrInput `pulumi:"from"`
// Whether it is non-China region.`1`: yes; `0`: no.
IsAbroad pulumi.StringPtrInput `pulumi:"isAbroad"`
// The internet service provider used for data reporting.
Isp pulumi.StringPtrInput `pulumi:"isp"`
// Log level for data reporting(`1`: whitelist, `2`: normal, `4`: error, `8`: promise error, `16`: ajax request error, `32`: js resource load error, `64`: image resource load error, `128`: css resource load error, `256`: console.error, `512`: video resource load error, `1024`: request retcode error, `2048`: sdk self monitor error, `4096`: pv log, `8192`: event log).
Level pulumi.StringPtrInput `pulumi:"level"`
// The network type used for data reporting.(`1`: Wifi, `2`: 2G, `3`: 3G, `4`: 4G, `5`: 5G, `6`: 6G, `100`: Unknown).
NetType pulumi.StringPtrInput `pulumi:"netType"`
// The operating system used for data reporting.
Os pulumi.StringPtrInput `pulumi:"os"`
// The platform where the data reporting takes place.(`1`: Android, `2`: IOS, `3`: Windows, `4`: Mac, `5`: Linux, `100`: Other).
Platform pulumi.StringPtrInput `pulumi:"platform"`
// Project ID.
ProjectId pulumi.IntInput `pulumi:"projectId"`
// Used to save results.
ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
// Start time but is represented using a timestamp in seconds.
StartTime pulumi.IntInput `pulumi:"startTime"`
// Query Data Type. `top`: CostType Sorting order by top, `count40x`: CostType Sorting order by statusCode(40x) count, `nettype`: CostType Sorting order by nettype, `allcount`: CostType allcount, `day`: CostType group by day, `condition`: CostType Sorting in condition, `pagepv`: CostType Sorting order by pagepv, `area`: CostType query in area, `version`: CostType sort by version, `platform`: CostType sort by platform, `isp`: CostType sort by isp, `region`: region, `device`: CostType sort by device, `browser`: CostType sort by browser, `ext1`: CostType sort by ext1, `ext2`: CostType sort by ext2, `ext3`: CostType sort by ext3, `ret`: CostType sort by ret, `status`: CostType sort by status, `from`: CostType sort by from, `url`: CostType sort by url, `env`: CostType sort by env.
Type pulumi.StringInput `pulumi:"type"`
// The URL Key where the data reporting takes place.
Url pulumi.StringPtrInput `pulumi:"url"`
// The SDK version used for data reporting.
VersionNum pulumi.StringPtrInput `pulumi:"versionNum"`
}
func (GetStaticResourceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetStaticResourceArgs)(nil)).Elem()
}
// A collection of values returned by getStaticResource.
type GetStaticResourceResultOutput struct{ *pulumi.OutputState }
func (GetStaticResourceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetStaticResourceResult)(nil)).Elem()
}
func (o GetStaticResourceResultOutput) ToGetStaticResourceResultOutput() GetStaticResourceResultOutput {
return o
}
func (o GetStaticResourceResultOutput) ToGetStaticResourceResultOutputWithContext(ctx context.Context) GetStaticResourceResultOutput {
return o
}
func (o GetStaticResourceResultOutput) Area() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Area }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Brand() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Brand }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Browser() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Browser }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) CostType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.CostType }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Device() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Device }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) EndTime() pulumi.IntOutput {
return o.ApplyT(func(v GetStaticResourceResult) int { return v.EndTime }).(pulumi.IntOutput)
}
func (o GetStaticResourceResultOutput) Engine() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Engine }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Env }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) ExtFirst() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.ExtFirst }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) ExtSecond() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.ExtSecond }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) ExtThird() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.ExtThird }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) From() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.From }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetStaticResourceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetStaticResourceResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetStaticResourceResultOutput) IsAbroad() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.IsAbroad }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Isp() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Isp }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Level() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Level }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) NetType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.NetType }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Os() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Os }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) Platform() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Platform }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) ProjectId() pulumi.IntOutput {
return o.ApplyT(func(v GetStaticResourceResult) int { return v.ProjectId }).(pulumi.IntOutput)
}
// Return value.
func (o GetStaticResourceResultOutput) Result() pulumi.StringOutput {
return o.ApplyT(func(v GetStaticResourceResult) string { return v.Result }).(pulumi.StringOutput)
}
func (o GetStaticResourceResultOutput) ResultOutputFile() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.ResultOutputFile }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) StartTime() pulumi.IntOutput {
return o.ApplyT(func(v GetStaticResourceResult) int { return v.StartTime }).(pulumi.IntOutput)
}
func (o GetStaticResourceResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetStaticResourceResult) string { return v.Type }).(pulumi.StringOutput)
}
func (o GetStaticResourceResultOutput) Url() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.Url }).(pulumi.StringPtrOutput)
}
func (o GetStaticResourceResultOutput) VersionNum() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStaticResourceResult) *string { return v.VersionNum }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetStaticResourceResultOutput{})
}