pulumi-fusionauth
Version:
A Pulumi package for managing FusionAuth instances.
81 lines • 3.55 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.FusionAuthKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## # Key Resource
*
* Cryptographic keys are used in signing and verifying JWTs and verifying responses for third party identity providers. It is more likely you will interact with keys using the FusionAuth UI in the Key Master menu.
*
* [Keys API](https://fusionauth.io/docs/v1/tech/apis/keys)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fusionauth from "pulumi-fusionauth";
*
* const adminId = new fusionauth.FusionAuthKey("adminId", {
* algorithm: "RS256",
* length: 2048,
* });
* ```
*/
class FusionAuthKey extends pulumi.CustomResource {
/**
* Get an existing FusionAuthKey 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 FusionAuthKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FusionAuthKey. 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'] === FusionAuthKey.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["algorithm"] = state ? state.algorithm : undefined;
resourceInputs["issuer"] = state ? state.issuer : undefined;
resourceInputs["keyId"] = state ? state.keyId : undefined;
resourceInputs["kid"] = state ? state.kid : undefined;
resourceInputs["length"] = state ? state.length : undefined;
resourceInputs["name"] = state ? state.name : undefined;
}
else {
const args = argsOrState;
if ((!args || args.algorithm === undefined) && !opts.urn) {
throw new Error("Missing required property 'algorithm'");
}
resourceInputs["algorithm"] = args ? args.algorithm : undefined;
resourceInputs["issuer"] = args ? args.issuer : undefined;
resourceInputs["keyId"] = args ? args.keyId : undefined;
resourceInputs["length"] = args ? args.length : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["kid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FusionAuthKey.__pulumiType, name, resourceInputs, opts);
}
}
exports.FusionAuthKey = FusionAuthKey;
/** @internal */
FusionAuthKey.__pulumiType = 'fusionauth:index/fusionAuthKey:FusionAuthKey';
//# sourceMappingURL=fusionAuthKey.js.map