UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

129 lines 7.92 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.FusionAuthWebhook = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # Webhook Resource * * A FusionAuth Webhook is intended to consume JSON events emitted by FusionAuth. Creating a Webhook allows you to tell FusionAuth where you would like to receive these JSON events. * * [Webhooks API](https://fusionauth.io/docs/v1/tech/apis/webhooks) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const example = new fusionauth.FusionAuthWebhook("example", { * tenantIds: [ * "00000000-0000-0000-0000-000000000003", * fusionauth_tenant.example.id, * ], * connectTimeout: 1000, * description: "The standard game Webhook", * eventsEnabled: { * userCreate: true, * userDelete: false, * }, * global: false, * headers: { * foo: "bar", * bar: "baz", * }, * httpAuthenticationPassword: "password", * httpAuthenticationUsername: "username", * readTimeout: 2000, * sslCertificate: " -----BEGIN CERTIFICATE-----\\nMIIDUjCCArugAwIBAgIJANZCTNN98L9ZMA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV\\nBAYTAlVTMQswCQYDVQQIEwJDTzEPMA0GA1UEBxMGZGVudmVyMQ8wDQYDVQQKEwZz\\nZXRoLXMxCjAIBgNVBAsTAXMxDjAMBgNVBAMTBWludmVyMSAwHgYJKoZIhvcNAQkB\\nFhFzamZkZkBsc2tkamZjLmNvbTAeFw0xNDA0MDkyMTA2MDdaFw0xNDA1MDkyMTA2\\nMDdaMHoxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDTzEPMA0GA1UEBxMGZGVudmVy\\nMQ8wDQYDVQQKEwZzZXRoLXMxCjAIBgNVBAsTAXMxDjAMBgNVBAMTBWludmVyMSAw\\nHgYJKoZIhvcNAQkBFhFzamZkZkBsc2tkamZjLmNvbTCBnzANBgkqhkiG9w0BAQEF\\nAAOBjQAwgYkCgYEAxnQBqyuYvjUE4aFQ6vVZU5RqHmy3KiTg2NcxELIlZztUTK3a\\nVFbJoBB4ixHXCCYslujthILyBjgT3F+IhSpPAcrlu8O5LVPaPCysh/SNrGNwH4lq\\neiW9Z5WAhRO/nG7NZNa0USPHAei6b9Sv9PxuKCY+GJfAIwlO4/bltIH06/kCAwEA\\nAaOB3zCB3DAdBgNVHQ4EFgQUU4SqJEFm1zW+CcLxmLlARrqtMN0wgawGA1UdIwSB\\npDCBoYAUU4SqJEFm1zW+CcLxmLlARrqtMN2hfqR8MHoxCzAJBgNVBAYTAlVTMQsw\\nCQYDVQQIEwJDTzEPMA0GA1UEBxMGZGVudmVyMQ8wDQYDVQQKEwZzZXRoLXMxCjAI\\nBgNVBAsTAXMxDjAMBgNVBAMTBWludmVyMSAwHgYJKoZIhvcNAQkBFhFzamZkZkBs\\nc2tkamZjLmNvbYIJANZCTNN98L9ZMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF\\nBQADgYEAY/cJsi3w6R4hF4PzAXLhGOg1tzTDYvol3w024WoehJur+qM0AY6UqtoJ\\nneCq9af32IKbbOKkoaok+t1+/tylQVF/0FXMTKepxaMbG22vr4TmN3idPUYYbPfW\\n5GkF7Hh96BjerrtiUPGuBZL50HoLZ5aR5oZUMAu7TXhOFp+vZp8=\\n-----END CERTIFICATE-----\n", * url: "http://mygameserver.local:7001/fusionauth-webhook", * signatureConfiguration: { * enabled: true, * signingKeyId: fusionauth_key.webhook_key.id, * }, * }); * ``` */ class FusionAuthWebhook extends pulumi.CustomResource { /** * Get an existing FusionAuthWebhook 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 FusionAuthWebhook(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FusionAuthWebhook. 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'] === FusionAuthWebhook.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["connectTimeout"] = state ? state.connectTimeout : undefined; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["eventsEnabled"] = state ? state.eventsEnabled : undefined; resourceInputs["global"] = state ? state.global : undefined; resourceInputs["headers"] = state ? state.headers : undefined; resourceInputs["httpAuthenticationPassword"] = state ? state.httpAuthenticationPassword : undefined; resourceInputs["httpAuthenticationUsername"] = state ? state.httpAuthenticationUsername : undefined; resourceInputs["readTimeout"] = state ? state.readTimeout : undefined; resourceInputs["signatureConfiguration"] = state ? state.signatureConfiguration : undefined; resourceInputs["sslCertificate"] = state ? state.sslCertificate : undefined; resourceInputs["sslCertificateKeyId"] = state ? state.sslCertificateKeyId : undefined; resourceInputs["tenantIds"] = state ? state.tenantIds : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["webhookId"] = state ? state.webhookId : undefined; } else { const args = argsOrState; 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'"); } if ((!args || args.url === undefined) && !opts.urn) { throw new Error("Missing required property 'url'"); } resourceInputs["connectTimeout"] = args ? args.connectTimeout : undefined; resourceInputs["data"] = args ? args.data : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["eventsEnabled"] = args ? args.eventsEnabled : undefined; resourceInputs["global"] = args ? args.global : 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["readTimeout"] = args ? args.readTimeout : undefined; resourceInputs["signatureConfiguration"] = args ? args.signatureConfiguration : undefined; resourceInputs["sslCertificate"] = args ? args.sslCertificate : undefined; resourceInputs["sslCertificateKeyId"] = args ? args.sslCertificateKeyId : undefined; resourceInputs["tenantIds"] = args ? args.tenantIds : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["webhookId"] = args ? args.webhookId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["httpAuthenticationPassword", "httpAuthenticationUsername"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(FusionAuthWebhook.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthWebhook = FusionAuthWebhook; /** @internal */ FusionAuthWebhook.__pulumiType = 'fusionauth:index/fusionAuthWebhook:FusionAuthWebhook'; //# sourceMappingURL=fusionAuthWebhook.js.map