- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateDataProtectionSettingsCommand
Creates a data protection settings resource that can be associated with a web portal.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkSpacesWebClient, CreateDataProtectionSettingsCommand } from "@aws-sdk/client-workspaces-web"; // ES Modules import
// const { WorkSpacesWebClient, CreateDataProtectionSettingsCommand } = require("@aws-sdk/client-workspaces-web"); // CommonJS import
const client = new WorkSpacesWebClient(config);
const input = { // CreateDataProtectionSettingsRequest
displayName: "STRING_VALUE",
description: "STRING_VALUE",
tags: [ // TagList
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE", // required
},
],
customerManagedKey: "STRING_VALUE",
additionalEncryptionContext: { // EncryptionContextMap
"<keys>": "STRING_VALUE",
},
inlineRedactionConfiguration: { // InlineRedactionConfiguration
inlineRedactionPatterns: [ // InlineRedactionPatterns // required
{ // InlineRedactionPattern
builtInPatternId: "STRING_VALUE",
customPattern: { // CustomPattern
patternName: "STRING_VALUE", // required
patternRegex: "STRING_VALUE", // required
patternDescription: "STRING_VALUE",
keywordRegex: "STRING_VALUE",
},
redactionPlaceHolder: { // RedactionPlaceHolder
redactionPlaceHolderType: "STRING_VALUE", // required
redactionPlaceHolderText: "STRING_VALUE",
},
enforcedUrls: [ // InlineRedactionUrls
"STRING_VALUE",
],
exemptUrls: [
"STRING_VALUE",
],
confidenceLevel: Number("int"),
},
],
globalEnforcedUrls: [ // GlobalInlineRedactionUrls
"STRING_VALUE",
],
globalExemptUrls: [
"STRING_VALUE",
],
globalConfidenceLevel: Number("int"),
},
clientToken: "STRING_VALUE",
};
const command = new CreateDataProtectionSettingsCommand(input);
const response = await client.send(command);
// { // CreateDataProtectionSettingsResponse
// dataProtectionSettingsArn: "STRING_VALUE", // required
// };
CreateDataProtectionSettingsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
additionalEncryptionContext | Record<string, string> | undefined | Additional encryption context of the data protection settings. |
clientToken | string | undefined | A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. |
customerManagedKey | string | undefined | The custom managed key of the data protection settings. |
description | string | undefined | The description of the data protection settings. |
displayName | string | undefined | The display name of the data protection settings. |
inlineRedactionConfiguration | InlineRedactionConfiguration | undefined | The inline redaction configuration of the data protection settings that will be applied to all sessions. |
tags | Tag[] | undefined | The tags to add to the data protection settings resource. A tag is a key-value pair. |
CreateDataProtectionSettingsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
dataProtectionSettingsArn Required | string | undefined | The ARN of the data protection settings resource. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Access is denied. |
ConflictException | client | There is a conflict. |
InternalServerException | server | There is an internal server error. |
ResourceNotFoundException | client | The resource cannot be found. |
ServiceQuotaExceededException | client | The service quota has been exceeded. |
ThrottlingException | client | There is a throttling error. |
ValidationException | client | There is a validation error. |
WorkSpacesWebServiceException | Base exception class for all service exceptions from WorkSpacesWeb service. |