generated from pulumi/pulumi-tf-provider-boilerplate
/
metricExportCloudwatchConfig.go
289 lines (237 loc) · 13.1 KB
/
metricExportCloudwatchConfig.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
// 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 cockroach
import (
"context"
"reflect"
"errors"
"github.com/lbrlabs/pulumi-cockroach/sdk/go/cockroach/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Amazon CloudWatch metric export configuration for a cluster.
type MetricExportCloudwatchConfig struct {
pulumi.CustomResourceState
// Cluster ID.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// The customized AWS CloudWatch log group name.
LogGroupName pulumi.StringOutput `pulumi:"logGroupName"`
// The IAM role used to upload metric segments to the target AWS account.
RoleArn pulumi.StringOutput `pulumi:"roleArn"`
// Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
Status pulumi.StringOutput `pulumi:"status"`
// The specific AWS region that the metrics will be exported to.
TargetRegion pulumi.StringOutput `pulumi:"targetRegion"`
// Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
UserMessage pulumi.StringOutput `pulumi:"userMessage"`
}
// NewMetricExportCloudwatchConfig registers a new resource with the given unique name, arguments, and options.
func NewMetricExportCloudwatchConfig(ctx *pulumi.Context,
name string, args *MetricExportCloudwatchConfigArgs, opts ...pulumi.ResourceOption) (*MetricExportCloudwatchConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterId == nil {
return nil, errors.New("invalid value for required argument 'ClusterId'")
}
if args.RoleArn == nil {
return nil, errors.New("invalid value for required argument 'RoleArn'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MetricExportCloudwatchConfig
err := ctx.RegisterResource("cockroach:index/metricExportCloudwatchConfig:MetricExportCloudwatchConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMetricExportCloudwatchConfig gets an existing MetricExportCloudwatchConfig 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 GetMetricExportCloudwatchConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MetricExportCloudwatchConfigState, opts ...pulumi.ResourceOption) (*MetricExportCloudwatchConfig, error) {
var resource MetricExportCloudwatchConfig
err := ctx.ReadResource("cockroach:index/metricExportCloudwatchConfig:MetricExportCloudwatchConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MetricExportCloudwatchConfig resources.
type metricExportCloudwatchConfigState struct {
// Cluster ID.
ClusterId *string `pulumi:"clusterId"`
// The customized AWS CloudWatch log group name.
LogGroupName *string `pulumi:"logGroupName"`
// The IAM role used to upload metric segments to the target AWS account.
RoleArn *string `pulumi:"roleArn"`
// Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
Status *string `pulumi:"status"`
// The specific AWS region that the metrics will be exported to.
TargetRegion *string `pulumi:"targetRegion"`
// Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
UserMessage *string `pulumi:"userMessage"`
}
type MetricExportCloudwatchConfigState struct {
// Cluster ID.
ClusterId pulumi.StringPtrInput
// The customized AWS CloudWatch log group name.
LogGroupName pulumi.StringPtrInput
// The IAM role used to upload metric segments to the target AWS account.
RoleArn pulumi.StringPtrInput
// Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
Status pulumi.StringPtrInput
// The specific AWS region that the metrics will be exported to.
TargetRegion pulumi.StringPtrInput
// Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
UserMessage pulumi.StringPtrInput
}
func (MetricExportCloudwatchConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*metricExportCloudwatchConfigState)(nil)).Elem()
}
type metricExportCloudwatchConfigArgs struct {
// Cluster ID.
ClusterId string `pulumi:"clusterId"`
// The customized AWS CloudWatch log group name.
LogGroupName *string `pulumi:"logGroupName"`
// The IAM role used to upload metric segments to the target AWS account.
RoleArn string `pulumi:"roleArn"`
// The specific AWS region that the metrics will be exported to.
TargetRegion *string `pulumi:"targetRegion"`
}
// The set of arguments for constructing a MetricExportCloudwatchConfig resource.
type MetricExportCloudwatchConfigArgs struct {
// Cluster ID.
ClusterId pulumi.StringInput
// The customized AWS CloudWatch log group name.
LogGroupName pulumi.StringPtrInput
// The IAM role used to upload metric segments to the target AWS account.
RoleArn pulumi.StringInput
// The specific AWS region that the metrics will be exported to.
TargetRegion pulumi.StringPtrInput
}
func (MetricExportCloudwatchConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*metricExportCloudwatchConfigArgs)(nil)).Elem()
}
type MetricExportCloudwatchConfigInput interface {
pulumi.Input
ToMetricExportCloudwatchConfigOutput() MetricExportCloudwatchConfigOutput
ToMetricExportCloudwatchConfigOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigOutput
}
func (*MetricExportCloudwatchConfig) ElementType() reflect.Type {
return reflect.TypeOf((**MetricExportCloudwatchConfig)(nil)).Elem()
}
func (i *MetricExportCloudwatchConfig) ToMetricExportCloudwatchConfigOutput() MetricExportCloudwatchConfigOutput {
return i.ToMetricExportCloudwatchConfigOutputWithContext(context.Background())
}
func (i *MetricExportCloudwatchConfig) ToMetricExportCloudwatchConfigOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetricExportCloudwatchConfigOutput)
}
// MetricExportCloudwatchConfigArrayInput is an input type that accepts MetricExportCloudwatchConfigArray and MetricExportCloudwatchConfigArrayOutput values.
// You can construct a concrete instance of `MetricExportCloudwatchConfigArrayInput` via:
//
// MetricExportCloudwatchConfigArray{ MetricExportCloudwatchConfigArgs{...} }
type MetricExportCloudwatchConfigArrayInput interface {
pulumi.Input
ToMetricExportCloudwatchConfigArrayOutput() MetricExportCloudwatchConfigArrayOutput
ToMetricExportCloudwatchConfigArrayOutputWithContext(context.Context) MetricExportCloudwatchConfigArrayOutput
}
type MetricExportCloudwatchConfigArray []MetricExportCloudwatchConfigInput
func (MetricExportCloudwatchConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MetricExportCloudwatchConfig)(nil)).Elem()
}
func (i MetricExportCloudwatchConfigArray) ToMetricExportCloudwatchConfigArrayOutput() MetricExportCloudwatchConfigArrayOutput {
return i.ToMetricExportCloudwatchConfigArrayOutputWithContext(context.Background())
}
func (i MetricExportCloudwatchConfigArray) ToMetricExportCloudwatchConfigArrayOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetricExportCloudwatchConfigArrayOutput)
}
// MetricExportCloudwatchConfigMapInput is an input type that accepts MetricExportCloudwatchConfigMap and MetricExportCloudwatchConfigMapOutput values.
// You can construct a concrete instance of `MetricExportCloudwatchConfigMapInput` via:
//
// MetricExportCloudwatchConfigMap{ "key": MetricExportCloudwatchConfigArgs{...} }
type MetricExportCloudwatchConfigMapInput interface {
pulumi.Input
ToMetricExportCloudwatchConfigMapOutput() MetricExportCloudwatchConfigMapOutput
ToMetricExportCloudwatchConfigMapOutputWithContext(context.Context) MetricExportCloudwatchConfigMapOutput
}
type MetricExportCloudwatchConfigMap map[string]MetricExportCloudwatchConfigInput
func (MetricExportCloudwatchConfigMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MetricExportCloudwatchConfig)(nil)).Elem()
}
func (i MetricExportCloudwatchConfigMap) ToMetricExportCloudwatchConfigMapOutput() MetricExportCloudwatchConfigMapOutput {
return i.ToMetricExportCloudwatchConfigMapOutputWithContext(context.Background())
}
func (i MetricExportCloudwatchConfigMap) ToMetricExportCloudwatchConfigMapOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetricExportCloudwatchConfigMapOutput)
}
type MetricExportCloudwatchConfigOutput struct{ *pulumi.OutputState }
func (MetricExportCloudwatchConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MetricExportCloudwatchConfig)(nil)).Elem()
}
func (o MetricExportCloudwatchConfigOutput) ToMetricExportCloudwatchConfigOutput() MetricExportCloudwatchConfigOutput {
return o
}
func (o MetricExportCloudwatchConfigOutput) ToMetricExportCloudwatchConfigOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigOutput {
return o
}
// Cluster ID.
func (o MetricExportCloudwatchConfigOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExportCloudwatchConfig) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// The customized AWS CloudWatch log group name.
func (o MetricExportCloudwatchConfigOutput) LogGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExportCloudwatchConfig) pulumi.StringOutput { return v.LogGroupName }).(pulumi.StringOutput)
}
// The IAM role used to upload metric segments to the target AWS account.
func (o MetricExportCloudwatchConfigOutput) RoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExportCloudwatchConfig) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput)
}
// Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
func (o MetricExportCloudwatchConfigOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExportCloudwatchConfig) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// The specific AWS region that the metrics will be exported to.
func (o MetricExportCloudwatchConfigOutput) TargetRegion() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExportCloudwatchConfig) pulumi.StringOutput { return v.TargetRegion }).(pulumi.StringOutput)
}
// Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
func (o MetricExportCloudwatchConfigOutput) UserMessage() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExportCloudwatchConfig) pulumi.StringOutput { return v.UserMessage }).(pulumi.StringOutput)
}
type MetricExportCloudwatchConfigArrayOutput struct{ *pulumi.OutputState }
func (MetricExportCloudwatchConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MetricExportCloudwatchConfig)(nil)).Elem()
}
func (o MetricExportCloudwatchConfigArrayOutput) ToMetricExportCloudwatchConfigArrayOutput() MetricExportCloudwatchConfigArrayOutput {
return o
}
func (o MetricExportCloudwatchConfigArrayOutput) ToMetricExportCloudwatchConfigArrayOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigArrayOutput {
return o
}
func (o MetricExportCloudwatchConfigArrayOutput) Index(i pulumi.IntInput) MetricExportCloudwatchConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MetricExportCloudwatchConfig {
return vs[0].([]*MetricExportCloudwatchConfig)[vs[1].(int)]
}).(MetricExportCloudwatchConfigOutput)
}
type MetricExportCloudwatchConfigMapOutput struct{ *pulumi.OutputState }
func (MetricExportCloudwatchConfigMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MetricExportCloudwatchConfig)(nil)).Elem()
}
func (o MetricExportCloudwatchConfigMapOutput) ToMetricExportCloudwatchConfigMapOutput() MetricExportCloudwatchConfigMapOutput {
return o
}
func (o MetricExportCloudwatchConfigMapOutput) ToMetricExportCloudwatchConfigMapOutputWithContext(ctx context.Context) MetricExportCloudwatchConfigMapOutput {
return o
}
func (o MetricExportCloudwatchConfigMapOutput) MapIndex(k pulumi.StringInput) MetricExportCloudwatchConfigOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MetricExportCloudwatchConfig {
return vs[0].(map[string]*MetricExportCloudwatchConfig)[vs[1].(string)]
}).(MetricExportCloudwatchConfigOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MetricExportCloudwatchConfigInput)(nil)).Elem(), &MetricExportCloudwatchConfig{})
pulumi.RegisterInputType(reflect.TypeOf((*MetricExportCloudwatchConfigArrayInput)(nil)).Elem(), MetricExportCloudwatchConfigArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MetricExportCloudwatchConfigMapInput)(nil)).Elem(), MetricExportCloudwatchConfigMap{})
pulumi.RegisterOutputType(MetricExportCloudwatchConfigOutput{})
pulumi.RegisterOutputType(MetricExportCloudwatchConfigArrayOutput{})
pulumi.RegisterOutputType(MetricExportCloudwatchConfigMapOutput{})
}