@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
171 lines • 7.26 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.DataProtectionSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS WorkSpaces Web Data Protection Settings resource. Once associated with a web portal, data protection settings control how sensitive information is redacted in streaming sessions.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.workspacesweb.DataProtectionSettings("example", {displayName: "example"});
* ```
*
* ### With Inline Redaction Configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.workspacesweb.DataProtectionSettings("example", {
* displayName: "example",
* description: "Example data protection settings",
* inlineRedactionConfiguration: {
* globalConfidenceLevel: 2,
* globalEnforcedUrls: ["https://example.com"],
* inlineRedactionPatterns: [{
* builtInPatternId: "ssn",
* confidenceLevel: 3,
* redactionPlaceHolders: [{
* redactionPlaceHolderType: "CustomText",
* redactionPlaceHolderText: "REDACTED",
* }],
* }],
* },
* });
* ```
*
* ### Complete Example
*
* ```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 Data Protection Settings",
* deletionWindowInDays: 7,
* });
* const exampleDataProtectionSettings = new aws.workspacesweb.DataProtectionSettings("example", {
* displayName: "example-complete",
* description: "Complete example data protection settings",
* customerManagedKey: example.arn,
* additionalEncryptionContext: {
* Environment: "Production",
* },
* inlineRedactionConfiguration: {
* globalConfidenceLevel: 2,
* globalEnforcedUrls: [
* "https://example.com",
* "https://test.example.com",
* ],
* globalExemptUrls: ["https://exempt.example.com"],
* inlineRedactionPatterns: [
* {
* builtInPatternId: "ssn",
* confidenceLevel: 3,
* enforcedUrls: ["https://pattern1.example.com"],
* exemptUrls: ["https://exempt-pattern1.example.com"],
* redactionPlaceHolders: [{
* redactionPlaceHolderType: "CustomText",
* redactionPlaceHolderText: "REDACTED-SSN",
* }],
* },
* {
* customPattern: {
* patternName: "CustomPattern",
* patternRegex: "/\\d{3}-\\d{2}-\\d{4}/g",
* keywordRegex: "/SSN|Social Security/gi",
* patternDescription: "Custom SSN pattern",
* },
* redactionPlaceHolders: [{
* redactionPlaceHolderType: "CustomText",
* redactionPlaceHolderText: "REDACTED-CUSTOM",
* }],
* },
* ],
* },
* tags: {
* Name: "example-data-protection-settings",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import WorkSpaces Web Data Protection Settings using the `data_protection_settings_arn`. For example:
*
* ```sh
* $ pulumi import aws:workspacesweb/dataProtectionSettings:DataProtectionSettings example arn:aws:workspaces-web:us-west-2:123456789012:dataprotectionsettings/abcdef12345
* ```
*/
class DataProtectionSettings extends pulumi.CustomResource {
/**
* Get an existing DataProtectionSettings 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 DataProtectionSettings(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DataProtectionSettings. 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'] === DataProtectionSettings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["additionalEncryptionContext"] = state?.additionalEncryptionContext;
resourceInputs["associatedPortalArns"] = state?.associatedPortalArns;
resourceInputs["customerManagedKey"] = state?.customerManagedKey;
resourceInputs["dataProtectionSettingsArn"] = state?.dataProtectionSettingsArn;
resourceInputs["description"] = state?.description;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["inlineRedactionConfiguration"] = state?.inlineRedactionConfiguration;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.displayName === undefined && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["additionalEncryptionContext"] = args?.additionalEncryptionContext;
resourceInputs["customerManagedKey"] = args?.customerManagedKey;
resourceInputs["description"] = args?.description;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["inlineRedactionConfiguration"] = args?.inlineRedactionConfiguration;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["associatedPortalArns"] = undefined /*out*/;
resourceInputs["dataProtectionSettingsArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DataProtectionSettings.__pulumiType, name, resourceInputs, opts);
}
}
exports.DataProtectionSettings = DataProtectionSettings;
/** @internal */
DataProtectionSettings.__pulumiType = 'aws:workspacesweb/dataProtectionSettings:DataProtectionSettings';
//# sourceMappingURL=dataProtectionSettings.js.map
;