Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

feat: add AnalyzeIamPolicy and ExportIamPolicyAnalysis; support OSInventory; add common resource helper methods; expose client transport #113

Merged
merged 13 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: added support OSInventory in Assets. docs: updated existing docs.
Clients receive detailed OSInventory in Assets.

PiperOrigin-RevId: 342689216

Source-Author: Google APIs <[email protected]>
Source-Date: Mon Nov 16 12:04:29 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb
Source-Link: googleapis/googleapis@1f8a514
  • Loading branch information
yoshi-automation committed Nov 17, 2020
commit 09255760012fb83b393b406563b588957bb38f7c
1 change: 1 addition & 0 deletions google/cloud/asset_v1/types/asset_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class ContentType(proto.Enum):
IAM_POLICY = 2
ORG_POLICY = 4
ACCESS_POLICY = 5
OS_INVENTORY = 6


class ExportAssetsRequest(proto.Message):
Expand Down
8 changes: 8 additions & 0 deletions google/cloud/asset_v1/types/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


from google.cloud.orgpolicy.v1 import orgpolicy_pb2 as orgpolicy # type: ignore
from google.cloud.osconfig.v1 import inventory_pb2 as inventory # type: ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asset is depending on a type in a different API.

https://github.com/googleapis/python-os-config

Dependency on OS Config added in: googleapis/googleapis@1f8a514

Plan:

  • regenerate google-cloud-os-config
  • add regex replacements in this file to use google.cloud.osconfig_v1.Inventory

Does that sound correct @software-dov?

from google.iam.v1 import policy_pb2 as gi_policy # type: ignore
from google.identity.accesscontextmanager.v1 import access_level_pb2 as gia_access_level # type: ignore
from google.identity.accesscontextmanager.v1 import access_policy_pb2 as gia_access_policy # type: ignore
Expand Down Expand Up @@ -156,6 +157,11 @@ class Asset(proto.Message):
service_perimeter (~.gia_service_perimeter.ServicePerimeter):
Please also refer to the `service perimeter user
guide <https://cloud.google.com/vpc-service-controls/docs/overview>`__.
os_inventory (~.inventory.Inventory):
A representation of runtime OS Inventory information. See
`this
topic <https://cloud.google.com/compute/docs/instances/os-inventory-management>`__
for more information.
ancestors (Sequence[str]):
The ancestry path of an asset in Google Cloud `resource
hierarchy <https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy>`__,
Expand Down Expand Up @@ -202,6 +208,8 @@ class Asset(proto.Message):
message=gia_service_perimeter.ServicePerimeter,
)

os_inventory = proto.Field(proto.MESSAGE, number=12, message=inventory.Inventory,)

ancestors = proto.RepeatedField(proto.STRING, number=10)


Expand Down
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776",
"internalRef": "339708980"
"sha": "1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb",
"internalRef": "342689216"
}
},
{
Expand Down