UNPKG

@port-labs/port

Version:

A Pulumi package for creating and managing Port resources.

104 lines 4.82 kB
"use strict"; // *** 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.Integration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * **NOTE:** This resource manages existing integration and integration mappings, not for creating new integrations. * * Docs about integrations can be found [here](https://docs.getport.io/integrations-index/). * * Docs about how to import existing integrations and manage their mappings can be found [here](https://docs.getport.io/guides/all/import-and-manage-integration). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as port from "@pulumi/port"; * * const myCustomIntegration = new port.index.Port_integration("myCustomIntegration", { * installationId: "my-custom-integration-id", * title: "My Custom Integration", * config: JSON.stringify({ * createMissingRelatedEntitiesboolean: true, * deleteDependentEntities: true, * resources: [{ * kind: "my-custom-kind", * selector: { * query: ".title", * }, * port: { * entity: { * mappings: [{ * identifier: "'my-identifier'", * title: ".title", * blueprint: "'my-blueprint'", * properties: { * my_property: 123, * }, * relations: {}, * }], * }, * }, * }], * }), * }); * ``` */ class Integration extends pulumi.CustomResource { /** * Get an existing Integration 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 Integration(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Integration. 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'] === Integration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["config"] = state ? state.config : undefined; resourceInputs["installationAppType"] = state ? state.installationAppType : undefined; resourceInputs["installationId"] = state ? state.installationId : undefined; resourceInputs["kafkaChangelogDestination"] = state ? state.kafkaChangelogDestination : undefined; resourceInputs["title"] = state ? state.title : undefined; resourceInputs["version"] = state ? state.version : undefined; resourceInputs["webhookChangelogDestination"] = state ? state.webhookChangelogDestination : undefined; } else { const args = argsOrState; if ((!args || args.installationId === undefined) && !opts.urn) { throw new Error("Missing required property 'installationId'"); } resourceInputs["config"] = args ? args.config : undefined; resourceInputs["installationAppType"] = args ? args.installationAppType : undefined; resourceInputs["installationId"] = args ? args.installationId : undefined; resourceInputs["kafkaChangelogDestination"] = args ? args.kafkaChangelogDestination : undefined; resourceInputs["title"] = args ? args.title : undefined; resourceInputs["version"] = args ? args.version : undefined; resourceInputs["webhookChangelogDestination"] = args ? args.webhookChangelogDestination : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Integration.__pulumiType, name, resourceInputs, opts); } } exports.Integration = Integration; /** @internal */ Integration.__pulumiType = 'port:index/integration:Integration'; //# sourceMappingURL=integration.js.map