• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, 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
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, 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="securitycenter_v1beta1.html">Cloud Security Command Center API</a> . <a href="securitycenter_v1beta1.organizations.html">organizations</a> . <a href="securitycenter_v1beta1.organizations.assets.html">assets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#group">group(parent, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Filters an organization's assets and  groups them by their specified</p>
80<p class="toc_element">
81  <code><a href="#group_next">group_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84  <code><a href="#list">list(parent, orderBy=None, pageSize=None, x__xgafv=None, compareDuration=None, pageToken=None, fieldMask=None, readTime=None, filter=None)</a></code></p>
85<p class="firstline">Lists an organization's assets.</p>
86<p class="toc_element">
87  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90  <code><a href="#runDiscovery">runDiscovery(parent, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Runs asset discovery. The discovery is tracked with a long-running</p>
92<p class="toc_element">
93  <code><a href="#updateSecurityMarks">updateSecurityMarks(name, body, startTime=None, updateMask=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates security marks.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="group">group(parent, body, x__xgafv=None)</code>
98  <pre>Filters an organization's assets and  groups them by their specified
99properties.
100
101Args:
102  parent: string, Name of the organization to groupBy. Its format is
103"organizations/[organization_id]". (required)
104  body: object, The request body. (required)
105    The object takes the form of:
106
107{ # Request message for grouping by assets.
108    "compareDuration": "A String", # When compare_duration is set, the Asset's "state" property is updated to
109        # indicate whether the asset was added, removed, or remained present during
110        # the compare_duration period of time that precedes the read_time. This is
111        # the time between (read_time - compare_duration) and read_time.
112        #
113        # The state value is derived based on the presence of the asset at the two
114        # points in time. Intermediate state changes between the two times don't
115        # affect the result. For example, the results aren't affected if the asset is
116        # removed and re-created again.
117        #
118        # Possible "state" values when compare_duration is specified:
119        #
120        # * "ADDED": indicates that the asset was not present before
121        #              compare_duration, but present at reference_time.
122        # * "REMOVED": indicates that the asset was present at the start of
123        #              compare_duration, but not present at reference_time.
124        # * "ACTIVE": indicates that the asset was present at both the
125        #              start and the end of the time period defined by
126        #              compare_duration and reference_time.
127        #
128        # This field is ignored if `state` is not a field in `group_by`.
129    "pageSize": 42, # The maximum number of results to return in a single response. Default is
130        # 10, minimum is 1, maximum is 1000.
131    "filter": "A String", # Expression that defines the filter to apply across assets.
132        # The expression is a list of zero or more restrictions combined via logical
133        # operators `AND` and `OR`.
134        # Parentheses are not supported, and `OR` has higher precedence than `AND`.
135        #
136        # Restrictions have the form `<field> <operator> <value>` and may have a `-`
137        # character in front of them to indicate negation. The fields map to those
138        # defined in the Asset resource. Examples include:
139        #
140        # * name
141        # * security_center_properties.resource_name
142        # * resource_properties.a_property
143        # * security_marks.marks.marka
144        #
145        # The supported operators are:
146        #
147        # * `=` for all value types.
148        # * `>`, `<`, `>=`, `<=` for integer values.
149        # * `:`, meaning substring matching, for strings.
150        #
151        # The supported value types are:
152        #
153        # * string literals in quotes.
154        # * integer literals without quotes.
155        # * boolean literals `true` and `false` without quotes.
156        #
157        # For example, `resource_properties.size = 100` is a valid filter string.
158    "pageToken": "A String", # The value returned by the last `GroupAssetsResponse`; indicates
159        # that this is a continuation of a prior `GroupAssets` call, and that the
160        # system should return the next page of data.
161    "groupBy": "A String", # Expression that defines what assets fields to use for grouping. The string
162        # value should follow SQL syntax: comma separated list of fields. For
163        # example:
164        # "security_center_properties.resource_project,security_center_properties.project".
165        #
166        # The following fields are supported when compare_duration is not set:
167        #
168        # * security_center_properties.resource_project
169        # * security_center_properties.resource_type
170        # * security_center_properties.resource_parent
171        #
172        # The following fields are supported when compare_duration is set:
173        #
174        # * security_center_properties.resource_type
175    "readTime": "A String", # Time used as a reference point when filtering assets. The filter is limited
176        # to assets existing at the supplied time and their values are those at that
177        # specific time. Absence of this field will default to the API's version of
178        # NOW.
179  }
180
181  x__xgafv: string, V1 error format.
182    Allowed values
183      1 - v1 error format
184      2 - v2 error format
185
186Returns:
187  An object of the form:
188
189    { # Response message for grouping by assets.
190    "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more
191        # results.
192    "groupByResults": [ # Group results. There exists an element for each existing unique
193        # combination of property/values. The element contains a count for the number
194        # of times those specific property/values appear.
195      { # Result containing the properties and count of a groupBy request.
196        "count": "A String", # Total count of resources for the given properties.
197        "properties": { # Properties matching the groupBy fields in the request.
198          "a_key": "",
199        },
200      },
201    ],
202    "readTime": "A String", # Time used for executing the groupBy request.
203  }</pre>
204</div>
205
206<div class="method">
207    <code class="details" id="group_next">group_next(previous_request, previous_response)</code>
208  <pre>Retrieves the next page of results.
209
210Args:
211  previous_request: The request for the previous page. (required)
212  previous_response: The response from the request for the previous page. (required)
213
214Returns:
215  A request object that you can call 'execute()' on to request the next
216  page. Returns None if there are no more items in the collection.
217    </pre>
218</div>
219
220<div class="method">
221    <code class="details" id="list">list(parent, orderBy=None, pageSize=None, x__xgafv=None, compareDuration=None, pageToken=None, fieldMask=None, readTime=None, filter=None)</code>
222  <pre>Lists an organization's assets.
223
224Args:
225  parent: string, Name of the organization assets should belong to. Its format is
226"organizations/[organization_id]". (required)
227  orderBy: string, Expression that defines what fields and order to use for sorting. The
228string value should follow SQL syntax: comma separated list of fields. For
229example: "name,resource_properties.a_property". The default sorting order
230is ascending. To specify descending order for a field, a suffix " desc"
231should be appended to the field name. For example: "name
232desc,resource_properties.a_property". Redundant space characters in the
233syntax are insignificant. "name desc,resource_properties.a_property" and "
234name     desc  ,   resource_properties.a_property  " are equivalent.
235  pageSize: integer, The maximum number of results to return in a single response. Default is
23610, minimum is 1, maximum is 1000.
237  x__xgafv: string, V1 error format.
238    Allowed values
239      1 - v1 error format
240      2 - v2 error format
241  compareDuration: string, When compare_duration is set, the ListAssetResult's "state" attribute is
242updated to indicate whether the asset was added, removed, or remained
243present during the compare_duration period of time that precedes the
244read_time. This is the time between (read_time -
245compare_duration) and read_time.
246
247The state value is derived based on the presence of the asset at the two
248points in time. Intermediate state changes between the two times don't
249affect the result. For example, the results aren't affected if the asset is
250removed and re-created again.
251
252Possible "state" values when compare_duration is specified:
253
254* "ADDED": indicates that the asset was not present before
255             compare_duration, but present at read_time.
256* "REMOVED": indicates that the asset was present at the start of
257             compare_duration, but not present at read_time.
258* "ACTIVE": indicates that the asset was present at both the
259             start and the end of the time period defined by
260             compare_duration and read_time.
261
262If compare_duration is not specified, then the only possible state is
263"UNUSED", which indicates that the asset is present at read_time.
264  pageToken: string, The value returned by the last `ListAssetsResponse`; indicates
265that this is a continuation of a prior `ListAssets` call, and
266that the system should return the next page of data.
267  fieldMask: string, Optional.
268
269A field mask to specify the ListAssetsResult fields to be listed in the
270response.
271An empty field mask will list all fields.
272  readTime: string, Time used as a reference point when filtering assets. The filter is limited
273to assets existing at the supplied time and their values are those at that
274specific time. Absence of this field will default to the API's version of
275NOW.
276  filter: string, Expression that defines the filter to apply across assets.
277The expression is a list of zero or more restrictions combined via logical
278operators `AND` and `OR`.
279Parentheses are not supported, and `OR` has higher precedence than `AND`.
280
281Restrictions have the form `<field> <operator> <value>` and may have a `-`
282character in front of them to indicate negation. The fields map to those
283defined in the Asset resource. Examples include:
284
285* name
286* security_center_properties.resource_name
287* resource_properties.a_property
288* security_marks.marks.marka
289
290The supported operators are:
291
292* `=` for all value types.
293* `>`, `<`, `>=`, `<=` for integer values.
294* `:`, meaning substring matching, for strings.
295
296The supported value types are:
297
298* string literals in quotes.
299* integer literals without quotes.
300* boolean literals `true` and `false` without quotes.
301
302For example, `resource_properties.size = 100` is a valid filter string.
303
304Returns:
305  An object of the form:
306
307    { # Response message for listing assets.
308    "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more
309        # results.
310    "totalSize": 42, # The total number of assets matching the query.
311    "listAssetsResults": [ # Assets matching the list request.
312      { # Result containing the Asset and its State.
313        "state": "A String", # State of the asset.
314        "asset": { # Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud # Asset matching the search request.
315            # Platform (GCP) resource.
316            #
317            # The Asset is a Cloud SCC resource that captures information about a single
318            # GCP resource. All modifications to an Asset are only within the context of
319            # Cloud SCC and don't affect the referenced GCP resource.
320          "updateTime": "A String", # The time at which the asset was last updated, added, or deleted in Cloud
321              # SCC.
322          "name": "A String", # The relative resource name of this asset. See:
323              # https://cloud.google.com/apis/design/resource_names#relative_resource_name
324              # Example:
325              # "organizations/123/assets/456".
326          "securityCenterProperties": { # Cloud SCC managed properties. These properties are managed by Cloud SCC and # Cloud SCC managed properties. These properties are managed by
327              # Cloud SCC and cannot be modified by the user.
328              # cannot be modified by the user.
329            "resourceType": "A String", # The type of the GCP resource. Examples include: APPLICATION,
330                # PROJECT, and ORGANIZATION. This is a case insensitive field defined by
331                # Cloud SCC and/or the producer of the resource and is immutable
332                # after create time.
333            "resourceName": "A String", # The full resource name of the GCP resource this asset
334                # represents. This field is immutable after create time. See:
335                # https://cloud.google.com/apis/design/resource_names#full_resource_name
336            "resourceParent": "A String", # The full resource name of the immediate parent of the resource. See:
337                # https://cloud.google.com/apis/design/resource_names#full_resource_name
338            "resourceProject": "A String", # The full resource name of the project the resource belongs to. See:
339                # https://cloud.google.com/apis/design/resource_names#full_resource_name
340            "resourceOwners": [ # Owners of the Google Cloud resource.
341              "A String",
342            ],
343          },
344          "resourceProperties": { # Resource managed properties. These properties are managed and defined by
345              # the GCP resource and cannot be modified by the user.
346            "a_key": "",
347          },
348          "securityMarks": { # User specified security marks that are attached to the parent Cloud Security # User specified security marks. These marks are entirely managed by the user
349              # and come from the SecurityMarks resource that belongs to the asset.
350                # Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud
351                # SCC organization -- they can be modified and viewed by all users who have
352                # proper permissions on the organization.
353              "name": "A String", # The relative resource name of the SecurityMarks. See:
354                  # https://cloud.google.com/apis/design/resource_names#relative_resource_name
355                  # Examples:
356                  # "organizations/123/assets/456/securityMarks"
357                  # "organizations/123/sources/456/findings/789/securityMarks".
358              "marks": { # Mutable user specified security marks belonging to the parent resource.
359                  # Constraints are as follows:
360                  #   - Keys and values are treated as case insensitive
361                  #   - Keys must be between 1 - 256 characters (inclusive)
362                  #   - Keys must be letters, numbers, underscores, or dashes
363                  #   - Values have leading and trailing whitespace trimmed, remaining
364                  #     characters must be between 1 - 4096 characters (inclusive)
365                "a_key": "A String",
366              },
367            },
368          "createTime": "A String", # The time at which the asset was created in Cloud SCC.
369        },
370      },
371    ],
372    "readTime": "A String", # Time used for executing the list request.
373  }</pre>
374</div>
375
376<div class="method">
377    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
378  <pre>Retrieves the next page of results.
379
380Args:
381  previous_request: The request for the previous page. (required)
382  previous_response: The response from the request for the previous page. (required)
383
384Returns:
385  A request object that you can call 'execute()' on to request the next
386  page. Returns None if there are no more items in the collection.
387    </pre>
388</div>
389
390<div class="method">
391    <code class="details" id="runDiscovery">runDiscovery(parent, body=None, x__xgafv=None)</code>
392  <pre>Runs asset discovery. The discovery is tracked with a long-running
393operation.
394
395This API can only be called with limited frequency for an organization. If
396it is called too frequently the caller will receive a TOO_MANY_REQUESTS
397error.
398
399Args:
400  parent: string, Name of the organization to run asset discovery for. Its format is
401"organizations/[organization_id]". (required)
402  body: object, The request body.
403    The object takes the form of:
404
405{ # Request message for running asset discovery for an organization.
406  }
407
408  x__xgafv: string, V1 error format.
409    Allowed values
410      1 - v1 error format
411      2 - v2 error format
412
413Returns:
414  An object of the form:
415
416    { # This resource represents a long-running operation that is the result of a
417      # network API call.
418    "metadata": { # Service-specific metadata associated with the operation.  It typically
419        # contains progress information and common metadata such as create time.
420        # Some services might not provide such metadata.  Any method that returns a
421        # long-running operation should document the metadata type, if any.
422      "a_key": "", # Properties of the object. Contains field @type with type URL.
423    },
424    "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
425        # different programming environments, including REST APIs and RPC APIs. It is
426        # used by [gRPC](https://github.com/grpc). Each `Status` message contains
427        # three pieces of data: error code, error message, and error details.
428        #
429        # You can find out more about this error model and how to work with it in the
430        # [API Design Guide](https://cloud.google.com/apis/design/errors).
431      "message": "A String", # A developer-facing error message, which should be in English. Any
432          # user-facing error message should be localized and sent in the
433          # google.rpc.Status.details field, or localized by the client.
434      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
435      "details": [ # A list of messages that carry the error details.  There is a common set of
436          # message types for APIs to use.
437        {
438          "a_key": "", # Properties of the object. Contains field @type with type URL.
439        },
440      ],
441    },
442    "done": True or False, # If the value is `false`, it means the operation is still in progress.
443        # If `true`, the operation is completed, and either `error` or `response` is
444        # available.
445    "response": { # The normal response of the operation in case of success.  If the original
446        # method returns no data on success, such as `Delete`, the response is
447        # `google.protobuf.Empty`.  If the original method is standard
448        # `Get`/`Create`/`Update`, the response should be the resource.  For other
449        # methods, the response should have the type `XxxResponse`, where `Xxx`
450        # is the original method name.  For example, if the original method name
451        # is `TakeSnapshot()`, the inferred response type is
452        # `TakeSnapshotResponse`.
453      "a_key": "", # Properties of the object. Contains field @type with type URL.
454    },
455    "name": "A String", # The server-assigned name, which is only unique within the same service that
456        # originally returns it. If you use the default HTTP mapping, the
457        # `name` should be a resource name ending with `operations/{unique_id}`.
458  }</pre>
459</div>
460
461<div class="method">
462    <code class="details" id="updateSecurityMarks">updateSecurityMarks(name, body, startTime=None, updateMask=None, x__xgafv=None)</code>
463  <pre>Updates security marks.
464
465Args:
466  name: string, The relative resource name of the SecurityMarks. See:
467https://cloud.google.com/apis/design/resource_names#relative_resource_name
468Examples:
469"organizations/123/assets/456/securityMarks"
470"organizations/123/sources/456/findings/789/securityMarks". (required)
471  body: object, The request body. (required)
472    The object takes the form of:
473
474{ # User specified security marks that are attached to the parent Cloud Security
475      # Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud
476      # SCC organization -- they can be modified and viewed by all users who have
477      # proper permissions on the organization.
478    "name": "A String", # The relative resource name of the SecurityMarks. See:
479        # https://cloud.google.com/apis/design/resource_names#relative_resource_name
480        # Examples:
481        # "organizations/123/assets/456/securityMarks"
482        # "organizations/123/sources/456/findings/789/securityMarks".
483    "marks": { # Mutable user specified security marks belonging to the parent resource.
484        # Constraints are as follows:
485        #   - Keys and values are treated as case insensitive
486        #   - Keys must be between 1 - 256 characters (inclusive)
487        #   - Keys must be letters, numbers, underscores, or dashes
488        #   - Values have leading and trailing whitespace trimmed, remaining
489        #     characters must be between 1 - 4096 characters (inclusive)
490      "a_key": "A String",
491    },
492  }
493
494  startTime: string, The time at which the updated SecurityMarks take effect.
495  updateMask: string, The FieldMask to use when updating the security marks resource.
496  x__xgafv: string, V1 error format.
497    Allowed values
498      1 - v1 error format
499      2 - v2 error format
500
501Returns:
502  An object of the form:
503
504    { # User specified security marks that are attached to the parent Cloud Security
505        # Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud
506        # SCC organization -- they can be modified and viewed by all users who have
507        # proper permissions on the organization.
508      "name": "A String", # The relative resource name of the SecurityMarks. See:
509          # https://cloud.google.com/apis/design/resource_names#relative_resource_name
510          # Examples:
511          # "organizations/123/assets/456/securityMarks"
512          # "organizations/123/sources/456/findings/789/securityMarks".
513      "marks": { # Mutable user specified security marks belonging to the parent resource.
514          # Constraints are as follows:
515          #   - Keys and values are treated as case insensitive
516          #   - Keys must be between 1 - 256 characters (inclusive)
517          #   - Keys must be letters, numbers, underscores, or dashes
518          #   - Values have leading and trailing whitespace trimmed, remaining
519          #     characters must be between 1 - 4096 characters (inclusive)
520        "a_key": "A String",
521      },
522    }</pre>
523</div>
524
525</body></html>