UNPKG

@pulumi/aws

Version:

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

196 lines • 8.23 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.UserSettings = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS WorkSpaces Web User Settings resource. Once associated with a web portal, user settings control how users can transfer data between a streaming session and their local devices. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.workspacesweb.UserSettings("example", { * copyAllowed: "Enabled", * downloadAllowed: "Enabled", * pasteAllowed: "Enabled", * printAllowed: "Enabled", * uploadAllowed: "Enabled", * }); * ``` * * ### With Toolbar Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.workspacesweb.UserSettings("example", { * copyAllowed: "Enabled", * downloadAllowed: "Enabled", * pasteAllowed: "Enabled", * printAllowed: "Enabled", * uploadAllowed: "Enabled", * toolbarConfiguration: { * toolbarType: "Docked", * visualMode: "Dark", * hiddenToolbarItems: [ * "Webcam", * "Microphone", * ], * }, * }); * ``` * * ### Complete Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.kms.Key("example", { * description: "KMS key for WorkSpaces Web User Settings", * deletionWindowInDays: 7, * }); * const exampleUserSettings = new aws.workspacesweb.UserSettings("example", { * copyAllowed: "Enabled", * downloadAllowed: "Enabled", * pasteAllowed: "Enabled", * printAllowed: "Enabled", * uploadAllowed: "Enabled", * deepLinkAllowed: "Enabled", * disconnectTimeoutInMinutes: 30, * idleDisconnectTimeoutInMinutes: 15, * customerManagedKey: example.arn, * additionalEncryptionContext: { * Environment: "Production", * }, * toolbarConfiguration: { * toolbarType: "Docked", * visualMode: "Dark", * hiddenToolbarItems: [ * "Webcam", * "Microphone", * ], * maxDisplayResolution: "size1920X1080", * }, * cookieSynchronizationConfiguration: { * allowlists: [{ * domain: "example.com", * path: "/path", * }], * blocklists: [{ * domain: "blocked.com", * }], * }, * tags: { * Name: "example-user-settings", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import WorkSpaces Web User Settings using the `user_settings_arn`. For example: * * ```sh * $ pulumi import aws:workspacesweb/userSettings:UserSettings example arn:aws:workspacesweb:us-west-2:123456789012:usersettings/abcdef12345 * ``` */ class UserSettings extends pulumi.CustomResource { /** * Get an existing UserSettings 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 UserSettings(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of UserSettings. 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'] === UserSettings.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["additionalEncryptionContext"] = state?.additionalEncryptionContext; resourceInputs["associatedPortalArns"] = state?.associatedPortalArns; resourceInputs["cookieSynchronizationConfiguration"] = state?.cookieSynchronizationConfiguration; resourceInputs["copyAllowed"] = state?.copyAllowed; resourceInputs["customerManagedKey"] = state?.customerManagedKey; resourceInputs["deepLinkAllowed"] = state?.deepLinkAllowed; resourceInputs["disconnectTimeoutInMinutes"] = state?.disconnectTimeoutInMinutes; resourceInputs["downloadAllowed"] = state?.downloadAllowed; resourceInputs["idleDisconnectTimeoutInMinutes"] = state?.idleDisconnectTimeoutInMinutes; resourceInputs["pasteAllowed"] = state?.pasteAllowed; resourceInputs["printAllowed"] = state?.printAllowed; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["toolbarConfiguration"] = state?.toolbarConfiguration; resourceInputs["uploadAllowed"] = state?.uploadAllowed; resourceInputs["userSettingsArn"] = state?.userSettingsArn; } else { const args = argsOrState; if (args?.copyAllowed === undefined && !opts.urn) { throw new Error("Missing required property 'copyAllowed'"); } if (args?.downloadAllowed === undefined && !opts.urn) { throw new Error("Missing required property 'downloadAllowed'"); } if (args?.pasteAllowed === undefined && !opts.urn) { throw new Error("Missing required property 'pasteAllowed'"); } if (args?.printAllowed === undefined && !opts.urn) { throw new Error("Missing required property 'printAllowed'"); } if (args?.uploadAllowed === undefined && !opts.urn) { throw new Error("Missing required property 'uploadAllowed'"); } resourceInputs["additionalEncryptionContext"] = args?.additionalEncryptionContext; resourceInputs["cookieSynchronizationConfiguration"] = args?.cookieSynchronizationConfiguration; resourceInputs["copyAllowed"] = args?.copyAllowed; resourceInputs["customerManagedKey"] = args?.customerManagedKey; resourceInputs["deepLinkAllowed"] = args?.deepLinkAllowed; resourceInputs["disconnectTimeoutInMinutes"] = args?.disconnectTimeoutInMinutes; resourceInputs["downloadAllowed"] = args?.downloadAllowed; resourceInputs["idleDisconnectTimeoutInMinutes"] = args?.idleDisconnectTimeoutInMinutes; resourceInputs["pasteAllowed"] = args?.pasteAllowed; resourceInputs["printAllowed"] = args?.printAllowed; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["toolbarConfiguration"] = args?.toolbarConfiguration; resourceInputs["uploadAllowed"] = args?.uploadAllowed; resourceInputs["associatedPortalArns"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["userSettingsArn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "aws:workspaces/webUserSettings:WebUserSettings" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(UserSettings.__pulumiType, name, resourceInputs, opts); } } exports.UserSettings = UserSettings; /** @internal */ UserSettings.__pulumiType = 'aws:workspacesweb/userSettings:UserSettings'; //# sourceMappingURL=userSettings.js.map