UNPKG

@osmit-gmbh/pulumi-authentik

Version:

A Pulumi package for creating and managing authentik cloud resources.

108 lines 5.18 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.Application = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as authentik from "@osmit-gmbh/pulumi-authentik"; * import * as authentik from "@pulumi/authentik"; * * // Create an application with a provider attached and policies applied * const default-authorization-flow = authentik.getFlow({ * slug: "default-provider-authorization-implicit-consent", * }); * const name = new authentik.ProviderOauth2("name", { * name: "example-app", * clientId: "example-app", * clientSecret: "test", * authorizationFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id), * }); * const policy = new authentik.PolicyExpression("policy", { * name: "example", * expression: "return True", * }); * const nameApplication = new authentik.Application("name", { * name: "example-app", * slug: "example-app", * protocolProvider: name.id, * }); * const app_access = new authentik.PolicyBinding("app-access", { * target: nameApplication.uuid, * policy: policy.id, * order: 0, * }); * ``` */ class Application extends pulumi.CustomResource { /** * Get an existing Application 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 Application(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Application. 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'] === Application.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["backchannelProviders"] = state ? state.backchannelProviders : undefined; resourceInputs["group"] = state ? state.group : undefined; resourceInputs["metaDescription"] = state ? state.metaDescription : undefined; resourceInputs["metaIcon"] = state ? state.metaIcon : undefined; resourceInputs["metaLaunchUrl"] = state ? state.metaLaunchUrl : undefined; resourceInputs["metaPublisher"] = state ? state.metaPublisher : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["openInNewTab"] = state ? state.openInNewTab : undefined; resourceInputs["policyEngineMode"] = state ? state.policyEngineMode : undefined; resourceInputs["protocolProvider"] = state ? state.protocolProvider : undefined; resourceInputs["slug"] = state ? state.slug : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; } else { const args = argsOrState; if ((!args || args.slug === undefined) && !opts.urn) { throw new Error("Missing required property 'slug'"); } resourceInputs["backchannelProviders"] = args ? args.backchannelProviders : undefined; resourceInputs["group"] = args ? args.group : undefined; resourceInputs["metaDescription"] = args ? args.metaDescription : undefined; resourceInputs["metaIcon"] = args ? args.metaIcon : undefined; resourceInputs["metaLaunchUrl"] = args ? args.metaLaunchUrl : undefined; resourceInputs["metaPublisher"] = args ? args.metaPublisher : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["openInNewTab"] = args ? args.openInNewTab : undefined; resourceInputs["policyEngineMode"] = args ? args.policyEngineMode : undefined; resourceInputs["protocolProvider"] = args ? args.protocolProvider : undefined; resourceInputs["slug"] = args ? args.slug : undefined; resourceInputs["uuid"] = args ? args.uuid : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Application.__pulumiType, name, resourceInputs, opts); } } exports.Application = Application; /** @internal */ Application.__pulumiType = 'authentik:index/application:Application'; //# sourceMappingURL=application.js.map