@port-labs/port
Version:
A Pulumi package for creating and managing Port resources.
83 lines • 4.35 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.Page = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class Page extends pulumi.CustomResource {
/**
* Get an existing Page 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 Page(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Page. 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'] === Page.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["after"] = state ? state.after : undefined;
resourceInputs["blueprint"] = state ? state.blueprint : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["createdBy"] = state ? state.createdBy : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["icon"] = state ? state.icon : undefined;
resourceInputs["identifier"] = state ? state.identifier : undefined;
resourceInputs["locked"] = state ? state.locked : undefined;
resourceInputs["pageFilters"] = state ? state.pageFilters : undefined;
resourceInputs["parent"] = state ? state.parent : undefined;
resourceInputs["title"] = state ? state.title : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
resourceInputs["updatedBy"] = state ? state.updatedBy : undefined;
resourceInputs["widgets"] = state ? state.widgets : undefined;
}
else {
const args = argsOrState;
if ((!args || args.identifier === undefined) && !opts.urn) {
throw new Error("Missing required property 'identifier'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["after"] = args ? args.after : undefined;
resourceInputs["blueprint"] = args ? args.blueprint : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["icon"] = args ? args.icon : undefined;
resourceInputs["identifier"] = args ? args.identifier : undefined;
resourceInputs["locked"] = args ? args.locked : undefined;
resourceInputs["pageFilters"] = args ? args.pageFilters : undefined;
resourceInputs["parent"] = args ? args.parent : undefined;
resourceInputs["title"] = args ? args.title : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["widgets"] = args ? args.widgets : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["createdBy"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
resourceInputs["updatedBy"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Page.__pulumiType, name, resourceInputs, opts);
}
}
exports.Page = Page;
/** @internal */
Page.__pulumiType = 'port:index/page:Page';
//# sourceMappingURL=page.js.map