All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.events.v1beta1.EventPatch Maven / Gradle / Ivy

There is a newer version: 4.19.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes.events.v1beta1;

import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.kubernetes.Utilities;
import com.pulumi.kubernetes.core.v1.outputs.EventSourcePatch;
import com.pulumi.kubernetes.core.v1.outputs.ObjectReferencePatch;
import com.pulumi.kubernetes.events.v1beta1.EventPatchArgs;
import com.pulumi.kubernetes.events.v1beta1.outputs.EventSeriesPatch;
import com.pulumi.kubernetes.meta.v1.outputs.ObjectMetaPatch;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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/how-to-guides/managing-resources-with-server-side-apply/) for
 * additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi.
 * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
 * 
 */
@ResourceType(type="kubernetes:events.k8s.io/v1beta1:EventPatch")
public class EventPatch extends com.pulumi.resources.CustomResource {
    /**
     * What action was taken/failed regarding to the regarding object.
     * 
     */
    @Export(name="action", refs={String.class}, tree="[0]")
    private Output action;

    /**
     * @return What action was taken/failed regarding to the regarding object.
     * 
     */
    public Output> action() {
        return Codegen.optional(this.action);
    }
    /**
     * 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
     * 
     */
    @Export(name="apiVersion", refs={String.class}, tree="[0]")
    private Output apiVersion;

    /**
     * @return 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
     * 
     */
    public Output> apiVersion() {
        return Codegen.optional(this.apiVersion);
    }
    /**
     * Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    @Export(name="deprecatedCount", refs={Integer.class}, tree="[0]")
    private Output deprecatedCount;

    /**
     * @return Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    public Output> deprecatedCount() {
        return Codegen.optional(this.deprecatedCount);
    }
    /**
     * Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    @Export(name="deprecatedFirstTimestamp", refs={String.class}, tree="[0]")
    private Output deprecatedFirstTimestamp;

    /**
     * @return Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    public Output> deprecatedFirstTimestamp() {
        return Codegen.optional(this.deprecatedFirstTimestamp);
    }
    /**
     * Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    @Export(name="deprecatedLastTimestamp", refs={String.class}, tree="[0]")
    private Output deprecatedLastTimestamp;

    /**
     * @return Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    public Output> deprecatedLastTimestamp() {
        return Codegen.optional(this.deprecatedLastTimestamp);
    }
    /**
     * Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    @Export(name="deprecatedSource", refs={EventSourcePatch.class}, tree="[0]")
    private Output deprecatedSource;

    /**
     * @return Deprecated field assuring backward compatibility with core.v1 Event type
     * 
     */
    public Output> deprecatedSource() {
        return Codegen.optional(this.deprecatedSource);
    }
    /**
     * Required. Time when this Event was first observed.
     * 
     */
    @Export(name="eventTime", refs={String.class}, tree="[0]")
    private Output eventTime;

    /**
     * @return Required. Time when this Event was first observed.
     * 
     */
    public Output> eventTime() {
        return Codegen.optional(this.eventTime);
    }
    /**
     * 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
     * 
     */
    @Export(name="kind", refs={String.class}, tree="[0]")
    private Output kind;

    /**
     * @return 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
     * 
     */
    public Output> kind() {
        return Codegen.optional(this.kind);
    }
    @Export(name="metadata", refs={ObjectMetaPatch.class}, tree="[0]")
    private Output metadata;

    public Output> metadata() {
        return Codegen.optional(this.metadata);
    }
    /**
     * 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.
     * 
     */
    @Export(name="note", refs={String.class}, tree="[0]")
    private Output note;

    /**
     * @return 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.
     * 
     */
    public Output> note() {
        return Codegen.optional(this.note);
    }
    /**
     * Why the action was taken.
     * 
     */
    @Export(name="reason", refs={String.class}, tree="[0]")
    private Output reason;

    /**
     * @return Why the action was taken.
     * 
     */
    public Output> reason() {
        return Codegen.optional(this.reason);
    }
    /**
     * 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.
     * 
     */
    @Export(name="regarding", refs={ObjectReferencePatch.class}, tree="[0]")
    private Output regarding;

    /**
     * @return 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.
     * 
     */
    public Output> regarding() {
        return Codegen.optional(this.regarding);
    }
    /**
     * Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
     * 
     */
    @Export(name="related", refs={ObjectReferencePatch.class}, tree="[0]")
    private Output related;

    /**
     * @return Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
     * 
     */
    public Output> related() {
        return Codegen.optional(this.related);
    }
    /**
     * Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
     * 
     */
    @Export(name="reportingController", refs={String.class}, tree="[0]")
    private Output reportingController;

    /**
     * @return Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
     * 
     */
    public Output> reportingController() {
        return Codegen.optional(this.reportingController);
    }
    /**
     * ID of the controller instance, e.g. `kubelet-xyzf`.
     * 
     */
    @Export(name="reportingInstance", refs={String.class}, tree="[0]")
    private Output reportingInstance;

    /**
     * @return ID of the controller instance, e.g. `kubelet-xyzf`.
     * 
     */
    public Output> reportingInstance() {
        return Codegen.optional(this.reportingInstance);
    }
    /**
     * Data about the Event series this event represents or nil if it's a singleton Event.
     * 
     */
    @Export(name="series", refs={EventSeriesPatch.class}, tree="[0]")
    private Output series;

    /**
     * @return Data about the Event series this event represents or nil if it's a singleton Event.
     * 
     */
    public Output> series() {
        return Codegen.optional(this.series);
    }
    /**
     * Type of this event (Normal, Warning), new types could be added in the future.
     * 
     */
    @Export(name="type", refs={String.class}, tree="[0]")
    private Output type;

    /**
     * @return Type of this event (Normal, Warning), new types could be added in the future.
     * 
     */
    public Output> type() {
        return Codegen.optional(this.type);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public EventPatch(String name) {
        this(name, EventPatchArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public EventPatch(String name, @Nullable EventPatchArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public EventPatch(String name, @Nullable EventPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("kubernetes:events.k8s.io/v1beta1:EventPatch", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
    }

    private EventPatch(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("kubernetes:events.k8s.io/v1beta1:EventPatch", name, null, makeResourceOptions(options, id));
    }

    private static EventPatchArgs makeArgs(@Nullable EventPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        var builder = args == null ? EventPatchArgs.builder() : EventPatchArgs.builder(args);
        return builder
            .apiVersion("events.k8s.io/v1beta1")
            .kind("Event")
            .build();
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .aliases(List.of(
                Output.of(Alias.builder().type("kubernetes:core/v1:EventPatch").build()),
                Output.of(Alias.builder().type("kubernetes:events.k8s.io/v1:EventPatch").build())
            ))
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static EventPatch get(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new EventPatch(name, id, options);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy