diff --git a/google/cloud/asset_v1/gapic/asset_service_client.py b/google/cloud/asset_v1/gapic/asset_service_client.py index dd625c88..a6a09b07 100644 --- a/google/cloud/asset_v1/gapic/asset_service_client.py +++ b/google/cloud/asset_v1/gapic/asset_service_client.py @@ -16,6 +16,7 @@ """Accesses the google.cloud.asset.v1 AssetService API.""" +import functools import pkg_resources import warnings @@ -28,6 +29,7 @@ import google.api_core.grpc_helpers import google.api_core.operation import google.api_core.operations_v1 +import google.api_core.page_iterator import google.api_core.path_template import grpc @@ -830,3 +832,305 @@ def update_feed( return self._inner_api_calls["update_feed"]( request, retry=retry, timeout=timeout, metadata=metadata ) + + def search_all_resources( + self, + scope, + query=None, + asset_types=None, + page_size=None, + order_by=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Searches all the resources within the given accessible scope (e.g., a + project, a folder or an organization). Callers should have + cloud.assets.SearchAllResources permission upon the requested scope, + otherwise the request will be rejected. + + Example: + >>> from google.cloud import asset_v1 + >>> + >>> client = asset_v1.AssetServiceClient() + >>> + >>> # TODO: Initialize `scope`: + >>> scope = '' + >>> + >>> # Iterate over all results + >>> for element in client.search_all_resources(scope): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.search_all_resources(scope).pages: + ... for element in page: + ... # process element + ... pass + + Args: + scope (str): Required. A scope can be a project, a folder or an organization. The + search is limited to the resources within the ``scope``. + + The allowed values are: + + - projects/{PROJECT_ID} + - projects/{PROJECT_NUMBER} + - folders/{FOLDER_NUMBER} + - organizations/{ORGANIZATION_NUMBER} + query (str): Optional. The query statement. An empty query can be specified to + search all the resources of certain ``asset_types`` within the given + ``scope``. + + Examples: + + - ``name : "Important"`` to find Cloud resources whose name contains + "Important" as a word. + - ``displayName : "Impor*"`` to find Cloud resources whose display name + contains "Impor" as a word prefix. + - ``description : "*por*"`` to find Cloud resources whose description + contains "por" as a substring. + - ``location : "us-west*"`` to find Cloud resources whose location is + prefixed with "us-west". + - ``labels : "prod"`` to find Cloud resources whose labels contain + "prod" as a key or value. + - ``labels.env : "prod"`` to find Cloud resources which have a label + "env" and its value is "prod". + - ``labels.env : *`` to find Cloud resources which have a label "env". + - ``"Important"`` to find Cloud resources which contain "Important" as + a word in any of the searchable fields. + - ``"Impor*"`` to find Cloud resources which contain "Impor" as a word + prefix in any of the searchable fields. + - ``"*por*"`` to find Cloud resources which contain "por" as a + substring in any of the searchable fields. + - ``("Important" AND location : ("us-west1" OR "global"))`` to find + Cloud resources which contain "Important" as a word in any of the + searchable fields and are also located in the "us-west1" region or + the "global" location. + + See `how to construct a + query `__ + for more details. + asset_types (list[str]): Optional. A list of asset types that this request searches for. If + empty, it will search all the `searchable asset + types `__. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + order_by (str): Optional. A comma separated list of fields specifying the sorting + order of the results. The default order is ascending. Add " DESC" after + the field name to indicate descending order. Redundant space characters + are ignored. Example: "location DESC, name". See `supported resource + metadata + fields `__ + for more details. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.asset_v1.types.ResourceSearchResult` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "search_all_resources" not in self._inner_api_calls: + self._inner_api_calls[ + "search_all_resources" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.search_all_resources, + default_retry=self._method_configs["SearchAllResources"].retry, + default_timeout=self._method_configs["SearchAllResources"].timeout, + client_info=self._client_info, + ) + + request = asset_service_pb2.SearchAllResourcesRequest( + scope=scope, + query=query, + asset_types=asset_types, + page_size=page_size, + order_by=order_by, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("scope", scope)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["search_all_resources"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="results", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + + def search_all_iam_policies( + self, + scope, + query=None, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Searches all the IAM policies within the given accessible scope (e.g., a + project, a folder or an organization). Callers should have + cloud.assets.SearchAllIamPolicies permission upon the requested scope, + otherwise the request will be rejected. + + Example: + >>> from google.cloud import asset_v1 + >>> + >>> client = asset_v1.AssetServiceClient() + >>> + >>> # TODO: Initialize `scope`: + >>> scope = '' + >>> + >>> # Iterate over all results + >>> for element in client.search_all_iam_policies(scope): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.search_all_iam_policies(scope).pages: + ... for element in page: + ... # process element + ... pass + + Args: + scope (str): Required. A scope can be a project, a folder or an organization. The + search is limited to the IAM policies within the ``scope``. + + The allowed values are: + + - projects/{PROJECT_ID} + - projects/{PROJECT_NUMBER} + - folders/{FOLDER_NUMBER} + - organizations/{ORGANIZATION_NUMBER} + query (str): Optional. The query statement. An empty query can be specified to + search all the IAM policies within the given ``scope``. + + Examples: + + - ``policy : "amy@gmail.com"`` to find Cloud IAM policy bindings that + specify user "amy@gmail.com". + - ``policy : "roles/compute.admin"`` to find Cloud IAM policy bindings + that specify the Compute Admin role. + - ``policy.role.permissions : "storage.buckets.update"`` to find Cloud + IAM policy bindings that specify a role containing + "storage.buckets.update" permission. + - ``resource : "organizations/123"`` to find Cloud IAM policy bindings + that are set on "organizations/123". + - ``(resource : ("organizations/123" OR "folders/1234") AND policy : "amy")`` + to find Cloud IAM policy bindings that are set on "organizations/123" + or "folders/1234", and also specify user "amy". + + See `how to construct a + query `__ + for more details. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.asset_v1.types.IamPolicySearchResult` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "search_all_iam_policies" not in self._inner_api_calls: + self._inner_api_calls[ + "search_all_iam_policies" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.search_all_iam_policies, + default_retry=self._method_configs["SearchAllIamPolicies"].retry, + default_timeout=self._method_configs["SearchAllIamPolicies"].timeout, + client_info=self._client_info, + ) + + request = asset_service_pb2.SearchAllIamPoliciesRequest( + scope=scope, query=query, page_size=page_size + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("scope", scope)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["search_all_iam_policies"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="results", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator diff --git a/google/cloud/asset_v1/gapic/asset_service_client_config.py b/google/cloud/asset_v1/gapic/asset_service_client_config.py index 68062167..75e1bf34 100644 --- a/google/cloud/asset_v1/gapic/asset_service_client_config.py +++ b/google/cloud/asset_v1/gapic/asset_service_client_config.py @@ -52,6 +52,16 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, + "SearchAllResources": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "SearchAllIamPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, }, } } diff --git a/google/cloud/asset_v1/gapic/transports/asset_service_grpc_transport.py b/google/cloud/asset_v1/gapic/transports/asset_service_grpc_transport.py index 6ad9733c..c5b19d50 100644 --- a/google/cloud/asset_v1/gapic/transports/asset_service_grpc_transport.py +++ b/google/cloud/asset_v1/gapic/transports/asset_service_grpc_transport.py @@ -214,3 +214,35 @@ def update_feed(self): deserialized response object. """ return self._stubs["asset_service_stub"].UpdateFeed + + @property + def search_all_resources(self): + """Return the gRPC stub for :meth:`AssetServiceClient.search_all_resources`. + + Searches all the resources within the given accessible scope (e.g., a + project, a folder or an organization). Callers should have + cloud.assets.SearchAllResources permission upon the requested scope, + otherwise the request will be rejected. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["asset_service_stub"].SearchAllResources + + @property + def search_all_iam_policies(self): + """Return the gRPC stub for :meth:`AssetServiceClient.search_all_iam_policies`. + + Searches all the IAM policies within the given accessible scope (e.g., a + project, a folder or an organization). Callers should have + cloud.assets.SearchAllIamPolicies permission upon the requested scope, + otherwise the request will be rejected. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["asset_service_stub"].SearchAllIamPolicies diff --git a/google/cloud/asset_v1/proto/asset_service_pb2.py b/google/cloud/asset_v1/proto/asset_service_pb2.py index bfc85625..bf4726f8 100644 --- a/google/cloud/asset_v1/proto/asset_service_pb2.py +++ b/google/cloud/asset_v1/proto/asset_service_pb2.py @@ -34,7 +34,7 @@ package="google.cloud.asset.v1", syntax="proto3", serialized_options=b"\n\031com.google.cloud.asset.v1B\021AssetServiceProtoP\001Z:google.golang.org/genproto/googleapis/cloud/asset/v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1", - serialized_pb=b'\n/google/cloud/asset_v1/proto/asset_service.proto\x12\x15google.cloud.asset.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/asset_v1/proto/assets.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto"\x8d\x02\n\x13\x45xportAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32".google.cloud.asset.v1.ContentType\x12?\n\routput_config\x18\x05 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfigB\x03\xe0\x41\x02"\x81\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\routput_config\x18\x02 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfig"\xed\x01\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32".google.cloud.asset.v1.ContentTypeB\x03\xe0\x41\x01\x12@\n\x10read_time_window\x18\x04 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindowB\x03\xe0\x41\x01"U\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12\x34\n\x06\x61ssets\x18\x01 \x03(\x0b\x32$.google.cloud.asset.v1.TemporalAsset"n\n\x11\x43reateFeedRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x66\x65\x65\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12.\n\x04\x66\x65\x65\x64\x18\x03 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02"F\n\x0eGetFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed"\'\n\x10ListFeedsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02"?\n\x11ListFeedsResponse\x12*\n\x05\x66\x65\x65\x64s\x18\x01 \x03(\x0b\x32\x1b.google.cloud.asset.v1.Feed"y\n\x11UpdateFeedRequest\x12.\n\x04\x66\x65\x65\x64\x18\x01 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"I\n\x11\x44\x65leteFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed"\xab\x01\n\x0cOutputConfig\x12@\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32%.google.cloud.asset.v1.GcsDestinationH\x00\x12J\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32*.google.cloud.asset.v1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination"C\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x14\n\nuri_prefix\x18\x02 \x01(\tH\x00\x42\x0c\n\nobject_uri"N\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08""\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t"i\n\x10\x46\x65\x65\x64OutputConfig\x12\x46\n\x12pubsub_destination\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1.PubsubDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xdb\x02\n\x04\x46\x65\x65\x64\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32".google.cloud.asset.v1.ContentType\x12H\n\x12\x66\x65\x65\x64_output_config\x18\x05 \x01(\x0b\x32\'.google.cloud.asset.v1.FeedOutputConfigB\x03\xe0\x41\x02:\x91\x01\xea\x41\x8d\x01\n\x1e\x63loudasset.googleapis.com/Feed\x12\x1fprojects/{project}/feeds/{feed}\x12\x1d\x66olders/{folder}/feeds/{feed}\x12)organizations/{organization}/feeds/{feed} \x01*l\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x12\x0e\n\nORG_POLICY\x10\x04\x12\x11\n\rACCESS_POLICY\x10\x05\x32\xf0\x08\n\x0c\x41ssetService\x12\xde\x01\n\x0c\x45xportAssets\x12*.google.cloud.asset.v1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation"\x82\x01\x82\xd3\xe4\x93\x02""\x1d/v1/{parent=*/*}:exportAssets:\x01*\xca\x41W\n*google.cloud.asset.v1.ExportAssetsResponse\x12)google.cloud.asset.v1.ExportAssetsRequest\x12\xb2\x01\n\x15\x42\x61tchGetAssetsHistory\x12\x33.google.cloud.asset.v1.BatchGetAssetsHistoryRequest\x1a\x34.google.cloud.asset.v1.BatchGetAssetsHistoryResponse".\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=*/*}:batchGetAssetsHistory\x12\x7f\n\nCreateFeed\x12(.google.cloud.asset.v1.CreateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed"*\x82\xd3\xe4\x93\x02\x1b"\x16/v1/{parent=*/*}/feeds:\x01*\xda\x41\x06parent\x12t\n\x07GetFeed\x12%.google.cloud.asset.v1.GetFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed"%\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{name=*/*/feeds/*}\xda\x41\x04name\x12\x87\x01\n\tListFeeds\x12\'.google.cloud.asset.v1.ListFeedsRequest\x1a(.google.cloud.asset.v1.ListFeedsResponse"\'\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{parent=*/*}/feeds\xda\x41\x06parent\x12\x82\x01\n\nUpdateFeed\x12(.google.cloud.asset.v1.UpdateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed"-\x82\xd3\xe4\x93\x02 2\x1b/v1/{feed.name=*/*/feeds/*}:\x01*\xda\x41\x04\x66\x65\x65\x64\x12u\n\nDeleteFeed\x12(.google.cloud.asset.v1.DeleteFeedRequest\x1a\x16.google.protobuf.Empty"%\x82\xd3\xe4\x93\x02\x18*\x16/v1/{name=*/*/feeds/*}\xda\x41\x04name\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9c\x01\n\x19\x63om.google.cloud.asset.v1B\x11\x41ssetServiceProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/asset/v1;asset\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3', + serialized_pb=b'\n/google/cloud/asset_v1/proto/asset_service.proto\x12\x15google.cloud.asset.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/asset_v1/proto/assets.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto"\x8d\x02\n\x13\x45xportAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32".google.cloud.asset.v1.ContentType\x12?\n\routput_config\x18\x05 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfigB\x03\xe0\x41\x02"\x81\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\routput_config\x18\x02 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfig"\xed\x01\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32".google.cloud.asset.v1.ContentTypeB\x03\xe0\x41\x01\x12@\n\x10read_time_window\x18\x04 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindowB\x03\xe0\x41\x01"U\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12\x34\n\x06\x61ssets\x18\x01 \x03(\x0b\x32$.google.cloud.asset.v1.TemporalAsset"n\n\x11\x43reateFeedRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x66\x65\x65\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12.\n\x04\x66\x65\x65\x64\x18\x03 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02"F\n\x0eGetFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed"\'\n\x10ListFeedsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02"?\n\x11ListFeedsResponse\x12*\n\x05\x66\x65\x65\x64s\x18\x01 \x03(\x0b\x32\x1b.google.cloud.asset.v1.Feed"y\n\x11UpdateFeedRequest\x12.\n\x04\x66\x65\x65\x64\x18\x01 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"I\n\x11\x44\x65leteFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed"\xab\x01\n\x0cOutputConfig\x12@\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32%.google.cloud.asset.v1.GcsDestinationH\x00\x12J\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32*.google.cloud.asset.v1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination"C\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x14\n\nuri_prefix\x18\x02 \x01(\tH\x00\x42\x0c\n\nobject_uri"N\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08""\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t"i\n\x10\x46\x65\x65\x64OutputConfig\x12\x46\n\x12pubsub_destination\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1.PubsubDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xdb\x02\n\x04\x46\x65\x65\x64\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32".google.cloud.asset.v1.ContentType\x12H\n\x12\x66\x65\x65\x64_output_config\x18\x05 \x01(\x0b\x32\'.google.cloud.asset.v1.FeedOutputConfigB\x03\xe0\x41\x02:\x91\x01\xea\x41\x8d\x01\n\x1e\x63loudasset.googleapis.com/Feed\x12\x1fprojects/{project}/feeds/{feed}\x12\x1d\x66olders/{folder}/feeds/{feed}\x12)organizations/{organization}/feeds/{feed} \x01"\xa5\x01\n\x19SearchAllResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01"s\n\x1aSearchAllResourcesResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.google.cloud.asset.v1.ResourceSearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x1bSearchAllIamPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"v\n\x1cSearchAllIamPoliciesResponse\x12=\n\x07results\x18\x01 \x03(\x0b\x32,.google.cloud.asset.v1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*l\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x12\x0e\n\nORG_POLICY\x10\x04\x12\x11\n\rACCESS_POLICY\x10\x05\x32\xf0\x0b\n\x0c\x41ssetService\x12\xde\x01\n\x0c\x45xportAssets\x12*.google.cloud.asset.v1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation"\x82\x01\x82\xd3\xe4\x93\x02""\x1d/v1/{parent=*/*}:exportAssets:\x01*\xca\x41W\n*google.cloud.asset.v1.ExportAssetsResponse\x12)google.cloud.asset.v1.ExportAssetsRequest\x12\xb2\x01\n\x15\x42\x61tchGetAssetsHistory\x12\x33.google.cloud.asset.v1.BatchGetAssetsHistoryRequest\x1a\x34.google.cloud.asset.v1.BatchGetAssetsHistoryResponse".\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=*/*}:batchGetAssetsHistory\x12\x7f\n\nCreateFeed\x12(.google.cloud.asset.v1.CreateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed"*\x82\xd3\xe4\x93\x02\x1b"\x16/v1/{parent=*/*}/feeds:\x01*\xda\x41\x06parent\x12t\n\x07GetFeed\x12%.google.cloud.asset.v1.GetFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed"%\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{name=*/*/feeds/*}\xda\x41\x04name\x12\x87\x01\n\tListFeeds\x12\'.google.cloud.asset.v1.ListFeedsRequest\x1a(.google.cloud.asset.v1.ListFeedsResponse"\'\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{parent=*/*}/feeds\xda\x41\x06parent\x12\x82\x01\n\nUpdateFeed\x12(.google.cloud.asset.v1.UpdateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed"-\x82\xd3\xe4\x93\x02 2\x1b/v1/{feed.name=*/*/feeds/*}:\x01*\xda\x41\x04\x66\x65\x65\x64\x12u\n\nDeleteFeed\x12(.google.cloud.asset.v1.DeleteFeedRequest\x1a\x16.google.protobuf.Empty"%\x82\xd3\xe4\x93\x02\x18*\x16/v1/{name=*/*/feeds/*}\xda\x41\x04name\x12\xbf\x01\n\x12SearchAllResources\x12\x30.google.cloud.asset.v1.SearchAllResourcesRequest\x1a\x31.google.cloud.asset.v1.SearchAllResourcesResponse"D\x82\xd3\xe4\x93\x02$\x12"/v1/{scope=*/*}:searchAllResources\xda\x41\x17scope,query,asset_types\x12\xbb\x01\n\x14SearchAllIamPolicies\x12\x32.google.cloud.asset.v1.SearchAllIamPoliciesRequest\x1a\x33.google.cloud.asset.v1.SearchAllIamPoliciesResponse":\x82\xd3\xe4\x93\x02&\x12$/v1/{scope=*/*}:searchAllIamPolicies\xda\x41\x0bscope,query\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9c\x01\n\x19\x63om.google.cloud.asset.v1B\x11\x41ssetServiceProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/asset/v1;asset\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -77,8 +77,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2423, - serialized_end=2531, + serialized_start=2948, + serialized_end=3056, ) _sym_db.RegisterEnumDescriptor(_CONTENTTYPE) @@ -1079,6 +1079,342 @@ serialized_end=2421, ) + +_SEARCHALLRESOURCESREQUEST = _descriptor.Descriptor( + name="SearchAllResourcesRequest", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="scope", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest.scope", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="query", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest.query", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="asset_types", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest.asset_types", + index=2, + number=3, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest.page_size", + index=3, + number=4, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest.page_token", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="order_by", + full_name="google.cloud.asset.v1.SearchAllResourcesRequest.order_by", + index=5, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2424, + serialized_end=2589, +) + + +_SEARCHALLRESOURCESRESPONSE = _descriptor.Descriptor( + name="SearchAllResourcesResponse", + full_name="google.cloud.asset.v1.SearchAllResourcesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="results", + full_name="google.cloud.asset.v1.SearchAllResourcesResponse.results", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.cloud.asset.v1.SearchAllResourcesResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2591, + serialized_end=2706, +) + + +_SEARCHALLIAMPOLICIESREQUEST = _descriptor.Descriptor( + name="SearchAllIamPoliciesRequest", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="scope", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesRequest.scope", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="query", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesRequest.query", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesRequest.page_token", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2708, + serialized_end=2826, +) + + +_SEARCHALLIAMPOLICIESRESPONSE = _descriptor.Descriptor( + name="SearchAllIamPoliciesResponse", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="results", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesResponse.results", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.cloud.asset.v1.SearchAllIamPoliciesResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2828, + serialized_end=2946, +) + _EXPORTASSETSREQUEST.fields_by_name[ "read_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP @@ -1136,6 +1472,16 @@ ].containing_oneof = _FEEDOUTPUTCONFIG.oneofs_by_name["destination"] _FEED.fields_by_name["content_type"].enum_type = _CONTENTTYPE _FEED.fields_by_name["feed_output_config"].message_type = _FEEDOUTPUTCONFIG +_SEARCHALLRESOURCESRESPONSE.fields_by_name[ + "results" +].message_type = ( + google_dot_cloud_dot_asset__v1_dot_proto_dot_assets__pb2._RESOURCESEARCHRESULT +) +_SEARCHALLIAMPOLICIESRESPONSE.fields_by_name[ + "results" +].message_type = ( + google_dot_cloud_dot_asset__v1_dot_proto_dot_assets__pb2._IAMPOLICYSEARCHRESULT +) DESCRIPTOR.message_types_by_name["ExportAssetsRequest"] = _EXPORTASSETSREQUEST DESCRIPTOR.message_types_by_name["ExportAssetsResponse"] = _EXPORTASSETSRESPONSE DESCRIPTOR.message_types_by_name[ @@ -1156,6 +1502,18 @@ DESCRIPTOR.message_types_by_name["PubsubDestination"] = _PUBSUBDESTINATION DESCRIPTOR.message_types_by_name["FeedOutputConfig"] = _FEEDOUTPUTCONFIG DESCRIPTOR.message_types_by_name["Feed"] = _FEED +DESCRIPTOR.message_types_by_name[ + "SearchAllResourcesRequest" +] = _SEARCHALLRESOURCESREQUEST +DESCRIPTOR.message_types_by_name[ + "SearchAllResourcesResponse" +] = _SEARCHALLRESOURCESRESPONSE +DESCRIPTOR.message_types_by_name[ + "SearchAllIamPoliciesRequest" +] = _SEARCHALLIAMPOLICIESREQUEST +DESCRIPTOR.message_types_by_name[ + "SearchAllIamPoliciesResponse" +] = _SEARCHALLIAMPOLICIESRESPONSE DESCRIPTOR.enum_types_by_name["ContentType"] = _CONTENTTYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -1166,8 +1524,6 @@ "DESCRIPTOR": _EXPORTASSETSREQUEST, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Export asset request. - - Attributes: parent: Required. The relative name of the root asset. This can only @@ -1207,13 +1563,10 @@ { "DESCRIPTOR": _EXPORTASSETSRESPONSE, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", - "__doc__": """The export asset response. This message is returned by the - [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] - method in the returned - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field. - - + "__doc__": """The export asset response. This message is returned by the [google.lon + grunning.Operations.GetOperation][google.longrunning.Operations.GetOpe + ration] method in the returned [google.longrunning.Operation.response] + [google.longrunning.Operation.response] field. Attributes: read_time: Time the snapshot was taken. @@ -1233,8 +1586,6 @@ "DESCRIPTOR": _BATCHGETASSETSHISTORYREQUEST, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Batch get assets history request. - - Attributes: parent: Required. The relative name of the root asset. It can only be @@ -1273,8 +1624,6 @@ "DESCRIPTOR": _BATCHGETASSETSHISTORYRESPONSE, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Batch get assets history response. - - Attributes: assets: A list of assets with valid time windows. @@ -1291,8 +1640,6 @@ "DESCRIPTOR": _CREATEFEEDREQUEST, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Create asset feed request. - - Attributes: parent: Required. The name of the project/folder/organization where @@ -1323,8 +1670,6 @@ "DESCRIPTOR": _GETFEEDREQUEST, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Get asset feed request. - - Attributes: name: Required. The name of the Feed and it must be in the format @@ -1344,8 +1689,6 @@ "DESCRIPTOR": _LISTFEEDSREQUEST, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """List asset feeds request. - - Attributes: parent: Required. The parent project/folder/organization whose feeds @@ -1381,8 +1724,6 @@ "DESCRIPTOR": _UPDATEFEEDREQUEST, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Update asset feed request. - - Attributes: feed: Required. The new values of feed details. It must match an @@ -1426,8 +1767,6 @@ "DESCRIPTOR": _OUTPUTCONFIG, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Output configuration for export assets destination. - - Attributes: destination: Asset export destination. @@ -1451,8 +1790,6 @@ "DESCRIPTOR": _GCSDESTINATION, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """A Cloud Storage location. - - Attributes: object_uri: Required. @@ -1485,8 +1822,6 @@ "DESCRIPTOR": _BIGQUERYDESTINATION, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """A BigQuery destination. - - Attributes: dataset: Required. The BigQuery dataset in format @@ -1516,8 +1851,6 @@ "DESCRIPTOR": _PUBSUBDESTINATION, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """A Pub/Sub destination. - - Attributes: topic: The name of the Pub/Sub topic to publish to. For example: @@ -1535,8 +1868,6 @@ "DESCRIPTOR": _FEEDOUTPUTCONFIG, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", "__doc__": """Output configuration for asset feed destination. - - Attributes: destination: Asset feed destination. @@ -1554,12 +1885,10 @@ { "DESCRIPTOR": _FEED, "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", - "__doc__": """An asset feed used to export asset updates to a - destinations. An asset feed filter controls what updates are exported. - The asset feed must be created within a project, organization, or - folder. Supported destinations are: Pub/Sub topics. - - + "__doc__": """An asset feed used to export asset updates to a destinations. An asset + feed filter controls what updates are exported. The asset feed must be + created within a project, organization, or folder. Supported + destinations are: Pub/Sub topics. Attributes: name: Required. The format will be @@ -1598,6 +1927,176 @@ ) _sym_db.RegisterMessage(Feed) +SearchAllResourcesRequest = _reflection.GeneratedProtocolMessageType( + "SearchAllResourcesRequest", + (_message.Message,), + { + "DESCRIPTOR": _SEARCHALLRESOURCESREQUEST, + "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", + "__doc__": """Search all resources request. + Attributes: + scope: + Required. A scope can be a project, a folder or an + organization. The search is limited to the resources within + the ``scope``. The allowed values are: - + projects/{PROJECT_ID} - projects/{PROJECT_NUMBER} - + folders/{FOLDER_NUMBER} - organizations/{ORGANIZATION_NUMBER} + query: + Optional. The query statement. An empty query can be specified + to search all the resources of certain ``asset_types`` within + the given ``scope``. Examples: - ``name : "Important"`` to + find Cloud resources whose name contains “Important” as a + word. - ``displayName : "Impor*"`` to find Cloud resources + whose display name contains “Impor” as a word prefix. - + ``description : "*por*"`` to find Cloud resources whose + description contains “por” as a substring. - ``location : + "us-west*"`` to find Cloud resources whose location is + prefixed with “us-west”. - ``labels : "prod"`` to find Cloud + resources whose labels contain “prod” as a key or value. - + ``labels.env : "prod"`` to find Cloud resources which have a + label “env” and its value is “prod”. - ``labels.env : *`` + to find Cloud resources which have a label “env”. - + ``"Important"`` to find Cloud resources which contain + “Important” as a word in any of the searchable fields. - + ``"Impor*"`` to find Cloud resources which contain “Impor” as + a word prefix in any of the searchable fields. - + ``"*por*"`` to find Cloud resources which contain “por” as a + substring in any of the searchable fields. - ``("Important" + AND location : ("us-west1" OR "global"))`` to find Cloud + resources which contain “Important” as a word in any of the + searchable fields and are also located in the “us-west1” + region or the “global” location. See `how to construct a + query `__ for more details. + asset_types: + Optional. A list of asset types that this request searches + for. If empty, it will search all the `searchable asset types + `__. + page_size: + Optional. The page size for search result pagination. Page + size is capped at 500 even if a larger value is given. If set + to zero, server will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there + could be more results as long as ``next_page_token`` is + returned. + page_token: + Optional. If present, then retrieve the next batch of results + from the preceding call to this method. ``page_token`` must be + the value of ``next_page_token`` from the previous response. + The values of all other method parameters, must be identical + to those in the previous call. + order_by: + Optional. A comma separated list of fields specifying the + sorting order of the results. The default order is ascending. + Add " DESC" after the field name to indicate descending order. + Redundant space characters are ignored. Example: “location + DESC, name”. See `supported resource metadata fields + `__ for more + details. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllResourcesRequest) + }, +) +_sym_db.RegisterMessage(SearchAllResourcesRequest) + +SearchAllResourcesResponse = _reflection.GeneratedProtocolMessageType( + "SearchAllResourcesResponse", + (_message.Message,), + { + "DESCRIPTOR": _SEARCHALLRESOURCESRESPONSE, + "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", + "__doc__": """Search all resources response. + Attributes: + results: + A list of Resources that match the search query. It contains + the resource standard metadata information. + next_page_token: + If there are more results than those appearing in this + response, then ``next_page_token`` is included. To get the + next set of results, call this method again using the value of + ``next_page_token`` as ``page_token``. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllResourcesResponse) + }, +) +_sym_db.RegisterMessage(SearchAllResourcesResponse) + +SearchAllIamPoliciesRequest = _reflection.GeneratedProtocolMessageType( + "SearchAllIamPoliciesRequest", + (_message.Message,), + { + "DESCRIPTOR": _SEARCHALLIAMPOLICIESREQUEST, + "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", + "__doc__": """Search all IAM policies request. + Attributes: + scope: + Required. A scope can be a project, a folder or an + organization. The search is limited to the IAM policies within + the ``scope``. The allowed values are: - + projects/{PROJECT_ID} - projects/{PROJECT_NUMBER} - + folders/{FOLDER_NUMBER} - organizations/{ORGANIZATION_NUMBER} + query: + Optional. The query statement. An empty query can be specified + to search all the IAM policies within the given ``scope``. + Examples: - ``policy : "amy@gmail.com"`` to find Cloud IAM + policy bindings that specify user “amy@gmail.com”. - + ``policy : "roles/compute.admin"`` to find Cloud IAM policy + bindings that specify the Compute Admin role. - + ``policy.role.permissions : "storage.buckets.update"`` to find + Cloud IAM policy bindings that specify a role containing + “storage.buckets.update” permission. - ``resource : + "organizations/123"`` to find Cloud IAM policy bindings + that are set on “organizations/123”. - ``(resource : + ("organizations/123" OR "folders/1234") AND policy : "amy")`` + to find Cloud IAM policy bindings that are set on + “organizations/123” or “folders/1234”, and also specify + user “amy”. See `how to construct a query + `__ for more details. + page_size: + Optional. The page size for search result pagination. Page + size is capped at 500 even if a larger value is given. If set + to zero, server will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there + could be more results as long as ``next_page_token`` is + returned. + page_token: + Optional. If present, retrieve the next batch of results from + the preceding call to this method. ``page_token`` must be the + value of ``next_page_token`` from the previous response. The + values of all other method parameters must be identical to + those in the previous call. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllIamPoliciesRequest) + }, +) +_sym_db.RegisterMessage(SearchAllIamPoliciesRequest) + +SearchAllIamPoliciesResponse = _reflection.GeneratedProtocolMessageType( + "SearchAllIamPoliciesResponse", + (_message.Message,), + { + "DESCRIPTOR": _SEARCHALLIAMPOLICIESRESPONSE, + "__module__": "google.cloud.asset_v1.proto.asset_service_pb2", + "__doc__": """Search all IAM policies response. + Attributes: + results: + A list of IamPolicy that match the search query. Related + information such as the associated resource is returned along + with the policy. + next_page_token: + Set if there are more results than those appearing in this + response; to get the next set of results, call this method + again, using this value as the ``page_token``. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllIamPoliciesResponse) + }, +) +_sym_db.RegisterMessage(SearchAllIamPoliciesResponse) + DESCRIPTOR._options = None _EXPORTASSETSREQUEST.fields_by_name["parent"]._options = None @@ -1618,6 +2117,16 @@ _FEED.fields_by_name["name"]._options = None _FEED.fields_by_name["feed_output_config"]._options = None _FEED._options = None +_SEARCHALLRESOURCESREQUEST.fields_by_name["scope"]._options = None +_SEARCHALLRESOURCESREQUEST.fields_by_name["query"]._options = None +_SEARCHALLRESOURCESREQUEST.fields_by_name["asset_types"]._options = None +_SEARCHALLRESOURCESREQUEST.fields_by_name["page_size"]._options = None +_SEARCHALLRESOURCESREQUEST.fields_by_name["page_token"]._options = None +_SEARCHALLRESOURCESREQUEST.fields_by_name["order_by"]._options = None +_SEARCHALLIAMPOLICIESREQUEST.fields_by_name["scope"]._options = None +_SEARCHALLIAMPOLICIESREQUEST.fields_by_name["query"]._options = None +_SEARCHALLIAMPOLICIESREQUEST.fields_by_name["page_size"]._options = None +_SEARCHALLIAMPOLICIESREQUEST.fields_by_name["page_token"]._options = None _ASSETSERVICE = _descriptor.ServiceDescriptor( name="AssetService", @@ -1625,8 +2134,8 @@ file=DESCRIPTOR, index=0, serialized_options=b"\312A\031cloudasset.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform", - serialized_start=2534, - serialized_end=3670, + serialized_start=3059, + serialized_end=4579, methods=[ _descriptor.MethodDescriptor( name="ExportAssets", @@ -1691,6 +2200,24 @@ output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=b"\202\323\344\223\002\030*\026/v1/{name=*/*/feeds/*}\332A\004name", ), + _descriptor.MethodDescriptor( + name="SearchAllResources", + full_name="google.cloud.asset.v1.AssetService.SearchAllResources", + index=7, + containing_service=None, + input_type=_SEARCHALLRESOURCESREQUEST, + output_type=_SEARCHALLRESOURCESRESPONSE, + serialized_options=b'\202\323\344\223\002$\022"/v1/{scope=*/*}:searchAllResources\332A\027scope,query,asset_types', + ), + _descriptor.MethodDescriptor( + name="SearchAllIamPolicies", + full_name="google.cloud.asset.v1.AssetService.SearchAllIamPolicies", + index=8, + containing_service=None, + input_type=_SEARCHALLIAMPOLICIESREQUEST, + output_type=_SEARCHALLIAMPOLICIESRESPONSE, + serialized_options=b"\202\323\344\223\002&\022$/v1/{scope=*/*}:searchAllIamPolicies\332A\013scope,query", + ), ], ) _sym_db.RegisterServiceDescriptor(_ASSETSERVICE) diff --git a/google/cloud/asset_v1/proto/asset_service_pb2_grpc.py b/google/cloud/asset_v1/proto/asset_service_pb2_grpc.py index 1b0b5385..7e4891a5 100644 --- a/google/cloud/asset_v1/proto/asset_service_pb2_grpc.py +++ b/google/cloud/asset_v1/proto/asset_service_pb2_grpc.py @@ -55,6 +55,16 @@ def __init__(self, channel): request_serializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.DeleteFeedRequest.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, ) + self.SearchAllResources = channel.unary_unary( + "/google.cloud.asset.v1.AssetService/SearchAllResources", + request_serializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllResourcesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllResourcesResponse.FromString, + ) + self.SearchAllIamPolicies = channel.unary_unary( + "/google.cloud.asset.v1.AssetService/SearchAllIamPolicies", + request_serializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllIamPoliciesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllIamPoliciesResponse.FromString, + ) class AssetServiceServicer(object): @@ -64,8 +74,9 @@ class AssetServiceServicer(object): def ExportAssets(self, request, context): """Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. - This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you - to keep track of the export. + This API implements the + [google.longrunning.Operation][google.longrunning.Operation] API allowing + you to keep track of the export. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -120,6 +131,26 @@ def DeleteFeed(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def SearchAllResources(self, request, context): + """Searches all the resources within the given accessible scope (e.g., a + project, a folder or an organization). Callers should have + cloud.assets.SearchAllResources permission upon the requested scope, + otherwise the request will be rejected. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def SearchAllIamPolicies(self, request, context): + """Searches all the IAM policies within the given accessible scope (e.g., a + project, a folder or an organization). Callers should have + cloud.assets.SearchAllIamPolicies permission upon the requested scope, + otherwise the request will be rejected. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def add_AssetServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -158,6 +189,16 @@ def add_AssetServiceServicer_to_server(servicer, server): request_deserializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.DeleteFeedRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), + "SearchAllResources": grpc.unary_unary_rpc_method_handler( + servicer.SearchAllResources, + request_deserializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllResourcesRequest.FromString, + response_serializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllResourcesResponse.SerializeToString, + ), + "SearchAllIamPolicies": grpc.unary_unary_rpc_method_handler( + servicer.SearchAllIamPolicies, + request_deserializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllIamPoliciesRequest.FromString, + response_serializer=google_dot_cloud_dot_asset__v1_dot_proto_dot_asset__service__pb2.SearchAllIamPoliciesResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( "google.cloud.asset.v1.AssetService", rpc_method_handlers diff --git a/google/cloud/asset_v1/proto/assets_pb2.py b/google/cloud/asset_v1/proto/assets_pb2.py index 71cefc7e..aa6e684a 100644 --- a/google/cloud/asset_v1/proto/assets_pb2.py +++ b/google/cloud/asset_v1/proto/assets_pb2.py @@ -12,6 +12,7 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.orgpolicy.v1 import ( orgpolicy_pb2 as google_dot_cloud_dot_orgpolicy_dot_v1_dot_orgpolicy__pb2, @@ -29,7 +30,6 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -37,8 +37,9 @@ package="google.cloud.asset.v1", syntax="proto3", serialized_options=b"\n\031com.google.cloud.asset.v1B\nAssetProtoP\001Z:google.golang.org/genproto/googleapis/cloud/asset/v1;asset\370\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1", - serialized_pb=b'\n(google/cloud/asset_v1/proto/assets.proto\x12\x15google.cloud.asset.v1\x1a\x19google/api/resource.proto\x1a)google/cloud/orgpolicy/v1/orgpolicy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x80\x01\n\rTemporalAsset\x12\x31\n\x06window\x18\x01 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12+\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1c.google.cloud.asset.v1.Asset"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x89\x04\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.asset.v1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x35\n\norg_policy\x18\x06 \x03(\x0b\x32!.google.cloud.orgpolicy.v1.Policy\x12N\n\raccess_policy\x18\x07 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyH\x00\x12L\n\x0c\x61\x63\x63\x65ss_level\x18\x08 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelH\x00\x12V\n\x11service_perimeter\x18\t \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterH\x00\x12\x11\n\tancestors\x18\n \x03(\t:\'\xea\x41$\n\x1f\x63loudasset.googleapis.com/Asset\x12\x01*B\x17\n\x15\x61\x63\x63\x65ss_context_policy"\xa0\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x98\x01\n\x19\x63om.google.cloud.asset.v1B\nAssetProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/asset/v1;asset\xf8\x01\x01\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3', + serialized_pb=b'\n(google/cloud/asset_v1/proto/assets.proto\x12\x15google.cloud.asset.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/orgpolicy/v1/orgpolicy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x80\x01\n\rTemporalAsset\x12\x31\n\x06window\x18\x01 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12+\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1c.google.cloud.asset.v1.Asset"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x89\x04\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.asset.v1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x35\n\norg_policy\x18\x06 \x03(\x0b\x32!.google.cloud.orgpolicy.v1.Policy\x12N\n\raccess_policy\x18\x07 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyH\x00\x12L\n\x0c\x61\x63\x63\x65ss_level\x18\x08 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelH\x00\x12V\n\x11service_perimeter\x18\t \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterH\x00\x12\x11\n\tancestors\x18\n \x03(\t:\'\xea\x41$\n\x1f\x63loudasset.googleapis.com/Asset\x12\x01*B\x17\n\x15\x61\x63\x63\x65ss_context_policy"\xb2\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08location\x18\x08 \x01(\t"\xcc\x02\n\x14ResourceSearchResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.asset.v1.ResourceSearchResult.LabelsEntry\x12\x14\n\x0cnetwork_tags\x18\x08 \x03(\t\x12\x36\n\x15\x61\x64\x64itional_attributes\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xd4\x03\n\x15IamPolicySearchResult\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12%\n\x06policy\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12M\n\x0b\x65xplanation\x18\x04 \x01(\x0b\x32\x38.google.cloud.asset.v1.IamPolicySearchResult.Explanation\x1a\xa1\x02\n\x0b\x45xplanation\x12m\n\x13matched_permissions\x18\x01 \x03(\x0b\x32P.google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry\x1a"\n\x0bPermissions\x12\x13\n\x0bpermissions\x18\x01 \x03(\t\x1a\x7f\n\x17MatchedPermissionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12S\n\x05value\x18\x02 \x01(\x0b\x32\x44.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions:\x02\x38\x01\x42\x98\x01\n\x19\x63om.google.cloud.asset.v1B\nAssetProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/asset/v1;asset\xf8\x01\x01\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3', dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_orgpolicy_dot_v1_dot_orgpolicy__pb2.DESCRIPTOR, google_dot_iam_dot_v1_dot_policy__pb2.DESCRIPTOR, @@ -48,7 +49,6 @@ google_dot_protobuf_dot_any__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -491,6 +491,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="location", + full_name="google.cloud.asset.v1.Resource.location", + index=6, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], @@ -501,7 +519,474 @@ extension_ranges=[], oneofs=[], serialized_start=1235, - serialized_end=1395, + serialized_end=1413, +) + + +_RESOURCESEARCHRESULT_LABELSENTRY = _descriptor.Descriptor( + name="LabelsEntry", + full_name="google.cloud.asset.v1.ResourceSearchResult.LabelsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.cloud.asset.v1.ResourceSearchResult.LabelsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.cloud.asset.v1.ResourceSearchResult.LabelsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1703, + serialized_end=1748, +) + +_RESOURCESEARCHRESULT = _descriptor.Descriptor( + name="ResourceSearchResult", + full_name="google.cloud.asset.v1.ResourceSearchResult", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.asset.v1.ResourceSearchResult.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="asset_type", + full_name="google.cloud.asset.v1.ResourceSearchResult.asset_type", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="project", + full_name="google.cloud.asset.v1.ResourceSearchResult.project", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="display_name", + full_name="google.cloud.asset.v1.ResourceSearchResult.display_name", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.asset.v1.ResourceSearchResult.description", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="location", + full_name="google.cloud.asset.v1.ResourceSearchResult.location", + index=5, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="labels", + full_name="google.cloud.asset.v1.ResourceSearchResult.labels", + index=6, + number=7, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="network_tags", + full_name="google.cloud.asset.v1.ResourceSearchResult.network_tags", + index=7, + number=8, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="additional_attributes", + full_name="google.cloud.asset.v1.ResourceSearchResult.additional_attributes", + index=8, + number=9, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_RESOURCESEARCHRESULT_LABELSENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1416, + serialized_end=1748, +) + + +_IAMPOLICYSEARCHRESULT_EXPLANATION_PERMISSIONS = _descriptor.Descriptor( + name="Permissions", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="permissions", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.permissions", + index=0, + number=1, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2056, + serialized_end=2090, +) + +_IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY = _descriptor.Descriptor( + name="MatchedPermissionsEntry", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2092, + serialized_end=2219, +) + +_IAMPOLICYSEARCHRESULT_EXPLANATION = _descriptor.Descriptor( + name="Explanation", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="matched_permissions", + full_name="google.cloud.asset.v1.IamPolicySearchResult.Explanation.matched_permissions", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[ + _IAMPOLICYSEARCHRESULT_EXPLANATION_PERMISSIONS, + _IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1930, + serialized_end=2219, +) + +_IAMPOLICYSEARCHRESULT = _descriptor.Descriptor( + name="IamPolicySearchResult", + full_name="google.cloud.asset.v1.IamPolicySearchResult", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="resource", + full_name="google.cloud.asset.v1.IamPolicySearchResult.resource", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="project", + full_name="google.cloud.asset.v1.IamPolicySearchResult.project", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="policy", + full_name="google.cloud.asset.v1.IamPolicySearchResult.policy", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="explanation", + full_name="google.cloud.asset.v1.IamPolicySearchResult.explanation", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_IAMPOLICYSEARCHRESULT_EXPLANATION], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1751, + serialized_end=2219, ) _TEMPORALASSET.fields_by_name["window"].message_type = _TIMEWINDOW @@ -557,10 +1042,40 @@ _RESOURCE.fields_by_name[ "data" ].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_RESOURCESEARCHRESULT_LABELSENTRY.containing_type = _RESOURCESEARCHRESULT +_RESOURCESEARCHRESULT.fields_by_name[ + "labels" +].message_type = _RESOURCESEARCHRESULT_LABELSENTRY +_RESOURCESEARCHRESULT.fields_by_name[ + "additional_attributes" +].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_IAMPOLICYSEARCHRESULT_EXPLANATION_PERMISSIONS.containing_type = ( + _IAMPOLICYSEARCHRESULT_EXPLANATION +) +_IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY.fields_by_name[ + "value" +].message_type = _IAMPOLICYSEARCHRESULT_EXPLANATION_PERMISSIONS +_IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY.containing_type = ( + _IAMPOLICYSEARCHRESULT_EXPLANATION +) +_IAMPOLICYSEARCHRESULT_EXPLANATION.fields_by_name[ + "matched_permissions" +].message_type = _IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY +_IAMPOLICYSEARCHRESULT_EXPLANATION.containing_type = _IAMPOLICYSEARCHRESULT +_IAMPOLICYSEARCHRESULT.fields_by_name[ + "policy" +].message_type = ( + google_dot_iam_dot_v1_dot_policy__pb2.google_dot_iam_dot_v1_dot_policy__pb2._POLICY +) +_IAMPOLICYSEARCHRESULT.fields_by_name[ + "explanation" +].message_type = _IAMPOLICYSEARCHRESULT_EXPLANATION DESCRIPTOR.message_types_by_name["TemporalAsset"] = _TEMPORALASSET DESCRIPTOR.message_types_by_name["TimeWindow"] = _TIMEWINDOW DESCRIPTOR.message_types_by_name["Asset"] = _ASSET DESCRIPTOR.message_types_by_name["Resource"] = _RESOURCE +DESCRIPTOR.message_types_by_name["ResourceSearchResult"] = _RESOURCESEARCHRESULT +DESCRIPTOR.message_types_by_name["IamPolicySearchResult"] = _IAMPOLICYSEARCHRESULT _sym_db.RegisterFileDescriptor(DESCRIPTOR) TemporalAsset = _reflection.GeneratedProtocolMessageType( @@ -569,11 +1084,9 @@ { "DESCRIPTOR": _TEMPORALASSET, "__module__": "google.cloud.asset_v1.proto.assets_pb2", - "__doc__": """An asset in Google Cloud and its temporal metadata, - including the time window when it was observed and its status during - that window. - - + "__doc__": """An asset in Google Cloud and its temporal metadata, including the time + window when it was observed and its status during that window. + Attributes: window: The time window when the asset data and state was observed. @@ -593,10 +1106,7 @@ { "DESCRIPTOR": _TIMEWINDOW, "__module__": "google.cloud.asset_v1.proto.assets_pb2", - "__doc__": """A time window specified by its “start_time” and - “end_time”. - - + "__doc__": """A time window specified by its ``start_time`` and ``end_time``. Attributes: start_time: Start time of the time window (exclusive). @@ -616,23 +1126,21 @@ "DESCRIPTOR": _ASSET, "__module__": "google.cloud.asset_v1.proto.assets_pb2", "__doc__": """An asset in Google Cloud. An asset can be any resource in the Google - Cloud `resource - hierarchy `__, - a resource outside the Google Cloud resource hierarchy (such as Google - Kubernetes Engine clusters and objects), or a Cloud IAM policy. - - + + Cloud `resource hierarchy `__, a resource outside + the Google Cloud resource hierarchy (such as Google Kubernetes Engine + clusters and objects), or a Cloud IAM policy. + Attributes: name: - The full name of the asset. For example: “//compute.googleapis - .com/projects/my_project_123/zones/zone1/instances/instance1” - See `Resource names `__ for more information. + The full name of the asset. For example: + ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`` + See `Resource names `__ for more information. asset_type: The type of the asset. For example: - “compute.googleapis.com/Disk” See `Supported asset types - `__ for more information. + ``compute.googleapis.com/Disk`` See `Supported asset types + `__ for more information. resource: A representation of the resource. iam_policy: @@ -654,18 +1162,15 @@ a given resource. access_context_policy: A representation of an `access policy - `__. + `__. ancestors: The ancestry path of an asset in Google Cloud `resource - hierarchy `__, + hierarchy `__, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the asset is a project, folder, or organization, the ancestry path starts from the asset itself. - For example: ``["projects/123456789", "folders/5432", - "organizations/1234"]`` + For example: ``["projects/123456789", "folders/5432", "organizations/1234"]`` """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Asset) }, @@ -679,28 +1184,26 @@ "DESCRIPTOR": _RESOURCE, "__module__": "google.cloud.asset_v1.proto.assets_pb2", "__doc__": """A representation of a Google Cloud resource. - - Attributes: version: - The API version. For example: “v1” + The API version. For example: ``v1`` discovery_document_uri: The URL of the discovery document containing the resource’s - JSON schema. For example: - “https://www.googleapis.com/discovery/v1/apis/compute/v1/rest” - This value is unspecified for resources that do not have an - API based on a discovery document, such as Cloud Bigtable. + JSON schema. For example: ``https://www.googleapis.com/discove + ry/v1/apis/compute/v1/rest`` This value is unspecified for + resources that do not have an API based on a discovery + document, such as Cloud Bigtable. discovery_name: The JSON schema name listed in the discovery document. For - example: “Project” This value is unspecified for resources + example: ``Project`` This value is unspecified for resources that do not have an API based on a discovery document, such as Cloud Bigtable. resource_url: The REST URL for accessing the resource. An HTTP ``GET`` request using this URL returns the resource itself. For example: - “https://cloudresourcemanager.googleapis.com/v1/projects/my- - project-123” This value is unspecified for resources without + ``https://cloudresourcemanager.googleapis.com/v1/projects/my- + project-123`` This value is unspecified for resources without a REST API. parent: The full name of the immediate parent of this resource. See @@ -708,19 +1211,212 @@ _names#full_resource_name>`__ for more information. For Google Cloud assets, this value is the parent resource defined in the `Cloud IAM policy hierarchy `__. For example: “//cloudre - sourcemanager.googleapis.com/projects/my_project_123” For + am/docs/overview#policy_hierarchy>`__. For example: ``//cloudr + esourcemanager.googleapis.com/projects/my_project_123`` For third-party assets, this field may be set differently. data: The content of the resource, in which some sensitive fields are removed and may not be present. + location: + The location of the resource in Google Cloud, such as its zone + and region. For more information, see + https://cloud.google.com/about/locations/. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Resource) }, ) _sym_db.RegisterMessage(Resource) +ResourceSearchResult = _reflection.GeneratedProtocolMessageType( + "ResourceSearchResult", + (_message.Message,), + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + { + "DESCRIPTOR": _RESOURCESEARCHRESULT_LABELSENTRY, + "__module__": "google.cloud.asset_v1.proto.assets_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ResourceSearchResult.LabelsEntry) + }, + ), + "DESCRIPTOR": _RESOURCESEARCHRESULT, + "__module__": "google.cloud.asset_v1.proto.assets_pb2", + "__doc__": """A result of Resource Search, containing information of a cloud + resoure. + Attributes: + name: + The full resource name of this resource. Example: ``//compute. + googleapis.com/projects/my_project_123/zones/zone1/instances/i + nstance1``. See `Cloud Asset Inventory Resource Name Format + `__ for more information. To search against the + ``name``: - use a field query. Example: ``name : + "instance1"`` - use a free text query. Example: + ``"instance1"`` + asset_type: + The type of this resource. Example: + ``compute.googleapis.com/Disk``. To search against the + ``asset_type``: - specify the ``asset_type`` field in your + search request. + project: + The project that this resource belongs to, in the form of + projects/{PROJECT_NUMBER}. To search against the ``project``: + - specify the ``scope`` field as this project in your search + request. + display_name: + The display name of this resource. To search against the + ``display_name``: - use a field query. Example: + ``displayName : "My Instance"`` - use a free text query. + Example: ``"My Instance"`` + description: + One or more paragraphs of text description of this resource. + Maximum length could be up to 1M bytes. To search against the + ``description``: - use a field query. Example: ``description + : "*important instance*"`` - use a free text query. Example: + ``"*important instance*"`` + location: + Location can be ``global``, regional like ``us-east1``, or + zonal like ``us-west1-b``. To search against the + ``location``: - use a field query. Example: ``location : + "us-west*"`` - use a free text query. Example: ``"us-west*"`` + labels: + Labels associated with this resource. See `Labelling and + grouping GCP resources + `__ for more + information. To search against the ``labels``: - use a + field query, as following: - query on any label’s key or + value. Example: ``labels : "prod"`` - query by a given + label. Example: ``labels.env : "prod"`` - query by a given + label’sexistence. Example: ``labels.env : *`` - use a free + text query. Example: ``"prod"`` + network_tags: + Network tags associated with this resource. Like labels, + network tags are a type of annotations used to group GCP + resources. See `Labelling GCP resources + `__ for more + information. To search against the ``network_tags``: - use + a field query. Example: ``networkTags : "internal"`` - use a + free text query. Example: ``"internal"`` + additional_attributes: + The additional attributes of this resource. The attributes may + vary from one resource type to another. Examples: + ``projectId`` for Project, ``dnsName`` for DNS ManagedZone. + To search against the ``additional_attributes``: - use a + free text query to match the attributes values. Example: to + search ``additional_attributes = { dnsName: "foobar" }``, you + can issue a query ``"foobar"``. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ResourceSearchResult) + }, +) +_sym_db.RegisterMessage(ResourceSearchResult) +_sym_db.RegisterMessage(ResourceSearchResult.LabelsEntry) + +IamPolicySearchResult = _reflection.GeneratedProtocolMessageType( + "IamPolicySearchResult", + (_message.Message,), + { + "Explanation": _reflection.GeneratedProtocolMessageType( + "Explanation", + (_message.Message,), + { + "Permissions": _reflection.GeneratedProtocolMessageType( + "Permissions", + (_message.Message,), + { + "DESCRIPTOR": _IAMPOLICYSEARCHRESULT_EXPLANATION_PERMISSIONS, + "__module__": "google.cloud.asset_v1.proto.assets_pb2", + "__doc__": """IAM permissions + Attributes: + permissions: + A list of permissions. A sample permission string: + ``compute.disk.get``. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) + }, + ), + "MatchedPermissionsEntry": _reflection.GeneratedProtocolMessageType( + "MatchedPermissionsEntry", + (_message.Message,), + { + "DESCRIPTOR": _IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY, + "__module__": "google.cloud.asset_v1.proto.assets_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry) + }, + ), + "DESCRIPTOR": _IAMPOLICYSEARCHRESULT_EXPLANATION, + "__module__": "google.cloud.asset_v1.proto.assets_pb2", + "__doc__": """Explanation about the IAM policy search result. + Attributes: + matched_permissions: + The map from roles to their included permissions that match + the permission query (i.e., a query containing + ``policy.role.permissions:``). Example: if query + ``policy.role.permissions : "compute.disk.get"`` matches a + policy binding that contains owner role, the + matched_permissions will be ``{"roles/owner": + ["compute.disk.get"]}``. The roles can also be found in the + returned ``policy`` bindings. Note that the map is populated + only for requests with permission queries. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation) + }, + ), + "DESCRIPTOR": _IAMPOLICYSEARCHRESULT, + "__module__": "google.cloud.asset_v1.proto.assets_pb2", + "__doc__": """A result of IAM Policy search, containing information of an IAM + policy. + Attributes: + resource: + The full resource name of the resource associated with this + IAM policy. Example: ``//compute.googleapis.com/projects/my_pr + oject_123/zones/zone1/instances/instance1``. See `Cloud Asset + Inventory Resource Name Format + `__ for more information. To search against the + ``resource``: - use a field query. Example: ``resource : + "organizations/123"`` + project: + The project that the associated GCP resource belongs to, in + the form of projects/{PROJECT_NUMBER}. If an IAM policy is set + on a resource (like VM instance, Cloud Storage bucket), the + project field will indicate the project that contains the + resource. If an IAM policy is set on a folder or orgnization, + the project field will be empty. To search against the + ``project``: - specify the ``scope`` field as this project + in your search request. + policy: + The IAM policy directly set on the given resource. Note that + the original IAM policy can contain multiple bindings. This + only contains the bindings that match the given query. For + queries that don’t contain a constrain on policies (e.g., an + empty query), this contains all the bindings. To search + against the ``policy`` bindings: - use a field query, as + following: - query by the policy contained members. + Example: ``policy : "amy@gmail.com"`` - query by the + policy contained roles. Example: ``policy : + "roles/compute.admin"`` - query by the policy contained + roles’ implied permissions. Example: + ``policy.role.permissions : "compute.instances.create"`` + explanation: + Explanation about the IAM policy search result. It contains + additional information to explain why the search result + matches the query. + """, + # @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult) + }, +) +_sym_db.RegisterMessage(IamPolicySearchResult) +_sym_db.RegisterMessage(IamPolicySearchResult.Explanation) +_sym_db.RegisterMessage(IamPolicySearchResult.Explanation.Permissions) +_sym_db.RegisterMessage(IamPolicySearchResult.Explanation.MatchedPermissionsEntry) + DESCRIPTOR._options = None _ASSET._options = None +_RESOURCESEARCHRESULT_LABELSENTRY._options = None +_IAMPOLICYSEARCHRESULT_EXPLANATION_MATCHEDPERMISSIONSENTRY._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/asset_v1beta1/proto/asset_service_pb2.py b/google/cloud/asset_v1beta1/proto/asset_service_pb2.py index b5ab5d6c..a2eac19d 100644 --- a/google/cloud/asset_v1beta1/proto/asset_service_pb2.py +++ b/google/cloud/asset_v1beta1/proto/asset_service_pb2.py @@ -546,8 +546,6 @@ "DESCRIPTOR": _EXPORTASSETSREQUEST, "__module__": "google.cloud.asset_v1beta1.proto.asset_service_pb2", "__doc__": """Export asset request. - - Attributes: parent: Required. The relative name of the root asset. This can only @@ -588,13 +586,10 @@ { "DESCRIPTOR": _EXPORTASSETSRESPONSE, "__module__": "google.cloud.asset_v1beta1.proto.asset_service_pb2", - "__doc__": """The export asset response. This message is returned by the - [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] - method in the returned - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field. - - + "__doc__": """The export asset response. This message is returned by the [google.lon + grunning.Operations.GetOperation][google.longrunning.Operations.GetOpe + ration] method in the returned [google.longrunning.Operation.response] + [google.longrunning.Operation.response] field. Attributes: read_time: Time the snapshot was taken. @@ -614,8 +609,6 @@ "DESCRIPTOR": _BATCHGETASSETSHISTORYREQUEST, "__module__": "google.cloud.asset_v1beta1.proto.asset_service_pb2", "__doc__": """Batch get assets history request. - - Attributes: parent: Required. The relative name of the root asset. It can only be @@ -653,8 +646,6 @@ "DESCRIPTOR": _BATCHGETASSETSHISTORYRESPONSE, "__module__": "google.cloud.asset_v1beta1.proto.asset_service_pb2", "__doc__": """Batch get assets history response. - - Attributes: assets: A list of assets with valid time windows. @@ -671,8 +662,6 @@ "DESCRIPTOR": _OUTPUTCONFIG, "__module__": "google.cloud.asset_v1beta1.proto.asset_service_pb2", "__doc__": """Output configuration for export assets destination. - - Attributes: destination: Asset export destination. @@ -691,8 +680,6 @@ "DESCRIPTOR": _GCSDESTINATION, "__module__": "google.cloud.asset_v1beta1.proto.asset_service_pb2", "__doc__": """A Cloud Storage location. - - Attributes: object_uri: Required. diff --git a/google/cloud/asset_v1beta1/proto/assets_pb2.py b/google/cloud/asset_v1beta1/proto/assets_pb2.py index 7d0d761f..0adbcb29 100644 --- a/google/cloud/asset_v1beta1/proto/assets_pb2.py +++ b/google/cloud/asset_v1beta1/proto/assets_pb2.py @@ -421,8 +421,7 @@ "__module__": "google.cloud.asset_v1beta1.proto.assets_pb2", "__doc__": """Temporal asset. In addition to the asset, the temporal asset includes the status of the asset and valid from and to time of it. - - + Attributes: window: The time window when the asset data and state was observed. @@ -443,8 +442,6 @@ "DESCRIPTOR": _TIMEWINDOW, "__module__": "google.cloud.asset_v1beta1.proto.assets_pb2", "__doc__": """A time window of (start_time, end_time]. - - Attributes: start_time: Start time of the time window (exclusive). @@ -463,10 +460,8 @@ { "DESCRIPTOR": _ASSET, "__module__": "google.cloud.asset_v1beta1.proto.assets_pb2", - "__doc__": """Cloud asset. This includes all Google Cloud Platform - resources, Cloud IAM policies, and other non-GCP assets. - - + "__doc__": """Cloud asset. This includes all Google Cloud Platform resources, Cloud + IAM policies, and other non-GCP assets. Attributes: name: @@ -495,8 +490,6 @@ "DESCRIPTOR": _RESOURCE, "__module__": "google.cloud.asset_v1beta1.proto.assets_pb2", "__doc__": """Representation of a cloud resource. - - Attributes: version: The API version. Example: “v1”. diff --git a/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py b/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py index e41bb1a2..b562db4c 100644 --- a/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py +++ b/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py @@ -401,8 +401,6 @@ "DESCRIPTOR": _SEARCHALLRESOURCESREQUEST, "__module__": "google.cloud.asset_v1p1beta1.proto.asset_service_pb2", "__doc__": """Search all resources request. - - Attributes: scope: Required. The relative name of an asset. The search is limited @@ -447,8 +445,6 @@ "DESCRIPTOR": _SEARCHALLRESOURCESRESPONSE, "__module__": "google.cloud.asset_v1p1beta1.proto.asset_service_pb2", "__doc__": """Search all resources response. - - Attributes: results: A list of resource that match the search query. @@ -470,8 +466,6 @@ "DESCRIPTOR": _SEARCHALLIAMPOLICIESREQUEST, "__module__": "google.cloud.asset_v1p1beta1.proto.asset_service_pb2", "__doc__": """Search all IAM policies request. - - Attributes: scope: Required. The relative name of an asset. The search is limited @@ -509,8 +503,6 @@ "DESCRIPTOR": _SEARCHALLIAMPOLICIESRESPONSE, "__module__": "google.cloud.asset_v1p1beta1.proto.asset_service_pb2", "__doc__": """Search all IAM policies response. - - Attributes: results: A list of IamPolicy that match the search query. Related diff --git a/google/cloud/asset_v1p1beta1/proto/assets_pb2.py b/google/cloud/asset_v1p1beta1/proto/assets_pb2.py index b00ec3e1..12d586e2 100644 --- a/google/cloud/asset_v1p1beta1/proto/assets_pb2.py +++ b/google/cloud/asset_v1p1beta1/proto/assets_pb2.py @@ -536,8 +536,6 @@ "DESCRIPTOR": _STANDARDRESOURCEMETADATA, "__module__": "google.cloud.asset_v1p1beta1.proto.assets_pb2", "__doc__": """The standard metadata of a cloud resource. - - Attributes: name: The full resource name. For example: ``//compute.googleapis.co @@ -602,8 +600,6 @@ "DESCRIPTOR": _IAMPOLICYSEARCHRESULT_EXPLANATION, "__module__": "google.cloud.asset_v1p1beta1.proto.assets_pb2", "__doc__": """Explanation about the IAM policy search result. - - Attributes: matched_permissions: The map from roles to their included permission matching the @@ -619,8 +615,6 @@ "DESCRIPTOR": _IAMPOLICYSEARCHRESULT, "__module__": "google.cloud.asset_v1p1beta1.proto.assets_pb2", "__doc__": """The result for a IAM Policy search. - - Attributes: resource: The `full resource name