UNPKG

@pulumi/kubernetes

Version:

[![Actions Status](https://github.com/pulumi/pulumi-kubernetes/workflows/main/badge.svg)](https://github.com/pulumi/pulumi-kubernetes/actions) [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https:/

69 lines 3.76 kB
"use strict"; // *** WARNING: this file was generated by pulumigen. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ControllerRevision = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../../utilities"); /** * ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. */ class ControllerRevision extends pulumi.CustomResource { /** * Get an existing ControllerRevision 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new ControllerRevision(name, undefined, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ControllerRevision. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ControllerRevision.__pulumiType; } /** * Create a ControllerRevision resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if (args?.revision === undefined && !opts.urn) { throw new Error("Missing required property 'revision'"); } resourceInputs["apiVersion"] = "apps/v1"; resourceInputs["data"] = args?.data; resourceInputs["kind"] = "ControllerRevision"; resourceInputs["metadata"] = args?.metadata; resourceInputs["revision"] = args?.revision; } else { resourceInputs["apiVersion"] = undefined /*out*/; resourceInputs["data"] = undefined /*out*/; resourceInputs["kind"] = undefined /*out*/; resourceInputs["metadata"] = undefined /*out*/; resourceInputs["revision"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "kubernetes:apps/v1beta1:ControllerRevision" }, { type: "kubernetes:apps/v1beta2:ControllerRevision" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(ControllerRevision.__pulumiType, name, resourceInputs, opts); } } exports.ControllerRevision = ControllerRevision; /** @internal */ ControllerRevision.__pulumiType = 'kubernetes:apps/v1:ControllerRevision'; //# sourceMappingURL=controllerRevision.js.map