@pulumiverse/harbor
Version:
A Pulumi package for creating and managing Harbor resources.
92 lines • 4.53 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.PreheatInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ### Basic Usage
*
* ### Usage with Authentication
*
* ## Import
*
* The `harbor_preheat_instance` resource can be imported using the preheat instance ID.
*
* ```sh
* $ pulumi import harbor:index/preheatInstance:PreheatInstance example /p2p/preheat/instances/example-preheat-instance
* ```
*/
class PreheatInstance extends pulumi.CustomResource {
/**
* Get an existing PreheatInstance 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 PreheatInstance(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PreheatInstance. 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'] === PreheatInstance.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authMode"] = state ? state.authMode : undefined;
resourceInputs["default"] = state ? state.default : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["endpoint"] = state ? state.endpoint : undefined;
resourceInputs["insecure"] = state ? state.insecure : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["token"] = state ? state.token : undefined;
resourceInputs["username"] = state ? state.username : undefined;
resourceInputs["vendor"] = state ? state.vendor : undefined;
}
else {
const args = argsOrState;
if ((!args || args.endpoint === undefined) && !opts.urn) {
throw new Error("Missing required property 'endpoint'");
}
if ((!args || args.vendor === undefined) && !opts.urn) {
throw new Error("Missing required property 'vendor'");
}
resourceInputs["authMode"] = args ? args.authMode : undefined;
resourceInputs["default"] = args ? args.default : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["endpoint"] = args ? args.endpoint : undefined;
resourceInputs["insecure"] = args ? args.insecure : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
resourceInputs["token"] = (args === null || args === void 0 ? void 0 : args.token) ? pulumi.secret(args.token) : undefined;
resourceInputs["username"] = args ? args.username : undefined;
resourceInputs["vendor"] = args ? args.vendor : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password", "token"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(PreheatInstance.__pulumiType, name, resourceInputs, opts);
}
}
exports.PreheatInstance = PreheatInstance;
/** @internal */
PreheatInstance.__pulumiType = 'harbor:index/preheatInstance:PreheatInstance';
//# sourceMappingURL=preheatInstance.js.map