github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/events/v1beta1/eventPatch.go (about) 1 // Code generated by pulumigen DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package v1beta1 5 6 import ( 7 "context" 8 "reflect" 9 10 corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1" 11 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Patch resources are used to modify existing Kubernetes resources by using 16 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 17 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 18 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 19 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 20 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 21 // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. 22 type EventPatch struct { 23 pulumi.CustomResourceState 24 25 // What action was taken/failed regarding to the regarding object. 26 Action pulumi.StringPtrOutput `pulumi:"action"` 27 // 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 28 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 29 // Deprecated field assuring backward compatibility with core.v1 Event type 30 DeprecatedCount pulumi.IntPtrOutput `pulumi:"deprecatedCount"` 31 // Deprecated field assuring backward compatibility with core.v1 Event type 32 DeprecatedFirstTimestamp pulumi.StringPtrOutput `pulumi:"deprecatedFirstTimestamp"` 33 // Deprecated field assuring backward compatibility with core.v1 Event type 34 DeprecatedLastTimestamp pulumi.StringPtrOutput `pulumi:"deprecatedLastTimestamp"` 35 // Deprecated field assuring backward compatibility with core.v1 Event type 36 DeprecatedSource corev1.EventSourcePatchPtrOutput `pulumi:"deprecatedSource"` 37 // Required. Time when this Event was first observed. 38 EventTime pulumi.StringPtrOutput `pulumi:"eventTime"` 39 // 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 40 Kind pulumi.StringPtrOutput `pulumi:"kind"` 41 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 42 // Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. 43 Note pulumi.StringPtrOutput `pulumi:"note"` 44 // Why the action was taken. 45 Reason pulumi.StringPtrOutput `pulumi:"reason"` 46 // The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. 47 Regarding corev1.ObjectReferencePatchPtrOutput `pulumi:"regarding"` 48 // Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object. 49 Related corev1.ObjectReferencePatchPtrOutput `pulumi:"related"` 50 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 51 ReportingController pulumi.StringPtrOutput `pulumi:"reportingController"` 52 // ID of the controller instance, e.g. `kubelet-xyzf`. 53 ReportingInstance pulumi.StringPtrOutput `pulumi:"reportingInstance"` 54 // Data about the Event series this event represents or nil if it's a singleton Event. 55 Series EventSeriesPatchPtrOutput `pulumi:"series"` 56 // Type of this event (Normal, Warning), new types could be added in the future. 57 Type pulumi.StringPtrOutput `pulumi:"type"` 58 } 59 60 // NewEventPatch registers a new resource with the given unique name, arguments, and options. 61 func NewEventPatch(ctx *pulumi.Context, 62 name string, args *EventPatchArgs, opts ...pulumi.ResourceOption) (*EventPatch, error) { 63 if args == nil { 64 args = &EventPatchArgs{} 65 } 66 67 args.ApiVersion = pulumi.StringPtr("events.k8s.io/v1beta1") 68 args.Kind = pulumi.StringPtr("Event") 69 aliases := pulumi.Aliases([]pulumi.Alias{ 70 { 71 Type: pulumi.String("kubernetes:core/v1:EventPatch"), 72 }, 73 { 74 Type: pulumi.String("kubernetes:events.k8s.io/v1:EventPatch"), 75 }, 76 }) 77 opts = append(opts, aliases) 78 var resource EventPatch 79 err := ctx.RegisterResource("kubernetes:events.k8s.io/v1beta1:EventPatch", name, args, &resource, opts...) 80 if err != nil { 81 return nil, err 82 } 83 return &resource, nil 84 } 85 86 // GetEventPatch gets an existing EventPatch resource's state with the given name, ID, and optional 87 // state properties that are used to uniquely qualify the lookup (nil if not required). 88 func GetEventPatch(ctx *pulumi.Context, 89 name string, id pulumi.IDInput, state *EventPatchState, opts ...pulumi.ResourceOption) (*EventPatch, error) { 90 var resource EventPatch 91 err := ctx.ReadResource("kubernetes:events.k8s.io/v1beta1:EventPatch", name, id, state, &resource, opts...) 92 if err != nil { 93 return nil, err 94 } 95 return &resource, nil 96 } 97 98 // Input properties used for looking up and filtering EventPatch resources. 99 type eventPatchState struct { 100 } 101 102 type EventPatchState struct { 103 } 104 105 func (EventPatchState) ElementType() reflect.Type { 106 return reflect.TypeOf((*eventPatchState)(nil)).Elem() 107 } 108 109 type eventPatchArgs struct { 110 // What action was taken/failed regarding to the regarding object. 111 Action *string `pulumi:"action"` 112 // 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 113 ApiVersion *string `pulumi:"apiVersion"` 114 // Deprecated field assuring backward compatibility with core.v1 Event type 115 DeprecatedCount *int `pulumi:"deprecatedCount"` 116 // Deprecated field assuring backward compatibility with core.v1 Event type 117 DeprecatedFirstTimestamp *string `pulumi:"deprecatedFirstTimestamp"` 118 // Deprecated field assuring backward compatibility with core.v1 Event type 119 DeprecatedLastTimestamp *string `pulumi:"deprecatedLastTimestamp"` 120 // Deprecated field assuring backward compatibility with core.v1 Event type 121 DeprecatedSource *corev1.EventSourcePatch `pulumi:"deprecatedSource"` 122 // Required. Time when this Event was first observed. 123 EventTime *string `pulumi:"eventTime"` 124 // 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 125 Kind *string `pulumi:"kind"` 126 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 127 // Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. 128 Note *string `pulumi:"note"` 129 // Why the action was taken. 130 Reason *string `pulumi:"reason"` 131 // The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. 132 Regarding *corev1.ObjectReferencePatch `pulumi:"regarding"` 133 // Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object. 134 Related *corev1.ObjectReferencePatch `pulumi:"related"` 135 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 136 ReportingController *string `pulumi:"reportingController"` 137 // ID of the controller instance, e.g. `kubelet-xyzf`. 138 ReportingInstance *string `pulumi:"reportingInstance"` 139 // Data about the Event series this event represents or nil if it's a singleton Event. 140 Series *EventSeriesPatch `pulumi:"series"` 141 // Type of this event (Normal, Warning), new types could be added in the future. 142 Type *string `pulumi:"type"` 143 } 144 145 // The set of arguments for constructing a EventPatch resource. 146 type EventPatchArgs struct { 147 // What action was taken/failed regarding to the regarding object. 148 Action pulumi.StringPtrInput 149 // 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 150 ApiVersion pulumi.StringPtrInput 151 // Deprecated field assuring backward compatibility with core.v1 Event type 152 DeprecatedCount pulumi.IntPtrInput 153 // Deprecated field assuring backward compatibility with core.v1 Event type 154 DeprecatedFirstTimestamp pulumi.StringPtrInput 155 // Deprecated field assuring backward compatibility with core.v1 Event type 156 DeprecatedLastTimestamp pulumi.StringPtrInput 157 // Deprecated field assuring backward compatibility with core.v1 Event type 158 DeprecatedSource corev1.EventSourcePatchPtrInput 159 // Required. Time when this Event was first observed. 160 EventTime pulumi.StringPtrInput 161 // 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 162 Kind pulumi.StringPtrInput 163 Metadata metav1.ObjectMetaPatchPtrInput 164 // Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. 165 Note pulumi.StringPtrInput 166 // Why the action was taken. 167 Reason pulumi.StringPtrInput 168 // The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. 169 Regarding corev1.ObjectReferencePatchPtrInput 170 // Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object. 171 Related corev1.ObjectReferencePatchPtrInput 172 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 173 ReportingController pulumi.StringPtrInput 174 // ID of the controller instance, e.g. `kubelet-xyzf`. 175 ReportingInstance pulumi.StringPtrInput 176 // Data about the Event series this event represents or nil if it's a singleton Event. 177 Series EventSeriesPatchPtrInput 178 // Type of this event (Normal, Warning), new types could be added in the future. 179 Type pulumi.StringPtrInput 180 } 181 182 func (EventPatchArgs) ElementType() reflect.Type { 183 return reflect.TypeOf((*eventPatchArgs)(nil)).Elem() 184 } 185 186 type EventPatchInput interface { 187 pulumi.Input 188 189 ToEventPatchOutput() EventPatchOutput 190 ToEventPatchOutputWithContext(ctx context.Context) EventPatchOutput 191 } 192 193 func (*EventPatch) ElementType() reflect.Type { 194 return reflect.TypeOf((**EventPatch)(nil)).Elem() 195 } 196 197 func (i *EventPatch) ToEventPatchOutput() EventPatchOutput { 198 return i.ToEventPatchOutputWithContext(context.Background()) 199 } 200 201 func (i *EventPatch) ToEventPatchOutputWithContext(ctx context.Context) EventPatchOutput { 202 return pulumi.ToOutputWithContext(ctx, i).(EventPatchOutput) 203 } 204 205 // EventPatchArrayInput is an input type that accepts EventPatchArray and EventPatchArrayOutput values. 206 // You can construct a concrete instance of `EventPatchArrayInput` via: 207 // 208 // EventPatchArray{ EventPatchArgs{...} } 209 type EventPatchArrayInput interface { 210 pulumi.Input 211 212 ToEventPatchArrayOutput() EventPatchArrayOutput 213 ToEventPatchArrayOutputWithContext(context.Context) EventPatchArrayOutput 214 } 215 216 type EventPatchArray []EventPatchInput 217 218 func (EventPatchArray) ElementType() reflect.Type { 219 return reflect.TypeOf((*[]*EventPatch)(nil)).Elem() 220 } 221 222 func (i EventPatchArray) ToEventPatchArrayOutput() EventPatchArrayOutput { 223 return i.ToEventPatchArrayOutputWithContext(context.Background()) 224 } 225 226 func (i EventPatchArray) ToEventPatchArrayOutputWithContext(ctx context.Context) EventPatchArrayOutput { 227 return pulumi.ToOutputWithContext(ctx, i).(EventPatchArrayOutput) 228 } 229 230 // EventPatchMapInput is an input type that accepts EventPatchMap and EventPatchMapOutput values. 231 // You can construct a concrete instance of `EventPatchMapInput` via: 232 // 233 // EventPatchMap{ "key": EventPatchArgs{...} } 234 type EventPatchMapInput interface { 235 pulumi.Input 236 237 ToEventPatchMapOutput() EventPatchMapOutput 238 ToEventPatchMapOutputWithContext(context.Context) EventPatchMapOutput 239 } 240 241 type EventPatchMap map[string]EventPatchInput 242 243 func (EventPatchMap) ElementType() reflect.Type { 244 return reflect.TypeOf((*map[string]*EventPatch)(nil)).Elem() 245 } 246 247 func (i EventPatchMap) ToEventPatchMapOutput() EventPatchMapOutput { 248 return i.ToEventPatchMapOutputWithContext(context.Background()) 249 } 250 251 func (i EventPatchMap) ToEventPatchMapOutputWithContext(ctx context.Context) EventPatchMapOutput { 252 return pulumi.ToOutputWithContext(ctx, i).(EventPatchMapOutput) 253 } 254 255 type EventPatchOutput struct{ *pulumi.OutputState } 256 257 func (EventPatchOutput) ElementType() reflect.Type { 258 return reflect.TypeOf((**EventPatch)(nil)).Elem() 259 } 260 261 func (o EventPatchOutput) ToEventPatchOutput() EventPatchOutput { 262 return o 263 } 264 265 func (o EventPatchOutput) ToEventPatchOutputWithContext(ctx context.Context) EventPatchOutput { 266 return o 267 } 268 269 // What action was taken/failed regarding to the regarding object. 270 func (o EventPatchOutput) Action() pulumi.StringPtrOutput { 271 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Action }).(pulumi.StringPtrOutput) 272 } 273 274 // 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 275 func (o EventPatchOutput) ApiVersion() pulumi.StringPtrOutput { 276 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 277 } 278 279 // Deprecated field assuring backward compatibility with core.v1 Event type 280 func (o EventPatchOutput) DeprecatedCount() pulumi.IntPtrOutput { 281 return o.ApplyT(func(v *EventPatch) pulumi.IntPtrOutput { return v.DeprecatedCount }).(pulumi.IntPtrOutput) 282 } 283 284 // Deprecated field assuring backward compatibility with core.v1 Event type 285 func (o EventPatchOutput) DeprecatedFirstTimestamp() pulumi.StringPtrOutput { 286 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.DeprecatedFirstTimestamp }).(pulumi.StringPtrOutput) 287 } 288 289 // Deprecated field assuring backward compatibility with core.v1 Event type 290 func (o EventPatchOutput) DeprecatedLastTimestamp() pulumi.StringPtrOutput { 291 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.DeprecatedLastTimestamp }).(pulumi.StringPtrOutput) 292 } 293 294 // Deprecated field assuring backward compatibility with core.v1 Event type 295 func (o EventPatchOutput) DeprecatedSource() corev1.EventSourcePatchPtrOutput { 296 return o.ApplyT(func(v *EventPatch) corev1.EventSourcePatchPtrOutput { return v.DeprecatedSource }).(corev1.EventSourcePatchPtrOutput) 297 } 298 299 // Required. Time when this Event was first observed. 300 func (o EventPatchOutput) EventTime() pulumi.StringPtrOutput { 301 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.EventTime }).(pulumi.StringPtrOutput) 302 } 303 304 // 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 305 func (o EventPatchOutput) Kind() pulumi.StringPtrOutput { 306 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 307 } 308 309 func (o EventPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 310 return o.ApplyT(func(v *EventPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 311 } 312 313 // Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. 314 func (o EventPatchOutput) Note() pulumi.StringPtrOutput { 315 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Note }).(pulumi.StringPtrOutput) 316 } 317 318 // Why the action was taken. 319 func (o EventPatchOutput) Reason() pulumi.StringPtrOutput { 320 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Reason }).(pulumi.StringPtrOutput) 321 } 322 323 // The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. 324 func (o EventPatchOutput) Regarding() corev1.ObjectReferencePatchPtrOutput { 325 return o.ApplyT(func(v *EventPatch) corev1.ObjectReferencePatchPtrOutput { return v.Regarding }).(corev1.ObjectReferencePatchPtrOutput) 326 } 327 328 // Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object. 329 func (o EventPatchOutput) Related() corev1.ObjectReferencePatchPtrOutput { 330 return o.ApplyT(func(v *EventPatch) corev1.ObjectReferencePatchPtrOutput { return v.Related }).(corev1.ObjectReferencePatchPtrOutput) 331 } 332 333 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 334 func (o EventPatchOutput) ReportingController() pulumi.StringPtrOutput { 335 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.ReportingController }).(pulumi.StringPtrOutput) 336 } 337 338 // ID of the controller instance, e.g. `kubelet-xyzf`. 339 func (o EventPatchOutput) ReportingInstance() pulumi.StringPtrOutput { 340 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.ReportingInstance }).(pulumi.StringPtrOutput) 341 } 342 343 // Data about the Event series this event represents or nil if it's a singleton Event. 344 func (o EventPatchOutput) Series() EventSeriesPatchPtrOutput { 345 return o.ApplyT(func(v *EventPatch) EventSeriesPatchPtrOutput { return v.Series }).(EventSeriesPatchPtrOutput) 346 } 347 348 // Type of this event (Normal, Warning), new types could be added in the future. 349 func (o EventPatchOutput) Type() pulumi.StringPtrOutput { 350 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) 351 } 352 353 type EventPatchArrayOutput struct{ *pulumi.OutputState } 354 355 func (EventPatchArrayOutput) ElementType() reflect.Type { 356 return reflect.TypeOf((*[]*EventPatch)(nil)).Elem() 357 } 358 359 func (o EventPatchArrayOutput) ToEventPatchArrayOutput() EventPatchArrayOutput { 360 return o 361 } 362 363 func (o EventPatchArrayOutput) ToEventPatchArrayOutputWithContext(ctx context.Context) EventPatchArrayOutput { 364 return o 365 } 366 367 func (o EventPatchArrayOutput) Index(i pulumi.IntInput) EventPatchOutput { 368 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventPatch { 369 return vs[0].([]*EventPatch)[vs[1].(int)] 370 }).(EventPatchOutput) 371 } 372 373 type EventPatchMapOutput struct{ *pulumi.OutputState } 374 375 func (EventPatchMapOutput) ElementType() reflect.Type { 376 return reflect.TypeOf((*map[string]*EventPatch)(nil)).Elem() 377 } 378 379 func (o EventPatchMapOutput) ToEventPatchMapOutput() EventPatchMapOutput { 380 return o 381 } 382 383 func (o EventPatchMapOutput) ToEventPatchMapOutputWithContext(ctx context.Context) EventPatchMapOutput { 384 return o 385 } 386 387 func (o EventPatchMapOutput) MapIndex(k pulumi.StringInput) EventPatchOutput { 388 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventPatch { 389 return vs[0].(map[string]*EventPatch)[vs[1].(string)] 390 }).(EventPatchOutput) 391 } 392 393 func init() { 394 pulumi.RegisterInputType(reflect.TypeOf((*EventPatchInput)(nil)).Elem(), &EventPatch{}) 395 pulumi.RegisterInputType(reflect.TypeOf((*EventPatchArrayInput)(nil)).Elem(), EventPatchArray{}) 396 pulumi.RegisterInputType(reflect.TypeOf((*EventPatchMapInput)(nil)).Elem(), EventPatchMap{}) 397 pulumi.RegisterOutputType(EventPatchOutput{}) 398 pulumi.RegisterOutputType(EventPatchArrayOutput{}) 399 pulumi.RegisterOutputType(EventPatchMapOutput{}) 400 }