UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

92 lines 4.57 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.FusionAuthApplicationOAuthScope = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # Application OAuth Scope Resource * * The Application OAuth Scope resource allows you to define the scopes that an application can request when using OAuth. * * [Application OAuth Scope API](https://fusionauth.io/docs/apis/scopes) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const _this = new fusionauth.FusionAuthApplicationOAuthScope("this", { * applicationId: fusionauth_application["this"].id, * data: { * addedBy: "Tom", * addedOn: "2025-02-05", * }, * defaultConsentDetail: "This will provide the requesting application read-only access to your data", * defaultConsentMessage: "View your data", * description: "Provides an application read-only access to a user's data", * required: true, * }); * ``` */ class FusionAuthApplicationOAuthScope extends pulumi.CustomResource { /** * Get an existing FusionAuthApplicationOAuthScope 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 FusionAuthApplicationOAuthScope(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FusionAuthApplicationOAuthScope. 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'] === FusionAuthApplicationOAuthScope.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationId"] = state ? state.applicationId : undefined; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["defaultConsentDetail"] = state ? state.defaultConsentDetail : undefined; resourceInputs["defaultConsentMessage"] = state ? state.defaultConsentMessage : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["required"] = state ? state.required : undefined; resourceInputs["scopeId"] = state ? state.scopeId : undefined; } else { const args = argsOrState; if ((!args || args.applicationId === undefined) && !opts.urn) { throw new Error("Missing required property 'applicationId'"); } resourceInputs["applicationId"] = args ? args.applicationId : undefined; resourceInputs["data"] = args ? args.data : undefined; resourceInputs["defaultConsentDetail"] = args ? args.defaultConsentDetail : undefined; resourceInputs["defaultConsentMessage"] = args ? args.defaultConsentMessage : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["required"] = args ? args.required : undefined; resourceInputs["scopeId"] = args ? args.scopeId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FusionAuthApplicationOAuthScope.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthApplicationOAuthScope = FusionAuthApplicationOAuthScope; /** @internal */ FusionAuthApplicationOAuthScope.__pulumiType = 'fusionauth:index/fusionAuthApplicationOAuthScope:FusionAuthApplicationOAuthScope'; //# sourceMappingURL=fusionAuthApplicationOAuthScope.js.map