@pulumi/kubernetes
Version:
[](https://travis-ci.com/pulumi/pulumi-kubernetes) [](https://slack.pulumi.com) [![NPM
71 lines • 3.51 kB
JavaScript
;
// *** 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.ResourceClaim = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../../utilities");
/**
* ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.
*
* This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
*/
class ResourceClaim extends pulumi.CustomResource {
/**
* Get an existing ResourceClaim 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 ResourceClaim(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ResourceClaim. 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'] === ResourceClaim.__pulumiType;
}
/**
* Create a ResourceClaim 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 || args.spec === undefined) && !opts.urn) {
throw new Error("Missing required property 'spec'");
}
resourceInputs["apiVersion"] = "resource.k8s.io/v1alpha2";
resourceInputs["kind"] = "ResourceClaim";
resourceInputs["metadata"] = args ? args.metadata : undefined;
resourceInputs["spec"] = args ? args.spec : undefined;
resourceInputs["status"] = undefined /*out*/;
}
else {
resourceInputs["apiVersion"] = undefined /*out*/;
resourceInputs["kind"] = undefined /*out*/;
resourceInputs["metadata"] = undefined /*out*/;
resourceInputs["spec"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "kubernetes:resource.k8s.io/v1alpha1:ResourceClaim" }, { type: "kubernetes:resource.k8s.io/v1alpha3:ResourceClaim" }, { type: "kubernetes:resource.k8s.io/v1beta1:ResourceClaim" }, { type: "kubernetes:resource.k8s.io/v1beta2:ResourceClaim" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(ResourceClaim.__pulumiType, name, resourceInputs, opts);
}
}
exports.ResourceClaim = ResourceClaim;
/** @internal */
ResourceClaim.__pulumiType = 'kubernetes:resource.k8s.io/v1alpha2:ResourceClaim';
//# sourceMappingURL=resourceClaim.js.map