1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054
|
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="recommender_v1beta1.html">Recommender API</a> . <a href="recommender_v1beta1.projects.html">projects</a> . <a href="recommender_v1beta1.projects.locations.html">locations</a> . <a href="recommender_v1beta1.projects.locations.recommenders.html">recommenders</a> . <a href="recommender_v1beta1.projects.locations.recommenders.recommendations.html">recommendations</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.</p>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#markClaimed">markClaimed(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
<p class="toc_element">
<code><a href="#markDismissed">markDismissed(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
<p class="toc_element">
<code><a href="#markFailed">markFailed(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
<p class="toc_element">
<code><a href="#markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, x__xgafv=None)</code>
<pre>Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Args:
name: string, Required. Name of the recommendation. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
"additionalImpact": [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
{ # Contains the impact a recommendation can have for a given category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
],
"associatedInsights": [ # Insights that led to this recommendation.
{ # Reference to an associated insight.
"insight": "A String", # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
},
],
"content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
"operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
{ # Group of operations that need to be performed atomically.
"operations": [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
{ # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
"action": "A String", # Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
"path": "A String", # Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
"pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * 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.
"a_key": "",
},
"pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
"a_key": { # Contains various matching options for values for a GCP resource field.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
"resource": "A String", # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
"resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
"sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
"sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = and resource_name = . This field is empty for all other values of `action`.
"value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
"valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
],
},
],
"overview": { # Condensed overview information about the recommendation.
"a_key": "", # Properties of the object.
},
},
"description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
"lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it in the first place.
"name": "A String", # Identifier. Name of recommendation.
"primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to optimize for one category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
"priority": "A String", # Recommendation's priority.
"recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
"stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
"state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
"stateMetadata": { # A map of metadata for the state, provided by user or automations systems.
"a_key": "A String",
},
},
"targetResources": [ # Fully qualified resource names that this recommendation is targeting.
"A String",
],
"xorGroupId": "A String", # Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Args:
parent: string, Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 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. (required)
filter: string, Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)
pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.
pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response to the `ListRecommendations` method.
"nextPageToken": "A String", # A token that can be used to request the next page of results. This field is empty if there are no additional results.
"recommendations": [ # The set of recommendations for the `parent` resource.
{ # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
"additionalImpact": [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
{ # Contains the impact a recommendation can have for a given category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
],
"associatedInsights": [ # Insights that led to this recommendation.
{ # Reference to an associated insight.
"insight": "A String", # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
},
],
"content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
"operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
{ # Group of operations that need to be performed atomically.
"operations": [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
{ # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
"action": "A String", # Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
"path": "A String", # Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
"pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * 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.
"a_key": "",
},
"pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
"a_key": { # Contains various matching options for values for a GCP resource field.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
"resource": "A String", # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
"resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
"sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
"sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = and resource_name = . This field is empty for all other values of `action`.
"value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
"valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
],
},
],
"overview": { # Condensed overview information about the recommendation.
"a_key": "", # Properties of the object.
},
},
"description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
"lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it in the first place.
"name": "A String", # Identifier. Name of recommendation.
"primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to optimize for one category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
"priority": "A String", # Recommendation's priority.
"recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
"stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
"state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
"stateMetadata": { # A map of metadata for the state, provided by user or automations systems.
"a_key": "A String",
},
},
"targetResources": [ # Fully qualified resource names that this recommendation is targeting.
"A String",
],
"xorGroupId": "A String", # Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next()</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="markClaimed">markClaimed(name, body=None, x__xgafv=None)</code>
<pre>Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.
Args:
name: string, Required. Name of the recommendation. (required)
body: object, The request body.
The object takes the form of:
{ # Request for the `MarkRecommendationClaimed` Method.
"etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking.
"stateMetadata": { # State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
"a_key": "A String",
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
"additionalImpact": [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
{ # Contains the impact a recommendation can have for a given category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
],
"associatedInsights": [ # Insights that led to this recommendation.
{ # Reference to an associated insight.
"insight": "A String", # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
},
],
"content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
"operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
{ # Group of operations that need to be performed atomically.
"operations": [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
{ # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
"action": "A String", # Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
"path": "A String", # Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
"pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * 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.
"a_key": "",
},
"pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
"a_key": { # Contains various matching options for values for a GCP resource field.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
"resource": "A String", # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
"resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
"sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
"sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = and resource_name = . This field is empty for all other values of `action`.
"value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
"valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
],
},
],
"overview": { # Condensed overview information about the recommendation.
"a_key": "", # Properties of the object.
},
},
"description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
"lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it in the first place.
"name": "A String", # Identifier. Name of recommendation.
"primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to optimize for one category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
"priority": "A String", # Recommendation's priority.
"recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
"stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
"state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
"stateMetadata": { # A map of metadata for the state, provided by user or automations systems.
"a_key": "A String",
},
},
"targetResources": [ # Fully qualified resource names that this recommendation is targeting.
"A String",
],
"xorGroupId": "A String", # Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
}</pre>
</div>
<div class="method">
<code class="details" id="markDismissed">markDismissed(name, body=None, x__xgafv=None)</code>
<pre>Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.
Args:
name: string, Required. Name of the recommendation. (required)
body: object, The request body.
The object takes the form of:
{ # Request for the `MarkRecommendationDismissed` Method.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
"additionalImpact": [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
{ # Contains the impact a recommendation can have for a given category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
],
"associatedInsights": [ # Insights that led to this recommendation.
{ # Reference to an associated insight.
"insight": "A String", # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
},
],
"content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
"operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
{ # Group of operations that need to be performed atomically.
"operations": [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
{ # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
"action": "A String", # Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
"path": "A String", # Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
"pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * 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.
"a_key": "",
},
"pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
"a_key": { # Contains various matching options for values for a GCP resource field.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
"resource": "A String", # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
"resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
"sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
"sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = and resource_name = . This field is empty for all other values of `action`.
"value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
"valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
],
},
],
"overview": { # Condensed overview information about the recommendation.
"a_key": "", # Properties of the object.
},
},
"description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
"lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it in the first place.
"name": "A String", # Identifier. Name of recommendation.
"primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to optimize for one category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
"priority": "A String", # Recommendation's priority.
"recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
"stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
"state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
"stateMetadata": { # A map of metadata for the state, provided by user or automations systems.
"a_key": "A String",
},
},
"targetResources": [ # Fully qualified resource names that this recommendation is targeting.
"A String",
],
"xorGroupId": "A String", # Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
}</pre>
</div>
<div class="method">
<code class="details" id="markFailed">markFailed(name, body=None, x__xgafv=None)</code>
<pre>Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.
Args:
name: string, Required. Name of the recommendation. (required)
body: object, The request body.
The object takes the form of:
{ # Request for the `MarkRecommendationFailed` Method.
"etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking.
"stateMetadata": { # State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
"a_key": "A String",
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
"additionalImpact": [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
{ # Contains the impact a recommendation can have for a given category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
],
"associatedInsights": [ # Insights that led to this recommendation.
{ # Reference to an associated insight.
"insight": "A String", # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
},
],
"content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
"operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
{ # Group of operations that need to be performed atomically.
"operations": [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
{ # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
"action": "A String", # Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
"path": "A String", # Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
"pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * 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.
"a_key": "",
},
"pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
"a_key": { # Contains various matching options for values for a GCP resource field.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
"resource": "A String", # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
"resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
"sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
"sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = and resource_name = . This field is empty for all other values of `action`.
"value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
"valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
],
},
],
"overview": { # Condensed overview information about the recommendation.
"a_key": "", # Properties of the object.
},
},
"description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
"lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it in the first place.
"name": "A String", # Identifier. Name of recommendation.
"primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to optimize for one category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
"priority": "A String", # Recommendation's priority.
"recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
"stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
"state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
"stateMetadata": { # A map of metadata for the state, provided by user or automations systems.
"a_key": "A String",
},
},
"targetResources": [ # Fully qualified resource names that this recommendation is targeting.
"A String",
],
"xorGroupId": "A String", # Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
}</pre>
</div>
<div class="method">
<code class="details" id="markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</code>
<pre>Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.
Args:
name: string, Required. Name of the recommendation. (required)
body: object, The request body.
The object takes the form of:
{ # Request for the `MarkRecommendationSucceeded` Method.
"etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking.
"stateMetadata": { # State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
"a_key": "A String",
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
"additionalImpact": [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
{ # Contains the impact a recommendation can have for a given category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
],
"associatedInsights": [ # Insights that led to this recommendation.
{ # Reference to an associated insight.
"insight": "A String", # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
},
],
"content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
"operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
{ # Group of operations that need to be performed atomically.
"operations": [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
{ # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
"action": "A String", # Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
"path": "A String", # Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
"pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * 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.
"a_key": "",
},
"pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
"a_key": { # Contains various matching options for values for a GCP resource field.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
"resource": "A String", # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
"resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
"sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
"sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = and resource_name = . This field is empty for all other values of `action`.
"value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
"valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
"matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
},
},
],
},
],
"overview": { # Condensed overview information about the recommendation.
"a_key": "", # Properties of the object.
},
},
"description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters.
"etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
"lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it in the first place.
"name": "A String", # Identifier. Name of recommendation.
"primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to optimize for one category.
"category": "A String", # Category that is being targeted.
"costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
"cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"costInLocalCurrency": { # Represents an amount of money with its currency type. # The approximate cost savings in the billing account's local currency.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"duration": "A String", # Duration for which this cost applies.
"pricingType": "A String", # How the cost is calculated.
},
"impactComponents": [ # If populated, the impact contains multiple components. In this case, the top-level impact contains aggregated values and each component contains per-service details.
# Object with schema name: GoogleCloudRecommenderV1beta1Impact
],
"reliabilityProjection": { # Contains information on the impact of a reliability recommendation. # Use with CategoryType.RELIABILITY
"details": { # Per-recommender projection.
"a_key": "", # Properties of the object.
},
"risks": [ # Reliability risks mitigated by this recommendation.
"A String",
],
},
"securityProjection": { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
"details": { # This field can be used by the recommender to define details specific to security impact.
"a_key": "", # Properties of the object.
},
},
"service": "A String", # The service that this impact is associated with.
"sustainabilityProjection": { # Contains metadata about how much sustainability a recommendation can save or incur. # Use with CategoryType.SUSTAINABILITY
"duration": "A String", # Duration for which this sustanability applies.
"kgCO2e": 3.14, # Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
},
},
"priority": "A String", # Recommendation's priority.
"recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
"stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
"state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
"stateMetadata": { # A map of metadata for the state, provided by user or automations systems.
"a_key": "A String",
},
},
"targetResources": [ # Fully qualified resource names that this recommendation is targeting.
"A String",
],
"xorGroupId": "A String", # Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
}</pre>
</div>
</body></html>
|