WorkSpacesWeb / Client / create_data_protection_settings

create_data_protection_settings#

WorkSpacesWeb.Client.create_data_protection_settings(**kwargs)#

Creates a data protection settings resource that can be associated with a web portal.

See also: AWS API Documentation

Request Syntax

response = client.create_data_protection_settings(
    additionalEncryptionContext={
        'string': 'string'
    },
    clientToken='string',
    customerManagedKey='string',
    description='string',
    displayName='string',
    inlineRedactionConfiguration={
        'globalConfidenceLevel': 123,
        'globalEnforcedUrls': [
            'string',
        ],
        'globalExemptUrls': [
            'string',
        ],
        'inlineRedactionPatterns': [
            {
                'builtInPatternId': 'string',
                'confidenceLevel': 123,
                'customPattern': {
                    'keywordRegex': 'string',
                    'patternDescription': 'string',
                    'patternName': 'string',
                    'patternRegex': 'string'
                },
                'enforcedUrls': [
                    'string',
                ],
                'exemptUrls': [
                    'string',
                ],
                'redactionPlaceHolder': {
                    'redactionPlaceHolderText': 'string',
                    'redactionPlaceHolderType': 'CustomText'
                }
            },
        ]
    },
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • additionalEncryptionContext (dict) –

    Additional encryption context of the data protection settings.

    • (string) –

      • (string) –

  • clientToken (string) –

    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.

    This field is autopopulated if not provided.

  • customerManagedKey (string) – The custom managed key of the data protection settings.

  • description (string) – The description of the data protection settings.

  • displayName (string) – The display name of the data protection settings.

  • inlineRedactionConfiguration (dict) –

    The inline redaction configuration of the data protection settings that will be applied to all sessions.

    • globalConfidenceLevel (integer) –

      The global confidence level for the inline redaction configuration. This indicates the certainty of data type matches in the redaction process. Confidence level 3 means high confidence, and requires a formatted text pattern match in order for content to be redacted. Confidence level 2 means medium confidence, and redaction considers both formatted and unformatted text, and adds keyword associate to the logic. Confidence level 1 means low confidence, and redaction is enforced for both formatted pattern + unformatted pattern without keyword. This is applied to patterns that do not have a pattern-level confidence level. Defaults to confidence level 2.

    • globalEnforcedUrls (list) –

      The global enforced URL configuration for the inline redaction configuration. This is applied to patterns that do not have a pattern-level enforced URL list.

      • (string) –

    • globalExemptUrls (list) –

      The global exempt URL configuration for the inline redaction configuration. This is applied to patterns that do not have a pattern-level exempt URL list.

      • (string) –

    • inlineRedactionPatterns (list) – [REQUIRED]

      The inline redaction patterns to be enabled for the inline redaction configuration.

      • (dict) –

        The set of patterns that determine the data types redacted in session.

        • builtInPatternId (string) –

          The built-in pattern from the list of preconfigured patterns. Either a customPattern or builtInPatternId is required.

        • confidenceLevel (integer) –

          The confidence level for inline redaction pattern. This indicates the certainty of data type matches in the redaction process. Confidence level 3 means high confidence, and requires a formatted text pattern match in order for content to be redacted. Confidence level 2 means medium confidence, and redaction considers both formatted and unformatted text, and adds keyword associate to the logic. Confidence level 1 means low confidence, and redaction is enforced for both formatted pattern + unformatted pattern without keyword. This overrides the global confidence level.

        • customPattern (dict) –

          >The configuration for a custom pattern. Either a customPattern or builtInPatternId is required.

          • keywordRegex (string) –

            The keyword regex for the customer pattern. After there is a match to the pattern regex, the keyword regex is used to search within the proximity of the match. If there is a keyword match, then the match is confirmed. If no keyword regex is provided, the pattern regex match will automatically be confirmed. The format must follow JavaScript regex format. The pattern must be enclosed between slashes, and can have flags behind the second slash. For example, “/ab+c/gi”

          • patternDescription (string) –

            The pattern description for the customer pattern.

          • patternName (string) – [REQUIRED]

            The pattern name for the custom pattern.

          • patternRegex (string) – [REQUIRED]

            The pattern regex for the customer pattern. The format must follow JavaScript regex format. The pattern must be enclosed between slashes, and can have flags behind the second slash. For example: “/ab+c/gi”.

        • enforcedUrls (list) –

          The enforced URL configuration for the inline redaction pattern. This will override the global enforced URL configuration.

          • (string) –

        • exemptUrls (list) –

          The exempt URL configuration for the inline redaction pattern. This will override the global exempt URL configuration for the inline redaction pattern.

          • (string) –

        • redactionPlaceHolder (dict) – [REQUIRED]

          The redaction placeholder that will replace the redacted text in session for the inline redaction pattern.

          • redactionPlaceHolderText (string) –

            The redaction placeholder text that will replace the redacted text in session for the custom text redaction placeholder type.

          • redactionPlaceHolderType (string) – [REQUIRED]

            The redaction placeholder type that will replace the redacted text in session.

  • tags (list) –

    The tags to add to the data protection settings resource. A tag is a key-value pair.

    • (dict) –

      The tag.

      • Key (string) – [REQUIRED]

        The key of the tag.

      • Value (string) – [REQUIRED]

        The value of the tag

Return type:

dict

Returns:

Response Syntax

{
    'dataProtectionSettingsArn': 'string'
}

Response Structure

  • (dict) –

    • dataProtectionSettingsArn (string) –

      The ARN of the data protection settings resource.

Exceptions

  • WorkSpacesWeb.Client.exceptions.InternalServerException

  • WorkSpacesWeb.Client.exceptions.ResourceNotFoundException

  • WorkSpacesWeb.Client.exceptions.AccessDeniedException

  • WorkSpacesWeb.Client.exceptions.ThrottlingException

  • WorkSpacesWeb.Client.exceptions.ServiceQuotaExceededException

  • WorkSpacesWeb.Client.exceptions.ValidationException

  • WorkSpacesWeb.Client.exceptions.ConflictException