feat: Add support for "billingAccounts" as another parent resource name for recommendations and insights APIs.
PiperOrigin-RevId: 347984439
This commit is contained in:
parent
1c353b7a6d
commit
be40b52d80
|
|
@ -30,7 +30,6 @@ option objc_class_prefix = "CREC";
|
|||
option (google.api.resource_definition) = {
|
||||
type: "recommender.googleapis.com/InsightType"
|
||||
pattern: "projects/{project}/locations/{location}/insightTypes/{insight_type}"
|
||||
pattern: "billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}"
|
||||
};
|
||||
|
||||
// An insight along with the information used to derive the insight. The insight
|
||||
|
|
@ -39,7 +38,6 @@ message Insight {
|
|||
option (google.api.resource) = {
|
||||
type: "recommender.googleapis.com/Insight"
|
||||
pattern: "projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}"
|
||||
pattern: "billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}"
|
||||
};
|
||||
|
||||
// Reference to an associated recommendation.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ option objc_class_prefix = "CREC";
|
|||
option (google.api.resource_definition) = {
|
||||
type: "recommender.googleapis.com/Recommender"
|
||||
pattern: "projects/{project}/locations/{location}/recommenders/{recommender}"
|
||||
pattern: "billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}"
|
||||
};
|
||||
|
||||
// A recommendation along with a suggested action. E.g., a rightsizing
|
||||
|
|
@ -39,7 +38,6 @@ message Recommendation {
|
|||
option (google.api.resource) = {
|
||||
type: "recommender.googleapis.com/Recommendation"
|
||||
pattern: "projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}"
|
||||
pattern: "billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}"
|
||||
};
|
||||
|
||||
// Reference to an associated insight.
|
||||
|
|
@ -172,12 +170,12 @@ message Operation {
|
|||
// "/versions/*/targetSize/percent": 20
|
||||
// }
|
||||
// * Example: {
|
||||
// "/bindings/*/role": "roles/owner"
|
||||
// "/bindings/*/role": "roles/admin"
|
||||
// "/bindings/*/condition" : null
|
||||
// }
|
||||
// * Example: {
|
||||
// "/bindings/*/role": "roles/owner"
|
||||
// "/bindings/*/members/*" : ["x@example.com", "y@example.com"]
|
||||
// "/bindings/*/role": "roles/admin"
|
||||
// "/bindings/*/members/*" : ["x@google.com", "y@google.com"]
|
||||
// }
|
||||
// When both path_filters and path_value_matchers are set, an implicit AND
|
||||
// must be performed.
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@ service Recommender {
|
|||
rpc ListInsights(ListInsightsRequest) returns (ListInsightsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/{parent=projects/*/locations/*/insightTypes/*}/insights"
|
||||
additional_bindings {
|
||||
get: "/v1/{parent=billingAccounts/*/locations/*/insightTypes/*}/insights"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
|
@ -55,9 +52,6 @@ service Recommender {
|
|||
rpc GetInsight(GetInsightRequest) returns (Insight) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}"
|
||||
additional_bindings {
|
||||
get: "/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
|
@ -72,10 +66,6 @@ service Recommender {
|
|||
option (google.api.http) = {
|
||||
post: "/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}:markAccepted"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}:markAccepted"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "name,state_metadata,etag";
|
||||
}
|
||||
|
|
@ -85,9 +75,6 @@ service Recommender {
|
|||
rpc ListRecommendations(ListRecommendationsRequest) returns (ListRecommendationsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/{parent=projects/*/locations/*/recommenders/*}/recommendations"
|
||||
additional_bindings {
|
||||
get: "/v1/{parent=billingAccounts/*/locations/*/recommenders/*}/recommendations"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
option (google.api.method_signature) = "parent,filter";
|
||||
|
|
@ -98,9 +85,6 @@ service Recommender {
|
|||
rpc GetRecommendation(GetRecommendationRequest) returns (Recommendation) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}"
|
||||
additional_bindings {
|
||||
get: "/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
|
@ -119,10 +103,6 @@ service Recommender {
|
|||
option (google.api.http) = {
|
||||
post: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markClaimed"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "name,state_metadata,etag";
|
||||
}
|
||||
|
|
@ -142,10 +122,6 @@ service Recommender {
|
|||
option (google.api.http) = {
|
||||
post: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markSucceeded"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "name,state_metadata,etag";
|
||||
}
|
||||
|
|
@ -165,10 +141,6 @@ service Recommender {
|
|||
option (google.api.http) = {
|
||||
post: "/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markFailed"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
option (google.api.method_signature) = "name,state_metadata,etag";
|
||||
}
|
||||
|
|
@ -184,8 +156,6 @@ message ListInsightsRequest {
|
|||
//
|
||||
// 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.)
|
||||
string parent = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
|
|
@ -259,8 +229,6 @@ message ListRecommendationsRequest {
|
|||
//
|
||||
// LOCATION here refers to GCP Locations:
|
||||
// https://cloud.google.com/about/locations/
|
||||
// RECOMMENDER_ID refers to supported recommenders:
|
||||
// https://cloud.google.com/recommender/docs/recommenders.
|
||||
string parent = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue