@pulumiverse/cpln
Version:
A Pulumi package for creating and managing Control Plane (cpln) resources.
95 lines • 5.43 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.Workload = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class Workload extends pulumi.CustomResource {
/**
* Get an existing Workload 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 Workload(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Workload. 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'] === Workload.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["containers"] = state ? state.containers : undefined;
resourceInputs["cplnId"] = state ? state.cplnId : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["extras"] = state ? state.extras : undefined;
resourceInputs["firewallSpec"] = state ? state.firewallSpec : undefined;
resourceInputs["gvc"] = state ? state.gvc : undefined;
resourceInputs["identityLink"] = state ? state.identityLink : undefined;
resourceInputs["jobs"] = state ? state.jobs : undefined;
resourceInputs["loadBalancer"] = state ? state.loadBalancer : undefined;
resourceInputs["localOptions"] = state ? state.localOptions : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["options"] = state ? state.options : undefined;
resourceInputs["requestRetryPolicy"] = state ? state.requestRetryPolicy : undefined;
resourceInputs["rolloutOptions"] = state ? state.rolloutOptions : undefined;
resourceInputs["securityOptions"] = state ? state.securityOptions : undefined;
resourceInputs["selfLink"] = state ? state.selfLink : undefined;
resourceInputs["sidecar"] = state ? state.sidecar : undefined;
resourceInputs["statuses"] = state ? state.statuses : undefined;
resourceInputs["supportDynamicTags"] = state ? state.supportDynamicTags : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
if ((!args || args.gvc === undefined) && !opts.urn) {
throw new Error("Missing required property 'gvc'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["containers"] = args ? args.containers : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["extras"] = args ? args.extras : undefined;
resourceInputs["firewallSpec"] = args ? args.firewallSpec : undefined;
resourceInputs["gvc"] = args ? args.gvc : undefined;
resourceInputs["identityLink"] = args ? args.identityLink : undefined;
resourceInputs["jobs"] = args ? args.jobs : undefined;
resourceInputs["loadBalancer"] = args ? args.loadBalancer : undefined;
resourceInputs["localOptions"] = args ? args.localOptions : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["options"] = args ? args.options : undefined;
resourceInputs["requestRetryPolicy"] = args ? args.requestRetryPolicy : undefined;
resourceInputs["rolloutOptions"] = args ? args.rolloutOptions : undefined;
resourceInputs["securityOptions"] = args ? args.securityOptions : undefined;
resourceInputs["sidecar"] = args ? args.sidecar : undefined;
resourceInputs["supportDynamicTags"] = args ? args.supportDynamicTags : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["cplnId"] = undefined /*out*/;
resourceInputs["selfLink"] = undefined /*out*/;
resourceInputs["statuses"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Workload.__pulumiType, name, resourceInputs, opts);
}
}
exports.Workload = Workload;
/** @internal */
Workload.__pulumiType = 'cpln:index/workload:Workload';
//# sourceMappingURL=workload.js.map