Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 03e172b

Browse files
authored
feat: add v1p1beta1; add resource_display_name, resource_parent_display_name, resource_project_display_name to v1.Asset.SecurityCenterProperties; add output only field resource to v1.ListFindingsResponse.ListFindingsResult; increase initial_rpc_timeout_millis` in default config for v1; standardize use of 'required' and 'optional' in docstrings; add 2.7 deprecation warning; bump copyright year to 2020 (#7)
1 parent 428f419 commit 03e172b

87 files changed

Lines changed: 15749 additions & 951 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/gapic/v1p1beta1/api.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Client for Cloud Security Command Center API
2+
============================================
3+
4+
.. automodule:: google.cloud.securitycenter_v1p1beta1
5+
:members:
6+
:inherited-members:

docs/gapic/v1p1beta1/types.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Types for Cloud Security Command Center API Client
2+
==================================================
3+
4+
.. automodule:: google.cloud.securitycenter_v1p1beta1.types
5+
:members:

docs/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@
22

33
Api Reference
44
-------------
5+
6+
v1
7+
~~~
58
.. toctree::
69
:maxdepth: 2
710

811
gapic/v1/api
912
gapic/v1/types
13+
14+
v1beta1
15+
~~~~~~~
16+
.. toctree::
1017
gapic/v1beta1/api
1118
gapic/v1beta1/types
1219

20+
21+
v1p1beta1
22+
~~~~~~~~~
23+
.. toctree::
24+
gapic/v1p1beta1/api
25+
gapic/v1p1beta1/types
26+
1327
Changelog
1428
----------
1529

google/cloud/securitycenter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/securitycenter_v1/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,12 +16,23 @@
1616

1717

1818
from __future__ import absolute_import
19+
import sys
20+
import warnings
1921

2022
from google.cloud.securitycenter_v1 import types
2123
from google.cloud.securitycenter_v1.gapic import enums
2224
from google.cloud.securitycenter_v1.gapic import security_center_client
2325

2426

27+
if sys.version_info[:2] == (2, 7):
28+
message = (
29+
"A future version of this library will drop support for Python 2.7."
30+
"More details about Python 2 support for Google Cloud Client Libraries"
31+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
32+
)
33+
warnings.warn(message, DeprecationWarning)
34+
35+
2536
class SecurityCenterClient(security_center_client.SecurityCenterClient):
2637
__doc__ = security_center_client.SecurityCenterClient.__doc__
2738
enums = enums

google/cloud/securitycenter_v1/gapic/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/securitycenter_v1/gapic/security_center_client.py

Lines changed: 149 additions & 93 deletions
Large diffs are not rendered by default.

google/cloud/securitycenter_v1/gapic/security_center_client_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"initial_retry_delay_millis": 100,
1111
"retry_delay_multiplier": 1.3,
1212
"max_retry_delay_millis": 60000,
13-
"initial_rpc_timeout_millis": 20000,
13+
"initial_rpc_timeout_millis": 480000,
1414
"rpc_timeout_multiplier": 1.0,
15-
"max_rpc_timeout_millis": 20000,
15+
"max_rpc_timeout_millis": 480000,
1616
"total_timeout_millis": 600000,
1717
}
1818
},

google/cloud/securitycenter_v1/gapic/transports/security_center_grpc_transport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -208,7 +208,7 @@ def group_findings(self):
208208
specified properties.
209209
210210
To group across all sources provide a ``-`` as the source id. Example:
211-
/v1/organizations/123/sources/-/findings
211+
/v1/organizations/{organization\_id}/sources/-/findings
212212
213213
Returns:
214214
Callable: A callable which accepts the appropriate
@@ -237,7 +237,7 @@ def list_findings(self):
237237
Lists an organization or source's findings.
238238
239239
To list across all sources provide a ``-`` as the source id. Example:
240-
/v1/organizations/123/sources/-/findings
240+
/v1/organizations/{organization\_id}/sources/-/findings
241241
242242
Returns:
243243
Callable: A callable which accepts the appropriate

google/cloud/securitycenter_v1/proto/asset.proto

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ syntax = "proto3";
1717

1818
package google.cloud.securitycenter.v1;
1919

20-
import "google/api/annotations.proto";
20+
import "google/api/resource.proto";
2121
import "google/cloud/securitycenter/v1/security_marks.proto";
2222
import "google/protobuf/struct.proto";
2323
import "google/protobuf/timestamp.proto";
24+
import "google/api/annotations.proto";
2425

2526
option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
2627
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
@@ -36,6 +37,11 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1";
3637
// GCP resource. All modifications to an Asset are only within the context of
3738
// Cloud SCC and don't affect the referenced GCP resource.
3839
message Asset {
40+
option (google.api.resource) = {
41+
type: "securitycenter.googleapis.com/Asset"
42+
pattern: "organizations/{organization}/assets/{asset}"
43+
};
44+
3945
// Cloud SCC managed properties. These properties are managed by Cloud SCC and
4046
// cannot be modified by the user.
4147
message SecurityCenterProperties {
@@ -60,6 +66,15 @@ message Asset {
6066

6167
// Owners of the Google Cloud resource.
6268
repeated string resource_owners = 5;
69+
70+
// The user defined display name for this resource.
71+
string resource_display_name = 6;
72+
73+
// The user defined display name for the parent of this resource.
74+
string resource_parent_display_name = 7;
75+
76+
// The user defined display name for the project of this resource.
77+
string resource_project_display_name = 8;
6378
}
6479

6580
// IAM Policy information associated with the GCP resource described by the
@@ -75,7 +90,7 @@ message Asset {
7590
// The relative resource name of this asset. See:
7691
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
7792
// Example:
78-
// "organizations/123/assets/456".
93+
// "organizations/{organization_id}/assets/{asset_id}".
7994
string name = 1;
8095

8196
// Cloud SCC managed properties. These properties are managed by

0 commit comments

Comments
 (0)