@pulumiverse/harbor
Version:
A Pulumi package for creating and managing Harbor resources.
92 lines • 4.79 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.Replication = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ## Import
*
* ```sh
* $ pulumi import harbor:index/replication:Replication main /replication/policies/1
* ```
*/
class Replication extends pulumi.CustomResource {
/**
* Get an existing Replication 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 Replication(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Replication. 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'] === Replication.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["action"] = state ? state.action : undefined;
resourceInputs["copyByChunk"] = state ? state.copyByChunk : undefined;
resourceInputs["deletion"] = state ? state.deletion : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["destNamespace"] = state ? state.destNamespace : undefined;
resourceInputs["destNamespaceReplace"] = state ? state.destNamespaceReplace : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["executeOnChanged"] = state ? state.executeOnChanged : undefined;
resourceInputs["filters"] = state ? state.filters : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["override"] = state ? state.override : undefined;
resourceInputs["registryId"] = state ? state.registryId : undefined;
resourceInputs["replicationPolicyId"] = state ? state.replicationPolicyId : undefined;
resourceInputs["schedule"] = state ? state.schedule : undefined;
resourceInputs["speed"] = state ? state.speed : undefined;
}
else {
const args = argsOrState;
if ((!args || args.action === undefined) && !opts.urn) {
throw new Error("Missing required property 'action'");
}
if ((!args || args.registryId === undefined) && !opts.urn) {
throw new Error("Missing required property 'registryId'");
}
resourceInputs["action"] = args ? args.action : undefined;
resourceInputs["copyByChunk"] = args ? args.copyByChunk : undefined;
resourceInputs["deletion"] = args ? args.deletion : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["destNamespace"] = args ? args.destNamespace : undefined;
resourceInputs["destNamespaceReplace"] = args ? args.destNamespaceReplace : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["executeOnChanged"] = args ? args.executeOnChanged : undefined;
resourceInputs["filters"] = args ? args.filters : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["override"] = args ? args.override : undefined;
resourceInputs["registryId"] = args ? args.registryId : undefined;
resourceInputs["schedule"] = args ? args.schedule : undefined;
resourceInputs["speed"] = args ? args.speed : undefined;
resourceInputs["replicationPolicyId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Replication.__pulumiType, name, resourceInputs, opts);
}
}
exports.Replication = Replication;
/** @internal */
Replication.__pulumiType = 'harbor:index/replication:Replication';
//# sourceMappingURL=replication.js.map