UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

131 lines 5.93 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** 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"); /** * Resource for managing an AWS SSO Admin Application. * * > The `CreateApplication` API only supports custom OAuth 2.0 applications. * Creation of 3rd party SAML or OAuth 2.0 applications require setup to be done through the associated app service or AWS console. * See this issue for additional context. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ssoadmin.getInstances({}); * const exampleApplication = new aws.ssoadmin.Application("example", { * name: "example", * applicationProviderArn: "arn:aws:sso::aws:applicationProvider/custom", * instanceArn: example.then(example => example.arns?.[0]), * }); * ``` * * ### With Portal Options * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ssoadmin.getInstances({}); * const exampleApplication = new aws.ssoadmin.Application("example", { * name: "example", * applicationProviderArn: "arn:aws:sso::aws:applicationProvider/custom", * instanceArn: example.then(example => example.arns?.[0]), * portalOptions: { * visibility: "ENABLED", * signInOptions: { * applicationUrl: "http://example.com", * origin: "APPLICATION", * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import SSO Admin Application using the `id`. For example: * * ```sh * $ pulumi import aws:ssoadmin/application:Application example arn:aws:sso::123456789012:application/id-12345678 * ``` */ 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["applicationAccount"] = state ? state.applicationAccount : undefined; resourceInputs["applicationArn"] = state ? state.applicationArn : undefined; resourceInputs["applicationProviderArn"] = state ? state.applicationProviderArn : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["clientToken"] = state ? state.clientToken : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["instanceArn"] = state ? state.instanceArn : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["portalOptions"] = state ? state.portalOptions : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; } else { const args = argsOrState; if ((!args || args.applicationProviderArn === undefined) && !opts.urn) { throw new Error("Missing required property 'applicationProviderArn'"); } if ((!args || args.instanceArn === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceArn'"); } resourceInputs["applicationProviderArn"] = args ? args.applicationProviderArn : undefined; resourceInputs["clientToken"] = args ? args.clientToken : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["instanceArn"] = args ? args.instanceArn : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["portalOptions"] = args ? args.portalOptions : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["status"] = args ? args.status : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["applicationAccount"] = undefined /*out*/; resourceInputs["applicationArn"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Application.__pulumiType, name, resourceInputs, opts); } } exports.Application = Application; /** @internal */ Application.__pulumiType = 'aws:ssoadmin/application:Application'; //# sourceMappingURL=application.js.map