This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
loggingGroup.go
295 lines (249 loc) · 10.6 KB
/
loggingGroup.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Yandex Cloud Logging group resource. For more information, see
// [the official documentation](https://cloud.yandex.com/en/docs/logging/concepts/log-group).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := yandex.NewLoggingGroup(ctx, "group1", &yandex.LoggingGroupArgs{
// FolderId: pulumi.Any(data.Yandex_resourcemanager_folder.Test_folder.Id),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type LoggingGroup struct {
pulumi.CustomResourceState
// ID of the cloud that the Yandex Cloud Logging group belong to.
CloudId pulumi.StringOutput `pulumi:"cloudId"`
// The Yandex Cloud Logging group creation timestamp.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// A description for the Yandex Cloud Logging group.
Description pulumi.StringPtrOutput `pulumi:"description"`
// ID of the folder that the Yandex Cloud Logging group belongs to.
// It will be deduced from provider configuration if not set explicitly.
FolderId pulumi.StringOutput `pulumi:"folderId"`
// A set of key/value label pairs to assign to the Yandex Cloud Logging group.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// Name for the Yandex Cloud Logging group.
Name pulumi.StringOutput `pulumi:"name"`
// Log entries retention period for the Yandex Cloud Logging group.
RetentionPeriod pulumi.StringOutput `pulumi:"retentionPeriod"`
// The Yandex Cloud Logging group status.
Status pulumi.StringOutput `pulumi:"status"`
}
// NewLoggingGroup registers a new resource with the given unique name, arguments, and options.
func NewLoggingGroup(ctx *pulumi.Context,
name string, args *LoggingGroupArgs, opts ...pulumi.ResourceOption) (*LoggingGroup, error) {
if args == nil {
args = &LoggingGroupArgs{}
}
var resource LoggingGroup
err := ctx.RegisterResource("yandex:index/loggingGroup:LoggingGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLoggingGroup gets an existing LoggingGroup 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 GetLoggingGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LoggingGroupState, opts ...pulumi.ResourceOption) (*LoggingGroup, error) {
var resource LoggingGroup
err := ctx.ReadResource("yandex:index/loggingGroup:LoggingGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LoggingGroup resources.
type loggingGroupState struct {
// ID of the cloud that the Yandex Cloud Logging group belong to.
CloudId *string `pulumi:"cloudId"`
// The Yandex Cloud Logging group creation timestamp.
CreatedAt *string `pulumi:"createdAt"`
// A description for the Yandex Cloud Logging group.
Description *string `pulumi:"description"`
// ID of the folder that the Yandex Cloud Logging group belongs to.
// It will be deduced from provider configuration if not set explicitly.
FolderId *string `pulumi:"folderId"`
// A set of key/value label pairs to assign to the Yandex Cloud Logging group.
Labels map[string]string `pulumi:"labels"`
// Name for the Yandex Cloud Logging group.
Name *string `pulumi:"name"`
// Log entries retention period for the Yandex Cloud Logging group.
RetentionPeriod *string `pulumi:"retentionPeriod"`
// The Yandex Cloud Logging group status.
Status *string `pulumi:"status"`
}
type LoggingGroupState struct {
// ID of the cloud that the Yandex Cloud Logging group belong to.
CloudId pulumi.StringPtrInput
// The Yandex Cloud Logging group creation timestamp.
CreatedAt pulumi.StringPtrInput
// A description for the Yandex Cloud Logging group.
Description pulumi.StringPtrInput
// ID of the folder that the Yandex Cloud Logging group belongs to.
// It will be deduced from provider configuration if not set explicitly.
FolderId pulumi.StringPtrInput
// A set of key/value label pairs to assign to the Yandex Cloud Logging group.
Labels pulumi.StringMapInput
// Name for the Yandex Cloud Logging group.
Name pulumi.StringPtrInput
// Log entries retention period for the Yandex Cloud Logging group.
RetentionPeriod pulumi.StringPtrInput
// The Yandex Cloud Logging group status.
Status pulumi.StringPtrInput
}
func (LoggingGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*loggingGroupState)(nil)).Elem()
}
type loggingGroupArgs struct {
// A description for the Yandex Cloud Logging group.
Description *string `pulumi:"description"`
// ID of the folder that the Yandex Cloud Logging group belongs to.
// It will be deduced from provider configuration if not set explicitly.
FolderId *string `pulumi:"folderId"`
// A set of key/value label pairs to assign to the Yandex Cloud Logging group.
Labels map[string]string `pulumi:"labels"`
// Name for the Yandex Cloud Logging group.
Name *string `pulumi:"name"`
// Log entries retention period for the Yandex Cloud Logging group.
RetentionPeriod *string `pulumi:"retentionPeriod"`
}
// The set of arguments for constructing a LoggingGroup resource.
type LoggingGroupArgs struct {
// A description for the Yandex Cloud Logging group.
Description pulumi.StringPtrInput
// ID of the folder that the Yandex Cloud Logging group belongs to.
// It will be deduced from provider configuration if not set explicitly.
FolderId pulumi.StringPtrInput
// A set of key/value label pairs to assign to the Yandex Cloud Logging group.
Labels pulumi.StringMapInput
// Name for the Yandex Cloud Logging group.
Name pulumi.StringPtrInput
// Log entries retention period for the Yandex Cloud Logging group.
RetentionPeriod pulumi.StringPtrInput
}
func (LoggingGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*loggingGroupArgs)(nil)).Elem()
}
type LoggingGroupInput interface {
pulumi.Input
ToLoggingGroupOutput() LoggingGroupOutput
ToLoggingGroupOutputWithContext(ctx context.Context) LoggingGroupOutput
}
func (*LoggingGroup) ElementType() reflect.Type {
return reflect.TypeOf((**LoggingGroup)(nil)).Elem()
}
func (i *LoggingGroup) ToLoggingGroupOutput() LoggingGroupOutput {
return i.ToLoggingGroupOutputWithContext(context.Background())
}
func (i *LoggingGroup) ToLoggingGroupOutputWithContext(ctx context.Context) LoggingGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoggingGroupOutput)
}
// LoggingGroupArrayInput is an input type that accepts LoggingGroupArray and LoggingGroupArrayOutput values.
// You can construct a concrete instance of `LoggingGroupArrayInput` via:
//
// LoggingGroupArray{ LoggingGroupArgs{...} }
type LoggingGroupArrayInput interface {
pulumi.Input
ToLoggingGroupArrayOutput() LoggingGroupArrayOutput
ToLoggingGroupArrayOutputWithContext(context.Context) LoggingGroupArrayOutput
}
type LoggingGroupArray []LoggingGroupInput
func (LoggingGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoggingGroup)(nil)).Elem()
}
func (i LoggingGroupArray) ToLoggingGroupArrayOutput() LoggingGroupArrayOutput {
return i.ToLoggingGroupArrayOutputWithContext(context.Background())
}
func (i LoggingGroupArray) ToLoggingGroupArrayOutputWithContext(ctx context.Context) LoggingGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoggingGroupArrayOutput)
}
// LoggingGroupMapInput is an input type that accepts LoggingGroupMap and LoggingGroupMapOutput values.
// You can construct a concrete instance of `LoggingGroupMapInput` via:
//
// LoggingGroupMap{ "key": LoggingGroupArgs{...} }
type LoggingGroupMapInput interface {
pulumi.Input
ToLoggingGroupMapOutput() LoggingGroupMapOutput
ToLoggingGroupMapOutputWithContext(context.Context) LoggingGroupMapOutput
}
type LoggingGroupMap map[string]LoggingGroupInput
func (LoggingGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoggingGroup)(nil)).Elem()
}
func (i LoggingGroupMap) ToLoggingGroupMapOutput() LoggingGroupMapOutput {
return i.ToLoggingGroupMapOutputWithContext(context.Background())
}
func (i LoggingGroupMap) ToLoggingGroupMapOutputWithContext(ctx context.Context) LoggingGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoggingGroupMapOutput)
}
type LoggingGroupOutput struct{ *pulumi.OutputState }
func (LoggingGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LoggingGroup)(nil)).Elem()
}
func (o LoggingGroupOutput) ToLoggingGroupOutput() LoggingGroupOutput {
return o
}
func (o LoggingGroupOutput) ToLoggingGroupOutputWithContext(ctx context.Context) LoggingGroupOutput {
return o
}
type LoggingGroupArrayOutput struct{ *pulumi.OutputState }
func (LoggingGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoggingGroup)(nil)).Elem()
}
func (o LoggingGroupArrayOutput) ToLoggingGroupArrayOutput() LoggingGroupArrayOutput {
return o
}
func (o LoggingGroupArrayOutput) ToLoggingGroupArrayOutputWithContext(ctx context.Context) LoggingGroupArrayOutput {
return o
}
func (o LoggingGroupArrayOutput) Index(i pulumi.IntInput) LoggingGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoggingGroup {
return vs[0].([]*LoggingGroup)[vs[1].(int)]
}).(LoggingGroupOutput)
}
type LoggingGroupMapOutput struct{ *pulumi.OutputState }
func (LoggingGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoggingGroup)(nil)).Elem()
}
func (o LoggingGroupMapOutput) ToLoggingGroupMapOutput() LoggingGroupMapOutput {
return o
}
func (o LoggingGroupMapOutput) ToLoggingGroupMapOutputWithContext(ctx context.Context) LoggingGroupMapOutput {
return o
}
func (o LoggingGroupMapOutput) MapIndex(k pulumi.StringInput) LoggingGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoggingGroup {
return vs[0].(map[string]*LoggingGroup)[vs[1].(string)]
}).(LoggingGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LoggingGroupInput)(nil)).Elem(), &LoggingGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*LoggingGroupArrayInput)(nil)).Elem(), LoggingGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LoggingGroupMapInput)(nil)).Elem(), LoggingGroupMap{})
pulumi.RegisterOutputType(LoggingGroupOutput{})
pulumi.RegisterOutputType(LoggingGroupArrayOutput{})
pulumi.RegisterOutputType(LoggingGroupMapOutput{})
}