/
folderBucketView.go
203 lines (170 loc) · 8.95 KB
/
folderBucketView.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v2
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.
// Auto-naming is currently not supported for this resource.
type FolderBucketView struct {
pulumi.CustomResourceState
BucketId pulumi.StringOutput `pulumi:"bucketId"`
// The creation timestamp of the view.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Describes this view.
Description pulumi.StringOutput `pulumi:"description"`
// Filter that restricts which log entries in a bucket are visible in this view.Filters are restricted to be a logical AND of ==/!= of any of the following: originating project/folder/organization/billing account. resource type log idFor example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")
Filter pulumi.StringOutput `pulumi:"filter"`
FolderId pulumi.StringOutput `pulumi:"folderId"`
Location pulumi.StringOutput `pulumi:"location"`
// The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view
Name pulumi.StringOutput `pulumi:"name"`
// The last update timestamp of the view.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
// Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.
ViewId pulumi.StringOutput `pulumi:"viewId"`
}
// NewFolderBucketView registers a new resource with the given unique name, arguments, and options.
func NewFolderBucketView(ctx *pulumi.Context,
name string, args *FolderBucketViewArgs, opts ...pulumi.ResourceOption) (*FolderBucketView, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BucketId == nil {
return nil, errors.New("invalid value for required argument 'BucketId'")
}
if args.FolderId == nil {
return nil, errors.New("invalid value for required argument 'FolderId'")
}
if args.ViewId == nil {
return nil, errors.New("invalid value for required argument 'ViewId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"bucketId",
"folderId",
"location",
"viewId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource FolderBucketView
err := ctx.RegisterResource("google-native:logging/v2:FolderBucketView", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFolderBucketView gets an existing FolderBucketView 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 GetFolderBucketView(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FolderBucketViewState, opts ...pulumi.ResourceOption) (*FolderBucketView, error) {
var resource FolderBucketView
err := ctx.ReadResource("google-native:logging/v2:FolderBucketView", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FolderBucketView resources.
type folderBucketViewState struct {
}
type FolderBucketViewState struct {
}
func (FolderBucketViewState) ElementType() reflect.Type {
return reflect.TypeOf((*folderBucketViewState)(nil)).Elem()
}
type folderBucketViewArgs struct {
BucketId string `pulumi:"bucketId"`
// Describes this view.
Description *string `pulumi:"description"`
// Filter that restricts which log entries in a bucket are visible in this view.Filters are restricted to be a logical AND of ==/!= of any of the following: originating project/folder/organization/billing account. resource type log idFor example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")
Filter *string `pulumi:"filter"`
FolderId string `pulumi:"folderId"`
Location *string `pulumi:"location"`
// The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view
Name *string `pulumi:"name"`
// Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.
ViewId string `pulumi:"viewId"`
}
// The set of arguments for constructing a FolderBucketView resource.
type FolderBucketViewArgs struct {
BucketId pulumi.StringInput
// Describes this view.
Description pulumi.StringPtrInput
// Filter that restricts which log entries in a bucket are visible in this view.Filters are restricted to be a logical AND of ==/!= of any of the following: originating project/folder/organization/billing account. resource type log idFor example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")
Filter pulumi.StringPtrInput
FolderId pulumi.StringInput
Location pulumi.StringPtrInput
// The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view
Name pulumi.StringPtrInput
// Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.
ViewId pulumi.StringInput
}
func (FolderBucketViewArgs) ElementType() reflect.Type {
return reflect.TypeOf((*folderBucketViewArgs)(nil)).Elem()
}
type FolderBucketViewInput interface {
pulumi.Input
ToFolderBucketViewOutput() FolderBucketViewOutput
ToFolderBucketViewOutputWithContext(ctx context.Context) FolderBucketViewOutput
}
func (*FolderBucketView) ElementType() reflect.Type {
return reflect.TypeOf((**FolderBucketView)(nil)).Elem()
}
func (i *FolderBucketView) ToFolderBucketViewOutput() FolderBucketViewOutput {
return i.ToFolderBucketViewOutputWithContext(context.Background())
}
func (i *FolderBucketView) ToFolderBucketViewOutputWithContext(ctx context.Context) FolderBucketViewOutput {
return pulumi.ToOutputWithContext(ctx, i).(FolderBucketViewOutput)
}
type FolderBucketViewOutput struct{ *pulumi.OutputState }
func (FolderBucketViewOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FolderBucketView)(nil)).Elem()
}
func (o FolderBucketViewOutput) ToFolderBucketViewOutput() FolderBucketViewOutput {
return o
}
func (o FolderBucketViewOutput) ToFolderBucketViewOutputWithContext(ctx context.Context) FolderBucketViewOutput {
return o
}
func (o FolderBucketViewOutput) BucketId() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.BucketId }).(pulumi.StringOutput)
}
// The creation timestamp of the view.
func (o FolderBucketViewOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Describes this view.
func (o FolderBucketViewOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Filter that restricts which log entries in a bucket are visible in this view.Filters are restricted to be a logical AND of ==/!= of any of the following: originating project/folder/organization/billing account. resource type log idFor example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")
func (o FolderBucketViewOutput) Filter() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.Filter }).(pulumi.StringOutput)
}
func (o FolderBucketViewOutput) FolderId() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.FolderId }).(pulumi.StringOutput)
}
func (o FolderBucketViewOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view
func (o FolderBucketViewOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The last update timestamp of the view.
func (o FolderBucketViewOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
// Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.
func (o FolderBucketViewOutput) ViewId() pulumi.StringOutput {
return o.ApplyT(func(v *FolderBucketView) pulumi.StringOutput { return v.ViewId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*FolderBucketViewInput)(nil)).Elem(), &FolderBucketView{})
pulumi.RegisterOutputType(FolderBucketViewOutput{})
}