Skip to content

Commit

Permalink
feat: [google-cloud-asset] added new resource references to fields in…
Browse files Browse the repository at this point in the history
… AnalyzeMoveRequest (#12126)

- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
feat: Added new resource references to fields in AnalyzeMoveRequest 
docs: Updated comments
END_COMMIT_OVERRIDE

chore: removed backend configuration from service config

PiperOrigin-RevId: 590982722

Source-Link:
googleapis/googleapis@da09f4c

Source-Link:
googleapis/googleapis-gen@7dd789a
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFzc2V0Ly5Pd2xCb3QueWFtbCIsImgiOiI3ZGQ3ODlhMmNhZDRkNTQ0ZmJiNTNhMTVjZTU5ZGViNDY3ZjMwYjZkIn0=

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Dec 14, 2023
1 parent fd30dff commit 599e175
Show file tree
Hide file tree
Showing 15 changed files with 253 additions and 174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "3.22.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "3.22.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -1229,38 +1229,36 @@ async def sample_search_all_resources():
have a label ``env``.
- ``tagKeys:env`` to find Google Cloud resources that
have directly attached tags where the
```TagKey`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey>`__
.\ ``namespacedName`` contains ``env``.
```TagKey.namespacedName`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey>`__
contains ``env``.
- ``tagValues:prod*`` to find Google Cloud resources
that have directly attached tags where the
```TagValue`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
.\ ``namespacedName`` contains a word prefixed by
``prod``.
```TagValue.namespacedName`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
contains a word prefixed by ``prod``.
- ``tagValueIds=tagValues/123`` to find Google Cloud
resources that have directly attached tags where the
```TagValue`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
.\ ``name`` is exactly ``tagValues/123``.
```TagValue.name`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
is exactly ``tagValues/123``.
- ``effectiveTagKeys:env`` to find Google Cloud
resources that have directly attached or inherited
tags where the
```TagKey`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey>`__
.\ ``namespacedName`` contains ``env``.
```TagKey.namespacedName`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey>`__
contains ``env``.
- ``effectiveTagValues:prod*`` to find Google Cloud
resources that have directly attached or inherited
tags where the
```TagValue`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
.\ ``namespacedName`` contains a word prefixed by
``prod``.
```TagValue.namespacedName`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
contains a word prefixed by ``prod``.
- ``effectiveTagValueIds=tagValues/123`` to find Google
Cloud resources that have directly attached or
inherited tags where the
```TagValue`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
.\ ``name`` is exactly ``tagValues/123``.
```TagValue.name`` <https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue>`__
is exactly ``tagValues/123``.
- ``kmsKey:key`` to find Google Cloud resources
encrypted with a customer-managed encryption key
whose name contains ``key`` as a word. This field is
deprecated. Please use the ``kmsKeys`` field to
retrieve Cloud KMS key information.
deprecated. Use the ``kmsKeys`` field to retrieve
Cloud KMS key information.
- ``kmsKeys:key`` to find Google Cloud resources
encrypted with customer-managed encryption keys whose
name contains the word ``key``.
Expand All @@ -1275,6 +1273,12 @@ async def sample_search_all_resources():
relationships with ``instance-group-1`` in the
Compute Engine instance group resource name, for
relationship type ``INSTANCE_TO_INSTANCEGROUP``.
- ``sccSecurityMarks.key=value`` to find Cloud
resources that are attached with security marks whose
key is ``key`` and value is ``value``.
- ``sccSecurityMarks.key:*`` to find Cloud resources
that are attached with security marks whose key is
``key``.
- ``state:ACTIVE`` to find Google Cloud resources whose
state contains ``ACTIVE`` as a word.
- ``NOT state:ACTIVE`` to find Google Cloud resources
Expand Down Expand Up @@ -1308,7 +1312,7 @@ async def sample_search_all_resources():
Optional. A list of asset types that this request
searches for. If empty, it will search all the
`searchable asset
types <https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types>`__.
types <https://cloud.google.com/asset-inventory/docs/supported-asset-types>`__.
Regular expressions are also supported. For example:
Expand Down Expand Up @@ -2767,13 +2771,17 @@ async def sample_analyze_org_policies():
filter (:class:`str`):
The expression to filter
[AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results].
The only supported field is
``consolidated_policy.attached_resource``, and the only
supported operator is ``=``.
Filtering is currently available for bare literal values
and the following fields:
Example:
- consolidated_policy.attached_resource
- consolidated_policy.rules.enforce
When filtering by a specific field, the only supported
operator is ``=``. For example, filtering by
consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001"
will return the org policy results of"folders/001".
will return all the Organization Policy results attached
to "folders/001".
This corresponds to the ``filter`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -2928,13 +2936,18 @@ async def sample_analyze_org_policy_governed_containers():
on the ``request`` instance; if ``request`` is provided, this
should not be set.
filter (:class:`str`):
The expression to filter the governed containers in
result. The only supported field is ``parent``, and the
only supported operator is ``=``.
The expression to filter
[AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers].
Filtering is currently available for bare literal values
and the following fields:
Example:
- parent
- consolidated_policy.rules.enforce
When filtering by a specific field, the only supported
operator is ``=``. For example, filtering by
parent="//cloudresourcemanager.googleapis.com/folders/001"
will return all containers under "folders/001".
will return all the containers under "folders/001".
This corresponds to the ``filter`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -3049,7 +3062,7 @@ async def analyze_org_policy_governed_assets(
This RPC only returns either resources of types supported by
`searchable asset
types <https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types>`__,
types <https://cloud.google.com/asset-inventory/docs/supported-asset-types>`__,
or IAM policies.
.. code-block:: python
Expand Down Expand Up @@ -3107,24 +3120,40 @@ async def sample_analyze_org_policy_governed_assets():
on the ``request`` instance; if ``request`` is provided, this
should not be set.
filter (:class:`str`):
The expression to filter the governed assets in result.
The only supported fields for governed resources are
``governed_resource.project`` and
``governed_resource.folders``. The only supported fields
for governed iam policies are
``governed_iam_policy.project`` and
``governed_iam_policy.folders``. The only supported
operator is ``=``.
Example 1: governed_resource.project="projects/12345678"
filter will return all governed resources under
projects/12345678 including the project ifself, if
applicable.
Example 2:
governed_iam_policy.folders="folders/12345678" filter
will return all governed iam policies under
folders/12345678, if applicable.
The expression to filter
[AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets].
For governed resources, filtering is currently available
for bare literal values and the following fields:
- governed_resource.project
- governed_resource.folders
- consolidated_policy.rules.enforce When filtering by
``governed_resource.project`` or
``consolidated_policy.rules.enforce``, the only
supported operator is ``=``. When filtering by
``governed_resource.folders``, the supported
operators are ``=`` and ``:``. For example, filtering
by ``governed_resource.project="projects/12345678"``
will return all the governed resources under
"projects/12345678", including the project itself if
applicable.
For governed IAM policies, filtering is currently
available for bare literal values and the following
fields:
- governed_iam_policy.project
- governed_iam_policy.folders
- consolidated_policy.rules.enforce When filtering by
``governed_iam_policy.project`` or
``consolidated_policy.rules.enforce``, the only
supported operator is ``=``. When filtering by
``governed_iam_policy.folders``, the supported
operators are ``=`` and ``:``. For example, filtering
by ``governed_iam_policy.folders:"folders/12345678"``
will return all the governed IAM policies under
"folders/001".
This corresponds to the ``filter`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Loading

0 comments on commit 599e175

Please sign in to comment.