@pulumiverse/harbor
Version:
A Pulumi package for creating and managing Harbor resources.
80 lines • 4.06 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectWebhook = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*/
class ProjectWebhook extends pulumi.CustomResource {
/**
* Get an existing ProjectWebhook 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 state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new ProjectWebhook(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ProjectWebhook. 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'] === ProjectWebhook.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["address"] = state ? state.address : undefined;
resourceInputs["authHeader"] = state ? state.authHeader : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["eventsTypes"] = state ? state.eventsTypes : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["notifyType"] = state ? state.notifyType : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["skipCertVerify"] = state ? state.skipCertVerify : undefined;
}
else {
const args = argsOrState;
if ((!args || args.address === undefined) && !opts.urn) {
throw new Error("Missing required property 'address'");
}
if ((!args || args.eventsTypes === undefined) && !opts.urn) {
throw new Error("Missing required property 'eventsTypes'");
}
if ((!args || args.notifyType === undefined) && !opts.urn) {
throw new Error("Missing required property 'notifyType'");
}
if ((!args || args.projectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["address"] = args ? args.address : undefined;
resourceInputs["authHeader"] = args ? args.authHeader : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["eventsTypes"] = args ? args.eventsTypes : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["notifyType"] = args ? args.notifyType : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["skipCertVerify"] = args ? args.skipCertVerify : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ProjectWebhook.__pulumiType, name, resourceInputs, opts);
}
}
exports.ProjectWebhook = ProjectWebhook;
/** @internal */
ProjectWebhook.__pulumiType = 'harbor:index/projectWebhook:ProjectWebhook';
//# sourceMappingURL=projectWebhook.js.map