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

Commit

Permalink
feat: add support for billingAccounts as another parent resource (#59)
Browse files Browse the repository at this point in the history
* feat: Add support for "billingAccounts" as another parent resource name for recommendations and insights APIs.

PiperOrigin-RevId: 347651882

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Dec 15 11:11:56 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: e689e62a5540d4b98639f0e444a0edf5b2d94043
Source-Link: googleapis/googleapis@e689e62

* feat: Add support for "billingAccounts" as another parent resource name for recommendations and insights APIs.

PiperOrigin-RevId: 347703845

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Dec 15 15:22:41 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 5256ab60f3d396a3d1bd393043776936b9651c5b
Source-Link: googleapis/googleapis@5256ab6
  • Loading branch information
yoshi-automation committed Dec 16, 2020
1 parent 10043cc commit 61d2c7b
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 19 deletions.
Expand Up @@ -181,6 +181,8 @@ async def list_insights(
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
INSIGHT_TYPE_ID refers to supported insight types:
https://cloud.google.com/recommender/docs/insights/insight-types.)
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down Expand Up @@ -459,7 +461,9 @@ async def list_recommendations(
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ RECOMMENDER_ID
refers to supported recommenders:
https://cloud.google.com/recommender/docs/recommenders.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
6 changes: 5 additions & 1 deletion google/cloud/recommender_v1/services/recommender/client.py
Expand Up @@ -424,6 +424,8 @@ def list_insights(
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
INSIGHT_TYPE_ID refers to supported insight types:
https://cloud.google.com/recommender/docs/insights/insight-types.)
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down Expand Up @@ -689,7 +691,9 @@ def list_recommendations(
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ RECOMMENDER_ID
refers to supported recommenders:
https://cloud.google.com/recommender/docs/recommenders.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/recommender_v1/types/recommendation.py
Expand Up @@ -217,11 +217,11 @@ class Operation(proto.Message):
- Example: ``{ "/versions/*/name" : "it-123"
"/versions/*/targetSize/percent": 20 }``
- Example: ``{ "/bindings/*/role": "roles/admin"
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/condition" : null }``
- Example: ``{ "/bindings/*/role": "roles/admin"
"/bindings/*/members/*" : ["x@google.com",
"y@google.com"] }`` When both path_filters and
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/members/*" : ["x@example.com",
"y@example.com"] }`` When both path_filters and
path_value_matchers are set, an implicit AND must be
performed.
path_value_matchers (Sequence[~.recommendation.Operation.PathValueMatchersEntry]):
Expand Down
8 changes: 6 additions & 2 deletions google/cloud/recommender_v1/types/recommender_service.py
Expand Up @@ -52,7 +52,9 @@ class ListInsightsRequest(proto.Message):
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID
refers to supported insight types:
https://cloud.google.com/recommender/docs/insights/insight-types.)
page_size (int):
Optional. The maximum number of results to
return from this request. Non-positive values
Expand Down Expand Up @@ -145,7 +147,9 @@ class ListRecommendationsRequest(proto.Message):
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ RECOMMENDER_ID
refers to supported recommenders:
https://cloud.google.com/recommender/docs/recommenders.
page_size (int):
Optional. The maximum number of results to
return from this request. Non-positive values
Expand Down
Expand Up @@ -181,6 +181,8 @@ async def list_insights(
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
INSIGHT_TYPE_ID refers to supported insight types:
https://cloud.google.com/recommender/docs/insights/insight-types.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down Expand Up @@ -459,7 +461,9 @@ async def list_recommendations(
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ RECOMMENDER_ID
refers to supported recommenders:
https://cloud.google.com/recommender/docs/recommenders.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
Expand Up @@ -424,6 +424,8 @@ def list_insights(
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
INSIGHT_TYPE_ID refers to supported insight types:
https://cloud.google.com/recommender/docs/insights/insight-types.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down Expand Up @@ -689,7 +691,9 @@ def list_recommendations(
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ RECOMMENDER_ID
refers to supported recommenders:
https://cloud.google.com/recommender/docs/recommenders.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/recommender_v1beta1/types/recommendation.py
Expand Up @@ -217,11 +217,11 @@ class Operation(proto.Message):
- Example: ``{ "/versions/*/name" : "it-123"
"/versions/*/targetSize/percent": 20 }``
- Example: ``{ "/bindings/*/role": "roles/admin"
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/condition" : null }``
- Example: ``{ "/bindings/*/role": "roles/admin"
"/bindings/*/members/*" : ["x@google.com",
"y@google.com"] }`` When both path_filters and
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/members/*" : ["x@example.com",
"y@example.com"] }`` When both path_filters and
path_value_matchers are set, an implicit AND must be
performed.
path_value_matchers (Sequence[~.recommendation.Operation.PathValueMatchersEntry]):
Expand Down
8 changes: 6 additions & 2 deletions google/cloud/recommender_v1beta1/types/recommender_service.py
Expand Up @@ -52,7 +52,9 @@ class ListInsightsRequest(proto.Message):
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID
refers to supported insight types:
https://cloud.google.com/recommender/docs/insights/insight-types.
page_size (int):
Optional. The maximum number of results to
return from this request. Non-positive values
Expand Down Expand Up @@ -145,7 +147,9 @@ class ListRecommendationsRequest(proto.Message):
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
https://cloud.google.com/about/locations/ RECOMMENDER_ID
refers to supported recommenders:
https://cloud.google.com/recommender/docs/recommenders.
page_size (int):
Optional. The maximum number of results to
return from this request. Non-positive values
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-recommender.git",
"sha": "5f3dbe447101439b6598e73794debdeb8941884c"
"sha": "10043cc32d9c13ab92da62e214a972918336e88d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
"internalRef": "347055288"
"sha": "5256ab60f3d396a3d1bd393043776936b9651c5b",
"internalRef": "347703845"
}
},
{
Expand Down

0 comments on commit 61d2c7b

Please sign in to comment.