Class UserSettings


  • public class UserSettings
    extends com.pulumi.resources.CustomResource
    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
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.workspacesweb.UserSettings;
     import com.pulumi.aws.workspacesweb.UserSettingsArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new UserSettings("example", UserSettingsArgs.builder()
                 .copyAllowed("Enabled")
                 .downloadAllowed("Enabled")
                 .pasteAllowed("Enabled")
                 .printAllowed("Enabled")
                 .uploadAllowed("Enabled")
                 .build());
     
         }
     }
     
     
    ### With Toolbar Configuration
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.workspacesweb.UserSettings;
     import com.pulumi.aws.workspacesweb.UserSettingsArgs;
     import com.pulumi.aws.workspacesweb.inputs.UserSettingsToolbarConfigurationArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new UserSettings("example", UserSettingsArgs.builder()
                 .toolbarConfiguration(UserSettingsToolbarConfigurationArgs.builder()
                     .toolbarType("Docked")
                     .visualMode("Dark")
                     .hiddenToolbarItems(                
                         "Webcam",
                         "Microphone")
                     .build())
                 .copyAllowed("Enabled")
                 .downloadAllowed("Enabled")
                 .pasteAllowed("Enabled")
                 .printAllowed("Enabled")
                 .uploadAllowed("Enabled")
                 .build());
     
         }
     }
     
     
    ### Complete Example
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.kms.Key;
     import com.pulumi.aws.kms.KeyArgs;
     import com.pulumi.aws.workspacesweb.UserSettings;
     import com.pulumi.aws.workspacesweb.UserSettingsArgs;
     import com.pulumi.aws.workspacesweb.inputs.UserSettingsToolbarConfigurationArgs;
     import com.pulumi.aws.workspacesweb.inputs.UserSettingsCookieSynchronizationConfigurationArgs;
     import com.pulumi.aws.workspacesweb.inputs.UserSettingsCookieSynchronizationConfigurationAllowlistArgs;
     import com.pulumi.aws.workspacesweb.inputs.UserSettingsCookieSynchronizationConfigurationBlocklistArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new Key("example", KeyArgs.builder()
                 .description("KMS key for WorkSpaces Web User Settings")
                 .deletionWindowInDays(7)
                 .build());
     
             var exampleUserSettings = new UserSettings("exampleUserSettings", UserSettingsArgs.builder()
                 .toolbarConfiguration(UserSettingsToolbarConfigurationArgs.builder()
                     .toolbarType("Docked")
                     .visualMode("Dark")
                     .hiddenToolbarItems(                
                         "Webcam",
                         "Microphone")
                     .maxDisplayResolution("size1920X1080")
                     .build())
                 .cookieSynchronizationConfiguration(UserSettingsCookieSynchronizationConfigurationArgs.builder()
                     .allowlists(UserSettingsCookieSynchronizationConfigurationAllowlistArgs.builder()
                         .domain("example.com")
                         .path("/path")
                         .build())
                     .blocklists(UserSettingsCookieSynchronizationConfigurationBlocklistArgs.builder()
                         .domain("blocked.com")
                         .build())
                     .build())
                 .copyAllowed("Enabled")
                 .downloadAllowed("Enabled")
                 .pasteAllowed("Enabled")
                 .printAllowed("Enabled")
                 .uploadAllowed("Enabled")
                 .deepLinkAllowed("Enabled")
                 .disconnectTimeoutInMinutes(30)
                 .idleDisconnectTimeoutInMinutes(15)
                 .customerManagedKey(example.arn())
                 .additionalEncryptionContext(Map.of("Environment", "Production"))
                 .tags(Map.of("Name", "example-user-settings"))
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import WorkSpaces Web User Settings using the `userSettingsArn`. For example: ```sh $ pulumi import aws:workspacesweb/userSettings:UserSettings example arn:aws:workspacesweb:us-west-2:123456789012:usersettings/abcdef12345 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Detail

      • UserSettings

        public UserSettings​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • UserSettings

        public UserSettings​(java.lang.String name,
                            UserSettingsArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • UserSettings

        public UserSettings​(java.lang.String name,
                            UserSettingsArgs args,
                            @Nullable
                            com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • additionalEncryptionContext

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> additionalEncryptionContext()
        Returns:
        Additional encryption context for the user settings.
      • associatedPortalArns

        public com.pulumi.core.Output<java.util.List<java.lang.String>> associatedPortalArns()
        Returns:
        List of web portal ARNs to associate with the user settings.
      • cookieSynchronizationConfiguration

        public com.pulumi.core.Output<java.util.Optional<UserSettingsCookieSynchronizationConfiguration>> cookieSynchronizationConfiguration()
        Returns:
        Configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser. Detailed below.
      • copyAllowed

        public com.pulumi.core.Output<java.lang.String> copyAllowed()
        Returns:
        Specifies whether the user can copy text from the streaming session to the local device. Valid values are `Enabled` or `Disabled`.
      • customerManagedKey

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> customerManagedKey()
        Returns:
        ARN of the customer managed KMS key.
      • deepLinkAllowed

        public com.pulumi.core.Output<java.lang.String> deepLinkAllowed()
        Returns:
        Specifies whether the user can use deep links that open automatically when connecting to a session. Valid values are `Enabled` or `Disabled`.
      • disconnectTimeoutInMinutes

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> disconnectTimeoutInMinutes()
        Returns:
        Amount of time that a streaming session remains active after users disconnect. Value must be between 1 and 600 minutes.
      • downloadAllowed

        public com.pulumi.core.Output<java.lang.String> downloadAllowed()
        Returns:
        Specifies whether the user can download files from the streaming session to the local device. Valid values are `Enabled` or `Disabled`.
      • idleDisconnectTimeoutInMinutes

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> idleDisconnectTimeoutInMinutes()
        Returns:
        Amount of time that users can be idle before they are disconnected from their streaming session. Value must be between 0 and 60 minutes.
      • pasteAllowed

        public com.pulumi.core.Output<java.lang.String> pasteAllowed()
        Returns:
        Specifies whether the user can paste text from the local device to the streaming session. Valid values are `Enabled` or `Disabled`.
      • printAllowed

        public com.pulumi.core.Output<java.lang.String> printAllowed()
        Returns:
        Specifies whether the user can print to the local device. Valid values are `Enabled` or `Disabled`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • toolbarConfiguration

        public com.pulumi.core.Output<java.util.Optional<UserSettingsToolbarConfiguration>> toolbarConfiguration()
        Returns:
        Configuration of the toolbar. Detailed below.
      • uploadAllowed

        public com.pulumi.core.Output<java.lang.String> uploadAllowed()
        Returns:
        Specifies whether the user can upload files from the local device to the streaming session. Valid values are `Enabled` or `Disabled`. The following arguments are optional:
      • userSettingsArn

        public com.pulumi.core.Output<java.lang.String> userSettingsArn()
        Returns:
        ARN of the user settings resource.
      • get

        public static UserSettings get​(java.lang.String name,
                                       com.pulumi.core.Output<java.lang.String> id,
                                       @Nullable
                                       UserSettingsState state,
                                       @Nullable
                                       com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.