/
appMonitor.go
176 lines (145 loc) · 7.16 KB
/
appMonitor.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package rum
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource Type definition for AWS::RUM::AppMonitor
type AppMonitor struct {
pulumi.CustomResourceState
AppMonitorConfiguration AppMonitorConfigurationPtrOutput `pulumi:"appMonitorConfiguration"`
// The unique ID of the new app monitor.
AwsId pulumi.StringOutput `pulumi:"awsId"`
CustomEvents AppMonitorCustomEventsPtrOutput `pulumi:"customEvents"`
// Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to CWLlong in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur CWLlong charges. If you omit this parameter, the default is false
CwLogEnabled pulumi.BoolPtrOutput `pulumi:"cwLogEnabled"`
// The top-level internet domain name for which your application has administrative authority.
Domain pulumi.StringOutput `pulumi:"domain"`
// A name for the app monitor
Name pulumi.StringOutput `pulumi:"name"`
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewAppMonitor registers a new resource with the given unique name, arguments, and options.
func NewAppMonitor(ctx *pulumi.Context,
name string, args *AppMonitorArgs, opts ...pulumi.ResourceOption) (*AppMonitor, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Domain == nil {
return nil, errors.New("invalid value for required argument 'Domain'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"name",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AppMonitor
err := ctx.RegisterResource("aws-native:rum:AppMonitor", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAppMonitor gets an existing AppMonitor resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAppMonitor(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AppMonitorState, opts ...pulumi.ResourceOption) (*AppMonitor, error) {
var resource AppMonitor
err := ctx.ReadResource("aws-native:rum:AppMonitor", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AppMonitor resources.
type appMonitorState struct {
}
type AppMonitorState struct {
}
func (AppMonitorState) ElementType() reflect.Type {
return reflect.TypeOf((*appMonitorState)(nil)).Elem()
}
type appMonitorArgs struct {
AppMonitorConfiguration *AppMonitorConfiguration `pulumi:"appMonitorConfiguration"`
CustomEvents *AppMonitorCustomEvents `pulumi:"customEvents"`
// Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to CWLlong in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur CWLlong charges. If you omit this parameter, the default is false
CwLogEnabled *bool `pulumi:"cwLogEnabled"`
// The top-level internet domain name for which your application has administrative authority.
Domain string `pulumi:"domain"`
// A name for the app monitor
Name *string `pulumi:"name"`
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a AppMonitor resource.
type AppMonitorArgs struct {
AppMonitorConfiguration AppMonitorConfigurationPtrInput
CustomEvents AppMonitorCustomEventsPtrInput
// Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to CWLlong in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur CWLlong charges. If you omit this parameter, the default is false
CwLogEnabled pulumi.BoolPtrInput
// The top-level internet domain name for which your application has administrative authority.
Domain pulumi.StringInput
// A name for the app monitor
Name pulumi.StringPtrInput
Tags aws.TagArrayInput
}
func (AppMonitorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*appMonitorArgs)(nil)).Elem()
}
type AppMonitorInput interface {
pulumi.Input
ToAppMonitorOutput() AppMonitorOutput
ToAppMonitorOutputWithContext(ctx context.Context) AppMonitorOutput
}
func (*AppMonitor) ElementType() reflect.Type {
return reflect.TypeOf((**AppMonitor)(nil)).Elem()
}
func (i *AppMonitor) ToAppMonitorOutput() AppMonitorOutput {
return i.ToAppMonitorOutputWithContext(context.Background())
}
func (i *AppMonitor) ToAppMonitorOutputWithContext(ctx context.Context) AppMonitorOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppMonitorOutput)
}
type AppMonitorOutput struct{ *pulumi.OutputState }
func (AppMonitorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AppMonitor)(nil)).Elem()
}
func (o AppMonitorOutput) ToAppMonitorOutput() AppMonitorOutput {
return o
}
func (o AppMonitorOutput) ToAppMonitorOutputWithContext(ctx context.Context) AppMonitorOutput {
return o
}
func (o AppMonitorOutput) AppMonitorConfiguration() AppMonitorConfigurationPtrOutput {
return o.ApplyT(func(v *AppMonitor) AppMonitorConfigurationPtrOutput { return v.AppMonitorConfiguration }).(AppMonitorConfigurationPtrOutput)
}
// The unique ID of the new app monitor.
func (o AppMonitorOutput) AwsId() pulumi.StringOutput {
return o.ApplyT(func(v *AppMonitor) pulumi.StringOutput { return v.AwsId }).(pulumi.StringOutput)
}
func (o AppMonitorOutput) CustomEvents() AppMonitorCustomEventsPtrOutput {
return o.ApplyT(func(v *AppMonitor) AppMonitorCustomEventsPtrOutput { return v.CustomEvents }).(AppMonitorCustomEventsPtrOutput)
}
// Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to CWLlong in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur CWLlong charges. If you omit this parameter, the default is false
func (o AppMonitorOutput) CwLogEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AppMonitor) pulumi.BoolPtrOutput { return v.CwLogEnabled }).(pulumi.BoolPtrOutput)
}
// The top-level internet domain name for which your application has administrative authority.
func (o AppMonitorOutput) Domain() pulumi.StringOutput {
return o.ApplyT(func(v *AppMonitor) pulumi.StringOutput { return v.Domain }).(pulumi.StringOutput)
}
// A name for the app monitor
func (o AppMonitorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AppMonitor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o AppMonitorOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *AppMonitor) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AppMonitorInput)(nil)).Elem(), &AppMonitor{})
pulumi.RegisterOutputType(AppMonitorOutput{})
}