Create sample for list recommendations
PiperOrigin-RevId: 282665402
This commit is contained in:
parent
f88e2ca657
commit
2cc56cb83e
|
|
@ -8,6 +8,7 @@ common:
|
|||
- .
|
||||
service_yaml: recommender_v1beta1.yaml
|
||||
gapic_yaml: recommender_gapic.yaml
|
||||
samples: samples
|
||||
artifacts:
|
||||
- name: gapic_config
|
||||
type: GAPIC_CONFIG
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto
|
||||
schema_version: 1.2.0
|
||||
samples:
|
||||
- title: List Recommendations
|
||||
service: google.cloud.recommender.v1beta1.Recommender
|
||||
description: |
|
||||
List recommendations for a specified project, location, and recommender.
|
||||
rpc: ListRecommendations
|
||||
request:
|
||||
- field: parent
|
||||
value: "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER]"
|
||||
response:
|
||||
- define: recommendation = $resp
|
||||
- print: ["Recommendation name: %s", recommendation.name]
|
||||
- print: ["- description: %s", recommendation.description]
|
||||
- print: ["- primary_impact.category: %s", recommendation.primary_impact.category]
|
||||
- print: ["- state_info.state: %s", recommendation.state_info.state]
|
||||
- print: ["- last_refresh_time: %s", recommendation.last_refresh_time]
|
||||
Loading…
Reference in New Issue