UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

81 lines 3.79 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.FusionAuthGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # Group Resource * * A FusionAuth Group is a named object that optionally contains one to many Application Roles. * * When a Group does not contain any Application Roles it can still be utilized to logically associate users. Assigning Application Roles to a group allow it to be used to dynamically manage Role assignment to registered Users. In this second scenario as long as a User is registered to an Application the Group membership will allow them to inherit the corresponding Roles from the Group. * * [Groups API](https://fusionauth.io/docs/v1/tech/apis/groups) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const myGroup = new fusionauth.FusionAuthGroup("myGroup", { * tenantId: fusionauth_tenant.my_tenant.id, * roleIds: [fusionauth_application_role.admins.id], * }); * ``` */ class FusionAuthGroup extends pulumi.CustomResource { /** * Get an existing FusionAuthGroup 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 FusionAuthGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FusionAuthGroup. 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'] === FusionAuthGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["roleIds"] = state ? state.roleIds : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; } else { const args = argsOrState; if ((!args || args.tenantId === undefined) && !opts.urn) { throw new Error("Missing required property 'tenantId'"); } resourceInputs["data"] = args ? args.data : undefined; resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["roleIds"] = args ? args.roleIds : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FusionAuthGroup.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthGroup = FusionAuthGroup; /** @internal */ FusionAuthGroup.__pulumiType = 'fusionauth:index/fusionAuthGroup:FusionAuthGroup'; //# sourceMappingURL=fusionAuthGroup.js.map