github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/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 v1 5 6 import ( 7 "context" 8 "reflect" 9 10 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Patch resources are used to modify existing Kubernetes resources by using 15 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 16 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 17 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 18 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 19 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 20 // Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. 21 type EventPatch struct { 22 pulumi.CustomResourceState 23 24 // What action was taken/failed regarding to the Regarding object. 25 Action pulumi.StringPtrOutput `pulumi:"action"` 26 // 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 27 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 28 // The number of times this event has occurred. 29 Count pulumi.IntPtrOutput `pulumi:"count"` 30 // Time when this Event was first observed. 31 EventTime pulumi.StringPtrOutput `pulumi:"eventTime"` 32 // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) 33 FirstTimestamp pulumi.StringPtrOutput `pulumi:"firstTimestamp"` 34 // The object that this event is about. 35 InvolvedObject ObjectReferencePatchPtrOutput `pulumi:"involvedObject"` 36 // 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 37 Kind pulumi.StringPtrOutput `pulumi:"kind"` 38 // The time at which the most recent occurrence of this event was recorded. 39 LastTimestamp pulumi.StringPtrOutput `pulumi:"lastTimestamp"` 40 // A human-readable description of the status of this operation. 41 Message pulumi.StringPtrOutput `pulumi:"message"` 42 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 43 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 44 // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. 45 Reason pulumi.StringPtrOutput `pulumi:"reason"` 46 // Optional secondary object for more complex actions. 47 Related ObjectReferencePatchPtrOutput `pulumi:"related"` 48 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 49 ReportingComponent pulumi.StringPtrOutput `pulumi:"reportingComponent"` 50 // ID of the controller instance, e.g. `kubelet-xyzf`. 51 ReportingInstance pulumi.StringPtrOutput `pulumi:"reportingInstance"` 52 // Data about the Event series this event represents or nil if it's a singleton Event. 53 Series EventSeriesPatchPtrOutput `pulumi:"series"` 54 // The component reporting this event. Should be a short machine understandable string. 55 Source EventSourcePatchPtrOutput `pulumi:"source"` 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("v1") 68 args.Kind = pulumi.StringPtr("Event") 69 aliases := pulumi.Aliases([]pulumi.Alias{ 70 { 71 Type: pulumi.String("kubernetes:events.k8s.io/v1:EventPatch"), 72 }, 73 { 74 Type: pulumi.String("kubernetes:events.k8s.io/v1beta1:EventPatch"), 75 }, 76 }) 77 opts = append(opts, aliases) 78 var resource EventPatch 79 err := ctx.RegisterResource("kubernetes:core/v1: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:core/v1: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 // The number of times this event has occurred. 115 Count *int `pulumi:"count"` 116 // Time when this Event was first observed. 117 EventTime *string `pulumi:"eventTime"` 118 // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) 119 FirstTimestamp *string `pulumi:"firstTimestamp"` 120 // The object that this event is about. 121 InvolvedObject *ObjectReferencePatch `pulumi:"involvedObject"` 122 // 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 123 Kind *string `pulumi:"kind"` 124 // The time at which the most recent occurrence of this event was recorded. 125 LastTimestamp *string `pulumi:"lastTimestamp"` 126 // A human-readable description of the status of this operation. 127 Message *string `pulumi:"message"` 128 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 129 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 130 // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. 131 Reason *string `pulumi:"reason"` 132 // Optional secondary object for more complex actions. 133 Related *ObjectReferencePatch `pulumi:"related"` 134 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 135 ReportingComponent *string `pulumi:"reportingComponent"` 136 // ID of the controller instance, e.g. `kubelet-xyzf`. 137 ReportingInstance *string `pulumi:"reportingInstance"` 138 // Data about the Event series this event represents or nil if it's a singleton Event. 139 Series *EventSeriesPatch `pulumi:"series"` 140 // The component reporting this event. Should be a short machine understandable string. 141 Source *EventSourcePatch `pulumi:"source"` 142 // Type of this event (Normal, Warning), new types could be added in the future 143 Type *string `pulumi:"type"` 144 } 145 146 // The set of arguments for constructing a EventPatch resource. 147 type EventPatchArgs struct { 148 // What action was taken/failed regarding to the Regarding object. 149 Action pulumi.StringPtrInput 150 // 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 151 ApiVersion pulumi.StringPtrInput 152 // The number of times this event has occurred. 153 Count pulumi.IntPtrInput 154 // Time when this Event was first observed. 155 EventTime pulumi.StringPtrInput 156 // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) 157 FirstTimestamp pulumi.StringPtrInput 158 // The object that this event is about. 159 InvolvedObject ObjectReferencePatchPtrInput 160 // 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 161 Kind pulumi.StringPtrInput 162 // The time at which the most recent occurrence of this event was recorded. 163 LastTimestamp pulumi.StringPtrInput 164 // A human-readable description of the status of this operation. 165 Message pulumi.StringPtrInput 166 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 167 Metadata metav1.ObjectMetaPatchPtrInput 168 // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. 169 Reason pulumi.StringPtrInput 170 // Optional secondary object for more complex actions. 171 Related ObjectReferencePatchPtrInput 172 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 173 ReportingComponent 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 // The component reporting this event. Should be a short machine understandable string. 179 Source EventSourcePatchPtrInput 180 // Type of this event (Normal, Warning), new types could be added in the future 181 Type pulumi.StringPtrInput 182 } 183 184 func (EventPatchArgs) ElementType() reflect.Type { 185 return reflect.TypeOf((*eventPatchArgs)(nil)).Elem() 186 } 187 188 type EventPatchInput interface { 189 pulumi.Input 190 191 ToEventPatchOutput() EventPatchOutput 192 ToEventPatchOutputWithContext(ctx context.Context) EventPatchOutput 193 } 194 195 func (*EventPatch) ElementType() reflect.Type { 196 return reflect.TypeOf((**EventPatch)(nil)).Elem() 197 } 198 199 func (i *EventPatch) ToEventPatchOutput() EventPatchOutput { 200 return i.ToEventPatchOutputWithContext(context.Background()) 201 } 202 203 func (i *EventPatch) ToEventPatchOutputWithContext(ctx context.Context) EventPatchOutput { 204 return pulumi.ToOutputWithContext(ctx, i).(EventPatchOutput) 205 } 206 207 // EventPatchArrayInput is an input type that accepts EventPatchArray and EventPatchArrayOutput values. 208 // You can construct a concrete instance of `EventPatchArrayInput` via: 209 // 210 // EventPatchArray{ EventPatchArgs{...} } 211 type EventPatchArrayInput interface { 212 pulumi.Input 213 214 ToEventPatchArrayOutput() EventPatchArrayOutput 215 ToEventPatchArrayOutputWithContext(context.Context) EventPatchArrayOutput 216 } 217 218 type EventPatchArray []EventPatchInput 219 220 func (EventPatchArray) ElementType() reflect.Type { 221 return reflect.TypeOf((*[]*EventPatch)(nil)).Elem() 222 } 223 224 func (i EventPatchArray) ToEventPatchArrayOutput() EventPatchArrayOutput { 225 return i.ToEventPatchArrayOutputWithContext(context.Background()) 226 } 227 228 func (i EventPatchArray) ToEventPatchArrayOutputWithContext(ctx context.Context) EventPatchArrayOutput { 229 return pulumi.ToOutputWithContext(ctx, i).(EventPatchArrayOutput) 230 } 231 232 // EventPatchMapInput is an input type that accepts EventPatchMap and EventPatchMapOutput values. 233 // You can construct a concrete instance of `EventPatchMapInput` via: 234 // 235 // EventPatchMap{ "key": EventPatchArgs{...} } 236 type EventPatchMapInput interface { 237 pulumi.Input 238 239 ToEventPatchMapOutput() EventPatchMapOutput 240 ToEventPatchMapOutputWithContext(context.Context) EventPatchMapOutput 241 } 242 243 type EventPatchMap map[string]EventPatchInput 244 245 func (EventPatchMap) ElementType() reflect.Type { 246 return reflect.TypeOf((*map[string]*EventPatch)(nil)).Elem() 247 } 248 249 func (i EventPatchMap) ToEventPatchMapOutput() EventPatchMapOutput { 250 return i.ToEventPatchMapOutputWithContext(context.Background()) 251 } 252 253 func (i EventPatchMap) ToEventPatchMapOutputWithContext(ctx context.Context) EventPatchMapOutput { 254 return pulumi.ToOutputWithContext(ctx, i).(EventPatchMapOutput) 255 } 256 257 type EventPatchOutput struct{ *pulumi.OutputState } 258 259 func (EventPatchOutput) ElementType() reflect.Type { 260 return reflect.TypeOf((**EventPatch)(nil)).Elem() 261 } 262 263 func (o EventPatchOutput) ToEventPatchOutput() EventPatchOutput { 264 return o 265 } 266 267 func (o EventPatchOutput) ToEventPatchOutputWithContext(ctx context.Context) EventPatchOutput { 268 return o 269 } 270 271 // What action was taken/failed regarding to the Regarding object. 272 func (o EventPatchOutput) Action() pulumi.StringPtrOutput { 273 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Action }).(pulumi.StringPtrOutput) 274 } 275 276 // 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 277 func (o EventPatchOutput) ApiVersion() pulumi.StringPtrOutput { 278 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 279 } 280 281 // The number of times this event has occurred. 282 func (o EventPatchOutput) Count() pulumi.IntPtrOutput { 283 return o.ApplyT(func(v *EventPatch) pulumi.IntPtrOutput { return v.Count }).(pulumi.IntPtrOutput) 284 } 285 286 // Time when this Event was first observed. 287 func (o EventPatchOutput) EventTime() pulumi.StringPtrOutput { 288 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.EventTime }).(pulumi.StringPtrOutput) 289 } 290 291 // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) 292 func (o EventPatchOutput) FirstTimestamp() pulumi.StringPtrOutput { 293 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.FirstTimestamp }).(pulumi.StringPtrOutput) 294 } 295 296 // The object that this event is about. 297 func (o EventPatchOutput) InvolvedObject() ObjectReferencePatchPtrOutput { 298 return o.ApplyT(func(v *EventPatch) ObjectReferencePatchPtrOutput { return v.InvolvedObject }).(ObjectReferencePatchPtrOutput) 299 } 300 301 // 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 302 func (o EventPatchOutput) Kind() pulumi.StringPtrOutput { 303 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 304 } 305 306 // The time at which the most recent occurrence of this event was recorded. 307 func (o EventPatchOutput) LastTimestamp() pulumi.StringPtrOutput { 308 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.LastTimestamp }).(pulumi.StringPtrOutput) 309 } 310 311 // A human-readable description of the status of this operation. 312 func (o EventPatchOutput) Message() pulumi.StringPtrOutput { 313 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Message }).(pulumi.StringPtrOutput) 314 } 315 316 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 317 func (o EventPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 318 return o.ApplyT(func(v *EventPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 319 } 320 321 // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. 322 func (o EventPatchOutput) Reason() pulumi.StringPtrOutput { 323 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Reason }).(pulumi.StringPtrOutput) 324 } 325 326 // Optional secondary object for more complex actions. 327 func (o EventPatchOutput) Related() ObjectReferencePatchPtrOutput { 328 return o.ApplyT(func(v *EventPatch) ObjectReferencePatchPtrOutput { return v.Related }).(ObjectReferencePatchPtrOutput) 329 } 330 331 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. 332 func (o EventPatchOutput) ReportingComponent() pulumi.StringPtrOutput { 333 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.ReportingComponent }).(pulumi.StringPtrOutput) 334 } 335 336 // ID of the controller instance, e.g. `kubelet-xyzf`. 337 func (o EventPatchOutput) ReportingInstance() pulumi.StringPtrOutput { 338 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.ReportingInstance }).(pulumi.StringPtrOutput) 339 } 340 341 // Data about the Event series this event represents or nil if it's a singleton Event. 342 func (o EventPatchOutput) Series() EventSeriesPatchPtrOutput { 343 return o.ApplyT(func(v *EventPatch) EventSeriesPatchPtrOutput { return v.Series }).(EventSeriesPatchPtrOutput) 344 } 345 346 // The component reporting this event. Should be a short machine understandable string. 347 func (o EventPatchOutput) Source() EventSourcePatchPtrOutput { 348 return o.ApplyT(func(v *EventPatch) EventSourcePatchPtrOutput { return v.Source }).(EventSourcePatchPtrOutput) 349 } 350 351 // Type of this event (Normal, Warning), new types could be added in the future 352 func (o EventPatchOutput) Type() pulumi.StringPtrOutput { 353 return o.ApplyT(func(v *EventPatch) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) 354 } 355 356 type EventPatchArrayOutput struct{ *pulumi.OutputState } 357 358 func (EventPatchArrayOutput) ElementType() reflect.Type { 359 return reflect.TypeOf((*[]*EventPatch)(nil)).Elem() 360 } 361 362 func (o EventPatchArrayOutput) ToEventPatchArrayOutput() EventPatchArrayOutput { 363 return o 364 } 365 366 func (o EventPatchArrayOutput) ToEventPatchArrayOutputWithContext(ctx context.Context) EventPatchArrayOutput { 367 return o 368 } 369 370 func (o EventPatchArrayOutput) Index(i pulumi.IntInput) EventPatchOutput { 371 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventPatch { 372 return vs[0].([]*EventPatch)[vs[1].(int)] 373 }).(EventPatchOutput) 374 } 375 376 type EventPatchMapOutput struct{ *pulumi.OutputState } 377 378 func (EventPatchMapOutput) ElementType() reflect.Type { 379 return reflect.TypeOf((*map[string]*EventPatch)(nil)).Elem() 380 } 381 382 func (o EventPatchMapOutput) ToEventPatchMapOutput() EventPatchMapOutput { 383 return o 384 } 385 386 func (o EventPatchMapOutput) ToEventPatchMapOutputWithContext(ctx context.Context) EventPatchMapOutput { 387 return o 388 } 389 390 func (o EventPatchMapOutput) MapIndex(k pulumi.StringInput) EventPatchOutput { 391 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventPatch { 392 return vs[0].(map[string]*EventPatch)[vs[1].(string)] 393 }).(EventPatchOutput) 394 } 395 396 func init() { 397 pulumi.RegisterInputType(reflect.TypeOf((*EventPatchInput)(nil)).Elem(), &EventPatch{}) 398 pulumi.RegisterInputType(reflect.TypeOf((*EventPatchArrayInput)(nil)).Elem(), EventPatchArray{}) 399 pulumi.RegisterInputType(reflect.TypeOf((*EventPatchMapInput)(nil)).Elem(), EventPatchMap{}) 400 pulumi.RegisterOutputType(EventPatchOutput{}) 401 pulumi.RegisterOutputType(EventPatchArrayOutput{}) 402 pulumi.RegisterOutputType(EventPatchMapOutput{}) 403 }