@pulumi/harness
Version:
A Pulumi package for creating and managing Harness resources.
110 lines • 4.81 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.ImageRegistry = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing a Harness Chaos Image Registry
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@pulumi/harness";
*
* const example = new harness.chaos.ImageRegistry("example", {
* orgId: "<org_id>",
* projectId: "<project_id>",
* registryServer: "<registry_server>",
* registryAccount: "<registry_account>",
* isPrivate: true,
* secretName: "<secret_name>",
* isDefault: false,
* isOverrideAllowed: true,
* useCustomImages: true,
* customImages: [{
* logWatcher: "<log_watcher_image>",
* ddcr: "<ddcr_image>",
* ddcrLib: "<ddcr_lib_image>",
* ddcrFault: "<ddcr_fault_image>",
* }],
* });
* ```
*/
class ImageRegistry extends pulumi.CustomResource {
/**
* Get an existing ImageRegistry 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 ImageRegistry(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ImageRegistry. 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'] === ImageRegistry.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["customImages"] = state?.customImages;
resourceInputs["infraId"] = state?.infraId;
resourceInputs["isDefault"] = state?.isDefault;
resourceInputs["isOverrideAllowed"] = state?.isOverrideAllowed;
resourceInputs["isPrivate"] = state?.isPrivate;
resourceInputs["orgId"] = state?.orgId;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["registryAccount"] = state?.registryAccount;
resourceInputs["registryServer"] = state?.registryServer;
resourceInputs["secretName"] = state?.secretName;
resourceInputs["updatedAt"] = state?.updatedAt;
resourceInputs["useCustomImages"] = state?.useCustomImages;
}
else {
const args = argsOrState;
if (args?.isPrivate === undefined && !opts.urn) {
throw new Error("Missing required property 'isPrivate'");
}
if (args?.registryAccount === undefined && !opts.urn) {
throw new Error("Missing required property 'registryAccount'");
}
if (args?.registryServer === undefined && !opts.urn) {
throw new Error("Missing required property 'registryServer'");
}
resourceInputs["customImages"] = args?.customImages;
resourceInputs["infraId"] = args?.infraId;
resourceInputs["isDefault"] = args?.isDefault;
resourceInputs["isOverrideAllowed"] = args?.isOverrideAllowed;
resourceInputs["isPrivate"] = args?.isPrivate;
resourceInputs["orgId"] = args?.orgId;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["registryAccount"] = args?.registryAccount;
resourceInputs["registryServer"] = args?.registryServer;
resourceInputs["secretName"] = args?.secretName;
resourceInputs["useCustomImages"] = args?.useCustomImages;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ImageRegistry.__pulumiType, name, resourceInputs, opts);
}
}
exports.ImageRegistry = ImageRegistry;
/** @internal */
ImageRegistry.__pulumiType = 'harness:chaos/imageRegistry:ImageRegistry';
//# sourceMappingURL=imageRegistry.js.map