io.enterpriseai.resources.DlpClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/DlpClient.java. Back to the Java SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class DlpClient
Data loss prevention inspection, redaction and rules.
Constructor DlpClient
DlpClient(Transport transport)
Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
DlpClient.createRule
JsonNode createRule(Object body)
Create or update a DLP rule. Creates the rule, or replaces the rule of the same name. A rule needs an entity_type or a pattern (a valid regular expression); errors answer 400 invalid_request (unknown action, invalid pattern or classification). Needs tenant_admin or security_officer. Writes the audit event dlp.rule.upsert. Answers 201 with the rule.
Route: /v1/dlp/rules (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Name, entity type or pattern, action, classification and score of the rule. |
Returns: JsonNode. Decoded JSON answer of the operation "Create or update a DLP rule".
Raises: the typed errors of the transport (Errors).
DlpClient.createRule
JsonNode createRule(Object body, RequestOptions options)
Create or update a DLP rule. Creates the rule, or replaces the rule of the same name. A rule needs an entity_type or a pattern (a valid regular expression); errors answer 400 invalid_request (unknown action, invalid pattern or classification). Needs tenant_admin or security_officer. Writes the audit event dlp.rule.upsert. Answers 201 with the rule.
Route: /v1/dlp/rules (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Name, entity type or pattern, action, classification and score of the rule. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create or update a DLP rule".
Raises: the typed errors of the transport (Errors).
DlpClient.inspect
JsonNode inspect(Object body)
Inspect a text for sensitive data. Runs DLP on the text with the tenant rules, in mode detect unless mode says otherwise. The answer gives text, findings (type, position, score, classification, short preview, action, rule), action (strongest action applied), classification, mode, engine (builtin or presidio), blocked and count. An unknown mode answers 400. Open to any member of the tenant. Writes the audit event dlp.inspect (counts and types only).
Route: /v1/dlp/inspect (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Text, optional mode and language. |
Returns: JsonNode. Decoded JSON answer of the operation "Inspect a text for sensitive data".
Raises: the typed errors of the transport (Errors).
DlpClient.inspect
JsonNode inspect(Object body, RequestOptions options)
Inspect a text for sensitive data. Runs DLP on the text with the tenant rules, in mode detect unless mode says otherwise. The answer gives text, findings (type, position, score, classification, short preview, action, rule), action (strongest action applied), classification, mode, engine (builtin or presidio), blocked and count. An unknown mode answers 400. Open to any member of the tenant. Writes the audit event dlp.inspect (counts and types only).
Route: /v1/dlp/inspect (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Text, optional mode and language. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Inspect a text for sensitive data".
Raises: the typed errors of the transport (Errors).
DlpClient.listRules
Page<JsonNode> listRules()
List the DLP rules. Lists the DLP rules of the tenant ordered by name. Open to any member of the tenant. next_cursor is always null.
Route: /v1/dlp/rules (GET).
This element takes no parameter.
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
DlpClient.redact
JsonNode redact(Object body)
Redact sensitive data from a text. Same as inspect, in mode mask by default: each finding is replaced by [TYPE] (for example [EMAIL]), or tokenized or blocked when a tenant rule or mode says so; a blocked text comes back empty with blocked: true. Open to any member of the tenant. Writes the audit event dlp.redact.
Route: /v1/dlp/redact (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Text, optional mode and language. |
Returns: JsonNode. Decoded JSON answer of the operation "Redact sensitive data from a text".
Raises: the typed errors of the transport (Errors).
DlpClient.redact
JsonNode redact(Object body, RequestOptions options)
Redact sensitive data from a text. Same as inspect, in mode mask by default: each finding is replaced by [TYPE] (for example [EMAIL]), or tokenized or blocked when a tenant rule or mode says so; a blocked text comes back empty with blocked: true. Open to any member of the tenant. Writes the audit event dlp.redact.
Route: /v1/dlp/redact (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Text, optional mode and language. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Redact sensitive data from a text".
Raises: the typed errors of the transport (Errors).