@pulumi/ns1
Version:
A Pulumi package for creating and managing ns1 cloud resources.
75 lines • 3.81 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.PulsarJob = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class PulsarJob extends pulumi.CustomResource {
/**
* Get an existing PulsarJob 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 PulsarJob(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PulsarJob. 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'] === PulsarJob.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["active"] = state ? state.active : undefined;
resourceInputs["appId"] = state ? state.appId : undefined;
resourceInputs["blendMetricWeights"] = state ? state.blendMetricWeights : undefined;
resourceInputs["community"] = state ? state.community : undefined;
resourceInputs["config"] = state ? state.config : undefined;
resourceInputs["customer"] = state ? state.customer : undefined;
resourceInputs["jobId"] = state ? state.jobId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["shared"] = state ? state.shared : undefined;
resourceInputs["typeId"] = state ? state.typeId : undefined;
resourceInputs["weights"] = state ? state.weights : undefined;
}
else {
const args = argsOrState;
if ((!args || args.appId === undefined) && !opts.urn) {
throw new Error("Missing required property 'appId'");
}
if ((!args || args.typeId === undefined) && !opts.urn) {
throw new Error("Missing required property 'typeId'");
}
resourceInputs["active"] = args ? args.active : undefined;
resourceInputs["appId"] = args ? args.appId : undefined;
resourceInputs["blendMetricWeights"] = args ? args.blendMetricWeights : undefined;
resourceInputs["config"] = args ? args.config : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["shared"] = args ? args.shared : undefined;
resourceInputs["typeId"] = args ? args.typeId : undefined;
resourceInputs["weights"] = args ? args.weights : undefined;
resourceInputs["community"] = undefined /*out*/;
resourceInputs["customer"] = undefined /*out*/;
resourceInputs["jobId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PulsarJob.__pulumiType, name, resourceInputs, opts);
}
}
exports.PulsarJob = PulsarJob;
/** @internal */
PulsarJob.__pulumiType = 'ns1:index/pulsarJob:PulsarJob';
//# sourceMappingURL=pulsarJob.js.map