@pulumi/kubernetes
Version:
[](https://github.com/pulumi/pulumi-kubernetes/actions) [](https://slack.pulumi.com) [;
exports.IngressClass = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../../utilities");
/**
* IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
*/
class IngressClass extends pulumi.CustomResource {
/**
* Get an existing IngressClass 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 IngressClass(name, undefined, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of IngressClass. 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'] === IngressClass.__pulumiType;
}
/**
* Create a IngressClass 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) {
resourceInputs["apiVersion"] = "networking.k8s.io/v1";
resourceInputs["kind"] = "IngressClass";
resourceInputs["metadata"] = args?.metadata;
resourceInputs["spec"] = args?.spec;
}
else {
resourceInputs["apiVersion"] = undefined /*out*/;
resourceInputs["kind"] = undefined /*out*/;
resourceInputs["metadata"] = undefined /*out*/;
resourceInputs["spec"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "kubernetes:networking.k8s.io/v1beta1:IngressClass" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(IngressClass.__pulumiType, name, resourceInputs, opts);
}
}
exports.IngressClass = IngressClass;
/** @internal */
IngressClass.__pulumiType = 'kubernetes:networking.k8s.io/v1:IngressClass';
//# sourceMappingURL=ingressClass.js.map