aws.workspaces.WebBrowserSettings
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.workspaces.WebBrowserSettings("example", {browserPolicy: JSON.stringify({
AdditionalSettings: {
DownloadsSettings: {
Behavior: "DISABLE",
},
},
})});
import pulumi
import json
import pulumi_aws as aws
example = aws.workspaces.WebBrowserSettings("example", browser_policy=json.dumps({
"AdditionalSettings": {
"DownloadsSettings": {
"Behavior": "DISABLE",
},
},
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspaces"
"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 = workspaces.NewWebBrowserSettings(ctx, "example", &workspaces.WebBrowserSettingsArgs{
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.Workspaces.WebBrowserSettings("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.workspaces.WebBrowserSettings;
import com.pulumi.aws.workspaces.WebBrowserSettingsArgs;
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 WebBrowserSettings("example", WebBrowserSettingsArgs.builder()
.browserPolicy(serializeJson(
jsonObject(
jsonProperty("AdditionalSettings", jsonObject(
jsonProperty("DownloadsSettings", jsonObject(
jsonProperty("Behavior", "DISABLE")
))
))
)))
.build());
}
}
resources:
example:
type: aws:workspaces:WebBrowserSettings
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 exampleWebBrowserSettings = new aws.workspaces.WebBrowserSettings("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_web_browser_settings = aws.workspaces.WebBrowserSettings("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/workspaces"
"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 = workspaces.NewWebBrowserSettings(ctx, "example", &workspaces.WebBrowserSettingsArgs{
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 exampleWebBrowserSettings = new Aws.Workspaces.WebBrowserSettings("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.workspaces.WebBrowserSettings;
import com.pulumi.aws.workspaces.WebBrowserSettingsArgs;
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 exampleWebBrowserSettings = new WebBrowserSettings("exampleWebBrowserSettings", WebBrowserSettingsArgs.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
exampleWebBrowserSettings:
type: aws:workspaces:WebBrowserSettings
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 WebBrowserSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebBrowserSettings(name: string, args: WebBrowserSettingsArgs, opts?: CustomResourceOptions);
@overload
def WebBrowserSettings(resource_name: str,
args: WebBrowserSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebBrowserSettings(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 NewWebBrowserSettings(ctx *Context, name string, args WebBrowserSettingsArgs, opts ...ResourceOption) (*WebBrowserSettings, error)
public WebBrowserSettings(string name, WebBrowserSettingsArgs args, CustomResourceOptions? opts = null)
public WebBrowserSettings(String name, WebBrowserSettingsArgs args)
public WebBrowserSettings(String name, WebBrowserSettingsArgs args, CustomResourceOptions options)
type: aws:workspaces:WebBrowserSettings
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 WebBrowserSettingsArgs
- 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 WebBrowserSettingsArgs
- 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 WebBrowserSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebBrowserSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebBrowserSettingsArgs
- 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 webBrowserSettingsResource = new Aws.Workspaces.WebBrowserSettings("webBrowserSettingsResource", new()
{
BrowserPolicy = "string",
AdditionalEncryptionContext =
{
{ "string", "string" },
},
CustomerManagedKey = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := workspaces.NewWebBrowserSettings(ctx, "webBrowserSettingsResource", &workspaces.WebBrowserSettingsArgs{
BrowserPolicy: pulumi.String("string"),
AdditionalEncryptionContext: pulumi.StringMap{
"string": pulumi.String("string"),
},
CustomerManagedKey: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var webBrowserSettingsResource = new WebBrowserSettings("webBrowserSettingsResource", WebBrowserSettingsArgs.builder()
.browserPolicy("string")
.additionalEncryptionContext(Map.of("string", "string"))
.customerManagedKey("string")
.tags(Map.of("string", "string"))
.build());
web_browser_settings_resource = aws.workspaces.WebBrowserSettings("webBrowserSettingsResource",
browser_policy="string",
additional_encryption_context={
"string": "string",
},
customer_managed_key="string",
tags={
"string": "string",
})
const webBrowserSettingsResource = new aws.workspaces.WebBrowserSettings("webBrowserSettingsResource", {
browserPolicy: "string",
additionalEncryptionContext: {
string: "string",
},
customerManagedKey: "string",
tags: {
string: "string",
},
});
type: aws:workspaces:WebBrowserSettings
properties:
additionalEncryptionContext:
string: string
browserPolicy: string
customerManagedKey: string
tags:
string: string
WebBrowserSettings 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 WebBrowserSettings 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 WebBrowserSettings 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 WebBrowserSettings Resource
Get an existing WebBrowserSettings 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?: WebBrowserSettingsState, opts?: CustomResourceOptions): WebBrowserSettings
@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) -> WebBrowserSettings
func GetWebBrowserSettings(ctx *Context, name string, id IDInput, state *WebBrowserSettingsState, opts ...ResourceOption) (*WebBrowserSettings, error)
public static WebBrowserSettings Get(string name, Input<string> id, WebBrowserSettingsState? state, CustomResourceOptions? opts = null)
public static WebBrowserSettings get(String name, Output<String> id, WebBrowserSettingsState state, CustomResourceOptions options)
resources: _: type: aws:workspaces:WebBrowserSettings 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:workspaces/webBrowserSettings:WebBrowserSettings 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.