@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
124 lines • 4.96 kB
JavaScript
// *** 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.BrowserSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS WorkSpaces Web Browser Settings resource.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* 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",
* },
* },
* })});
* ```
*
* ### With All Arguments
*
* ```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 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
*
* Using `pulumi import`, import WorkSpaces Web Browser Settings using the `browser_settings_arn`. For example:
*
* ```sh
* $ pulumi import aws:workspacesweb/browserSettings:BrowserSettings example arn:aws:workspacesweb:us-west-2:123456789012:browsersettings/abcdef12345
* ```
*/
class BrowserSettings extends pulumi.CustomResource {
/**
* Get an existing BrowserSettings 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 BrowserSettings(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of BrowserSettings. 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'] === BrowserSettings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["additionalEncryptionContext"] = state?.additionalEncryptionContext;
resourceInputs["associatedPortalArns"] = state?.associatedPortalArns;
resourceInputs["browserPolicy"] = state?.browserPolicy;
resourceInputs["browserSettingsArn"] = state?.browserSettingsArn;
resourceInputs["customerManagedKey"] = state?.customerManagedKey;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.browserPolicy === undefined && !opts.urn) {
throw new Error("Missing required property 'browserPolicy'");
}
resourceInputs["additionalEncryptionContext"] = args?.additionalEncryptionContext;
resourceInputs["browserPolicy"] = args?.browserPolicy;
resourceInputs["customerManagedKey"] = args?.customerManagedKey;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["associatedPortalArns"] = undefined /*out*/;
resourceInputs["browserSettingsArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "aws:workspaces/webBrowserSettings:WebBrowserSettings" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(BrowserSettings.__pulumiType, name, resourceInputs, opts);
}
}
exports.BrowserSettings = BrowserSettings;
/** @internal */
BrowserSettings.__pulumiType = 'aws:workspacesweb/browserSettings:BrowserSettings';
//# sourceMappingURL=browserSettings.js.map
;