Home | History | Annotate | Download | only in dyn
      1 <html><body>
      2 <style>
      3 
      4 body, h1, h2, h3, div, span, p, pre, a {
      5   margin: 0;
      6   padding: 0;
      7   border: 0;
      8   font-weight: inherit;
      9   font-style: inherit;
     10   font-size: 100%;
     11   font-family: inherit;
     12   vertical-align: baseline;
     13 }
     14 
     15 body {
     16   font-size: 13px;
     17   padding: 1em;
     18 }
     19 
     20 h1 {
     21   font-size: 26px;
     22   margin-bottom: 1em;
     23 }
     24 
     25 h2 {
     26   font-size: 24px;
     27   margin-bottom: 1em;
     28 }
     29 
     30 h3 {
     31   font-size: 20px;
     32   margin-bottom: 1em;
     33   margin-top: 1em;
     34 }
     35 
     36 pre, code {
     37   line-height: 1.5;
     38   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
     39 }
     40 
     41 pre {
     42   margin-top: 0.5em;
     43 }
     44 
     45 h1, h2, h3, p {
     46   font-family: Arial, sans serif;
     47 }
     48 
     49 h1, h2, h3 {
     50   border-bottom: solid #CCC 1px;
     51 }
     52 
     53 .toc_element {
     54   margin-top: 0.5em;
     55 }
     56 
     57 .firstline {
     58   margin-left: 2 em;
     59 }
     60 
     61 .method  {
     62   margin-top: 1em;
     63   border: solid 1px #CCC;
     64   padding: 1em;
     65   background: #EEE;
     66 }
     67 
     68 .details {
     69   font-weight: bold;
     70   font-size: 14px;
     71 }
     72 
     73 </style>
     74 
     75 <h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.autoscalers.html">autoscalers</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
     79 <p class="firstline">Retrieves an aggregated list of autoscalers.</p>
     80 <p class="toc_element">
     81   <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
     82 <p class="firstline">Retrieves the next page of results.</p>
     83 <p class="toc_element">
     84   <code><a href="#delete">delete(project, zone, autoscaler)</a></code></p>
     85 <p class="firstline">Deletes the specified autoscaler.</p>
     86 <p class="toc_element">
     87   <code><a href="#get">get(project, zone, autoscaler)</a></code></p>
     88 <p class="firstline">Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.</p>
     89 <p class="toc_element">
     90   <code><a href="#insert">insert(project, zone, body)</a></code></p>
     91 <p class="firstline">Creates an autoscaler in the specified project using the data included in the request.</p>
     92 <p class="toc_element">
     93   <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
     94 <p class="firstline">Retrieves a list of autoscalers contained within the specified zone.</p>
     95 <p class="toc_element">
     96   <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
     97 <p class="firstline">Retrieves the next page of results.</p>
     98 <p class="toc_element">
     99   <code><a href="#patch">patch(project, zone, body, autoscaler=None)</a></code></p>
    100 <p class="firstline">Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.</p>
    101 <p class="toc_element">
    102   <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
    103 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
    104 <p class="toc_element">
    105   <code><a href="#update">update(project, zone, body, autoscaler=None)</a></code></p>
    106 <p class="firstline">Updates an autoscaler in the specified project using the data included in the request.</p>
    107 <h3>Method Details</h3>
    108 <div class="method">
    109     <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
    110   <pre>Retrieves an aggregated list of autoscalers.
    111 
    112 Args:
    113   project: string, Project ID for this request. (required)
    114   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
    115 
    116 You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
    117 
    118 Currently, only sorting by name or creationTimestamp desc is supported.
    119   maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
    120   pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
    121   filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
    122 
    123 The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
    124 
    125 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
    126 
    127 You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
    128 
    129 To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
    130 
    131 Returns:
    132   An object of the form:
    133 
    134     {
    135     "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
    136     "items": { # A map of scoped autoscaler lists.
    137       "a_key": { # [Output Only] Name of the scope containing this set of autoscalers.
    138         "warning": { # [Output Only] Informational warning which replaces the list of autoscalers when the list is empty.
    139           "message": "A String", # [Output Only] A human-readable description of the warning code.
    140           "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    141           "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    142               # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    143             {
    144               "value": "A String", # [Output Only] A warning data value corresponding to the key.
    145               "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
    146             },
    147           ],
    148         },
    149         "autoscalers": [ # [Output Only] List of autoscalers contained in this scope.
    150           { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
    151               "status": "A String", # [Output Only] The status of the autoscaler configuration.
    152               "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
    153               "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    154               "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
    155               "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
    156               "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
    157                   #
    158                   # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
    159                 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
    160                 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
    161                     #
    162                     # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
    163                 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
    164                   "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
    165                 },
    166                 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
    167                   { # Custom utilization metric policy.
    168                     "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.
    169                         #
    170                         # The metric must have a value type of INT64 or DOUBLE.
    171                     "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
    172                     "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
    173                         #
    174                         # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
    175                   },
    176                 ],
    177                 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
    178                   "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
    179                       #
    180                       # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
    181                       #
    182                       # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
    183                 },
    184                 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
    185               },
    186               "target": "A String", # URL of the managed instance group that this autoscaler will scale.
    187               "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
    188                 {
    189                   "message": "A String", # The status message.
    190                   "type": "A String", # The type of error returned.
    191                 },
    192               ],
    193               "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    194               "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    195               "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    196               "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    197             },
    198         ],
    199       },
    200     },
    201     "kind": "compute#autoscalerAggregatedList", # [Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.
    202     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    203     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    204   }</pre>
    205 </div>
    206 
    207 <div class="method">
    208     <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
    209   <pre>Retrieves the next page of results.
    210 
    211 Args:
    212   previous_request: The request for the previous page. (required)
    213   previous_response: The response from the request for the previous page. (required)
    214 
    215 Returns:
    216   A request object that you can call 'execute()' on to request the next
    217   page. Returns None if there are no more items in the collection.
    218     </pre>
    219 </div>
    220 
    221 <div class="method">
    222     <code class="details" id="delete">delete(project, zone, autoscaler)</code>
    223   <pre>Deletes the specified autoscaler.
    224 
    225 Args:
    226   project: string, Project ID for this request. (required)
    227   zone: string, Name of the zone for this request. (required)
    228   autoscaler: string, Name of the autoscaler to delete. (required)
    229 
    230 Returns:
    231   An object of the form:
    232 
    233     { # An Operation resource, used to manage asynchronous API requests.
    234     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    235     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    236     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    237     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    238     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    239     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    240     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    241     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    242     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    243     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    244     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    245     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    246     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    247     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    248       {
    249         "message": "A String", # [Output Only] A human-readable description of the warning code.
    250         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    251         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    252             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    253           {
    254             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    255             "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
    256           },
    257         ],
    258       },
    259     ],
    260     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    261     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    262     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    263     "name": "A String", # [Output Only] Name of the resource.
    264     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    265     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    266       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    267         {
    268           "message": "A String", # [Output Only] An optional, human-readable error message.
    269           "code": "A String", # [Output Only] The error type identifier for this error.
    270           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    271         },
    272       ],
    273     },
    274     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    275     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    276     "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
    277   }</pre>
    278 </div>
    279 
    280 <div class="method">
    281     <code class="details" id="get">get(project, zone, autoscaler)</code>
    282   <pre>Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.
    283 
    284 Args:
    285   project: string, Project ID for this request. (required)
    286   zone: string, Name of the zone for this request. (required)
    287   autoscaler: string, Name of the autoscaler to return. (required)
    288 
    289 Returns:
    290   An object of the form:
    291 
    292     { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
    293       "status": "A String", # [Output Only] The status of the autoscaler configuration.
    294       "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
    295       "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    296       "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
    297       "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
    298       "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
    299           #
    300           # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
    301         "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
    302         "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
    303             #
    304             # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
    305         "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
    306           "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
    307         },
    308         "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
    309           { # Custom utilization metric policy.
    310             "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.
    311                 #
    312                 # The metric must have a value type of INT64 or DOUBLE.
    313             "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
    314             "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
    315                 #
    316                 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
    317           },
    318         ],
    319         "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
    320           "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
    321               #
    322               # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
    323               #
    324               # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
    325         },
    326         "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
    327       },
    328       "target": "A String", # URL of the managed instance group that this autoscaler will scale.
    329       "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
    330         {
    331           "message": "A String", # The status message.
    332           "type": "A String", # The type of error returned.
    333         },
    334       ],
    335       "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    336       "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    337       "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    338       "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    339     }</pre>
    340 </div>
    341 
    342 <div class="method">
    343     <code class="details" id="insert">insert(project, zone, body)</code>
    344   <pre>Creates an autoscaler in the specified project using the data included in the request.
    345 
    346 Args:
    347   project: string, Project ID for this request. (required)
    348   zone: string, Name of the zone for this request. (required)
    349   body: object, The request body. (required)
    350     The object takes the form of:
    351 
    352 { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
    353     "status": "A String", # [Output Only] The status of the autoscaler configuration.
    354     "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
    355     "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    356     "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
    357     "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
    358     "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
    359         # 
    360         # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
    361       "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
    362       "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
    363           #
    364           # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
    365       "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
    366         "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
    367       },
    368       "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
    369         { # Custom utilization metric policy.
    370           "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.
    371               #
    372               # The metric must have a value type of INT64 or DOUBLE.
    373           "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
    374           "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
    375               #
    376               # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
    377         },
    378       ],
    379       "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
    380         "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
    381             #
    382             # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
    383             #
    384             # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
    385       },
    386       "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
    387     },
    388     "target": "A String", # URL of the managed instance group that this autoscaler will scale.
    389     "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
    390       {
    391         "message": "A String", # The status message.
    392         "type": "A String", # The type of error returned.
    393       },
    394     ],
    395     "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    396     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    397     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    398     "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    399   }
    400 
    401 
    402 Returns:
    403   An object of the form:
    404 
    405     { # An Operation resource, used to manage asynchronous API requests.
    406     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    407     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    408     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    409     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    410     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    411     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    412     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    413     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    414     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    415     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    416     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    417     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    418     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    419     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    420       {
    421         "message": "A String", # [Output Only] A human-readable description of the warning code.
    422         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    423         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    424             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    425           {
    426             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    427             "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
    428           },
    429         ],
    430       },
    431     ],
    432     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    433     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    434     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    435     "name": "A String", # [Output Only] Name of the resource.
    436     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    437     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    438       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    439         {
    440           "message": "A String", # [Output Only] An optional, human-readable error message.
    441           "code": "A String", # [Output Only] The error type identifier for this error.
    442           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    443         },
    444       ],
    445     },
    446     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    447     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    448     "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
    449   }</pre>
    450 </div>
    451 
    452 <div class="method">
    453     <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
    454   <pre>Retrieves a list of autoscalers contained within the specified zone.
    455 
    456 Args:
    457   project: string, Project ID for this request. (required)
    458   zone: string, Name of the zone for this request. (required)
    459   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
    460 
    461 You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
    462 
    463 Currently, only sorting by name or creationTimestamp desc is supported.
    464   maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
    465   pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
    466   filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
    467 
    468 The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
    469 
    470 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
    471 
    472 You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
    473 
    474 To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
    475 
    476 Returns:
    477   An object of the form:
    478 
    479     { # Contains a list of Autoscaler resources.
    480     "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
    481     "items": [ # A list of Autoscaler resources.
    482       { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
    483           "status": "A String", # [Output Only] The status of the autoscaler configuration.
    484           "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
    485           "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    486           "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
    487           "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
    488           "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
    489               #
    490               # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
    491             "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
    492             "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
    493                 #
    494                 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
    495             "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
    496               "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
    497             },
    498             "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
    499               { # Custom utilization metric policy.
    500                 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.
    501                     #
    502                     # The metric must have a value type of INT64 or DOUBLE.
    503                 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
    504                 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
    505                     #
    506                     # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
    507               },
    508             ],
    509             "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
    510               "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
    511                   #
    512                   # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
    513                   #
    514                   # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
    515             },
    516             "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
    517           },
    518           "target": "A String", # URL of the managed instance group that this autoscaler will scale.
    519           "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
    520             {
    521               "message": "A String", # The status message.
    522               "type": "A String", # The type of error returned.
    523             },
    524           ],
    525           "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    526           "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    527           "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    528           "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    529         },
    530     ],
    531     "kind": "compute#autoscalerList", # [Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.
    532     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    533     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    534   }</pre>
    535 </div>
    536 
    537 <div class="method">
    538     <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
    539   <pre>Retrieves the next page of results.
    540 
    541 Args:
    542   previous_request: The request for the previous page. (required)
    543   previous_response: The response from the request for the previous page. (required)
    544 
    545 Returns:
    546   A request object that you can call 'execute()' on to request the next
    547   page. Returns None if there are no more items in the collection.
    548     </pre>
    549 </div>
    550 
    551 <div class="method">
    552     <code class="details" id="patch">patch(project, zone, body, autoscaler=None)</code>
    553   <pre>Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.
    554 
    555 Args:
    556   project: string, Project ID for this request. (required)
    557   zone: string, Name of the zone for this request. (required)
    558   body: object, The request body. (required)
    559     The object takes the form of:
    560 
    561 { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
    562     "status": "A String", # [Output Only] The status of the autoscaler configuration.
    563     "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
    564     "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    565     "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
    566     "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
    567     "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
    568         # 
    569         # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
    570       "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
    571       "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
    572           #
    573           # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
    574       "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
    575         "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
    576       },
    577       "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
    578         { # Custom utilization metric policy.
    579           "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.
    580               #
    581               # The metric must have a value type of INT64 or DOUBLE.
    582           "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
    583           "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
    584               #
    585               # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
    586         },
    587       ],
    588       "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
    589         "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
    590             #
    591             # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
    592             #
    593             # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
    594       },
    595       "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
    596     },
    597     "target": "A String", # URL of the managed instance group that this autoscaler will scale.
    598     "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
    599       {
    600         "message": "A String", # The status message.
    601         "type": "A String", # The type of error returned.
    602       },
    603     ],
    604     "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    605     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    606     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    607     "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    608   }
    609 
    610   autoscaler: string, Name of the autoscaler to patch.
    611 
    612 Returns:
    613   An object of the form:
    614 
    615     { # An Operation resource, used to manage asynchronous API requests.
    616     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    617     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    618     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    619     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    620     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    621     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    622     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    623     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    624     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    625     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    626     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    627     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    628     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    629     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    630       {
    631         "message": "A String", # [Output Only] A human-readable description of the warning code.
    632         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    633         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    634             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    635           {
    636             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    637             "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
    638           },
    639         ],
    640       },
    641     ],
    642     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    643     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    644     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    645     "name": "A String", # [Output Only] Name of the resource.
    646     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    647     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    648       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    649         {
    650           "message": "A String", # [Output Only] An optional, human-readable error message.
    651           "code": "A String", # [Output Only] The error type identifier for this error.
    652           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    653         },
    654       ],
    655     },
    656     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    657     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    658     "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
    659   }</pre>
    660 </div>
    661 
    662 <div class="method">
    663     <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
    664   <pre>Returns permissions that a caller has on the specified resource.
    665 
    666 Args:
    667   project: string, Project ID for this request. (required)
    668   zone: string, The name of the zone for this request. (required)
    669   resource: string, Name of the resource for this request. (required)
    670   body: object, The request body. (required)
    671     The object takes the form of:
    672 
    673 {
    674     "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
    675       "A String",
    676     ],
    677   }
    678 
    679 
    680 Returns:
    681   An object of the form:
    682 
    683     {
    684     "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
    685       "A String",
    686     ],
    687   }</pre>
    688 </div>
    689 
    690 <div class="method">
    691     <code class="details" id="update">update(project, zone, body, autoscaler=None)</code>
    692   <pre>Updates an autoscaler in the specified project using the data included in the request.
    693 
    694 Args:
    695   project: string, Project ID for this request. (required)
    696   zone: string, Name of the zone for this request. (required)
    697   body: object, The request body. (required)
    698     The object takes the form of:
    699 
    700 { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
    701     "status": "A String", # [Output Only] The status of the autoscaler configuration.
    702     "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
    703     "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    704     "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
    705     "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
    706     "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
    707         # 
    708         # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
    709       "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
    710       "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
    711           #
    712           # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
    713       "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
    714         "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
    715       },
    716       "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
    717         { # Custom utilization metric policy.
    718           "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.
    719               #
    720               # The metric must have a value type of INT64 or DOUBLE.
    721           "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
    722           "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
    723               #
    724               # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
    725         },
    726       ],
    727       "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
    728         "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
    729             #
    730             # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
    731             #
    732             # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
    733       },
    734       "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
    735     },
    736     "target": "A String", # URL of the managed instance group that this autoscaler will scale.
    737     "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
    738       {
    739         "message": "A String", # The status message.
    740         "type": "A String", # The type of error returned.
    741       },
    742     ],
    743     "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    744     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    745     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    746     "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    747   }
    748 
    749   autoscaler: string, Name of the autoscaler to update.
    750 
    751 Returns:
    752   An object of the form:
    753 
    754     { # An Operation resource, used to manage asynchronous API requests.
    755     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    756     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    757     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    758     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    759     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    760     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    761     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    762     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    763     "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
    764     "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
    765     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    766     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    767     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    768     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    769       {
    770         "message": "A String", # [Output Only] A human-readable description of the warning code.
    771         "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
    772         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    773             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    774           {
    775             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    776             "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
    777           },
    778         ],
    779       },
    780     ],
    781     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    782     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    783     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    784     "name": "A String", # [Output Only] Name of the resource.
    785     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    786     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    787       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    788         {
    789           "message": "A String", # [Output Only] An optional, human-readable error message.
    790           "code": "A String", # [Output Only] The error type identifier for this error.
    791           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    792         },
    793       ],
    794     },
    795     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    796     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    797     "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
    798   }</pre>
    799 </div>
    800 
    801 </body></html>