/
statusPatch.go
290 lines (236 loc) · 14.4 KB
/
statusPatch.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
// Code generated by pulumigen DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Patch resources are used to modify existing Kubernetes resources by using
// Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than
// one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource.
// Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the
// [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/#server-side-apply) for
// additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi.
// Status is a return value for calls that don't return other objects.
type StatusPatch struct {
pulumi.CustomResourceState
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
// Suggested HTTP return code for this status, 0 if not set.
Code pulumi.IntPtrOutput `pulumi:"code"`
// Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
Details StatusDetailsPatchPtrOutput `pulumi:"details"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind pulumi.StringPtrOutput `pulumi:"kind"`
// A human-readable description of the status of this operation.
Message pulumi.StringPtrOutput `pulumi:"message"`
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Metadata ListMetaPatchPtrOutput `pulumi:"metadata"`
// A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
Reason pulumi.StringPtrOutput `pulumi:"reason"`
// Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Status pulumi.StringPtrOutput `pulumi:"status"`
}
// NewStatusPatch registers a new resource with the given unique name, arguments, and options.
func NewStatusPatch(ctx *pulumi.Context,
name string, args *StatusPatchArgs, opts ...pulumi.ResourceOption) (*StatusPatch, error) {
if args == nil {
args = &StatusPatchArgs{}
}
args.ApiVersion = pulumi.StringPtr("v1")
args.Kind = pulumi.StringPtr("Status")
var resource StatusPatch
err := ctx.RegisterResource("kubernetes:meta/v1:StatusPatch", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStatusPatch gets an existing StatusPatch 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 GetStatusPatch(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StatusPatchState, opts ...pulumi.ResourceOption) (*StatusPatch, error) {
var resource StatusPatch
err := ctx.ReadResource("kubernetes:meta/v1:StatusPatch", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StatusPatch resources.
type statusPatchState struct {
}
type StatusPatchState struct {
}
func (StatusPatchState) ElementType() reflect.Type {
return reflect.TypeOf((*statusPatchState)(nil)).Elem()
}
type statusPatchArgs struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `pulumi:"apiVersion"`
// Suggested HTTP return code for this status, 0 if not set.
Code *int `pulumi:"code"`
// Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
Details *StatusDetailsPatch `pulumi:"details"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `pulumi:"kind"`
// A human-readable description of the status of this operation.
Message *string `pulumi:"message"`
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Metadata *ListMetaPatch `pulumi:"metadata"`
// A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
Reason *string `pulumi:"reason"`
}
// The set of arguments for constructing a StatusPatch resource.
type StatusPatchArgs struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion pulumi.StringPtrInput
// Suggested HTTP return code for this status, 0 if not set.
Code pulumi.IntPtrInput
// Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
Details StatusDetailsPatchPtrInput
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind pulumi.StringPtrInput
// A human-readable description of the status of this operation.
Message pulumi.StringPtrInput
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Metadata ListMetaPatchPtrInput
// A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
Reason pulumi.StringPtrInput
}
func (StatusPatchArgs) ElementType() reflect.Type {
return reflect.TypeOf((*statusPatchArgs)(nil)).Elem()
}
type StatusPatchInput interface {
pulumi.Input
ToStatusPatchOutput() StatusPatchOutput
ToStatusPatchOutputWithContext(ctx context.Context) StatusPatchOutput
}
func (*StatusPatch) ElementType() reflect.Type {
return reflect.TypeOf((**StatusPatch)(nil)).Elem()
}
func (i *StatusPatch) ToStatusPatchOutput() StatusPatchOutput {
return i.ToStatusPatchOutputWithContext(context.Background())
}
func (i *StatusPatch) ToStatusPatchOutputWithContext(ctx context.Context) StatusPatchOutput {
return pulumi.ToOutputWithContext(ctx, i).(StatusPatchOutput)
}
// StatusPatchArrayInput is an input type that accepts StatusPatchArray and StatusPatchArrayOutput values.
// You can construct a concrete instance of `StatusPatchArrayInput` via:
//
// StatusPatchArray{ StatusPatchArgs{...} }
type StatusPatchArrayInput interface {
pulumi.Input
ToStatusPatchArrayOutput() StatusPatchArrayOutput
ToStatusPatchArrayOutputWithContext(context.Context) StatusPatchArrayOutput
}
type StatusPatchArray []StatusPatchInput
func (StatusPatchArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StatusPatch)(nil)).Elem()
}
func (i StatusPatchArray) ToStatusPatchArrayOutput() StatusPatchArrayOutput {
return i.ToStatusPatchArrayOutputWithContext(context.Background())
}
func (i StatusPatchArray) ToStatusPatchArrayOutputWithContext(ctx context.Context) StatusPatchArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StatusPatchArrayOutput)
}
// StatusPatchMapInput is an input type that accepts StatusPatchMap and StatusPatchMapOutput values.
// You can construct a concrete instance of `StatusPatchMapInput` via:
//
// StatusPatchMap{ "key": StatusPatchArgs{...} }
type StatusPatchMapInput interface {
pulumi.Input
ToStatusPatchMapOutput() StatusPatchMapOutput
ToStatusPatchMapOutputWithContext(context.Context) StatusPatchMapOutput
}
type StatusPatchMap map[string]StatusPatchInput
func (StatusPatchMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StatusPatch)(nil)).Elem()
}
func (i StatusPatchMap) ToStatusPatchMapOutput() StatusPatchMapOutput {
return i.ToStatusPatchMapOutputWithContext(context.Background())
}
func (i StatusPatchMap) ToStatusPatchMapOutputWithContext(ctx context.Context) StatusPatchMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StatusPatchMapOutput)
}
type StatusPatchOutput struct{ *pulumi.OutputState }
func (StatusPatchOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StatusPatch)(nil)).Elem()
}
func (o StatusPatchOutput) ToStatusPatchOutput() StatusPatchOutput {
return o
}
func (o StatusPatchOutput) ToStatusPatchOutputWithContext(ctx context.Context) StatusPatchOutput {
return o
}
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
func (o StatusPatchOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
// Suggested HTTP return code for this status, 0 if not set.
func (o StatusPatchOutput) Code() pulumi.IntPtrOutput {
return o.ApplyT(func(v *StatusPatch) pulumi.IntPtrOutput { return v.Code }).(pulumi.IntPtrOutput)
}
// Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
func (o StatusPatchOutput) Details() StatusDetailsPatchPtrOutput {
return o.ApplyT(func(v *StatusPatch) StatusDetailsPatchPtrOutput { return v.Details }).(StatusDetailsPatchPtrOutput)
}
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
func (o StatusPatchOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}
// A human-readable description of the status of this operation.
func (o StatusPatchOutput) Message() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Message }).(pulumi.StringPtrOutput)
}
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
func (o StatusPatchOutput) Metadata() ListMetaPatchPtrOutput {
return o.ApplyT(func(v *StatusPatch) ListMetaPatchPtrOutput { return v.Metadata }).(ListMetaPatchPtrOutput)
}
// A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
func (o StatusPatchOutput) Reason() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Reason }).(pulumi.StringPtrOutput)
}
// Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
func (o StatusPatchOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
type StatusPatchArrayOutput struct{ *pulumi.OutputState }
func (StatusPatchArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StatusPatch)(nil)).Elem()
}
func (o StatusPatchArrayOutput) ToStatusPatchArrayOutput() StatusPatchArrayOutput {
return o
}
func (o StatusPatchArrayOutput) ToStatusPatchArrayOutputWithContext(ctx context.Context) StatusPatchArrayOutput {
return o
}
func (o StatusPatchArrayOutput) Index(i pulumi.IntInput) StatusPatchOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StatusPatch {
return vs[0].([]*StatusPatch)[vs[1].(int)]
}).(StatusPatchOutput)
}
type StatusPatchMapOutput struct{ *pulumi.OutputState }
func (StatusPatchMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StatusPatch)(nil)).Elem()
}
func (o StatusPatchMapOutput) ToStatusPatchMapOutput() StatusPatchMapOutput {
return o
}
func (o StatusPatchMapOutput) ToStatusPatchMapOutputWithContext(ctx context.Context) StatusPatchMapOutput {
return o
}
func (o StatusPatchMapOutput) MapIndex(k pulumi.StringInput) StatusPatchOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StatusPatch {
return vs[0].(map[string]*StatusPatch)[vs[1].(string)]
}).(StatusPatchOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StatusPatchInput)(nil)).Elem(), &StatusPatch{})
pulumi.RegisterInputType(reflect.TypeOf((*StatusPatchArrayInput)(nil)).Elem(), StatusPatchArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StatusPatchMapInput)(nil)).Elem(), StatusPatchMap{})
pulumi.RegisterOutputType(StatusPatchOutput{})
pulumi.RegisterOutputType(StatusPatchArrayOutput{})
pulumi.RegisterOutputType(StatusPatchMapOutput{})
}