UNPKG

@pulumi/aws

Version:

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

99 lines 4.41 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.PermissionSet = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Single Sign-On (SSO) Permission Set resource * * > **NOTE:** Updating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ssoadmin.getInstances({}); * const examplePermissionSet = new aws.ssoadmin.PermissionSet("example", { * name: "Example", * description: "An example", * instanceArn: example.then(example => example.arns?.[0]), * relayState: "https://s3.console.aws.amazon.com/s3/home?region=us-east-1#", * sessionDuration: "PT2H", * }); * ``` * * ## Import * * Using `pulumi import`, import SSO Permission Sets using the `arn` and `instance_arn` separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:ssoadmin/permissionSet:PermissionSet example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72 * ``` */ class PermissionSet extends pulumi.CustomResource { /** * Get an existing PermissionSet 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 PermissionSet(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of PermissionSet. 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'] === PermissionSet.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["createdDate"] = state?.createdDate; resourceInputs["description"] = state?.description; resourceInputs["instanceArn"] = state?.instanceArn; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["relayState"] = state?.relayState; resourceInputs["sessionDuration"] = state?.sessionDuration; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.instanceArn === undefined && !opts.urn) { throw new Error("Missing required property 'instanceArn'"); } resourceInputs["description"] = args?.description; resourceInputs["instanceArn"] = args?.instanceArn; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["relayState"] = args?.relayState; resourceInputs["sessionDuration"] = args?.sessionDuration; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createdDate"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PermissionSet.__pulumiType, name, resourceInputs, opts); } } exports.PermissionSet = PermissionSet; /** @internal */ PermissionSet.__pulumiType = 'aws:ssoadmin/permissionSet:PermissionSet'; //# sourceMappingURL=permissionSet.js.map