Home | History | Annotate | Download | only in dyn
      1 <html><body>
      2 <style>
      3 
      4 body, h1, h2, h3, div, span, p, pre, a {
      5   margin: 0;
      6   padding: 0;
      7   border: 0;
      8   font-weight: inherit;
      9   font-style: inherit;
     10   font-size: 100%;
     11   font-family: inherit;
     12   vertical-align: baseline;
     13 }
     14 
     15 body {
     16   font-size: 13px;
     17   padding: 1em;
     18 }
     19 
     20 h1 {
     21   font-size: 26px;
     22   margin-bottom: 1em;
     23 }
     24 
     25 h2 {
     26   font-size: 24px;
     27   margin-bottom: 1em;
     28 }
     29 
     30 h3 {
     31   font-size: 20px;
     32   margin-bottom: 1em;
     33   margin-top: 1em;
     34 }
     35 
     36 pre, code {
     37   line-height: 1.5;
     38   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
     39 }
     40 
     41 pre {
     42   margin-top: 0.5em;
     43 }
     44 
     45 h1, h2, h3, p {
     46   font-family: Arial, sans serif;
     47 }
     48 
     49 h1, h2, h3 {
     50   border-bottom: solid #CCC 1px;
     51 }
     52 
     53 .toc_element {
     54   margin-top: 0.5em;
     55 }
     56 
     57 .firstline {
     58   margin-left: 2 em;
     59 }
     60 
     61 .method  {
     62   margin-top: 1em;
     63   border: solid 1px #CCC;
     64   padding: 1em;
     65   background: #EEE;
     66 }
     67 
     68 .details {
     69   font-weight: bold;
     70   font-size: 14px;
     71 }
     72 
     73 </style>
     74 
     75 <h1><a href="dlp_v2beta1.html">DLP API</a> . <a href="dlp_v2beta1.content.html">content</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#inspect">inspect(body, x__xgafv=None)</a></code></p>
     79 <p class="firstline">Find potentially sensitive info in a list of strings.</p>
     80 <p class="toc_element">
     81   <code><a href="#redact">redact(body, x__xgafv=None)</a></code></p>
     82 <p class="firstline">Redact potentially sensitive info from a list of strings.</p>
     83 <h3>Method Details</h3>
     84 <div class="method">
     85     <code class="details" id="inspect">inspect(body, x__xgafv=None)</code>
     86   <pre>Find potentially sensitive info in a list of strings.
     87 This method has limits on input size, processing time, and output size.
     88 
     89 Args:
     90   body: object, The request body. (required)
     91     The object takes the form of:
     92 
     93 { # Request to search for potentially sensitive info in a list of items.
     94     "items": [ # The list of items to inspect. Items in a single request are
     95         # considered "related" unless inspect_config.independent_inputs is true.
     96         # Up to 100 are allowed per request.
     97       { # Container structure for the content to inspect.
     98         "data": "A String", # Content data to inspect or redact.
     99         "type": "A String", # Type of the content, as defined in Content-Type HTTP header.
    100             # Supported types are: all "text" types, octet streams, PNG images,
    101             # JPEG images.
    102         "value": "A String", # String data to inspect or redact.
    103       },
    104     ],
    105     "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector.
    106         # When used with redactContent only info_types and min_likelihood are currently
    107         # used.
    108       "minLikelihood": "A String", # Only return findings equal or above this threshold.
    109       "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
    110           # included in the response; see Finding.quote.
    111       "excludeTypes": True or False, # When true, exclude type information of the findings.
    112       "infoTypes": [ # Restrict what info_types to look for. The values must correspond to
    113           # InfoType values returned by ListInfoTypes or found in documentation.
    114           # Empty info_types runs all enabled detectors.
    115         { # Type of information detected by the API.
    116           "name": "A String", # Name of the information type. For built-in info types, this is provided by
    117               # the API call ListInfoTypes. For user-defined info types, this is
    118               # provided by the user. All user-defined info types must have unique names,
    119               # and cannot conflict with built-in info type names.
    120         },
    121       ],
    122       "maxFindings": 42, # Limit the number of findings per content item.
    123     },
    124   }
    125 
    126   x__xgafv: string, V1 error format.
    127     Allowed values
    128       1 - v1 error format
    129       2 - v2 error format
    130 
    131 Returns:
    132   An object of the form:
    133 
    134     { # Results of inspecting a list of items.
    135     "results": [ # Each content_item from the request has a result in this list, in the
    136         # same order as the request.
    137       { # All the findings for a single scanned item.
    138         "findingsTruncated": True or False, # If true, then this item might have more findings than were returned,
    139             # and the findings returned are an arbitrary subset of all findings.
    140             # The findings list might be truncated because the input items were too
    141             # large, or because the server reached the maximum amount of resources
    142             # allowed for a single API call. For best results, divide the input into
    143             # smaller batches.
    144         "findings": [ # List of findings for an item.
    145           { # Container structure describing a single finding within a string or image.
    146             "quote": "A String", # The specific string that may be potentially sensitive info.
    147             "likelihood": "A String", # Estimate of how likely it is that the info_type is correct.
    148             "infoType": { # Type of information detected by the API. # The specific type of info the string might be.
    149               "name": "A String", # Name of the information type. For built-in info types, this is provided by
    150                   # the API call ListInfoTypes. For user-defined info types, this is
    151                   # provided by the user. All user-defined info types must have unique names,
    152                   # and cannot conflict with built-in info type names.
    153             },
    154             "createTime": "A String", # Timestamp when finding was detected.
    155             "location": { # Specifies the location of a finding within its source item. # Location of the info found.
    156               "fieldId": { # General identifier of a data field in a storage service. # Field id of the field containing the finding.
    157                 "columnName": "A String", # Column name describing the field.
    158               },
    159               "imageBoxes": [ # Location within an image's pixels.
    160                 { # Bounding box encompassing detected text within an image.
    161                   "width": 42, # Width of the bounding box in pixels.
    162                   "top": 42, # Top coordinate of the bounding box. (0,0) is upper left.
    163                   "left": 42, # Left coordinate of the bounding box. (0,0) is upper left.
    164                   "height": 42, # Height of the bounding box in pixels.
    165                 },
    166               ],
    167               "codepointRange": { # Generic half-open interval [start, end) # Character offsets within a content item, included when content type
    168                   # is a text. Default charset assumed to be UTF-8.
    169                 "start": "A String", # Index of the first character of the range (inclusive).
    170                 "end": "A String", # Index of the last character of the range (exclusive).
    171               },
    172               "recordKey": { # Message for a unique key indicating a record that contains a finding. # Key of the finding.
    173                 "datastoreKey": { # Record key for a finding in Cloud Datastore.
    174                   "entityKey": { # A unique identifier for a Datastore entity. # Datastore entity key.
    175                       # If a key's partition ID or any of its path kinds or names are
    176                       # reserved/read-only, the key is reserved/read-only.
    177                       # A reserved/read-only key is forbidden in certain documented contexts.
    178                     "path": [ # The entity path.
    179                         # An entity path consists of one or more elements composed of a kind and a
    180                         # string or numerical identifier, which identify entities. The first
    181                         # element identifies a _root entity_, the second element identifies
    182                         # a _child_ of the root entity, the third element identifies a child of the
    183                         # second entity, and so forth. The entities identified by all prefixes of
    184                         # the path are called the element's _ancestors_.
    185                         #
    186                         # A path can never be empty, and a path can have at most 100 elements.
    187                       { # A (kind, ID/name) pair used to construct a key path.
    188                           #
    189                           # If either name or ID is set, the element is complete.
    190                           # If neither is set, the element is incomplete.
    191                         "kind": "A String", # The kind of the entity.
    192                             # A kind matching regex `__.*__` is reserved/read-only.
    193                             # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    194                             # Cannot be `""`.
    195                         "name": "A String", # The name of the entity.
    196                             # A name matching regex `__.*__` is reserved/read-only.
    197                             # A name must not be more than 1500 bytes when UTF-8 encoded.
    198                             # Cannot be `""`.
    199                         "id": "A String", # The auto-allocated ID of the entity.
    200                             # Never equal to zero. Values less than zero are discouraged and may not
    201                             # be supported in the future.
    202                       },
    203                     ],
    204                     "partitionId": { # Datastore partition ID. # Entities are partitioned into subsets, currently identified by a project
    205                         # ID and namespace ID.
    206                         # Queries are scoped to a single partition.
    207                         # A partition ID identifies a grouping of entities. The grouping is always
    208                         # by project and namespace, however the namespace ID may be empty.
    209                         #
    210                         # A partition ID contains several dimensions:
    211                         # project ID and namespace ID.
    212                       "projectId": "A String", # The ID of the project to which the entities belong.
    213                       "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    214                     },
    215                   },
    216                 },
    217                 "cloudStorageKey": { # Record key for a finding in a Cloud Storage file.
    218                   "startOffset": "A String", # Byte offset of the referenced data in the file.
    219                   "filePath": "A String", # Path to the file.
    220                 },
    221               },
    222               "byteRange": { # Generic half-open interval [start, end) # Zero-based byte offsets within a content item.
    223                 "start": "A String", # Index of the first character of the range (inclusive).
    224                 "end": "A String", # Index of the last character of the range (exclusive).
    225               },
    226             },
    227           },
    228         ],
    229       },
    230     ],
    231   }</pre>
    232 </div>
    233 
    234 <div class="method">
    235     <code class="details" id="redact">redact(body, x__xgafv=None)</code>
    236   <pre>Redact potentially sensitive info from a list of strings.
    237 This method has limits on input size, processing time, and output size.
    238 
    239 Args:
    240   body: object, The request body. (required)
    241     The object takes the form of:
    242 
    243 { # Request to search for potentially sensitive info in a list of items
    244       # and replace it with a default or provided content.
    245     "items": [ # The list of items to inspect. Up to 100 are allowed per request.
    246       { # Container structure for the content to inspect.
    247         "data": "A String", # Content data to inspect or redact.
    248         "type": "A String", # Type of the content, as defined in Content-Type HTTP header.
    249             # Supported types are: all "text" types, octet streams, PNG images,
    250             # JPEG images.
    251         "value": "A String", # String data to inspect or redact.
    252       },
    253     ],
    254     "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector.
    255         # When used with redactContent only info_types and min_likelihood are currently
    256         # used.
    257       "minLikelihood": "A String", # Only return findings equal or above this threshold.
    258       "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
    259           # included in the response; see Finding.quote.
    260       "excludeTypes": True or False, # When true, exclude type information of the findings.
    261       "infoTypes": [ # Restrict what info_types to look for. The values must correspond to
    262           # InfoType values returned by ListInfoTypes or found in documentation.
    263           # Empty info_types runs all enabled detectors.
    264         { # Type of information detected by the API.
    265           "name": "A String", # Name of the information type. For built-in info types, this is provided by
    266               # the API call ListInfoTypes. For user-defined info types, this is
    267               # provided by the user. All user-defined info types must have unique names,
    268               # and cannot conflict with built-in info type names.
    269         },
    270       ],
    271       "maxFindings": 42, # Limit the number of findings per content item.
    272     },
    273     "replaceConfigs": [ # The strings to replace findings with. Must specify at least one.
    274       {
    275         "replaceWith": "A String", # Content replacing sensitive information of given type. Max 256 chars.
    276         "infoType": { # Type of information detected by the API. # Type of information to replace. Only one ReplaceConfig per info_type
    277             # should be provided. If ReplaceConfig does not have an info_type, the DLP
    278             # API matches it against all info_types that are found but not specified in
    279             # another ReplaceConfig.
    280           "name": "A String", # Name of the information type. For built-in info types, this is provided by
    281               # the API call ListInfoTypes. For user-defined info types, this is
    282               # provided by the user. All user-defined info types must have unique names,
    283               # and cannot conflict with built-in info type names.
    284         },
    285       },
    286     ],
    287   }
    288 
    289   x__xgafv: string, V1 error format.
    290     Allowed values
    291       1 - v1 error format
    292       2 - v2 error format
    293 
    294 Returns:
    295   An object of the form:
    296 
    297     { # Results of redacting a list of items.
    298     "items": [ # The redacted content.
    299       { # Container structure for the content to inspect.
    300         "data": "A String", # Content data to inspect or redact.
    301         "type": "A String", # Type of the content, as defined in Content-Type HTTP header.
    302             # Supported types are: all "text" types, octet streams, PNG images,
    303             # JPEG images.
    304         "value": "A String", # String data to inspect or redact.
    305       },
    306     ],
    307   }</pre>
    308 </div>
    309 
    310 </body></html>