Skip to content

Commit 66f99c3

Browse files
feat: [cloudasset] added new resource references to fields in AnalyzeMoveRequest (#10138)
* feat: added messages ExportAssetsResponse, BatchGetAssetsHistoryResponse feat: added Asset.access_policy, access_level, service_perimeter, org_policy feat: added resource definitions to some messages docs: updated comments chore: removed backend configuration from service config PiperOrigin-RevId: 589961470 Source-Link: googleapis/googleapis@02fbe75 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2a25ee3638abdc2ea520c87e1d4c7c53fc624e30 Copy-Tag: eyJwIjoiamF2YS1hc3NldC8uT3dsQm90LnlhbWwiLCJoIjoiMmEyNWVlMzYzOGFiZGMyZWE1MjBjODdlMWQ0YzdjNTNmYzYyNGUzMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added new resource references to fields in AnalyzeMoveRequest docs: updated comments chore: removed backend configuration from service config PiperOrigin-RevId: 590982722 Source-Link: googleapis/googleapis@da09f4c Source-Link: https://github.com/googleapis/googleapis-gen/commit/7dd789a2cad4d544fbb53a15ce59deb467f30b6d Copy-Tag: eyJwIjoiamF2YS1hc3NldC8uT3dsQm90LnlhbWwiLCJoIjoiN2RkNzg5YTJjYWQ0ZDU0NGZiYjUzYTE1Y2U1OWRlYjQ2N2YzMGI2ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add accesscontextmanager and orgpolicy to asset/v1p2beta1 * correct license header year --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: diegomarquezp <diegomarquezp@google.com>
1 parent cb5168c commit 66f99c3

File tree

70 files changed

+6996
-2007
lines changed

Some content is hidden

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

70 files changed

+6996
-2007
lines changed

java-asset/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-asset.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-asset/3.34.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-asset/3.36.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java

Lines changed: 70 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,31 +1114,31 @@ public final UnaryCallable<DeleteFeedRequest, Empty> deleteFeedCallable() {
11141114
* <li>`labels.env:&#42;` to find Google Cloud resources that have a label `env`.
11151115
* <li>`tagKeys:env` to find Google Cloud resources that have directly attached tags where
11161116
* the
1117-
* [`TagKey`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey)
1118-
* .`namespacedName` contains `env`.
1117+
* [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey)
1118+
* contains `env`.
11191119
* <li>`tagValues:prod&#42;` to find Google Cloud resources that have directly attached tags
11201120
* where the
1121-
* [`TagValue`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1122-
* .`namespacedName` contains a word prefixed by `prod`.
1121+
* [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1122+
* contains a word prefixed by `prod`.
11231123
* <li>`tagValueIds=tagValues/123` to find Google Cloud resources that have directly
11241124
* attached tags where the
1125-
* [`TagValue`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1126-
* .`name` is exactly `tagValues/123`.
1125+
* [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1126+
* is exactly `tagValues/123`.
11271127
* <li>`effectiveTagKeys:env` to find Google Cloud resources that have directly attached or
11281128
* inherited tags where the
1129-
* [`TagKey`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey)
1130-
* .`namespacedName` contains `env`.
1129+
* [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey)
1130+
* contains `env`.
11311131
* <li>`effectiveTagValues:prod&#42;` to find Google Cloud resources that have directly
11321132
* attached or inherited tags where the
1133-
* [`TagValue`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1134-
* .`namespacedName` contains a word prefixed by `prod`.
1133+
* [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1134+
* contains a word prefixed by `prod`.
11351135
* <li>`effectiveTagValueIds=tagValues/123` to find Google Cloud resources that have
11361136
* directly attached or inherited tags where the
1137-
* [`TagValue`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1138-
* .`name` is exactly `tagValues/123`.
1137+
* [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue)
1138+
* is exactly `tagValues/123`.
11391139
* <li>`kmsKey:key` to find Google Cloud resources encrypted with a customer-managed
1140-
* encryption key whose name contains `key` as a word. This field is deprecated. Please
1141-
* use the `kmsKeys` field to retrieve Cloud KMS key information.
1140+
* encryption key whose name contains `key` as a word. This field is deprecated. Use the
1141+
* `kmsKeys` field to retrieve Cloud KMS key information.
11421142
* <li>`kmsKeys:key` to find Google Cloud resources encrypted with customer-managed
11431143
* encryption keys whose name contains the word `key`.
11441144
* <li>`relationships:instance-group-1` to find Google Cloud resources that have
@@ -1148,6 +1148,10 @@ public final UnaryCallable<DeleteFeedRequest, Empty> deleteFeedCallable() {
11481148
* <li>`relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find Compute Engine
11491149
* instances that have relationships with `instance-group-1` in the Compute Engine
11501150
* instance group resource name, for relationship type `INSTANCE_TO_INSTANCEGROUP`.
1151+
* <li>`sccSecurityMarks.key=value` to find Cloud resources that are attached with security
1152+
* marks whose key is `key` and value is `value`.
1153+
* <li>`sccSecurityMarks.key:&#42;` to find Cloud resources that are attached with security
1154+
* marks whose key is `key`.
11511155
* <li>`state:ACTIVE` to find Google Cloud resources whose state contains `ACTIVE` as a
11521156
* word.
11531157
* <li>`NOT state:ACTIVE` to find Google Cloud resources whose state doesn't contain
@@ -1169,7 +1173,7 @@ public final UnaryCallable<DeleteFeedRequest, Empty> deleteFeedCallable() {
11691173
*
11701174
* @param assetTypes Optional. A list of asset types that this request searches for. If empty, it
11711175
* will search all the [searchable asset
1172-
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
1176+
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types).
11731177
* <p>Regular expressions are also supported. For example:
11741178
* <ul>
11751179
* <li>"compute.googleapis.com.&#42;" snapshots resources whose asset type starts with
@@ -1721,8 +1725,8 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r
17211725
* try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
17221726
* AnalyzeMoveRequest request =
17231727
* AnalyzeMoveRequest.newBuilder()
1724-
* .setResource("resource-341064690")
1725-
* .setDestinationParent("destinationParent-1733659048")
1728+
* .setResource(ProjectName.of("[PROJECT]").toString())
1729+
* .setDestinationParent(FolderName.of("[FOLDER]").toString())
17261730
* .build();
17271731
* AnalyzeMoveResponse response = assetServiceClient.analyzeMove(request);
17281732
* }
@@ -1753,8 +1757,8 @@ public final AnalyzeMoveResponse analyzeMove(AnalyzeMoveRequest request) {
17531757
* try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
17541758
* AnalyzeMoveRequest request =
17551759
* AnalyzeMoveRequest.newBuilder()
1756-
* .setResource("resource-341064690")
1757-
* .setDestinationParent("destinationParent-1733659048")
1760+
* .setResource(ProjectName.of("[PROJECT]").toString())
1761+
* .setDestinationParent(FolderName.of("[FOLDER]").toString())
17581762
* .build();
17591763
* ApiFuture<AnalyzeMoveResponse> future =
17601764
* assetServiceClient.analyzeMoveCallable().futureCall(request);
@@ -2764,11 +2768,15 @@ public final BatchGetEffectiveIamPoliciesResponse batchGetEffectiveIamPolicies(
27642768
* The response only contains analyzed organization policies for the provided constraint.
27652769
* @param filter The expression to filter
27662770
* [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results].
2767-
* The only supported field is `consolidated_policy.attached_resource`, and the only supported
2768-
* operator is `=`.
2769-
* <p>Example:
2771+
* Filtering is currently available for bare literal values and the following fields:
2772+
* <ul>
2773+
* <li>consolidated_policy.attached_resource
2774+
* <li>consolidated_policy.rules.enforce
2775+
* </ul>
2776+
* <p>When filtering by a specific field, the only supported operator is `=`. For example,
2777+
* filtering by
27702778
* consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001"
2771-
* will return the org policy results of"folders/001".
2779+
* will return all the Organization Policy results attached to "folders/001".
27722780
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
27732781
*/
27742782
public final AnalyzeOrgPoliciesPagedResponse analyzeOrgPolicies(
@@ -2931,9 +2939,15 @@ public final AnalyzeOrgPoliciesPagedResponse analyzeOrgPolicies(
29312939
*
29322940
* @param constraint Required. The name of the constraint to analyze governed containers for. The
29332941
* analysis only contains organization policies for the provided constraint.
2934-
* @param filter The expression to filter the governed containers in result. The only supported
2935-
* field is `parent`, and the only supported operator is `=`.
2936-
* <p>Example: parent="//cloudresourcemanager.googleapis.com/folders/001" will return all
2942+
* @param filter The expression to filter
2943+
* [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers].
2944+
* Filtering is currently available for bare literal values and the following fields:
2945+
* <ul>
2946+
* <li>parent
2947+
* <li>consolidated_policy.rules.enforce
2948+
* </ul>
2949+
* <p>When filtering by a specific field, the only supported operator is `=`. For example,
2950+
* filtering by parent="//cloudresourcemanager.googleapis.com/folders/001" will return all the
29372951
* containers under "folders/001".
29382952
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
29392953
*/
@@ -3088,8 +3102,7 @@ public final AnalyzeOrgPolicyGovernedContainersPagedResponse analyzeOrgPolicyGov
30883102
* </ul>
30893103
*
30903104
* <p>This RPC only returns either resources of types supported by [searchable asset
3091-
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types),
3092-
* or IAM policies.
3105+
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), or IAM policies.
30933106
*
30943107
* <p>Sample code:
30953108
*
@@ -3121,14 +3134,32 @@ public final AnalyzeOrgPolicyGovernedContainersPagedResponse analyzeOrgPolicyGov
31213134
*
31223135
* @param constraint Required. The name of the constraint to analyze governed assets for. The
31233136
* analysis only contains analyzed organization policies for the provided constraint.
3124-
* @param filter The expression to filter the governed assets in result. The only supported fields
3125-
* for governed resources are `governed_resource.project` and `governed_resource.folders`. The
3126-
* only supported fields for governed iam policies are `governed_iam_policy.project` and
3127-
* `governed_iam_policy.folders`. The only supported operator is `=`.
3128-
* <p>Example 1: governed_resource.project="projects/12345678" filter will return all governed
3129-
* resources under projects/12345678 including the project ifself, if applicable.
3130-
* <p>Example 2: governed_iam_policy.folders="folders/12345678" filter will return all
3131-
* governed iam policies under folders/12345678, if applicable.
3137+
* @param filter The expression to filter
3138+
* [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets].
3139+
* <p>For governed resources, filtering is currently available for bare literal values and the
3140+
* following fields:
3141+
* <ul>
3142+
* <li>governed_resource.project
3143+
* <li>governed_resource.folders
3144+
* <li>consolidated_policy.rules.enforce When filtering by `governed_resource.project` or
3145+
* `consolidated_policy.rules.enforce`, the only supported operator is `=`. When
3146+
* filtering by `governed_resource.folders`, the supported operators are `=` and `:`.
3147+
* For example, filtering by `governed_resource.project="projects/12345678"` will return
3148+
* all the governed resources under "projects/12345678", including the project itself if
3149+
* applicable.
3150+
* </ul>
3151+
* <p>For governed IAM policies, filtering is currently available for bare literal values and
3152+
* the following fields:
3153+
* <ul>
3154+
* <li>governed_iam_policy.project
3155+
* <li>governed_iam_policy.folders
3156+
* <li>consolidated_policy.rules.enforce When filtering by `governed_iam_policy.project` or
3157+
* `consolidated_policy.rules.enforce`, the only supported operator is `=`. When
3158+
* filtering by `governed_iam_policy.folders`, the supported operators are `=` and `:`.
3159+
* For example, filtering by `governed_iam_policy.folders:"folders/12345678"` will
3160+
* return all the governed IAM policies under "folders/001".
3161+
* </ul>
3162+
*
31323163
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
31333164
*/
31343165
public final AnalyzeOrgPolicyGovernedAssetsPagedResponse analyzeOrgPolicyGovernedAssets(
@@ -3161,8 +3192,7 @@ public final AnalyzeOrgPolicyGovernedAssetsPagedResponse analyzeOrgPolicyGoverne
31613192
* </ul>
31623193
*
31633194
* <p>This RPC only returns either resources of types supported by [searchable asset
3164-
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types),
3165-
* or IAM policies.
3195+
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), or IAM policies.
31663196
*
31673197
* <p>Sample code:
31683198
*
@@ -3215,8 +3245,7 @@ public final AnalyzeOrgPolicyGovernedAssetsPagedResponse analyzeOrgPolicyGoverne
32153245
* </ul>
32163246
*
32173247
* <p>This RPC only returns either resources of types supported by [searchable asset
3218-
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types),
3219-
* or IAM policies.
3248+
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), or IAM policies.
32203249
*
32213250
* <p>Sample code:
32223251
*
@@ -3270,8 +3299,7 @@ public final AnalyzeOrgPolicyGovernedAssetsPagedResponse analyzeOrgPolicyGoverne
32703299
* </ul>
32713300
*
32723301
* <p>This RPC only returns either resources of types supported by [searchable asset
3273-
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types),
3274-
* or IAM policies.
3302+
* types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), or IAM policies.
32753303
*
32763304
* <p>Sample code:
32773305
*

java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public AssetServiceStub getStub() {
184184
*
185185
* @param parent Required. The name of the project/folder/organization where this feed should be
186186
* created in. It can only be an organization number (such as "organizations/123"), a folder
187-
* number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a
187+
* number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a
188188
* project number (such as "projects/12345").
189189
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
190190
*/

0 commit comments

Comments
 (0)