aws.workspacesweb.BrowserSettings
Explore with Pulumi AI
Resource for managing an AWS WorkSpaces Web Browser Settings resource.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.workspacesweb.BrowserSettings("example", {browserPolicy: JSON.stringify({
AdditionalSettings: {
DownloadsSettings: {
Behavior: "DISABLE",
},
},
})});
import pulumi
import json
import pulumi_aws as aws
example = aws.workspacesweb.BrowserSettings("example", browser_policy=json.dumps({
"AdditionalSettings": {
"DownloadsSettings": {
"Behavior": "DISABLE",
},
},
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspacesweb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"AdditionalSettings": map[string]interface{}{
"DownloadsSettings": map[string]interface{}{
"Behavior": "DISABLE",
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = workspacesweb.NewBrowserSettings(ctx, "example", &workspacesweb.BrowserSettingsArgs{
BrowserPolicy: pulumi.String(json0),
})
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.BrowserSettings("example", new()
{
BrowserPolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["AdditionalSettings"] = new Dictionary<string, object?>
{
["DownloadsSettings"] = new Dictionary<string, object?>
{
["Behavior"] = "DISABLE",
},
},
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspacesweb.BrowserSettings;
import com.pulumi.aws.workspacesweb.BrowserSettingsArgs;
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 BrowserSettings("example", BrowserSettingsArgs.builder()
.browserPolicy(serializeJson(
jsonObject(
jsonProperty("AdditionalSettings", jsonObject(
jsonProperty("DownloadsSettings", jsonObject(
jsonProperty("Behavior", "DISABLE")
))
))
)))
.build());
}
}
resources:
example:
type: aws:workspacesweb:BrowserSettings
properties:
browserPolicy:
fn::toJSON:
AdditionalSettings:
DownloadsSettings:
Behavior: DISABLE
With All Arguments
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 Browser Settings",
deletionWindowInDays: 7,
});
const exampleBrowserSettings = new aws.workspacesweb.BrowserSettings("example", {
browserPolicy: JSON.stringify({
chromePolicies: {
DefaultDownloadDirectory: {
value: "/home/as2-streaming-user/MyFiles/TemporaryFiles1",
},
},
}),
customerManagedKey: example.arn,
additionalEncryptionContext: {
Environment: "Production",
},
tags: {
Name: "example-browser-settings",
},
});
import pulumi
import json
import pulumi_aws as aws
example = aws.kms.Key("example",
description="KMS key for WorkSpaces Web Browser Settings",
deletion_window_in_days=7)
example_browser_settings = aws.workspacesweb.BrowserSettings("example",
browser_policy=json.dumps({
"chromePolicies": {
"DefaultDownloadDirectory": {
"value": "/home/as2-streaming-user/MyFiles/TemporaryFiles1",
},
},
}),
customer_managed_key=example.arn,
additional_encryption_context={
"Environment": "Production",
},
tags={
"Name": "example-browser-settings",
})
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspacesweb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := kms.NewKey(ctx, "example", &kms.KeyArgs{
Description: pulumi.String("KMS key for WorkSpaces Web Browser Settings"),
DeletionWindowInDays: pulumi.Int(7),
})
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)
_, err = workspacesweb.NewBrowserSettings(ctx, "example", &workspacesweb.BrowserSettingsArgs{
BrowserPolicy: pulumi.String(json0),
CustomerManagedKey: example.Arn,
AdditionalEncryptionContext: pulumi.StringMap{
"Environment": pulumi.String("Production"),
},
Tags: pulumi.StringMap{
"Name": pulumi.String("example-browser-settings"),
},
})
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.Kms.Key("example", new()
{
Description = "KMS key for WorkSpaces Web Browser Settings",
DeletionWindowInDays = 7,
});
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",
},
},
}),
CustomerManagedKey = example.Arn,
AdditionalEncryptionContext =
{
{ "Environment", "Production" },
},
Tags =
{
{ "Name", "example-browser-settings" },
},
});
});
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.BrowserSettings;
import com.pulumi.aws.workspacesweb.BrowserSettingsArgs;
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 Key("example", KeyArgs.builder()
.description("KMS key for WorkSpaces Web Browser Settings")
.deletionWindowInDays(7)
.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")
))
))
)))
.customerManagedKey(example.arn())
.additionalEncryptionContext(Map.of("Environment", "Production"))
.tags(Map.of("Name", "example-browser-settings"))
.build());
}
}
resources:
example:
type: aws:kms:Key
properties:
description: KMS key for WorkSpaces Web Browser Settings
deletionWindowInDays: 7
exampleBrowserSettings:
type: aws:workspacesweb:BrowserSettings
name: example
properties:
browserPolicy:
fn::toJSON:
chromePolicies:
DefaultDownloadDirectory:
value: /home/as2-streaming-user/MyFiles/TemporaryFiles1
customerManagedKey: ${example.arn}
additionalEncryptionContext:
Environment: Production
tags:
Name: example-browser-settings
Create BrowserSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BrowserSettings(name: string, args: BrowserSettingsArgs, opts?: CustomResourceOptions);
@overload
def BrowserSettings(resource_name: str,
args: BrowserSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BrowserSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
browser_policy: Optional[str] = None,
additional_encryption_context: Optional[Mapping[str, str]] = None,
customer_managed_key: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewBrowserSettings(ctx *Context, name string, args BrowserSettingsArgs, opts ...ResourceOption) (*BrowserSettings, error)
public BrowserSettings(string name, BrowserSettingsArgs args, CustomResourceOptions? opts = null)
public BrowserSettings(String name, BrowserSettingsArgs args)
public BrowserSettings(String name, BrowserSettingsArgs args, CustomResourceOptions options)
type: aws:workspacesweb:BrowserSettings
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 BrowserSettingsArgs
- 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 BrowserSettingsArgs
- 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 BrowserSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BrowserSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BrowserSettingsArgs
- 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 browserSettingsResource = new Aws.WorkSpacesWeb.BrowserSettings("browserSettingsResource", new()
{
BrowserPolicy = "string",
AdditionalEncryptionContext =
{
{ "string", "string" },
},
CustomerManagedKey = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := workspacesweb.NewBrowserSettings(ctx, "browserSettingsResource", &workspacesweb.BrowserSettingsArgs{
BrowserPolicy: pulumi.String("string"),
AdditionalEncryptionContext: pulumi.StringMap{
"string": pulumi.String("string"),
},
CustomerManagedKey: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var browserSettingsResource = new BrowserSettings("browserSettingsResource", BrowserSettingsArgs.builder()
.browserPolicy("string")
.additionalEncryptionContext(Map.of("string", "string"))
.customerManagedKey("string")
.tags(Map.of("string", "string"))
.build());
browser_settings_resource = aws.workspacesweb.BrowserSettings("browserSettingsResource",
browser_policy="string",
additional_encryption_context={
"string": "string",
},
customer_managed_key="string",
tags={
"string": "string",
})
const browserSettingsResource = new aws.workspacesweb.BrowserSettings("browserSettingsResource", {
browserPolicy: "string",
additionalEncryptionContext: {
string: "string",
},
customerManagedKey: "string",
tags: {
string: "string",
},
});
type: aws:workspacesweb:BrowserSettings
properties:
additionalEncryptionContext:
string: string
browserPolicy: string
customerManagedKey: string
tags:
string: string
BrowserSettings 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 BrowserSettings resource accepts the following input properties:
- Browser
Policy string Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- Additional
Encryption Dictionary<string, string>Context - Additional encryption context for the browser settings.
- Customer
Managed stringKey - ARN of the customer managed KMS key.
- Dictionary<string, string>
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Browser
Policy string Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- Additional
Encryption map[string]stringContext - Additional encryption context for the browser settings.
- Customer
Managed stringKey - ARN of the customer managed KMS key.
- map[string]string
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- browser
Policy String Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- additional
Encryption Map<String,String>Context - Additional encryption context for the browser settings.
- customer
Managed StringKey - ARN of the customer managed KMS key.
- Map<String,String>
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- browser
Policy string Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- additional
Encryption {[key: string]: string}Context - Additional encryption context for the browser settings.
- customer
Managed stringKey - ARN of the customer managed KMS key.
- {[key: string]: string}
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- browser_
policy str Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- additional_
encryption_ Mapping[str, str]context - Additional encryption context for the browser settings.
- customer_
managed_ strkey - ARN of the customer managed KMS key.
- Mapping[str, str]
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- browser
Policy String Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- additional
Encryption Map<String>Context - Additional encryption context for the browser settings.
- customer
Managed StringKey - ARN of the customer managed KMS key.
- Map<String>
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the BrowserSettings resource produces the following output properties:
- Associated
Portal List<string>Arns - List of web portal ARNs to associate with the browser settings.
- Browser
Settings stringArn - ARN of the browser settings resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Associated
Portal []stringArns - List of web portal ARNs to associate with the browser settings.
- Browser
Settings stringArn - ARN of the browser settings resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- associated
Portal List<String>Arns - List of web portal ARNs to associate with the browser settings.
- browser
Settings StringArn - ARN of the browser settings resource.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- associated
Portal string[]Arns - List of web portal ARNs to associate with the browser settings.
- browser
Settings stringArn - ARN of the browser settings resource.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- associated_
portal_ Sequence[str]arns - List of web portal ARNs to associate with the browser settings.
- browser_
settings_ strarn - ARN of the browser settings resource.
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- associated
Portal List<String>Arns - List of web portal ARNs to associate with the browser settings.
- browser
Settings StringArn - ARN of the browser settings resource.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing BrowserSettings Resource
Get an existing BrowserSettings 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?: BrowserSettingsState, opts?: CustomResourceOptions): BrowserSettings
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_encryption_context: Optional[Mapping[str, str]] = None,
associated_portal_arns: Optional[Sequence[str]] = None,
browser_policy: Optional[str] = None,
browser_settings_arn: Optional[str] = None,
customer_managed_key: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> BrowserSettings
func GetBrowserSettings(ctx *Context, name string, id IDInput, state *BrowserSettingsState, opts ...ResourceOption) (*BrowserSettings, error)
public static BrowserSettings Get(string name, Input<string> id, BrowserSettingsState? state, CustomResourceOptions? opts = null)
public static BrowserSettings get(String name, Output<String> id, BrowserSettingsState state, CustomResourceOptions options)
resources: _: type: aws:workspacesweb:BrowserSettings 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.
- Additional
Encryption Dictionary<string, string>Context - Additional encryption context for the browser settings.
- Associated
Portal List<string>Arns - List of web portal ARNs to associate with the browser settings.
- Browser
Policy string Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- Browser
Settings stringArn - ARN of the browser settings resource.
- Customer
Managed stringKey - ARN of the customer managed KMS key.
- Dictionary<string, string>
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Additional
Encryption map[string]stringContext - Additional encryption context for the browser settings.
- Associated
Portal []stringArns - List of web portal ARNs to associate with the browser settings.
- Browser
Policy string Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- Browser
Settings stringArn - ARN of the browser settings resource.
- Customer
Managed stringKey - ARN of the customer managed KMS key.
- map[string]string
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- additional
Encryption Map<String,String>Context - Additional encryption context for the browser settings.
- associated
Portal List<String>Arns - List of web portal ARNs to associate with the browser settings.
- browser
Policy String Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- browser
Settings StringArn - ARN of the browser settings resource.
- customer
Managed StringKey - ARN of the customer managed KMS key.
- Map<String,String>
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- additional
Encryption {[key: string]: string}Context - Additional encryption context for the browser settings.
- associated
Portal string[]Arns - List of web portal ARNs to associate with the browser settings.
- browser
Policy string Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- browser
Settings stringArn - ARN of the browser settings resource.
- customer
Managed stringKey - ARN of the customer managed KMS key.
- {[key: string]: string}
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- additional_
encryption_ Mapping[str, str]context - Additional encryption context for the browser settings.
- associated_
portal_ Sequence[str]arns - List of web portal ARNs to associate with the browser settings.
- browser_
policy str Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- browser_
settings_ strarn - ARN of the browser settings resource.
- customer_
managed_ strkey - ARN of the customer managed KMS key.
- Mapping[str, str]
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- additional
Encryption Map<String>Context - Additional encryption context for the browser settings.
- associated
Portal List<String>Arns - List of web portal ARNs to associate with the browser settings.
- browser
Policy String Browser policy for the browser settings. This is a JSON string that defines the browser settings policy.
The following arguments are optional:
- browser
Settings StringArn - ARN of the browser settings resource.
- customer
Managed StringKey - ARN of the customer managed KMS key.
- Map<String>
- Map of tags assigned to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Import
Using pulumi import
, import WorkSpaces Web Browser Settings using the browser_settings_arn
. For example:
$ pulumi import aws:workspacesweb/browserSettings:BrowserSettings example arn:aws:workspacesweb:us-west-2:123456789012:browsersettings/abcdef12345
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.