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:/

63 lines 2.73 kB
"use strict"; // Copyright 2016-2022, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomResourcePatch = void 0; // *** WARNING: this file was generated by pulumigen. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * CustomResourcePatch represents an instance of a CustomResourceDefinition (CRD). For example, the * CoreOS Prometheus operator exposes a CRD `monitoring.coreos.com/ServiceMonitor`; to * instantiate this as a Pulumi resource, one could call `new CustomResourcePatch`, passing the * `ServiceMonitor` resource definition as an argument. */ class CustomResourcePatch extends pulumi.CustomResource { getInputs() { return this.__inputs; } /** * Create a CustomResourcePatch 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 inputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.apiVersion === undefined) && !opts.urn) { throw new Error("Missing required property 'apiVersion'"); } if ((!args || args.kind === undefined) && !opts.urn) { throw new Error("Missing required property 'kind'"); } for (const key of Object.keys(args)) { inputs[key] = args[key]; } } else { for (const key of Object.keys(args)) { inputs[key] = undefined; } } if (!opts.version) { opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() }); } super(`kubernetes:${args.apiVersion}:${args.kind}Patch`, name, inputs, opts); this.__inputs = args; } } exports.CustomResourcePatch = CustomResourcePatch; //# sourceMappingURL=customResourcePatch.js.map