UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

109 lines 5.67 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.FusionAuthGenericConnector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # Generic Connector Resource * * A FusionAuth Generic Connector is a named object that provides configuration for allowing authentication against external systems. * * [Generic Connector API](https://fusionauth.io/docs/v1/tech/apis/connectors/generic/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const example = new fusionauth.FusionAuthGenericConnector("example", { * authenticationUrl: "http://mygameserver.local:7001/fusionauth-connector", * connectTimeout: 1000, * data: { * foo: "bar", * }, * debug: false, * headers: { * foo: "bar", * bar: "baz", * }, * httpAuthenticationPassword: "supersecret", * httpAuthenticationUsername: "me", * readTimeout: 2000, * sslCertificateKeyId: "00000000-0000-0000-0000-000000000678", * }); * ``` */ class FusionAuthGenericConnector extends pulumi.CustomResource { /** * Get an existing FusionAuthGenericConnector 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 FusionAuthGenericConnector(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FusionAuthGenericConnector. 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'] === FusionAuthGenericConnector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authenticationUrl"] = state ? state.authenticationUrl : undefined; resourceInputs["connectTimeout"] = state ? state.connectTimeout : undefined; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["debug"] = state ? state.debug : undefined; resourceInputs["headers"] = state ? state.headers : undefined; resourceInputs["httpAuthenticationPassword"] = state ? state.httpAuthenticationPassword : undefined; resourceInputs["httpAuthenticationUsername"] = state ? state.httpAuthenticationUsername : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["readTimeout"] = state ? state.readTimeout : undefined; resourceInputs["sslCertificateKeyId"] = state ? state.sslCertificateKeyId : undefined; } else { const args = argsOrState; if ((!args || args.authenticationUrl === undefined) && !opts.urn) { throw new Error("Missing required property 'authenticationUrl'"); } if ((!args || args.connectTimeout === undefined) && !opts.urn) { throw new Error("Missing required property 'connectTimeout'"); } if ((!args || args.readTimeout === undefined) && !opts.urn) { throw new Error("Missing required property 'readTimeout'"); } resourceInputs["authenticationUrl"] = args ? args.authenticationUrl : undefined; resourceInputs["connectTimeout"] = args ? args.connectTimeout : undefined; resourceInputs["data"] = args ? args.data : undefined; resourceInputs["debug"] = args ? args.debug : undefined; resourceInputs["headers"] = args ? args.headers : undefined; resourceInputs["httpAuthenticationPassword"] = (args === null || args === void 0 ? void 0 : args.httpAuthenticationPassword) ? pulumi.secret(args.httpAuthenticationPassword) : undefined; resourceInputs["httpAuthenticationUsername"] = (args === null || args === void 0 ? void 0 : args.httpAuthenticationUsername) ? pulumi.secret(args.httpAuthenticationUsername) : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["readTimeout"] = args ? args.readTimeout : undefined; resourceInputs["sslCertificateKeyId"] = args ? args.sslCertificateKeyId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["httpAuthenticationPassword", "httpAuthenticationUsername"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(FusionAuthGenericConnector.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthGenericConnector = FusionAuthGenericConnector; /** @internal */ FusionAuthGenericConnector.__pulumiType = 'fusionauth:index/fusionAuthGenericConnector:FusionAuthGenericConnector'; //# sourceMappingURL=fusionAuthGenericConnector.js.map