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.instances.html">instances</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</a></code></p>
     79 <p class="firstline">Adds an access config to an instance's network interface.</p>
     80 <p class="toc_element">
     81   <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
     82 <p class="firstline">Retrieves aggregated list of instances.</p>
     83 <p class="toc_element">
     84   <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
     85 <p class="firstline">Retrieves the next page of results.</p>
     86 <p class="toc_element">
     87   <code><a href="#attachDisk">attachDisk(project, zone, instance, body)</a></code></p>
     88 <p class="firstline">Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.</p>
     89 <p class="toc_element">
     90   <code><a href="#delete">delete(project, zone, instance)</a></code></p>
     91 <p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
     92 <p class="toc_element">
     93   <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</a></code></p>
     94 <p class="firstline">Deletes an access config from an instance's network interface.</p>
     95 <p class="toc_element">
     96   <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName)</a></code></p>
     97 <p class="firstline">Detaches a disk from an instance.</p>
     98 <p class="toc_element">
     99   <code><a href="#get">get(project, zone, instance)</a></code></p>
    100 <p class="firstline">Returns the specified Instance resource. Get a list of available instances by making a list() request.</p>
    101 <p class="toc_element">
    102   <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
    103 <p class="firstline">Returns the specified instance's serial port output.</p>
    104 <p class="toc_element">
    105   <code><a href="#insert">insert(project, zone, body)</a></code></p>
    106 <p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
    107 <p class="toc_element">
    108   <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
    109 <p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
    110 <p class="toc_element">
    111   <code><a href="#listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</a></code></p>
    112 <p class="firstline">Retrieves the list of referrers to instances contained within the specified zone.</p>
    113 <p class="toc_element">
    114   <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
    115 <p class="firstline">Retrieves the next page of results.</p>
    116 <p class="toc_element">
    117   <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
    118 <p class="firstline">Retrieves the next page of results.</p>
    119 <p class="toc_element">
    120   <code><a href="#reset">reset(project, zone, instance)</a></code></p>
    121 <p class="firstline">Performs a reset on the instance. For more information, see Resetting an instance.</p>
    122 <p class="toc_element">
    123   <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</a></code></p>
    124 <p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
    125 <p class="toc_element">
    126   <code><a href="#setLabels">setLabels(project, zone, instance, body)</a></code></p>
    127 <p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling or Tagging Resources documentation.</p>
    128 <p class="toc_element">
    129   <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body)</a></code></p>
    130 <p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
    131 <p class="toc_element">
    132   <code><a href="#setMachineType">setMachineType(project, zone, instance, body)</a></code></p>
    133 <p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
    134 <p class="toc_element">
    135   <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
    136 <p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
    137 <p class="toc_element">
    138   <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</a></code></p>
    139 <p class="firstline">Changes the minimum cpu/platform that this instance should be started as. This is called on a stopped instance.</p>
    140 <p class="toc_element">
    141   <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
    142 <p class="firstline">Sets an instance's scheduling options.</p>
    143 <p class="toc_element">
    144   <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body)</a></code></p>
    145 <p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
    146 <p class="toc_element">
    147   <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
    148 <p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
    149 <p class="toc_element">
    150   <code><a href="#start">start(project, zone, instance)</a></code></p>
    151 <p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
    152 <p class="toc_element">
    153   <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body)</a></code></p>
    154 <p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
    155 <p class="toc_element">
    156   <code><a href="#stop">stop(project, zone, instance)</a></code></p>
    157 <p class="firstline">Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
    158 <p class="toc_element">
    159   <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
    160 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
    161 <h3>Method Details</h3>
    162 <div class="method">
    163     <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
    164   <pre>Adds an access config to an instance's network interface.
    165 
    166 Args:
    167   project: string, Project ID for this request. (required)
    168   zone: string, The name of the zone for this request. (required)
    169   instance: string, The instance name for this request. (required)
    170   networkInterface: string, The name of the network interface to add to this instance. (required)
    171   body: object, The request body. (required)
    172     The object takes the form of:
    173 
    174 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
    175   "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
    176   "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
    177   "name": "A String", # The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
    178   "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
    179 }
    180 
    181 
    182 Returns:
    183   An object of the form:
    184 
    185     { # An Operation resource, used to manage asynchronous API requests.
    186     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    187     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    188     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    189     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    190     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    191     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    192     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    193     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    194     "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.
    195     "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.
    196     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    197     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    198     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    199     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    200       {
    201         "message": "A String", # [Output Only] A human-readable description of the warning code.
    202         "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.
    203         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    204             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    205           {
    206             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    207             "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).
    208           },
    209         ],
    210       },
    211     ],
    212     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    213     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    214     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    215     "name": "A String", # [Output Only] Name of the resource.
    216     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    217     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    218       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    219         {
    220           "message": "A String", # [Output Only] An optional, human-readable error message.
    221           "code": "A String", # [Output Only] The error type identifier for this error.
    222           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    223         },
    224       ],
    225     },
    226     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    227     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    228     "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.
    229   }</pre>
    230 </div>
    231 
    232 <div class="method">
    233     <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
    234   <pre>Retrieves aggregated list of instances.
    235 
    236 Args:
    237   project: string, Project ID for this request. (required)
    238   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
    239 
    240 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.
    241 
    242 Currently, only sorting by name or creationTimestamp desc is supported.
    243   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)
    244   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.
    245   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.
    246 
    247 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.
    248 
    249 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
    250 
    251 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.
    252 
    253 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.
    254 
    255 Returns:
    256   An object of the form:
    257 
    258     {
    259     "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.
    260     "items": { # [Output Only] A map of scoped instance lists.
    261       "a_key": { # [Output Only] Name of the scope containing this set of instances.
    262         "instances": [ # [Output Only] List of instances contained in this scope.
    263           { # An Instance resource.
    264             "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
    265             "guestAccelerators": [ # List of the type and count of accelerator cards attached to the instance.
    266               { # A specification of the type and number of accelerator cards attached to the instance.
    267                 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
    268                 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
    269               },
    270             ],
    271             "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
    272               "a_key": "A String",
    273             },
    274             "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
    275               "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
    276                   #
    277                   # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
    278               "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
    279               "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
    280             },
    281             "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
    282             "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
    283                 #
    284                 # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
    285               { # A service account.
    286                 "scopes": [ # The list of scopes to be made available for this service account.
    287                   "A String",
    288                 ],
    289                 "email": "A String", # Email address of the service account.
    290               },
    291             ],
    292             "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    293             "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    294             "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.
    295               { # A network interface resource attached to an instance.
    296                 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
    297                 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
    298                   { # An alias IP range attached to an instance's network interface.
    299                     "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
    300                     "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
    301                   },
    302                 ],
    303                 "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
    304                     #
    305                     # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
    306                     #
    307                     # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
    308                     # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
    309                     # - projects/project/global/networks/network
    310                     # - global/networks/default
    311                 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
    312                   { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
    313                     "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
    314                     "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
    315                     "name": "A String", # The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
    316                     "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
    317                   },
    318                 ],
    319                 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
    320                 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
    321                     # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
    322                     # - regions/region/subnetworks/subnetwork
    323                 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
    324               },
    325             ],
    326             "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
    327             "zone": "A String", # [Output Only] URL of the zone where the instance resides.
    328             "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
    329             "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
    330               "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
    331                 {
    332                   "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
    333                   "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
    334                 },
    335               ],
    336               "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
    337               "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
    338             },
    339             "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
    340             "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
    341             "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    342             "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
    343               "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
    344                 "A String",
    345               ],
    346               "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
    347                   #
    348                   # To see the latest fingerprint, make get() request to the instance.
    349             },
    350             "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
    351                 #
    352                 # To see the latest fingerprint, make get() request to the instance.
    353             "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
    354                 #
    355                 # zones/us-central1-f/machineTypes/n1-standard-1
    356                 #
    357                 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
    358                 #
    359                 # zones/zone/machineTypes/custom-CPUS-MEMORY
    360                 #
    361                 # For example: zones/us-central1-f/machineTypes/custom-4-5120
    362                 #
    363                 # For a full list of restrictions, read the Specifications for custom machine types.
    364             "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
    365             "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
    366             "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
    367               { # An instance-attached disk resource.
    368                 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
    369                     #
    370                     # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
    371                     #
    372                     # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
    373                     #
    374                     # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
    375                     #
    376                     # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
    377                   "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    378                   "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    379                   "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
    380                       #
    381                       # The key must meet the following requirements before you can provide it to Compute Engine:
    382                       # - The key is wrapped using a RSA public key certificate provided by Google.
    383                       # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
    384                       # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
    385                 },
    386                 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
    387                     #
    388                     # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
    389                 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
    390                 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
    391                     #
    392                     # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    393                     #
    394                     # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    395                   "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
    396                       #
    397                       # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
    398                     "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    399                     "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    400                     "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
    401                         #
    402                         # The key must meet the following requirements before you can provide it to Compute Engine:
    403                         # - The key is wrapped using a RSA public key certificate provided by Google.
    404                         # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
    405                         # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
    406                   },
    407                   "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
    408                   "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
    409                       #
    410                       # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
    411                       #
    412                       # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
    413                       # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
    414                       # - projects/project/zones/zone/diskTypes/diskType
    415                       # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
    416                   "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
    417                   "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    418                       #
    419                       # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
    420                       #
    421                       # projects/debian-cloud/global/images/family/debian-8
    422                       #
    423                       # Alternatively, use a specific version of a public operating system image:
    424                       #
    425                       # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
    426                       #
    427                       # To create a disk with a private image that you created, specify the image name in the following format:
    428                       #
    429                       # global/images/my-private-image
    430                       #
    431                       # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
    432                       #
    433                       # global/images/family/my-private-family
    434                       #
    435                       # If the source image is deleted later, this field will not be set.
    436                   "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
    437                 },
    438                 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
    439                 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
    440                 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
    441                 "licenses": [ # [Output Only] Any valid publicly visible licenses.
    442                   "A String",
    443                 ],
    444                 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
    445                 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
    446                 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
    447                 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    448                     #
    449                     # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
    450                     #
    451                     # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
    452               },
    453             ],
    454             "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    455           },
    456         ],
    457         "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
    458           "message": "A String", # [Output Only] A human-readable description of the warning code.
    459           "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.
    460           "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    461               # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    462             {
    463               "value": "A String", # [Output Only] A warning data value corresponding to the key.
    464               "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).
    465             },
    466           ],
    467         },
    468       },
    469     },
    470     "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
    471     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    472     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    473   }</pre>
    474 </div>
    475 
    476 <div class="method">
    477     <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
    478   <pre>Retrieves the next page of results.
    479 
    480 Args:
    481   previous_request: The request for the previous page. (required)
    482   previous_response: The response from the request for the previous page. (required)
    483 
    484 Returns:
    485   A request object that you can call 'execute()' on to request the next
    486   page. Returns None if there are no more items in the collection.
    487     </pre>
    488 </div>
    489 
    490 <div class="method">
    491     <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
    492   <pre>Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
    493 
    494 Args:
    495   project: string, Project ID for this request. (required)
    496   zone: string, The name of the zone for this request. (required)
    497   instance: string, The instance name for this request. (required)
    498   body: object, The request body. (required)
    499     The object takes the form of:
    500 
    501 { # An instance-attached disk resource.
    502   "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
    503       # 
    504       # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
    505       # 
    506       # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
    507       # 
    508       # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
    509       # 
    510       # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
    511     "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    512     "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    513     "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
    514         #
    515         # The key must meet the following requirements before you can provide it to Compute Engine:
    516         # - The key is wrapped using a RSA public key certificate provided by Google.
    517         # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
    518         # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
    519   },
    520   "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
    521       # 
    522       # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
    523   "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
    524   "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
    525       # 
    526       # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    527       #
    528       # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    529     "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
    530         #
    531         # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
    532       "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    533       "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    534       "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
    535           #
    536           # The key must meet the following requirements before you can provide it to Compute Engine:
    537           # - The key is wrapped using a RSA public key certificate provided by Google.
    538           # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
    539           # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
    540     },
    541     "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
    542     "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
    543         #
    544         # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
    545         #
    546         # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
    547         # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
    548         # - projects/project/zones/zone/diskTypes/diskType
    549         # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
    550     "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
    551     "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    552         #
    553         # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
    554         #
    555         # projects/debian-cloud/global/images/family/debian-8
    556         #
    557         # Alternatively, use a specific version of a public operating system image:
    558         #
    559         # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
    560         #
    561         # To create a disk with a private image that you created, specify the image name in the following format:
    562         #
    563         # global/images/my-private-image
    564         #
    565         # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
    566         #
    567         # global/images/family/my-private-family
    568         #
    569         # If the source image is deleted later, this field will not be set.
    570     "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
    571   },
    572   "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
    573   "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
    574   "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
    575   "licenses": [ # [Output Only] Any valid publicly visible licenses.
    576     "A String",
    577   ],
    578   "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
    579   "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
    580   "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
    581   "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    582       # 
    583       # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
    584       # 
    585       # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
    586 }
    587 
    588 
    589 Returns:
    590   An object of the form:
    591 
    592     { # An Operation resource, used to manage asynchronous API requests.
    593     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    594     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    595     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    596     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    597     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    598     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    599     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    600     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    601     "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.
    602     "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.
    603     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    604     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    605     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    606     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    607       {
    608         "message": "A String", # [Output Only] A human-readable description of the warning code.
    609         "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.
    610         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    611             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    612           {
    613             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    614             "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).
    615           },
    616         ],
    617       },
    618     ],
    619     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    620     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    621     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    622     "name": "A String", # [Output Only] Name of the resource.
    623     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    624     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    625       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    626         {
    627           "message": "A String", # [Output Only] An optional, human-readable error message.
    628           "code": "A String", # [Output Only] The error type identifier for this error.
    629           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    630         },
    631       ],
    632     },
    633     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    634     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    635     "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.
    636   }</pre>
    637 </div>
    638 
    639 <div class="method">
    640     <code class="details" id="delete">delete(project, zone, instance)</code>
    641   <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
    642 
    643 Args:
    644   project: string, Project ID for this request. (required)
    645   zone: string, The name of the zone for this request. (required)
    646   instance: string, Name of the instance resource to delete. (required)
    647 
    648 Returns:
    649   An object of the form:
    650 
    651     { # An Operation resource, used to manage asynchronous API requests.
    652     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    653     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    654     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    655     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    656     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    657     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    658     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    659     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    660     "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.
    661     "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.
    662     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    663     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    664     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    665     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    666       {
    667         "message": "A String", # [Output Only] A human-readable description of the warning code.
    668         "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.
    669         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    670             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    671           {
    672             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    673             "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).
    674           },
    675         ],
    676       },
    677     ],
    678     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    679     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    680     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    681     "name": "A String", # [Output Only] Name of the resource.
    682     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    683     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    684       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    685         {
    686           "message": "A String", # [Output Only] An optional, human-readable error message.
    687           "code": "A String", # [Output Only] The error type identifier for this error.
    688           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    689         },
    690       ],
    691     },
    692     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    693     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    694     "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.
    695   }</pre>
    696 </div>
    697 
    698 <div class="method">
    699     <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
    700   <pre>Deletes an access config from an instance's network interface.
    701 
    702 Args:
    703   project: string, Project ID for this request. (required)
    704   zone: string, The name of the zone for this request. (required)
    705   instance: string, The instance name for this request. (required)
    706   accessConfig: string, The name of the access config to delete. (required)
    707   networkInterface: string, The name of the network interface. (required)
    708 
    709 Returns:
    710   An object of the form:
    711 
    712     { # An Operation resource, used to manage asynchronous API requests.
    713     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    714     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    715     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    716     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    717     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    718     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    719     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    720     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    721     "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.
    722     "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.
    723     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    724     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    725     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    726     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    727       {
    728         "message": "A String", # [Output Only] A human-readable description of the warning code.
    729         "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.
    730         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    731             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    732           {
    733             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    734             "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).
    735           },
    736         ],
    737       },
    738     ],
    739     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    740     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    741     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    742     "name": "A String", # [Output Only] Name of the resource.
    743     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    744     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    745       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    746         {
    747           "message": "A String", # [Output Only] An optional, human-readable error message.
    748           "code": "A String", # [Output Only] The error type identifier for this error.
    749           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    750         },
    751       ],
    752     },
    753     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    754     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    755     "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.
    756   }</pre>
    757 </div>
    758 
    759 <div class="method">
    760     <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
    761   <pre>Detaches a disk from an instance.
    762 
    763 Args:
    764   project: string, Project ID for this request. (required)
    765   zone: string, The name of the zone for this request. (required)
    766   instance: string, Instance name. (required)
    767   deviceName: string, Disk device name to detach. (required)
    768 
    769 Returns:
    770   An object of the form:
    771 
    772     { # An Operation resource, used to manage asynchronous API requests.
    773     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    774     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    775     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    776     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    777     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    778     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    779     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    780     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    781     "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.
    782     "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.
    783     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    784     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    785     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    786     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    787       {
    788         "message": "A String", # [Output Only] A human-readable description of the warning code.
    789         "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.
    790         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    791             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    792           {
    793             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    794             "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).
    795           },
    796         ],
    797       },
    798     ],
    799     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    800     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    801     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    802     "name": "A String", # [Output Only] Name of the resource.
    803     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    804     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    805       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    806         {
    807           "message": "A String", # [Output Only] An optional, human-readable error message.
    808           "code": "A String", # [Output Only] The error type identifier for this error.
    809           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    810         },
    811       ],
    812     },
    813     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    814     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    815     "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.
    816   }</pre>
    817 </div>
    818 
    819 <div class="method">
    820     <code class="details" id="get">get(project, zone, instance)</code>
    821   <pre>Returns the specified Instance resource. Get a list of available instances by making a list() request.
    822 
    823 Args:
    824   project: string, Project ID for this request. (required)
    825   zone: string, The name of the zone for this request. (required)
    826   instance: string, Name of the instance resource to return. (required)
    827 
    828 Returns:
    829   An object of the form:
    830 
    831     { # An Instance resource.
    832     "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
    833     "guestAccelerators": [ # List of the type and count of accelerator cards attached to the instance.
    834       { # A specification of the type and number of accelerator cards attached to the instance.
    835         "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
    836         "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
    837       },
    838     ],
    839     "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
    840       "a_key": "A String",
    841     },
    842     "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
    843       "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
    844           #
    845           # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
    846       "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
    847       "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
    848     },
    849     "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
    850     "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
    851         #
    852         # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
    853       { # A service account.
    854         "scopes": [ # The list of scopes to be made available for this service account.
    855           "A String",
    856         ],
    857         "email": "A String", # Email address of the service account.
    858       },
    859     ],
    860     "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    861     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    862     "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.
    863       { # A network interface resource attached to an instance.
    864         "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
    865         "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
    866           { # An alias IP range attached to an instance's network interface.
    867             "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
    868             "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
    869           },
    870         ],
    871         "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
    872             #
    873             # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
    874             #
    875             # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
    876             # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
    877             # - projects/project/global/networks/network
    878             # - global/networks/default
    879         "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
    880           { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
    881             "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
    882             "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
    883             "name": "A String", # The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
    884             "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
    885           },
    886         ],
    887         "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
    888         "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
    889             # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
    890             # - regions/region/subnetworks/subnetwork
    891         "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
    892       },
    893     ],
    894     "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
    895     "zone": "A String", # [Output Only] URL of the zone where the instance resides.
    896     "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
    897     "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
    898       "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
    899         {
    900           "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
    901           "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
    902         },
    903       ],
    904       "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
    905       "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
    906     },
    907     "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
    908     "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
    909     "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    910     "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
    911       "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
    912         "A String",
    913       ],
    914       "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
    915           #
    916           # To see the latest fingerprint, make get() request to the instance.
    917     },
    918     "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
    919         #
    920         # To see the latest fingerprint, make get() request to the instance.
    921     "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
    922         #
    923         # zones/us-central1-f/machineTypes/n1-standard-1
    924         #
    925         # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
    926         #
    927         # zones/zone/machineTypes/custom-CPUS-MEMORY
    928         #
    929         # For example: zones/us-central1-f/machineTypes/custom-4-5120
    930         #
    931         # For a full list of restrictions, read the Specifications for custom machine types.
    932     "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
    933     "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
    934     "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
    935       { # An instance-attached disk resource.
    936         "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
    937             #
    938             # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
    939             #
    940             # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
    941             #
    942             # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
    943             #
    944             # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
    945           "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    946           "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    947           "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
    948               #
    949               # The key must meet the following requirements before you can provide it to Compute Engine:
    950               # - The key is wrapped using a RSA public key certificate provided by Google.
    951               # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
    952               # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
    953         },
    954         "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
    955             #
    956             # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
    957         "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
    958         "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
    959             #
    960             # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    961             #
    962             # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    963           "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
    964               #
    965               # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
    966             "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    967             "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    968             "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
    969                 #
    970                 # The key must meet the following requirements before you can provide it to Compute Engine:
    971                 # - The key is wrapped using a RSA public key certificate provided by Google.
    972                 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
    973                 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
    974           },
    975           "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
    976           "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
    977               #
    978               # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
    979               #
    980               # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
    981               # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
    982               # - projects/project/zones/zone/diskTypes/diskType
    983               # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
    984           "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
    985           "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    986               #
    987               # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
    988               #
    989               # projects/debian-cloud/global/images/family/debian-8
    990               #
    991               # Alternatively, use a specific version of a public operating system image:
    992               #
    993               # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
    994               #
    995               # To create a disk with a private image that you created, specify the image name in the following format:
    996               #
    997               # global/images/my-private-image
    998               #
    999               # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
   1000               #
   1001               # global/images/family/my-private-family
   1002               #
   1003               # If the source image is deleted later, this field will not be set.
   1004           "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
   1005         },
   1006         "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
   1007         "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
   1008         "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
   1009         "licenses": [ # [Output Only] Any valid publicly visible licenses.
   1010           "A String",
   1011         ],
   1012         "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
   1013         "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
   1014         "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
   1015         "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1016             #
   1017             # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
   1018             #
   1019             # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
   1020       },
   1021     ],
   1022     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1023   }</pre>
   1024 </div>
   1025 
   1026 <div class="method">
   1027     <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
   1028   <pre>Returns the specified instance's serial port output.
   1029 
   1030 Args:
   1031   project: string, Project ID for this request. (required)
   1032   zone: string, The name of the zone for this request. (required)
   1033   instance: string, Name of the instance scoping this request. (required)
   1034   start: string, Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
   1035   port: integer, Specifies which COM or serial port to retrieve data from.
   1036 
   1037 Returns:
   1038   An object of the form:
   1039 
   1040     { # An instance's serial console output.
   1041     "start": "A String", # The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.
   1042     "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
   1043     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1044     "contents": "A String", # [Output Only] The contents of the console output.
   1045     "next": "A String", # [Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.
   1046   }</pre>
   1047 </div>
   1048 
   1049 <div class="method">
   1050     <code class="details" id="insert">insert(project, zone, body)</code>
   1051   <pre>Creates an instance resource in the specified project using the data included in the request.
   1052 
   1053 Args:
   1054   project: string, Project ID for this request. (required)
   1055   zone: string, The name of the zone for this request. (required)
   1056   body: object, The request body. (required)
   1057     The object takes the form of:
   1058 
   1059 { # An Instance resource.
   1060   "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
   1061   "guestAccelerators": [ # List of the type and count of accelerator cards attached to the instance.
   1062     { # A specification of the type and number of accelerator cards attached to the instance.
   1063       "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
   1064       "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
   1065     },
   1066   ],
   1067   "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
   1068     "a_key": "A String",
   1069   },
   1070   "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
   1071     "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
   1072         #
   1073         # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
   1074     "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
   1075     "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
   1076   },
   1077   "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
   1078   "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
   1079       # 
   1080       # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
   1081     { # A service account.
   1082       "scopes": [ # The list of scopes to be made available for this service account.
   1083         "A String",
   1084       ],
   1085       "email": "A String", # Email address of the service account.
   1086     },
   1087   ],
   1088   "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
   1089   "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1090   "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.
   1091     { # A network interface resource attached to an instance.
   1092       "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   1093       "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
   1094         { # An alias IP range attached to an instance's network interface.
   1095           "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
   1096           "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
   1097         },
   1098       ],
   1099       "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
   1100           #
   1101           # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
   1102           #
   1103           # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
   1104           # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
   1105           # - projects/project/global/networks/network
   1106           # - global/networks/default
   1107       "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
   1108         { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
   1109           "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
   1110           "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
   1111           "name": "A String", # The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
   1112           "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
   1113         },
   1114       ],
   1115       "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
   1116       "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
   1117           # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
   1118           # - regions/region/subnetworks/subnetwork
   1119       "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
   1120     },
   1121   ],
   1122   "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
   1123   "zone": "A String", # [Output Only] URL of the zone where the instance resides.
   1124   "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
   1125   "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
   1126     "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
   1127       {
   1128         "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
   1129         "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
   1130       },
   1131     ],
   1132     "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
   1133     "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1134   },
   1135   "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
   1136   "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
   1137   "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
   1138   "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
   1139     "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
   1140       "A String",
   1141     ],
   1142     "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1143         #
   1144         # To see the latest fingerprint, make get() request to the instance.
   1145   },
   1146   "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1147       # 
   1148       # To see the latest fingerprint, make get() request to the instance.
   1149   "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
   1150       # 
   1151       # zones/us-central1-f/machineTypes/n1-standard-1
   1152       # 
   1153       # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
   1154       # 
   1155       # zones/zone/machineTypes/custom-CPUS-MEMORY
   1156       # 
   1157       # For example: zones/us-central1-f/machineTypes/custom-4-5120
   1158       # 
   1159       # For a full list of restrictions, read the Specifications for custom machine types.
   1160   "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
   1161   "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
   1162   "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
   1163     { # An instance-attached disk resource.
   1164       "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
   1165           #
   1166           # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
   1167           #
   1168           # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
   1169           #
   1170           # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
   1171           #
   1172           # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
   1173         "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1174         "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1175         "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
   1176             #
   1177             # The key must meet the following requirements before you can provide it to Compute Engine:
   1178             # - The key is wrapped using a RSA public key certificate provided by Google.
   1179             # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
   1180             # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
   1181       },
   1182       "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
   1183           #
   1184           # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
   1185       "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
   1186       "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
   1187           #
   1188           # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1189           #
   1190           # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1191         "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
   1192             #
   1193             # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
   1194           "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1195           "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1196           "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
   1197               #
   1198               # The key must meet the following requirements before you can provide it to Compute Engine:
   1199               # - The key is wrapped using a RSA public key certificate provided by Google.
   1200               # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
   1201               # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
   1202         },
   1203         "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
   1204         "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
   1205             #
   1206             # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
   1207             #
   1208             # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
   1209             # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
   1210             # - projects/project/zones/zone/diskTypes/diskType
   1211             # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
   1212         "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
   1213         "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1214             #
   1215             # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
   1216             #
   1217             # projects/debian-cloud/global/images/family/debian-8
   1218             #
   1219             # Alternatively, use a specific version of a public operating system image:
   1220             #
   1221             # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
   1222             #
   1223             # To create a disk with a private image that you created, specify the image name in the following format:
   1224             #
   1225             # global/images/my-private-image
   1226             #
   1227             # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
   1228             #
   1229             # global/images/family/my-private-family
   1230             #
   1231             # If the source image is deleted later, this field will not be set.
   1232         "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
   1233       },
   1234       "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
   1235       "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
   1236       "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
   1237       "licenses": [ # [Output Only] Any valid publicly visible licenses.
   1238         "A String",
   1239       ],
   1240       "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
   1241       "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
   1242       "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
   1243       "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1244           #
   1245           # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
   1246           #
   1247           # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
   1248     },
   1249   ],
   1250   "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1251 }
   1252 
   1253 
   1254 Returns:
   1255   An object of the form:
   1256 
   1257     { # An Operation resource, used to manage asynchronous API requests.
   1258     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1259     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1260     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1261     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1262     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1263     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1264     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1265     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1266     "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.
   1267     "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.
   1268     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1269     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1270     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1271     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1272       {
   1273         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1274         "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.
   1275         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1276             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1277           {
   1278             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1279             "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).
   1280           },
   1281         ],
   1282       },
   1283     ],
   1284     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1285     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1286     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1287     "name": "A String", # [Output Only] Name of the resource.
   1288     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1289     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1290       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1291         {
   1292           "message": "A String", # [Output Only] An optional, human-readable error message.
   1293           "code": "A String", # [Output Only] The error type identifier for this error.
   1294           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1295         },
   1296       ],
   1297     },
   1298     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1299     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1300     "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.
   1301   }</pre>
   1302 </div>
   1303 
   1304 <div class="method">
   1305     <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
   1306   <pre>Retrieves the list of instances contained within the specified zone.
   1307 
   1308 Args:
   1309   project: string, Project ID for this request. (required)
   1310   zone: string, The name of the zone for this request. (required)
   1311   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
   1312 
   1313 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.
   1314 
   1315 Currently, only sorting by name or creationTimestamp desc is supported.
   1316   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)
   1317   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.
   1318   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.
   1319 
   1320 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.
   1321 
   1322 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
   1323 
   1324 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.
   1325 
   1326 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.
   1327 
   1328 Returns:
   1329   An object of the form:
   1330 
   1331     { # Contains a list of instances.
   1332     "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.
   1333     "items": [ # [Output Only] A list of instances.
   1334       { # An Instance resource.
   1335         "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
   1336         "guestAccelerators": [ # List of the type and count of accelerator cards attached to the instance.
   1337           { # A specification of the type and number of accelerator cards attached to the instance.
   1338             "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
   1339             "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
   1340           },
   1341         ],
   1342         "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
   1343           "a_key": "A String",
   1344         },
   1345         "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
   1346           "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
   1347               #
   1348               # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
   1349           "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
   1350           "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
   1351         },
   1352         "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
   1353         "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
   1354             #
   1355             # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
   1356           { # A service account.
   1357             "scopes": [ # The list of scopes to be made available for this service account.
   1358               "A String",
   1359             ],
   1360             "email": "A String", # Email address of the service account.
   1361           },
   1362         ],
   1363         "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
   1364         "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1365         "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.
   1366           { # A network interface resource attached to an instance.
   1367             "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   1368             "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
   1369               { # An alias IP range attached to an instance's network interface.
   1370                 "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
   1371                 "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
   1372               },
   1373             ],
   1374             "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
   1375                 #
   1376                 # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
   1377                 #
   1378                 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
   1379                 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
   1380                 # - projects/project/global/networks/network
   1381                 # - global/networks/default
   1382             "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
   1383               { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
   1384                 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
   1385                 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
   1386                 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.
   1387                 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
   1388               },
   1389             ],
   1390             "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
   1391             "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
   1392                 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
   1393                 # - regions/region/subnetworks/subnetwork
   1394             "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
   1395           },
   1396         ],
   1397         "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
   1398         "zone": "A String", # [Output Only] URL of the zone where the instance resides.
   1399         "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
   1400         "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
   1401           "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
   1402             {
   1403               "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
   1404               "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
   1405             },
   1406           ],
   1407           "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
   1408           "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1409         },
   1410         "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
   1411         "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
   1412         "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
   1413         "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
   1414           "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
   1415             "A String",
   1416           ],
   1417           "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1418               #
   1419               # To see the latest fingerprint, make get() request to the instance.
   1420         },
   1421         "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1422             #
   1423             # To see the latest fingerprint, make get() request to the instance.
   1424         "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
   1425             #
   1426             # zones/us-central1-f/machineTypes/n1-standard-1
   1427             #
   1428             # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
   1429             #
   1430             # zones/zone/machineTypes/custom-CPUS-MEMORY
   1431             #
   1432             # For example: zones/us-central1-f/machineTypes/custom-4-5120
   1433             #
   1434             # For a full list of restrictions, read the Specifications for custom machine types.
   1435         "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
   1436         "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
   1437         "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
   1438           { # An instance-attached disk resource.
   1439             "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
   1440                 #
   1441                 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
   1442                 #
   1443                 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
   1444                 #
   1445                 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
   1446                 #
   1447                 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
   1448               "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1449               "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1450               "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
   1451                   #
   1452                   # The key must meet the following requirements before you can provide it to Compute Engine:
   1453                   # - The key is wrapped using a RSA public key certificate provided by Google.
   1454                   # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
   1455                   # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
   1456             },
   1457             "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
   1458                 #
   1459                 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
   1460             "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
   1461             "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
   1462                 #
   1463                 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1464                 #
   1465                 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1466               "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
   1467                   #
   1468                   # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
   1469                 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1470                 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1471                 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
   1472                     #
   1473                     # The key must meet the following requirements before you can provide it to Compute Engine:
   1474                     # - The key is wrapped using a RSA public key certificate provided by Google.
   1475                     # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
   1476                     # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
   1477               },
   1478               "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
   1479               "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
   1480                   #
   1481                   # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
   1482                   #
   1483                   # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
   1484                   # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
   1485                   # - projects/project/zones/zone/diskTypes/diskType
   1486                   # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
   1487               "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
   1488               "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1489                   #
   1490                   # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
   1491                   #
   1492                   # projects/debian-cloud/global/images/family/debian-8
   1493                   #
   1494                   # Alternatively, use a specific version of a public operating system image:
   1495                   #
   1496                   # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
   1497                   #
   1498                   # To create a disk with a private image that you created, specify the image name in the following format:
   1499                   #
   1500                   # global/images/my-private-image
   1501                   #
   1502                   # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
   1503                   #
   1504                   # global/images/family/my-private-family
   1505                   #
   1506                   # If the source image is deleted later, this field will not be set.
   1507               "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
   1508             },
   1509             "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
   1510             "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
   1511             "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
   1512             "licenses": [ # [Output Only] Any valid publicly visible licenses.
   1513               "A String",
   1514             ],
   1515             "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
   1516             "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
   1517             "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
   1518             "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1519                 #
   1520                 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
   1521                 #
   1522                 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
   1523           },
   1524         ],
   1525         "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1526       },
   1527     ],
   1528     "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
   1529     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1530     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1531   }</pre>
   1532 </div>
   1533 
   1534 <div class="method">
   1535     <code class="details" id="listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</code>
   1536   <pre>Retrieves the list of referrers to instances contained within the specified zone.
   1537 
   1538 Args:
   1539   project: string, Project ID for this request. (required)
   1540   zone: string, The name of the zone for this request. (required)
   1541   instance: string, Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. (required)
   1542   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
   1543 
   1544 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.
   1545 
   1546 Currently, only sorting by name or creationTimestamp desc is supported.
   1547   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.
   1548 
   1549 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.
   1550 
   1551 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
   1552 
   1553 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.
   1554 
   1555 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.
   1556   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)
   1557   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.
   1558 
   1559 Returns:
   1560   An object of the form:
   1561 
   1562     { # Contains a list of instance referrers.
   1563     "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.
   1564     "items": [ # [Output Only] A list of referrers.
   1565       { # Represents a reference to a resource.
   1566         "referrer": "A String", # URL of the resource which refers to the target.
   1567         "kind": "compute#reference", # [Output Only] Type of the resource. Always compute#reference for references.
   1568         "referenceType": "A String", # A description of the reference type with no implied semantics. Possible values include:
   1569             # - MEMBER_OF
   1570         "target": "A String", # URL of the resource to which this reference points.
   1571       },
   1572     ],
   1573     "kind": "compute#instanceListReferrers", # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
   1574     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1575     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1576   }</pre>
   1577 </div>
   1578 
   1579 <div class="method">
   1580     <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
   1581   <pre>Retrieves the next page of results.
   1582 
   1583 Args:
   1584   previous_request: The request for the previous page. (required)
   1585   previous_response: The response from the request for the previous page. (required)
   1586 
   1587 Returns:
   1588   A request object that you can call 'execute()' on to request the next
   1589   page. Returns None if there are no more items in the collection.
   1590     </pre>
   1591 </div>
   1592 
   1593 <div class="method">
   1594     <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
   1595   <pre>Retrieves the next page of results.
   1596 
   1597 Args:
   1598   previous_request: The request for the previous page. (required)
   1599   previous_response: The response from the request for the previous page. (required)
   1600 
   1601 Returns:
   1602   A request object that you can call 'execute()' on to request the next
   1603   page. Returns None if there are no more items in the collection.
   1604     </pre>
   1605 </div>
   1606 
   1607 <div class="method">
   1608     <code class="details" id="reset">reset(project, zone, instance)</code>
   1609   <pre>Performs a reset on the instance. For more information, see Resetting an instance.
   1610 
   1611 Args:
   1612   project: string, Project ID for this request. (required)
   1613   zone: string, The name of the zone for this request. (required)
   1614   instance: string, Name of the instance scoping this request. (required)
   1615 
   1616 Returns:
   1617   An object of the form:
   1618 
   1619     { # An Operation resource, used to manage asynchronous API requests.
   1620     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1621     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1622     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1623     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1624     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1625     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1626     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1627     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1628     "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.
   1629     "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.
   1630     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1631     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1632     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1633     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1634       {
   1635         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1636         "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.
   1637         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1638             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1639           {
   1640             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1641             "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).
   1642           },
   1643         ],
   1644       },
   1645     ],
   1646     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1647     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1648     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1649     "name": "A String", # [Output Only] Name of the resource.
   1650     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1651     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1652       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1653         {
   1654           "message": "A String", # [Output Only] An optional, human-readable error message.
   1655           "code": "A String", # [Output Only] The error type identifier for this error.
   1656           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1657         },
   1658       ],
   1659     },
   1660     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1661     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1662     "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.
   1663   }</pre>
   1664 </div>
   1665 
   1666 <div class="method">
   1667     <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
   1668   <pre>Sets the auto-delete flag for a disk attached to an instance.
   1669 
   1670 Args:
   1671   project: string, Project ID for this request. (required)
   1672   zone: string, The name of the zone for this request. (required)
   1673   instance: string, The instance name. (required)
   1674   autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
   1675   deviceName: string, The device name of the disk to modify. (required)
   1676 
   1677 Returns:
   1678   An object of the form:
   1679 
   1680     { # An Operation resource, used to manage asynchronous API requests.
   1681     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1682     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1683     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1684     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1685     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1686     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1687     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1688     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1689     "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.
   1690     "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.
   1691     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1692     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1693     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1694     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1695       {
   1696         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1697         "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.
   1698         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1699             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1700           {
   1701             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1702             "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).
   1703           },
   1704         ],
   1705       },
   1706     ],
   1707     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1708     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1709     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1710     "name": "A String", # [Output Only] Name of the resource.
   1711     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1712     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1713       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1714         {
   1715           "message": "A String", # [Output Only] An optional, human-readable error message.
   1716           "code": "A String", # [Output Only] The error type identifier for this error.
   1717           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1718         },
   1719       ],
   1720     },
   1721     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1722     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1723     "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.
   1724   }</pre>
   1725 </div>
   1726 
   1727 <div class="method">
   1728     <code class="details" id="setLabels">setLabels(project, zone, instance, body)</code>
   1729   <pre>Sets labels on an instance. To learn more about labels, read the Labeling or Tagging Resources documentation.
   1730 
   1731 Args:
   1732   project: string, Project ID for this request. (required)
   1733   zone: string, The name of the zone for this request. (required)
   1734   instance: string, Name of the instance scoping this request. (required)
   1735   body: object, The request body. (required)
   1736     The object takes the form of:
   1737 
   1738 {
   1739     "labelFingerprint": "A String", # Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.
   1740     "labels": {
   1741       "a_key": "A String",
   1742     },
   1743   }
   1744 
   1745 
   1746 Returns:
   1747   An object of the form:
   1748 
   1749     { # An Operation resource, used to manage asynchronous API requests.
   1750     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1751     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1752     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1753     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1754     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1755     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1756     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1757     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1758     "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.
   1759     "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.
   1760     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1761     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1762     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1763     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1764       {
   1765         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1766         "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.
   1767         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1768             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1769           {
   1770             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1771             "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).
   1772           },
   1773         ],
   1774       },
   1775     ],
   1776     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1777     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1778     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1779     "name": "A String", # [Output Only] Name of the resource.
   1780     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1781     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1782       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1783         {
   1784           "message": "A String", # [Output Only] An optional, human-readable error message.
   1785           "code": "A String", # [Output Only] The error type identifier for this error.
   1786           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1787         },
   1788       ],
   1789     },
   1790     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1791     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1792     "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.
   1793   }</pre>
   1794 </div>
   1795 
   1796 <div class="method">
   1797     <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body)</code>
   1798   <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
   1799 
   1800 Args:
   1801   project: string, Project ID for this request. (required)
   1802   zone: string, The name of the zone for this request. (required)
   1803   instance: string, Name of the instance scoping this request. (required)
   1804   body: object, The request body. (required)
   1805     The object takes the form of:
   1806 
   1807 {
   1808     "guestAccelerators": [ # List of the type and count of accelerator cards attached to the instance.
   1809       { # A specification of the type and number of accelerator cards attached to the instance.
   1810         "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
   1811         "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
   1812       },
   1813     ],
   1814   }
   1815 
   1816 
   1817 Returns:
   1818   An object of the form:
   1819 
   1820     { # An Operation resource, used to manage asynchronous API requests.
   1821     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1822     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1823     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1824     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1825     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1826     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1827     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1828     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1829     "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.
   1830     "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.
   1831     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1832     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1833     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1834     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1835       {
   1836         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1837         "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.
   1838         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1839             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1840           {
   1841             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1842             "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).
   1843           },
   1844         ],
   1845       },
   1846     ],
   1847     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1848     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1849     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1850     "name": "A String", # [Output Only] Name of the resource.
   1851     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1852     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1853       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1854         {
   1855           "message": "A String", # [Output Only] An optional, human-readable error message.
   1856           "code": "A String", # [Output Only] The error type identifier for this error.
   1857           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1858         },
   1859       ],
   1860     },
   1861     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1862     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1863     "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.
   1864   }</pre>
   1865 </div>
   1866 
   1867 <div class="method">
   1868     <code class="details" id="setMachineType">setMachineType(project, zone, instance, body)</code>
   1869   <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
   1870 
   1871 Args:
   1872   project: string, Project ID for this request. (required)
   1873   zone: string, The name of the zone for this request. (required)
   1874   instance: string, Name of the instance scoping this request. (required)
   1875   body: object, The request body. (required)
   1876     The object takes the form of:
   1877 
   1878 {
   1879     "machineType": "A String", # Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1
   1880   }
   1881 
   1882 
   1883 Returns:
   1884   An object of the form:
   1885 
   1886     { # An Operation resource, used to manage asynchronous API requests.
   1887     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1888     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1889     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1890     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1891     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1892     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1893     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1894     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1895     "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.
   1896     "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.
   1897     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1898     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1899     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1900     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1901       {
   1902         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1903         "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.
   1904         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1905             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1906           {
   1907             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1908             "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).
   1909           },
   1910         ],
   1911       },
   1912     ],
   1913     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1914     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1915     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1916     "name": "A String", # [Output Only] Name of the resource.
   1917     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1918     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1919       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1920         {
   1921           "message": "A String", # [Output Only] An optional, human-readable error message.
   1922           "code": "A String", # [Output Only] The error type identifier for this error.
   1923           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1924         },
   1925       ],
   1926     },
   1927     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1928     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1929     "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.
   1930   }</pre>
   1931 </div>
   1932 
   1933 <div class="method">
   1934     <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
   1935   <pre>Sets metadata for the specified instance to the data included in the request.
   1936 
   1937 Args:
   1938   project: string, Project ID for this request. (required)
   1939   zone: string, The name of the zone for this request. (required)
   1940   instance: string, Name of the instance scoping this request. (required)
   1941   body: object, The request body. (required)
   1942     The object takes the form of:
   1943 
   1944 { # A metadata key/value entry.
   1945   "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
   1946     {
   1947       "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
   1948       "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
   1949     },
   1950   ],
   1951   "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
   1952   "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   1953 }
   1954 
   1955 
   1956 Returns:
   1957   An object of the form:
   1958 
   1959     { # An Operation resource, used to manage asynchronous API requests.
   1960     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1961     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1962     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1963     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1964     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1965     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1966     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1967     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1968     "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.
   1969     "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.
   1970     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1971     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1972     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1973     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1974       {
   1975         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1976         "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.
   1977         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1978             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1979           {
   1980             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1981             "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).
   1982           },
   1983         ],
   1984       },
   1985     ],
   1986     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1987     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1988     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1989     "name": "A String", # [Output Only] Name of the resource.
   1990     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1991     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1992       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1993         {
   1994           "message": "A String", # [Output Only] An optional, human-readable error message.
   1995           "code": "A String", # [Output Only] The error type identifier for this error.
   1996           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1997         },
   1998       ],
   1999     },
   2000     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2001     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2002     "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.
   2003   }</pre>
   2004 </div>
   2005 
   2006 <div class="method">
   2007     <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</code>
   2008   <pre>Changes the minimum cpu/platform that this instance should be started as. This is called on a stopped instance.
   2009 
   2010 Args:
   2011   project: string, Project ID for this request. (required)
   2012   zone: string, The name of the zone for this request. (required)
   2013   instance: string, Name of the instance scoping this request. (required)
   2014   body: object, The request body. (required)
   2015     The object takes the form of:
   2016 
   2017 {
   2018     "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
   2019   }
   2020 
   2021   requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
   2022 
   2023 Returns:
   2024   An object of the form:
   2025 
   2026     { # An Operation resource, used to manage asynchronous API requests.
   2027     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2028     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2029     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2030     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2031     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2032     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2033     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2034     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2035     "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.
   2036     "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.
   2037     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2038     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2039     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2040     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2041       {
   2042         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2043         "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.
   2044         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2045             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2046           {
   2047             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2048             "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).
   2049           },
   2050         ],
   2051       },
   2052     ],
   2053     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2054     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2055     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2056     "name": "A String", # [Output Only] Name of the resource.
   2057     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2058     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2059       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2060         {
   2061           "message": "A String", # [Output Only] An optional, human-readable error message.
   2062           "code": "A String", # [Output Only] The error type identifier for this error.
   2063           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2064         },
   2065       ],
   2066     },
   2067     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2068     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2069     "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.
   2070   }</pre>
   2071 </div>
   2072 
   2073 <div class="method">
   2074     <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
   2075   <pre>Sets an instance's scheduling options.
   2076 
   2077 Args:
   2078   project: string, Project ID for this request. (required)
   2079   zone: string, The name of the zone for this request. (required)
   2080   instance: string, Instance name. (required)
   2081   body: object, The request body. (required)
   2082     The object takes the form of:
   2083 
   2084 { # Sets the scheduling options for an Instance.
   2085   "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
   2086       # 
   2087       # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
   2088   "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
   2089   "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
   2090 }
   2091 
   2092 
   2093 Returns:
   2094   An object of the form:
   2095 
   2096     { # An Operation resource, used to manage asynchronous API requests.
   2097     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2098     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2099     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2100     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2101     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2102     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2103     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2104     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2105     "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.
   2106     "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.
   2107     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2108     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2109     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2110     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2111       {
   2112         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2113         "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.
   2114         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2115             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2116           {
   2117             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2118             "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).
   2119           },
   2120         ],
   2121       },
   2122     ],
   2123     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2124     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2125     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2126     "name": "A String", # [Output Only] Name of the resource.
   2127     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2128     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2129       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2130         {
   2131           "message": "A String", # [Output Only] An optional, human-readable error message.
   2132           "code": "A String", # [Output Only] The error type identifier for this error.
   2133           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2134         },
   2135       ],
   2136     },
   2137     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2138     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2139     "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.
   2140   }</pre>
   2141 </div>
   2142 
   2143 <div class="method">
   2144     <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body)</code>
   2145   <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
   2146 
   2147 Args:
   2148   project: string, Project ID for this request. (required)
   2149   zone: string, The name of the zone for this request. (required)
   2150   instance: string, Name of the instance resource to start. (required)
   2151   body: object, The request body. (required)
   2152     The object takes the form of:
   2153 
   2154 {
   2155     "scopes": [ # The list of scopes to be made available for this service account.
   2156       "A String",
   2157     ],
   2158     "email": "A String", # Email address of the service account.
   2159   }
   2160 
   2161 
   2162 Returns:
   2163   An object of the form:
   2164 
   2165     { # An Operation resource, used to manage asynchronous API requests.
   2166     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2167     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2168     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2169     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2170     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2171     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2172     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2173     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2174     "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.
   2175     "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.
   2176     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2177     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2178     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2179     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2180       {
   2181         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2182         "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.
   2183         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2184             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2185           {
   2186             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2187             "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).
   2188           },
   2189         ],
   2190       },
   2191     ],
   2192     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2193     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2194     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2195     "name": "A String", # [Output Only] Name of the resource.
   2196     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2197     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2198       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2199         {
   2200           "message": "A String", # [Output Only] An optional, human-readable error message.
   2201           "code": "A String", # [Output Only] The error type identifier for this error.
   2202           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2203         },
   2204       ],
   2205     },
   2206     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2207     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2208     "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.
   2209   }</pre>
   2210 </div>
   2211 
   2212 <div class="method">
   2213     <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
   2214   <pre>Sets tags for the specified instance to the data included in the request.
   2215 
   2216 Args:
   2217   project: string, Project ID for this request. (required)
   2218   zone: string, The name of the zone for this request. (required)
   2219   instance: string, Name of the instance scoping this request. (required)
   2220   body: object, The request body. (required)
   2221     The object takes the form of:
   2222 
   2223 { # A set of instance tags.
   2224   "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
   2225     "A String",
   2226   ],
   2227   "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
   2228       # 
   2229       # To see the latest fingerprint, make get() request to the instance.
   2230 }
   2231 
   2232 
   2233 Returns:
   2234   An object of the form:
   2235 
   2236     { # An Operation resource, used to manage asynchronous API requests.
   2237     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2238     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2239     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2240     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2241     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2242     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2243     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2244     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2245     "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.
   2246     "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.
   2247     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2248     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2249     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2250     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2251       {
   2252         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2253         "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.
   2254         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2255             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2256           {
   2257             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2258             "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).
   2259           },
   2260         ],
   2261       },
   2262     ],
   2263     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2264     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2265     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2266     "name": "A String", # [Output Only] Name of the resource.
   2267     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2268     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2269       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2270         {
   2271           "message": "A String", # [Output Only] An optional, human-readable error message.
   2272           "code": "A String", # [Output Only] The error type identifier for this error.
   2273           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2274         },
   2275       ],
   2276     },
   2277     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2278     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2279     "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.
   2280   }</pre>
   2281 </div>
   2282 
   2283 <div class="method">
   2284     <code class="details" id="start">start(project, zone, instance)</code>
   2285   <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
   2286 
   2287 Args:
   2288   project: string, Project ID for this request. (required)
   2289   zone: string, The name of the zone for this request. (required)
   2290   instance: string, Name of the instance resource to start. (required)
   2291 
   2292 Returns:
   2293   An object of the form:
   2294 
   2295     { # An Operation resource, used to manage asynchronous API requests.
   2296     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2297     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2298     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2299     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2300     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2301     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2302     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2303     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2304     "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.
   2305     "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.
   2306     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2307     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2308     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2309     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2310       {
   2311         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2312         "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.
   2313         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2314             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2315           {
   2316             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2317             "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).
   2318           },
   2319         ],
   2320       },
   2321     ],
   2322     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2323     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2324     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2325     "name": "A String", # [Output Only] Name of the resource.
   2326     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2327     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2328       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2329         {
   2330           "message": "A String", # [Output Only] An optional, human-readable error message.
   2331           "code": "A String", # [Output Only] The error type identifier for this error.
   2332           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2333         },
   2334       ],
   2335     },
   2336     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2337     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2338     "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.
   2339   }</pre>
   2340 </div>
   2341 
   2342 <div class="method">
   2343     <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body)</code>
   2344   <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
   2345 
   2346 Args:
   2347   project: string, Project ID for this request. (required)
   2348   zone: string, The name of the zone for this request. (required)
   2349   instance: string, Name of the instance resource to start. (required)
   2350   body: object, The request body. (required)
   2351     The object takes the form of:
   2352 
   2353 {
   2354     "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
   2355         # 
   2356         # In order to start the instance, the disk url and its corresponding key must be provided.
   2357         # 
   2358         # If the disk is not protected with a customer-supplied encryption key it should not be specified.
   2359       {
   2360         "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
   2361           "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   2362           "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   2363           "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
   2364               #
   2365               # The key must meet the following requirements before you can provide it to Compute Engine:
   2366               # - The key is wrapped using a RSA public key certificate provided by Google.
   2367               # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding.  Get the RSA public key certificate provided by Google at:
   2368               # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
   2369         },
   2370         "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
   2371       },
   2372     ],
   2373   }
   2374 
   2375 
   2376 Returns:
   2377   An object of the form:
   2378 
   2379     { # An Operation resource, used to manage asynchronous API requests.
   2380     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2381     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2382     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2383     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2384     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2385     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2386     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2387     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2388     "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.
   2389     "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.
   2390     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2391     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2392     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2393     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2394       {
   2395         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2396         "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.
   2397         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2398             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2399           {
   2400             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2401             "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).
   2402           },
   2403         ],
   2404       },
   2405     ],
   2406     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2407     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2408     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2409     "name": "A String", # [Output Only] Name of the resource.
   2410     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2411     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2412       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2413         {
   2414           "message": "A String", # [Output Only] An optional, human-readable error message.
   2415           "code": "A String", # [Output Only] The error type identifier for this error.
   2416           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2417         },
   2418       ],
   2419     },
   2420     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2421     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2422     "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.
   2423   }</pre>
   2424 </div>
   2425 
   2426 <div class="method">
   2427     <code class="details" id="stop">stop(project, zone, instance)</code>
   2428   <pre>Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
   2429 
   2430 Args:
   2431   project: string, Project ID for this request. (required)
   2432   zone: string, The name of the zone for this request. (required)
   2433   instance: string, Name of the instance resource to stop. (required)
   2434 
   2435 Returns:
   2436   An object of the form:
   2437 
   2438     { # An Operation resource, used to manage asynchronous API requests.
   2439     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2440     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2441     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2442     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2443     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2444     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2445     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2446     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2447     "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.
   2448     "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.
   2449     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2450     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2451     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2452     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2453       {
   2454         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2455         "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.
   2456         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2457             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2458           {
   2459             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2460             "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).
   2461           },
   2462         ],
   2463       },
   2464     ],
   2465     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2466     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2467     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2468     "name": "A String", # [Output Only] Name of the resource.
   2469     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2470     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2471       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2472         {
   2473           "message": "A String", # [Output Only] An optional, human-readable error message.
   2474           "code": "A String", # [Output Only] The error type identifier for this error.
   2475           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2476         },
   2477       ],
   2478     },
   2479     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2480     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2481     "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.
   2482   }</pre>
   2483 </div>
   2484 
   2485 <div class="method">
   2486     <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
   2487   <pre>Returns permissions that a caller has on the specified resource.
   2488 
   2489 Args:
   2490   project: string, Project ID for this request. (required)
   2491   zone: string, The name of the zone for this request. (required)
   2492   resource: string, Name of the resource for this request. (required)
   2493   body: object, The request body. (required)
   2494     The object takes the form of:
   2495 
   2496 {
   2497     "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
   2498       "A String",
   2499     ],
   2500   }
   2501 
   2502 
   2503 Returns:
   2504   An object of the form:
   2505 
   2506     {
   2507     "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
   2508       "A String",
   2509     ],
   2510   }</pre>
   2511 </div>
   2512 
   2513 </body></html>