1. Packages
  2. AWS
  3. API Docs
  4. workspacesweb
  5. BrowserSettingsAssociation
AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi

aws.workspacesweb.BrowserSettingsAssociation

Explore with Pulumi AI

aws logo
AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi

    Resource for managing an AWS WorkSpaces Web Browser Settings Association.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.workspacesweb.Portal("example", {displayName: "example"});
    const exampleBrowserSettings = new aws.workspacesweb.BrowserSettings("example", {browserPolicy: JSON.stringify({
        chromePolicies: {
            DefaultDownloadDirectory: {
                value: "/home/as2-streaming-user/MyFiles/TemporaryFiles1",
            },
        },
    })});
    const exampleBrowserSettingsAssociation = new aws.workspacesweb.BrowserSettingsAssociation("example", {
        browserSettingsArn: exampleBrowserSettings.browserSettingsArn,
        portalArn: example.portalArn,
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    
    example = aws.workspacesweb.Portal("example", display_name="example")
    example_browser_settings = aws.workspacesweb.BrowserSettings("example", browser_policy=json.dumps({
        "chromePolicies": {
            "DefaultDownloadDirectory": {
                "value": "/home/as2-streaming-user/MyFiles/TemporaryFiles1",
            },
        },
    }))
    example_browser_settings_association = aws.workspacesweb.BrowserSettingsAssociation("example",
        browser_settings_arn=example_browser_settings.browser_settings_arn,
        portal_arn=example.portal_arn)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workspacesweb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := workspacesweb.NewPortal(ctx, "example", &workspacesweb.PortalArgs{
    			DisplayName: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"chromePolicies": map[string]interface{}{
    				"DefaultDownloadDirectory": map[string]interface{}{
    					"value": "/home/as2-streaming-user/MyFiles/TemporaryFiles1",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		exampleBrowserSettings, err := workspacesweb.NewBrowserSettings(ctx, "example", &workspacesweb.BrowserSettingsArgs{
    			BrowserPolicy: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = workspacesweb.NewBrowserSettingsAssociation(ctx, "example", &workspacesweb.BrowserSettingsAssociationArgs{
    			BrowserSettingsArn: exampleBrowserSettings.BrowserSettingsArn,
    			PortalArn:          example.PortalArn,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.WorkSpacesWeb.Portal("example", new()
        {
            DisplayName = "example",
        });
    
        var exampleBrowserSettings = new Aws.WorkSpacesWeb.BrowserSettings("example", new()
        {
            BrowserPolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["chromePolicies"] = new Dictionary<string, object?>
                {
                    ["DefaultDownloadDirectory"] = new Dictionary<string, object?>
                    {
                        ["value"] = "/home/as2-streaming-user/MyFiles/TemporaryFiles1",
                    },
                },
            }),
        });
    
        var exampleBrowserSettingsAssociation = new Aws.WorkSpacesWeb.BrowserSettingsAssociation("example", new()
        {
            BrowserSettingsArn = exampleBrowserSettings.BrowserSettingsArn,
            PortalArn = example.PortalArn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.workspacesweb.Portal;
    import com.pulumi.aws.workspacesweb.PortalArgs;
    import com.pulumi.aws.workspacesweb.BrowserSettings;
    import com.pulumi.aws.workspacesweb.BrowserSettingsArgs;
    import com.pulumi.aws.workspacesweb.BrowserSettingsAssociation;
    import com.pulumi.aws.workspacesweb.BrowserSettingsAssociationArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.List;
    import java.util.ArrayList;
    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 Portal("example", PortalArgs.builder()
                .displayName("example")
                .build());
    
            var exampleBrowserSettings = new BrowserSettings("exampleBrowserSettings", BrowserSettingsArgs.builder()
                .browserPolicy(serializeJson(
                    jsonObject(
                        jsonProperty("chromePolicies", jsonObject(
                            jsonProperty("DefaultDownloadDirectory", jsonObject(
                                jsonProperty("value", "/home/as2-streaming-user/MyFiles/TemporaryFiles1")
                            ))
                        ))
                    )))
                .build());
    
            var exampleBrowserSettingsAssociation = new BrowserSettingsAssociation("exampleBrowserSettingsAssociation", BrowserSettingsAssociationArgs.builder()
                .browserSettingsArn(exampleBrowserSettings.browserSettingsArn())
                .portalArn(example.portalArn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:workspacesweb:Portal
        properties:
          displayName: example
      exampleBrowserSettings:
        type: aws:workspacesweb:BrowserSettings
        name: example
        properties:
          browserPolicy:
            fn::toJSON:
              chromePolicies:
                DefaultDownloadDirectory:
                  value: /home/as2-streaming-user/MyFiles/TemporaryFiles1
      exampleBrowserSettingsAssociation:
        type: aws:workspacesweb:BrowserSettingsAssociation
        name: example
        properties:
          browserSettingsArn: ${exampleBrowserSettings.browserSettingsArn}
          portalArn: ${example.portalArn}
    

    Create BrowserSettingsAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BrowserSettingsAssociation(name: string, args: BrowserSettingsAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def BrowserSettingsAssociation(resource_name: str,
                                   args: BrowserSettingsAssociationArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def BrowserSettingsAssociation(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   browser_settings_arn: Optional[str] = None,
                                   portal_arn: Optional[str] = None,
                                   region: Optional[str] = None)
    func NewBrowserSettingsAssociation(ctx *Context, name string, args BrowserSettingsAssociationArgs, opts ...ResourceOption) (*BrowserSettingsAssociation, error)
    public BrowserSettingsAssociation(string name, BrowserSettingsAssociationArgs args, CustomResourceOptions? opts = null)
    public BrowserSettingsAssociation(String name, BrowserSettingsAssociationArgs args)
    public BrowserSettingsAssociation(String name, BrowserSettingsAssociationArgs args, CustomResourceOptions options)
    
    type: aws:workspacesweb:BrowserSettingsAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BrowserSettingsAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BrowserSettingsAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BrowserSettingsAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BrowserSettingsAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BrowserSettingsAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var browserSettingsAssociationResource = new Aws.WorkSpacesWeb.BrowserSettingsAssociation("browserSettingsAssociationResource", new()
    {
        BrowserSettingsArn = "string",
        PortalArn = "string",
        Region = "string",
    });
    
    example, err := workspacesweb.NewBrowserSettingsAssociation(ctx, "browserSettingsAssociationResource", &workspacesweb.BrowserSettingsAssociationArgs{
    	BrowserSettingsArn: pulumi.String("string"),
    	PortalArn:          pulumi.String("string"),
    	Region:             pulumi.String("string"),
    })
    
    var browserSettingsAssociationResource = new BrowserSettingsAssociation("browserSettingsAssociationResource", BrowserSettingsAssociationArgs.builder()
        .browserSettingsArn("string")
        .portalArn("string")
        .region("string")
        .build());
    
    browser_settings_association_resource = aws.workspacesweb.BrowserSettingsAssociation("browserSettingsAssociationResource",
        browser_settings_arn="string",
        portal_arn="string",
        region="string")
    
    const browserSettingsAssociationResource = new aws.workspacesweb.BrowserSettingsAssociation("browserSettingsAssociationResource", {
        browserSettingsArn: "string",
        portalArn: "string",
        region: "string",
    });
    
    type: aws:workspacesweb:BrowserSettingsAssociation
    properties:
        browserSettingsArn: string
        portalArn: string
        region: string
    

    BrowserSettingsAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BrowserSettingsAssociation resource accepts the following input properties:

    BrowserSettingsArn string
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    PortalArn string

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    BrowserSettingsArn string
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    PortalArn string

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browserSettingsArn String
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portalArn String

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browserSettingsArn string
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portalArn string

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browser_settings_arn str
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portal_arn str

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browserSettingsArn String
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portalArn String

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BrowserSettingsAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BrowserSettingsAssociation Resource

    Get an existing BrowserSettingsAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BrowserSettingsAssociationState, opts?: CustomResourceOptions): BrowserSettingsAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            browser_settings_arn: Optional[str] = None,
            portal_arn: Optional[str] = None,
            region: Optional[str] = None) -> BrowserSettingsAssociation
    func GetBrowserSettingsAssociation(ctx *Context, name string, id IDInput, state *BrowserSettingsAssociationState, opts ...ResourceOption) (*BrowserSettingsAssociation, error)
    public static BrowserSettingsAssociation Get(string name, Input<string> id, BrowserSettingsAssociationState? state, CustomResourceOptions? opts = null)
    public static BrowserSettingsAssociation get(String name, Output<String> id, BrowserSettingsAssociationState state, CustomResourceOptions options)
    resources:  _:    type: aws:workspacesweb:BrowserSettingsAssociation    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BrowserSettingsArn string
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    PortalArn string

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    BrowserSettingsArn string
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    PortalArn string

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browserSettingsArn String
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portalArn String

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browserSettingsArn string
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portalArn string

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browser_settings_arn str
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portal_arn str

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    browserSettingsArn String
    ARN of the browser settings to associate with the portal. Forces replacement if changed.
    portalArn String

    ARN of the portal to associate with the browser settings. Forces replacement if changed.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Import

    Using pulumi import, import WorkSpaces Web Browser Settings Association using the browser_settings_arn,portal_arn. For example:

    $ pulumi import aws:workspacesweb/browserSettingsAssociation:BrowserSettingsAssociation example arn:aws:workspaces-web:us-west-2:123456789012:browserSettings/browser_settings-id-12345678,arn:aws:workspaces-web:us-west-2:123456789012:portal/portal-id-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi
      AI Agentic Workflows: Register now