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

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add v1p1beta1; add resource_display_name, resource_parent_dis…
…play_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)
  • Loading branch information
busunkim96 committed Feb 13, 2020
1 parent 428f419 commit 03e172b
Show file tree
Hide file tree
Showing 87 changed files with 15,749 additions and 951 deletions.
6 changes: 6 additions & 0 deletions docs/gapic/v1p1beta1/api.rst
@@ -0,0 +1,6 @@
Client for Cloud Security Command Center API
============================================

.. automodule:: google.cloud.securitycenter_v1p1beta1
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/gapic/v1p1beta1/types.rst
@@ -0,0 +1,5 @@
Types for Cloud Security Command Center API Client
==================================================

.. automodule:: google.cloud.securitycenter_v1p1beta1.types
:members:
14 changes: 14 additions & 0 deletions docs/index.rst
Expand Up @@ -2,14 +2,28 @@

Api Reference
-------------

v1
~~~
.. toctree::
:maxdepth: 2

gapic/v1/api
gapic/v1/types

v1beta1
~~~~~~~
.. toctree::
gapic/v1beta1/api
gapic/v1beta1/types


v1p1beta1
~~~~~~~~~
.. toctree::
gapic/v1p1beta1/api
gapic/v1p1beta1/types

Changelog
----------

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/securitycenter.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
13 changes: 12 additions & 1 deletion google/cloud/securitycenter_v1/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,23 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.securitycenter_v1 import types
from google.cloud.securitycenter_v1.gapic import enums
from google.cloud.securitycenter_v1.gapic import security_center_client


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class SecurityCenterClient(security_center_client.SecurityCenterClient):
__doc__ = security_center_client.SecurityCenterClient.__doc__
enums = enums
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/securitycenter_v1/gapic/enums.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
242 changes: 149 additions & 93 deletions google/cloud/securitycenter_v1/gapic/security_center_client.py

Large diffs are not rendered by default.

Expand Up @@ -10,9 +10,9 @@
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"initial_rpc_timeout_millis": 480000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"max_rpc_timeout_millis": 480000,
"total_timeout_millis": 600000,
}
},
Expand Down
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -208,7 +208,7 @@ def group_findings(self):
specified properties.
To group across all sources provide a ``-`` as the source id. Example:
/v1/organizations/123/sources/-/findings
/v1/organizations/{organization\_id}/sources/-/findings
Returns:
Callable: A callable which accepts the appropriate
Expand Down Expand Up @@ -237,7 +237,7 @@ def list_findings(self):
Lists an organization or source's findings.
To list across all sources provide a ``-`` as the source id. Example:
/v1/organizations/123/sources/-/findings
/v1/organizations/{organization\_id}/sources/-/findings
Returns:
Callable: A callable which accepts the appropriate
Expand Down
19 changes: 17 additions & 2 deletions google/cloud/securitycenter_v1/proto/asset.proto
Expand Up @@ -17,10 +17,11 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/api/resource.proto";
import "google/cloud/securitycenter/v1/security_marks.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand All @@ -36,6 +37,11 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1";
// GCP resource. All modifications to an Asset are only within the context of
// Cloud SCC and don't affect the referenced GCP resource.
message Asset {
option (google.api.resource) = {
type: "securitycenter.googleapis.com/Asset"
pattern: "organizations/{organization}/assets/{asset}"
};

// Cloud SCC managed properties. These properties are managed by Cloud SCC and
// cannot be modified by the user.
message SecurityCenterProperties {
Expand All @@ -60,6 +66,15 @@ message Asset {

// Owners of the Google Cloud resource.
repeated string resource_owners = 5;

// The user defined display name for this resource.
string resource_display_name = 6;

// The user defined display name for the parent of this resource.
string resource_parent_display_name = 7;

// The user defined display name for the project of this resource.
string resource_project_display_name = 8;
}

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

// Cloud SCC managed properties. These properties are managed by
Expand Down
107 changes: 87 additions & 20 deletions google/cloud/securitycenter_v1/proto/asset_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 03e172b

Please sign in to comment.