UNPKG

@pulumi/aws

Version:

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

196 lines • 8.89 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, Object.assign(Object.assign({}, 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 ? state.additionalEncryptionContext : undefined; resourceInputs["associatedPortalArns"] = state ? state.associatedPortalArns : undefined; resourceInputs["cookieSynchronizationConfiguration"] = state ? state.cookieSynchronizationConfiguration : undefined; resourceInputs["copyAllowed"] = state ? state.copyAllowed : undefined; resourceInputs["customerManagedKey"] = state ? state.customerManagedKey : undefined; resourceInputs["deepLinkAllowed"] = state ? state.deepLinkAllowed : undefined; resourceInputs["disconnectTimeoutInMinutes"] = state ? state.disconnectTimeoutInMinutes : undefined; resourceInputs["downloadAllowed"] = state ? state.downloadAllowed : undefined; resourceInputs["idleDisconnectTimeoutInMinutes"] = state ? state.idleDisconnectTimeoutInMinutes : undefined; resourceInputs["pasteAllowed"] = state ? state.pasteAllowed : undefined; resourceInputs["printAllowed"] = state ? state.printAllowed : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["toolbarConfiguration"] = state ? state.toolbarConfiguration : undefined; resourceInputs["uploadAllowed"] = state ? state.uploadAllowed : undefined; resourceInputs["userSettingsArn"] = state ? state.userSettingsArn : undefined; } else { const args = argsOrState; if ((!args || args.copyAllowed === undefined) && !opts.urn) { throw new Error("Missing required property 'copyAllowed'"); } if ((!args || args.downloadAllowed === undefined) && !opts.urn) { throw new Error("Missing required property 'downloadAllowed'"); } if ((!args || args.pasteAllowed === undefined) && !opts.urn) { throw new Error("Missing required property 'pasteAllowed'"); } if ((!args || args.printAllowed === undefined) && !opts.urn) { throw new Error("Missing required property 'printAllowed'"); } if ((!args || args.uploadAllowed === undefined) && !opts.urn) { throw new Error("Missing required property 'uploadAllowed'"); } resourceInputs["additionalEncryptionContext"] = args ? args.additionalEncryptionContext : undefined; resourceInputs["cookieSynchronizationConfiguration"] = args ? args.cookieSynchronizationConfiguration : undefined; resourceInputs["copyAllowed"] = args ? args.copyAllowed : undefined; resourceInputs["customerManagedKey"] = args ? args.customerManagedKey : undefined; resourceInputs["deepLinkAllowed"] = args ? args.deepLinkAllowed : undefined; resourceInputs["disconnectTimeoutInMinutes"] = args ? args.disconnectTimeoutInMinutes : undefined; resourceInputs["downloadAllowed"] = args ? args.downloadAllowed : undefined; resourceInputs["idleDisconnectTimeoutInMinutes"] = args ? args.idleDisconnectTimeoutInMinutes : undefined; resourceInputs["pasteAllowed"] = args ? args.pasteAllowed : undefined; resourceInputs["printAllowed"] = args ? args.printAllowed : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["toolbarConfiguration"] = args ? args.toolbarConfiguration : undefined; resourceInputs["uploadAllowed"] = args ? args.uploadAllowed : undefined; 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