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_v1.html">Compute Engine API</a> . <a href="compute_v1.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="#list_next">list_next(previous_request, previous_response)</a></code></p>
    112 <p class="firstline">Retrieves the next page of results.</p>
    113 <p class="toc_element">
    114   <code><a href="#reset">reset(project, zone, instance)</a></code></p>
    115 <p class="firstline">Performs a reset on the instance. For more information, see Resetting an instance.</p>
    116 <p class="toc_element">
    117   <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</a></code></p>
    118 <p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
    119 <p class="toc_element">
    120   <code><a href="#setLabels">setLabels(project, zone, instance, body)</a></code></p>
    121 <p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling or Tagging Resources documentation.</p>
    122 <p class="toc_element">
    123   <code><a href="#setMachineType">setMachineType(project, zone, instance, body)</a></code></p>
    124 <p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
    125 <p class="toc_element">
    126   <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
    127 <p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
    128 <p class="toc_element">
    129   <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
    130 <p class="firstline">Sets an instance's scheduling options.</p>
    131 <p class="toc_element">
    132   <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body)</a></code></p>
    133 <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>
    134 <p class="toc_element">
    135   <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
    136 <p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
    137 <p class="toc_element">
    138   <code><a href="#start">start(project, zone, instance)</a></code></p>
    139 <p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
    140 <p class="toc_element">
    141   <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body)</a></code></p>
    142 <p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
    143 <p class="toc_element">
    144   <code><a href="#stop">stop(project, zone, instance)</a></code></p>
    145 <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>
    146 <h3>Method Details</h3>
    147 <div class="method">
    148     <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
    149   <pre>Adds an access config to an instance's network interface.
    150 
    151 Args:
    152   project: string, Project ID for this request. (required)
    153   zone: string, The name of the zone for this request. (required)
    154   instance: string, The instance name for this request. (required)
    155   networkInterface: string, The name of the network interface to add to this instance. (required)
    156   body: object, The request body. (required)
    157     The object takes the form of:
    158 
    159 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
    160   "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
    161   "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
    162   "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.
    163   "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.
    164 }
    165 
    166 
    167 Returns:
    168   An object of the form:
    169 
    170     { # An Operation resource, used to manage asynchronous API requests.
    171     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    172     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    173     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    174     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    175     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    176     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    177     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    178     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    179     "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.
    180     "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.
    181     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    182     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    183     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    184     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    185       {
    186         "message": "A String", # [Output Only] A human-readable description of the warning code.
    187         "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.
    188         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    189             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    190           {
    191             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    192             "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).
    193           },
    194         ],
    195       },
    196     ],
    197     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    198     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    199     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    200     "name": "A String", # [Output Only] Name of the resource.
    201     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    202     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    203       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    204         {
    205           "message": "A String", # [Output Only] An optional, human-readable error message.
    206           "code": "A String", # [Output Only] The error type identifier for this error.
    207           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    208         },
    209       ],
    210     },
    211     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    212     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    213     "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.
    214   }</pre>
    215 </div>
    216 
    217 <div class="method">
    218     <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
    219   <pre>Retrieves aggregated list of instances.
    220 
    221 Args:
    222   project: string, Project ID for this request. (required)
    223   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
    224 
    225 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.
    226 
    227 Currently, only sorting by name or creationTimestamp desc is supported.
    228   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)
    229   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.
    230   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.
    231 
    232 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.
    233 
    234 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
    235 
    236 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.
    237 
    238 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.
    239 
    240 Returns:
    241   An object of the form:
    242 
    243     {
    244     "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.
    245     "items": { # [Output Only] A map of scoped instance lists.
    246       "a_key": { # [Output Only] Name of the scope containing this set of instances.
    247         "instances": [ # [Output Only] List of instances contained in this scope.
    248           { # An Instance resource.
    249             "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
    250             "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
    251             "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
    252             "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
    253               "a_key": "A String",
    254             },
    255             "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.
    256             "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    257             "zone": "A String", # [Output Only] URL of the zone where the instance resides.
    258             "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.
    259               "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
    260                 "A String",
    261               ],
    262               "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.
    263                   #
    264                   # To see the latest fingerprint, make get() request to the instance.
    265             },
    266             "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.
    267                 #
    268                 # To see the latest fingerprint, make get() request to the instance.
    269             "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
    270               { # An instance-attached disk resource.
    271                 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
    272                     #
    273                     # 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.
    274                     #
    275                     # 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.
    276                     #
    277                     # 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.
    278                     #
    279                     # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
    280                   "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    281                   "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    282                 },
    283                 "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.
    284                     #
    285                     # 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.
    286                 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
    287                 "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.
    288                     #
    289                     # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    290                     #
    291                     # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    292                   "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.
    293                       #
    294                       # 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.
    295                     "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    296                     "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    297                   },
    298                   "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
    299                   "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
    300                   "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    301                       #
    302                       # 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:
    303                       #
    304                       # projects/debian-cloud/global/images/family/debian-8
    305                       #
    306                       # Alternatively, use a specific version of a public operating system image:
    307                       #
    308                       # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
    309                       #
    310                       # To create a disk with a private image that you created, specify the image name in the following format:
    311                       #
    312                       # global/images/my-private-image
    313                       #
    314                       # 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:
    315                       #
    316                       # global/images/family/my-private-family
    317                       #
    318                       # If the source image is deleted later, this field will not be set.
    319                   "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:
    320                       #
    321                       # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
    322                       #
    323                       # 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:
    324                       # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
    325                       # - projects/project/zones/zone/diskTypes/diskType
    326                       # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
    327                 },
    328                 "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).
    329                 "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.
    330                 "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.
    331                 "licenses": [ # [Output Only] Any valid publicly visible licenses.
    332                   "A String",
    333                 ],
    334                 "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.
    335                 "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.
    336                 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
    337                 "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.
    338                     #
    339                     # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
    340                     #
    341                     # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
    342               },
    343             ],
    344             "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.
    345             "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
    346             "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
    347             "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
    348               "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.
    349                   #
    350                   # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
    351               "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.
    352               "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.
    353             },
    354             "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:
    355                 #
    356                 # zones/us-central1-f/machineTypes/n1-standard-1
    357                 #
    358                 # 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):
    359                 #
    360                 # zones/zone/machineTypes/custom-CPUS-MEMORY
    361                 #
    362                 # For example: zones/us-central1-f/machineTypes/custom-4-5120
    363                 #
    364                 # For a full list of restrictions, read the Specifications for custom machine types.
    365             "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
    366                 #
    367                 # 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.
    368               { # A service account.
    369                 "scopes": [ # The list of scopes to be made available for this service account.
    370                   "A String",
    371                 ],
    372                 "email": "A String", # Email address of the service account.
    373               },
    374             ],
    375             "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.
    376               { # A network interface resource attached to an instance.
    377                 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
    378                 "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.
    379                     #
    380                     # 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.
    381                     #
    382                     # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
    383                     # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
    384                     # - projects/project/global/networks/network
    385                     # - global/networks/default
    386                 "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.
    387                   { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
    388                     "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
    389                     "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
    390                     "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.
    391                     "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.
    392                   },
    393                 ],
    394                 "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.
    395                 "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:
    396                     # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
    397                     # - regions/region/subnetworks/subnetwork
    398                 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
    399               },
    400             ],
    401             "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    402             "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    403             "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    404             "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
    405               "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
    406                 {
    407                   "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.
    408                   "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.
    409                 },
    410               ],
    411               "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
    412               "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.
    413             },
    414           },
    415         ],
    416         "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
    417           "message": "A String", # [Output Only] A human-readable description of the warning code.
    418           "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.
    419           "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    420               # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    421             {
    422               "value": "A String", # [Output Only] A warning data value corresponding to the key.
    423               "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).
    424             },
    425           ],
    426         },
    427       },
    428     },
    429     "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
    430     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    431     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    432   }</pre>
    433 </div>
    434 
    435 <div class="method">
    436     <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
    437   <pre>Retrieves the next page of results.
    438 
    439 Args:
    440   previous_request: The request for the previous page. (required)
    441   previous_response: The response from the request for the previous page. (required)
    442 
    443 Returns:
    444   A request object that you can call 'execute()' on to request the next
    445   page. Returns None if there are no more items in the collection.
    446     </pre>
    447 </div>
    448 
    449 <div class="method">
    450     <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
    451   <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.
    452 
    453 Args:
    454   project: string, Project ID for this request. (required)
    455   zone: string, The name of the zone for this request. (required)
    456   instance: string, The instance name for this request. (required)
    457   body: object, The request body. (required)
    458     The object takes the form of:
    459 
    460 { # An instance-attached disk resource.
    461   "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
    462       # 
    463       # 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.
    464       # 
    465       # 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.
    466       # 
    467       # 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.
    468       # 
    469       # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
    470     "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    471     "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    472   },
    473   "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.
    474       # 
    475       # 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.
    476   "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
    477   "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.
    478       # 
    479       # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    480       #
    481       # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    482     "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.
    483         #
    484         # 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.
    485       "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    486       "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    487     },
    488     "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
    489     "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
    490     "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    491         #
    492         # 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:
    493         #
    494         # projects/debian-cloud/global/images/family/debian-8
    495         #
    496         # Alternatively, use a specific version of a public operating system image:
    497         #
    498         # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
    499         #
    500         # To create a disk with a private image that you created, specify the image name in the following format:
    501         #
    502         # global/images/my-private-image
    503         #
    504         # 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:
    505         #
    506         # global/images/family/my-private-family
    507         #
    508         # If the source image is deleted later, this field will not be set.
    509     "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:
    510         #
    511         # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
    512         #
    513         # 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:
    514         # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
    515         # - projects/project/zones/zone/diskTypes/diskType
    516         # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
    517   },
    518   "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).
    519   "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.
    520   "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.
    521   "licenses": [ # [Output Only] Any valid publicly visible licenses.
    522     "A String",
    523   ],
    524   "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.
    525   "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.
    526   "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
    527   "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.
    528       # 
    529       # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
    530       # 
    531       # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
    532 }
    533 
    534 
    535 Returns:
    536   An object of the form:
    537 
    538     { # An Operation resource, used to manage asynchronous API requests.
    539     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    540     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    541     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    542     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    543     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    544     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    545     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    546     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    547     "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.
    548     "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.
    549     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    550     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    551     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    552     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    553       {
    554         "message": "A String", # [Output Only] A human-readable description of the warning code.
    555         "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.
    556         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    557             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    558           {
    559             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    560             "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).
    561           },
    562         ],
    563       },
    564     ],
    565     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    566     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    567     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    568     "name": "A String", # [Output Only] Name of the resource.
    569     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    570     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    571       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    572         {
    573           "message": "A String", # [Output Only] An optional, human-readable error message.
    574           "code": "A String", # [Output Only] The error type identifier for this error.
    575           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    576         },
    577       ],
    578     },
    579     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    580     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    581     "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.
    582   }</pre>
    583 </div>
    584 
    585 <div class="method">
    586     <code class="details" id="delete">delete(project, zone, instance)</code>
    587   <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
    588 
    589 Args:
    590   project: string, Project ID for this request. (required)
    591   zone: string, The name of the zone for this request. (required)
    592   instance: string, Name of the instance resource to delete. (required)
    593 
    594 Returns:
    595   An object of the form:
    596 
    597     { # An Operation resource, used to manage asynchronous API requests.
    598     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    599     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    600     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    601     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    602     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    603     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    604     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    605     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    606     "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.
    607     "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.
    608     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    609     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    610     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    611     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    612       {
    613         "message": "A String", # [Output Only] A human-readable description of the warning code.
    614         "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.
    615         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    616             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    617           {
    618             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    619             "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).
    620           },
    621         ],
    622       },
    623     ],
    624     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    625     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    626     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    627     "name": "A String", # [Output Only] Name of the resource.
    628     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    629     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    630       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    631         {
    632           "message": "A String", # [Output Only] An optional, human-readable error message.
    633           "code": "A String", # [Output Only] The error type identifier for this error.
    634           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    635         },
    636       ],
    637     },
    638     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    639     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    640     "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.
    641   }</pre>
    642 </div>
    643 
    644 <div class="method">
    645     <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
    646   <pre>Deletes an access config from an instance's network interface.
    647 
    648 Args:
    649   project: string, Project ID for this request. (required)
    650   zone: string, The name of the zone for this request. (required)
    651   instance: string, The instance name for this request. (required)
    652   accessConfig: string, The name of the access config to delete. (required)
    653   networkInterface: string, The name of the network interface. (required)
    654 
    655 Returns:
    656   An object of the form:
    657 
    658     { # An Operation resource, used to manage asynchronous API requests.
    659     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    660     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    661     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    662     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    663     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    664     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    665     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    666     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    667     "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.
    668     "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.
    669     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    670     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    671     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    672     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    673       {
    674         "message": "A String", # [Output Only] A human-readable description of the warning code.
    675         "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.
    676         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    677             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    678           {
    679             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    680             "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).
    681           },
    682         ],
    683       },
    684     ],
    685     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    686     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    687     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    688     "name": "A String", # [Output Only] Name of the resource.
    689     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    690     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    691       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    692         {
    693           "message": "A String", # [Output Only] An optional, human-readable error message.
    694           "code": "A String", # [Output Only] The error type identifier for this error.
    695           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    696         },
    697       ],
    698     },
    699     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    700     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    701     "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.
    702   }</pre>
    703 </div>
    704 
    705 <div class="method">
    706     <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
    707   <pre>Detaches a disk from an instance.
    708 
    709 Args:
    710   project: string, Project ID for this request. (required)
    711   zone: string, The name of the zone for this request. (required)
    712   instance: string, Instance name. (required)
    713   deviceName: string, Disk device name to detach. (required)
    714 
    715 Returns:
    716   An object of the form:
    717 
    718     { # An Operation resource, used to manage asynchronous API requests.
    719     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
    720     "clientOperationId": "A String", # [Output Only] Reserved for future use.
    721     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
    722     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    723     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
    724     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
    725     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
    726     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
    727     "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.
    728     "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.
    729     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
    730     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
    731     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
    732     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
    733       {
    734         "message": "A String", # [Output Only] A human-readable description of the warning code.
    735         "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.
    736         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
    737             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    738           {
    739             "value": "A String", # [Output Only] A warning data value corresponding to the key.
    740             "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).
    741           },
    742         ],
    743       },
    744     ],
    745     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
    746     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
    747     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
    748     "name": "A String", # [Output Only] Name of the resource.
    749     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
    750     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
    751       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
    752         {
    753           "message": "A String", # [Output Only] An optional, human-readable error message.
    754           "code": "A String", # [Output Only] The error type identifier for this error.
    755           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
    756         },
    757       ],
    758     },
    759     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
    760     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
    761     "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.
    762   }</pre>
    763 </div>
    764 
    765 <div class="method">
    766     <code class="details" id="get">get(project, zone, instance)</code>
    767   <pre>Returns the specified Instance resource. Get a list of available instances by making a list() request.
    768 
    769 Args:
    770   project: string, Project ID for this request. (required)
    771   zone: string, The name of the zone for this request. (required)
    772   instance: string, Name of the instance resource to return. (required)
    773 
    774 Returns:
    775   An object of the form:
    776 
    777     { # An Instance resource.
    778     "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
    779     "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
    780     "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
    781     "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
    782       "a_key": "A String",
    783     },
    784     "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.
    785     "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    786     "zone": "A String", # [Output Only] URL of the zone where the instance resides.
    787     "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.
    788       "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
    789         "A String",
    790       ],
    791       "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.
    792           #
    793           # To see the latest fingerprint, make get() request to the instance.
    794     },
    795     "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.
    796         #
    797         # To see the latest fingerprint, make get() request to the instance.
    798     "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
    799       { # An instance-attached disk resource.
    800         "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
    801             #
    802             # 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.
    803             #
    804             # 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.
    805             #
    806             # 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.
    807             #
    808             # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
    809           "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    810           "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    811         },
    812         "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.
    813             #
    814             # 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.
    815         "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
    816         "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.
    817             #
    818             # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    819             #
    820             # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
    821           "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.
    822               #
    823               # 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.
    824             "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
    825             "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
    826           },
    827           "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
    828           "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
    829           "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
    830               #
    831               # 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:
    832               #
    833               # projects/debian-cloud/global/images/family/debian-8
    834               #
    835               # Alternatively, use a specific version of a public operating system image:
    836               #
    837               # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
    838               #
    839               # To create a disk with a private image that you created, specify the image name in the following format:
    840               #
    841               # global/images/my-private-image
    842               #
    843               # 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:
    844               #
    845               # global/images/family/my-private-family
    846               #
    847               # If the source image is deleted later, this field will not be set.
    848           "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:
    849               #
    850               # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
    851               #
    852               # 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:
    853               # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
    854               # - projects/project/zones/zone/diskTypes/diskType
    855               # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
    856         },
    857         "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).
    858         "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.
    859         "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.
    860         "licenses": [ # [Output Only] Any valid publicly visible licenses.
    861           "A String",
    862         ],
    863         "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.
    864         "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.
    865         "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
    866         "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.
    867             #
    868             # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
    869             #
    870             # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
    871       },
    872     ],
    873     "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.
    874     "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
    875     "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
    876     "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
    877       "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.
    878           #
    879           # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
    880       "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.
    881       "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.
    882     },
    883     "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:
    884         #
    885         # zones/us-central1-f/machineTypes/n1-standard-1
    886         #
    887         # 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):
    888         #
    889         # zones/zone/machineTypes/custom-CPUS-MEMORY
    890         #
    891         # For example: zones/us-central1-f/machineTypes/custom-4-5120
    892         #
    893         # For a full list of restrictions, read the Specifications for custom machine types.
    894     "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
    895         #
    896         # 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.
    897       { # A service account.
    898         "scopes": [ # The list of scopes to be made available for this service account.
    899           "A String",
    900         ],
    901         "email": "A String", # Email address of the service account.
    902       },
    903     ],
    904     "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.
    905       { # A network interface resource attached to an instance.
    906         "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
    907         "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.
    908             #
    909             # 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.
    910             #
    911             # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
    912             # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
    913             # - projects/project/global/networks/network
    914             # - global/networks/default
    915         "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.
    916           { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
    917             "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
    918             "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
    919             "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.
    920             "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.
    921           },
    922         ],
    923         "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.
    924         "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:
    925             # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
    926             # - regions/region/subnetworks/subnetwork
    927         "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
    928       },
    929     ],
    930     "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
    931     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    932     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    933     "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
    934       "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
    935         {
    936           "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.
    937           "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.
    938         },
    939       ],
    940       "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
    941       "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.
    942     },
    943   }</pre>
    944 </div>
    945 
    946 <div class="method">
    947     <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
    948   <pre>Returns the specified instance's serial port output.
    949 
    950 Args:
    951   project: string, Project ID for this request. (required)
    952   zone: string, The name of the zone for this request. (required)
    953   instance: string, Name of the instance scoping this request. (required)
    954   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.
    955   port: integer, Specifies which COM or serial port to retrieve data from.
    956 
    957 Returns:
    958   An object of the form:
    959 
    960     { # An instance's serial console output.
    961     "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.
    962     "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
    963     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
    964     "contents": "A String", # [Output Only] The contents of the console output.
    965     "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.
    966   }</pre>
    967 </div>
    968 
    969 <div class="method">
    970     <code class="details" id="insert">insert(project, zone, body)</code>
    971   <pre>Creates an instance resource in the specified project using the data included in the request.
    972 
    973 Args:
    974   project: string, Project ID for this request. (required)
    975   zone: string, The name of the zone for this request. (required)
    976   body: object, The request body. (required)
    977     The object takes the form of:
    978 
    979 { # An Instance resource.
    980   "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
    981   "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
    982   "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
    983   "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
    984     "a_key": "A String",
    985   },
    986   "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.
    987   "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
    988   "zone": "A String", # [Output Only] URL of the zone where the instance resides.
    989   "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.
    990     "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
    991       "A String",
    992     ],
    993     "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.
    994         #
    995         # To see the latest fingerprint, make get() request to the instance.
    996   },
    997   "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.
    998       # 
    999       # To see the latest fingerprint, make get() request to the instance.
   1000   "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
   1001     { # An instance-attached disk resource.
   1002       "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
   1003           #
   1004           # 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.
   1005           #
   1006           # 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.
   1007           #
   1008           # 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.
   1009           #
   1010           # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
   1011         "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1012         "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1013       },
   1014       "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.
   1015           #
   1016           # 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.
   1017       "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
   1018       "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.
   1019           #
   1020           # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1021           #
   1022           # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1023         "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.
   1024             #
   1025             # 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.
   1026           "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1027           "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1028         },
   1029         "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
   1030         "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
   1031         "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1032             #
   1033             # 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:
   1034             #
   1035             # projects/debian-cloud/global/images/family/debian-8
   1036             #
   1037             # Alternatively, use a specific version of a public operating system image:
   1038             #
   1039             # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
   1040             #
   1041             # To create a disk with a private image that you created, specify the image name in the following format:
   1042             #
   1043             # global/images/my-private-image
   1044             #
   1045             # 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:
   1046             #
   1047             # global/images/family/my-private-family
   1048             #
   1049             # If the source image is deleted later, this field will not be set.
   1050         "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:
   1051             #
   1052             # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
   1053             #
   1054             # 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:
   1055             # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
   1056             # - projects/project/zones/zone/diskTypes/diskType
   1057             # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
   1058       },
   1059       "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).
   1060       "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.
   1061       "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.
   1062       "licenses": [ # [Output Only] Any valid publicly visible licenses.
   1063         "A String",
   1064       ],
   1065       "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.
   1066       "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.
   1067       "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
   1068       "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.
   1069           #
   1070           # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
   1071           #
   1072           # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
   1073     },
   1074   ],
   1075   "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.
   1076   "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
   1077   "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
   1078   "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
   1079     "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.
   1080         #
   1081         # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
   1082     "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.
   1083     "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.
   1084   },
   1085   "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:
   1086       # 
   1087       # zones/us-central1-f/machineTypes/n1-standard-1
   1088       # 
   1089       # 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):
   1090       # 
   1091       # zones/zone/machineTypes/custom-CPUS-MEMORY
   1092       # 
   1093       # For example: zones/us-central1-f/machineTypes/custom-4-5120
   1094       # 
   1095       # For a full list of restrictions, read the Specifications for custom machine types.
   1096   "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
   1097       # 
   1098       # 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.
   1099     { # A service account.
   1100       "scopes": [ # The list of scopes to be made available for this service account.
   1101         "A String",
   1102       ],
   1103       "email": "A String", # Email address of the service account.
   1104     },
   1105   ],
   1106   "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.
   1107     { # A network interface resource attached to an instance.
   1108       "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   1109       "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.
   1110           #
   1111           # 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.
   1112           #
   1113           # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
   1114           # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
   1115           # - projects/project/global/networks/network
   1116           # - global/networks/default
   1117       "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.
   1118         { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
   1119           "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
   1120           "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
   1121           "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.
   1122           "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.
   1123         },
   1124       ],
   1125       "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.
   1126       "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:
   1127           # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
   1128           # - regions/region/subnetworks/subnetwork
   1129       "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
   1130     },
   1131   ],
   1132   "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
   1133   "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1134   "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1135   "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
   1136     "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
   1137       {
   1138         "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.
   1139         "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.
   1140       },
   1141     ],
   1142     "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
   1143     "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.
   1144   },
   1145 }
   1146 
   1147 
   1148 Returns:
   1149   An object of the form:
   1150 
   1151     { # An Operation resource, used to manage asynchronous API requests.
   1152     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1153     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1154     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1155     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1156     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1157     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1158     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1159     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1160     "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.
   1161     "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.
   1162     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1163     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1164     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1165     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1166       {
   1167         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1168         "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.
   1169         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1170             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1171           {
   1172             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1173             "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).
   1174           },
   1175         ],
   1176       },
   1177     ],
   1178     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1179     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1180     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1181     "name": "A String", # [Output Only] Name of the resource.
   1182     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1183     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1184       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1185         {
   1186           "message": "A String", # [Output Only] An optional, human-readable error message.
   1187           "code": "A String", # [Output Only] The error type identifier for this error.
   1188           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1189         },
   1190       ],
   1191     },
   1192     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1193     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1194     "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.
   1195   }</pre>
   1196 </div>
   1197 
   1198 <div class="method">
   1199     <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
   1200   <pre>Retrieves the list of instances contained within the specified zone.
   1201 
   1202 Args:
   1203   project: string, Project ID for this request. (required)
   1204   zone: string, The name of the zone for this request. (required)
   1205   orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
   1206 
   1207 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.
   1208 
   1209 Currently, only sorting by name or creationTimestamp desc is supported.
   1210   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)
   1211   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.
   1212   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.
   1213 
   1214 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.
   1215 
   1216 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
   1217 
   1218 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.
   1219 
   1220 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.
   1221 
   1222 Returns:
   1223   An object of the form:
   1224 
   1225     { # Contains a list of instances.
   1226     "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.
   1227     "items": [ # [Output Only] A list of instances.
   1228       { # An Instance resource.
   1229         "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
   1230         "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
   1231         "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
   1232         "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
   1233           "a_key": "A String",
   1234         },
   1235         "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.
   1236         "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
   1237         "zone": "A String", # [Output Only] URL of the zone where the instance resides.
   1238         "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.
   1239           "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
   1240             "A String",
   1241           ],
   1242           "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.
   1243               #
   1244               # To see the latest fingerprint, make get() request to the instance.
   1245         },
   1246         "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.
   1247             #
   1248             # To see the latest fingerprint, make get() request to the instance.
   1249         "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
   1250           { # An instance-attached disk resource.
   1251             "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
   1252                 #
   1253                 # 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.
   1254                 #
   1255                 # 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.
   1256                 #
   1257                 # 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.
   1258                 #
   1259                 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
   1260               "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1261               "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1262             },
   1263             "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.
   1264                 #
   1265                 # 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.
   1266             "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
   1267             "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.
   1268                 #
   1269                 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1270                 #
   1271                 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
   1272               "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.
   1273                   #
   1274                   # 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.
   1275                 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   1276                 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   1277               },
   1278               "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
   1279               "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
   1280               "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
   1281                   #
   1282                   # 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:
   1283                   #
   1284                   # projects/debian-cloud/global/images/family/debian-8
   1285                   #
   1286                   # Alternatively, use a specific version of a public operating system image:
   1287                   #
   1288                   # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
   1289                   #
   1290                   # To create a disk with a private image that you created, specify the image name in the following format:
   1291                   #
   1292                   # global/images/my-private-image
   1293                   #
   1294                   # 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:
   1295                   #
   1296                   # global/images/family/my-private-family
   1297                   #
   1298                   # If the source image is deleted later, this field will not be set.
   1299               "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:
   1300                   #
   1301                   # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
   1302                   #
   1303                   # 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:
   1304                   # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
   1305                   # - projects/project/zones/zone/diskTypes/diskType
   1306                   # - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this is the name of the disk type, not URL.
   1307             },
   1308             "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).
   1309             "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.
   1310             "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.
   1311             "licenses": [ # [Output Only] Any valid publicly visible licenses.
   1312               "A String",
   1313             ],
   1314             "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.
   1315             "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.
   1316             "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
   1317             "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.
   1318                 #
   1319                 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
   1320                 #
   1321                 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
   1322           },
   1323         ],
   1324         "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.
   1325         "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
   1326         "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
   1327         "scheduling": { # Sets the scheduling options for an Instance. # Sets the scheduling options for this instance.
   1328           "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.
   1329               #
   1330               # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
   1331           "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.
   1332           "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.
   1333         },
   1334         "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:
   1335             #
   1336             # zones/us-central1-f/machineTypes/n1-standard-1
   1337             #
   1338             # 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):
   1339             #
   1340             # zones/zone/machineTypes/custom-CPUS-MEMORY
   1341             #
   1342             # For example: zones/us-central1-f/machineTypes/custom-4-5120
   1343             #
   1344             # For a full list of restrictions, read the Specifications for custom machine types.
   1345         "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
   1346             #
   1347             # 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.
   1348           { # A service account.
   1349             "scopes": [ # The list of scopes to be made available for this service account.
   1350               "A String",
   1351             ],
   1352             "email": "A String", # Email address of the service account.
   1353           },
   1354         ],
   1355         "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.
   1356           { # A network interface resource attached to an instance.
   1357             "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   1358             "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.
   1359                 #
   1360                 # 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.
   1361                 #
   1362                 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
   1363                 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
   1364                 # - projects/project/global/networks/network
   1365                 # - global/networks/default
   1366             "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.
   1367               { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
   1368                 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
   1369                 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
   1370                 "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.
   1371                 "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.
   1372               },
   1373             ],
   1374             "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.
   1375             "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:
   1376                 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
   1377                 # - regions/region/subnetworks/subnetwork
   1378             "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
   1379           },
   1380         ],
   1381         "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
   1382         "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1383         "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1384         "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
   1385           "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
   1386             {
   1387               "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.
   1388               "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.
   1389             },
   1390           ],
   1391           "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
   1392           "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.
   1393         },
   1394       },
   1395     ],
   1396     "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
   1397     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1398     "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
   1399   }</pre>
   1400 </div>
   1401 
   1402 <div class="method">
   1403     <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
   1404   <pre>Retrieves the next page of results.
   1405 
   1406 Args:
   1407   previous_request: The request for the previous page. (required)
   1408   previous_response: The response from the request for the previous page. (required)
   1409 
   1410 Returns:
   1411   A request object that you can call 'execute()' on to request the next
   1412   page. Returns None if there are no more items in the collection.
   1413     </pre>
   1414 </div>
   1415 
   1416 <div class="method">
   1417     <code class="details" id="reset">reset(project, zone, instance)</code>
   1418   <pre>Performs a reset on the instance. For more information, see Resetting an instance.
   1419 
   1420 Args:
   1421   project: string, Project ID for this request. (required)
   1422   zone: string, The name of the zone for this request. (required)
   1423   instance: string, Name of the instance scoping this request. (required)
   1424 
   1425 Returns:
   1426   An object of the form:
   1427 
   1428     { # An Operation resource, used to manage asynchronous API requests.
   1429     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1430     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1431     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1432     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1433     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1434     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1435     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1436     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1437     "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.
   1438     "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.
   1439     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1440     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1441     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1442     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1443       {
   1444         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1445         "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.
   1446         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1447             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1448           {
   1449             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1450             "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).
   1451           },
   1452         ],
   1453       },
   1454     ],
   1455     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1456     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1457     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1458     "name": "A String", # [Output Only] Name of the resource.
   1459     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1460     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1461       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1462         {
   1463           "message": "A String", # [Output Only] An optional, human-readable error message.
   1464           "code": "A String", # [Output Only] The error type identifier for this error.
   1465           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1466         },
   1467       ],
   1468     },
   1469     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1470     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1471     "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.
   1472   }</pre>
   1473 </div>
   1474 
   1475 <div class="method">
   1476     <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
   1477   <pre>Sets the auto-delete flag for a disk attached to an instance.
   1478 
   1479 Args:
   1480   project: string, Project ID for this request. (required)
   1481   zone: string, The name of the zone for this request. (required)
   1482   instance: string, The instance name. (required)
   1483   autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
   1484   deviceName: string, The device name of the disk to modify. (required)
   1485 
   1486 Returns:
   1487   An object of the form:
   1488 
   1489     { # An Operation resource, used to manage asynchronous API requests.
   1490     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1491     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1492     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1493     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1494     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1495     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1496     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1497     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1498     "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.
   1499     "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.
   1500     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1501     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1502     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1503     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1504       {
   1505         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1506         "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.
   1507         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1508             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1509           {
   1510             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1511             "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).
   1512           },
   1513         ],
   1514       },
   1515     ],
   1516     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1517     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1518     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1519     "name": "A String", # [Output Only] Name of the resource.
   1520     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1521     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1522       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1523         {
   1524           "message": "A String", # [Output Only] An optional, human-readable error message.
   1525           "code": "A String", # [Output Only] The error type identifier for this error.
   1526           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1527         },
   1528       ],
   1529     },
   1530     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1531     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1532     "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.
   1533   }</pre>
   1534 </div>
   1535 
   1536 <div class="method">
   1537     <code class="details" id="setLabels">setLabels(project, zone, instance, body)</code>
   1538   <pre>Sets labels on an instance. To learn more about labels, read the Labeling or Tagging Resources documentation.
   1539 
   1540 Args:
   1541   project: string, Project ID for this request. (required)
   1542   zone: string, The name of the zone for this request. (required)
   1543   instance: string, Name of the instance scoping this request. (required)
   1544   body: object, The request body. (required)
   1545     The object takes the form of:
   1546 
   1547 {
   1548     "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.
   1549     "labels": {
   1550       "a_key": "A String",
   1551     },
   1552   }
   1553 
   1554 
   1555 Returns:
   1556   An object of the form:
   1557 
   1558     { # An Operation resource, used to manage asynchronous API requests.
   1559     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1560     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1561     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1562     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1563     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1564     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1565     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1566     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1567     "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.
   1568     "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.
   1569     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1570     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1571     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1572     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1573       {
   1574         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1575         "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.
   1576         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1577             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1578           {
   1579             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1580             "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).
   1581           },
   1582         ],
   1583       },
   1584     ],
   1585     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1586     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1587     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1588     "name": "A String", # [Output Only] Name of the resource.
   1589     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1590     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1591       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1592         {
   1593           "message": "A String", # [Output Only] An optional, human-readable error message.
   1594           "code": "A String", # [Output Only] The error type identifier for this error.
   1595           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1596         },
   1597       ],
   1598     },
   1599     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1600     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1601     "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.
   1602   }</pre>
   1603 </div>
   1604 
   1605 <div class="method">
   1606     <code class="details" id="setMachineType">setMachineType(project, zone, instance, body)</code>
   1607   <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
   1608 
   1609 Args:
   1610   project: string, Project ID for this request. (required)
   1611   zone: string, The name of the zone for this request. (required)
   1612   instance: string, Name of the instance scoping this request. (required)
   1613   body: object, The request body. (required)
   1614     The object takes the form of:
   1615 
   1616 {
   1617     "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
   1618   }
   1619 
   1620 
   1621 Returns:
   1622   An object of the form:
   1623 
   1624     { # An Operation resource, used to manage asynchronous API requests.
   1625     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1626     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1627     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1628     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1629     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1630     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1631     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1632     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1633     "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.
   1634     "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.
   1635     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1636     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1637     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1638     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1639       {
   1640         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1641         "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.
   1642         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1643             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1644           {
   1645             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1646             "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).
   1647           },
   1648         ],
   1649       },
   1650     ],
   1651     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1652     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1653     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1654     "name": "A String", # [Output Only] Name of the resource.
   1655     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1656     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1657       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1658         {
   1659           "message": "A String", # [Output Only] An optional, human-readable error message.
   1660           "code": "A String", # [Output Only] The error type identifier for this error.
   1661           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1662         },
   1663       ],
   1664     },
   1665     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1666     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1667     "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.
   1668   }</pre>
   1669 </div>
   1670 
   1671 <div class="method">
   1672     <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
   1673   <pre>Sets metadata for the specified instance to the data included in the request.
   1674 
   1675 Args:
   1676   project: string, Project ID for this request. (required)
   1677   zone: string, The name of the zone for this request. (required)
   1678   instance: string, Name of the instance scoping this request. (required)
   1679   body: object, The request body. (required)
   1680     The object takes the form of:
   1681 
   1682 { # A metadata key/value entry.
   1683   "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
   1684     {
   1685       "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.
   1686       "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.
   1687     },
   1688   ],
   1689   "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
   1690   "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.
   1691 }
   1692 
   1693 
   1694 Returns:
   1695   An object of the form:
   1696 
   1697     { # An Operation resource, used to manage asynchronous API requests.
   1698     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1699     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1700     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1701     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1702     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1703     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1704     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1705     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1706     "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.
   1707     "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.
   1708     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1709     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1710     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1711     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1712       {
   1713         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1714         "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.
   1715         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1716             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1717           {
   1718             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1719             "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).
   1720           },
   1721         ],
   1722       },
   1723     ],
   1724     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1725     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1726     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1727     "name": "A String", # [Output Only] Name of the resource.
   1728     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1729     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1730       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1731         {
   1732           "message": "A String", # [Output Only] An optional, human-readable error message.
   1733           "code": "A String", # [Output Only] The error type identifier for this error.
   1734           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1735         },
   1736       ],
   1737     },
   1738     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1739     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1740     "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.
   1741   }</pre>
   1742 </div>
   1743 
   1744 <div class="method">
   1745     <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
   1746   <pre>Sets an instance's scheduling options.
   1747 
   1748 Args:
   1749   project: string, Project ID for this request. (required)
   1750   zone: string, The name of the zone for this request. (required)
   1751   instance: string, Instance name. (required)
   1752   body: object, The request body. (required)
   1753     The object takes the form of:
   1754 
   1755 { # Sets the scheduling options for an Instance.
   1756   "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.
   1757       # 
   1758       # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
   1759   "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.
   1760   "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.
   1761 }
   1762 
   1763 
   1764 Returns:
   1765   An object of the form:
   1766 
   1767     { # An Operation resource, used to manage asynchronous API requests.
   1768     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1769     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1770     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1771     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1772     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1773     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1774     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1775     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1776     "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.
   1777     "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.
   1778     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1779     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1780     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1781     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1782       {
   1783         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1784         "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.
   1785         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1786             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1787           {
   1788             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1789             "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).
   1790           },
   1791         ],
   1792       },
   1793     ],
   1794     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1795     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1796     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1797     "name": "A String", # [Output Only] Name of the resource.
   1798     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1799     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1800       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1801         {
   1802           "message": "A String", # [Output Only] An optional, human-readable error message.
   1803           "code": "A String", # [Output Only] The error type identifier for this error.
   1804           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1805         },
   1806       ],
   1807     },
   1808     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1809     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1810     "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.
   1811   }</pre>
   1812 </div>
   1813 
   1814 <div class="method">
   1815     <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body)</code>
   1816   <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
   1817 
   1818 Args:
   1819   project: string, Project ID for this request. (required)
   1820   zone: string, The name of the zone for this request. (required)
   1821   instance: string, Name of the instance resource to start. (required)
   1822   body: object, The request body. (required)
   1823     The object takes the form of:
   1824 
   1825 {
   1826     "scopes": [ # The list of scopes to be made available for this service account.
   1827       "A String",
   1828     ],
   1829     "email": "A String", # Email address of the service account.
   1830   }
   1831 
   1832 
   1833 Returns:
   1834   An object of the form:
   1835 
   1836     { # An Operation resource, used to manage asynchronous API requests.
   1837     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1838     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1839     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1840     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1841     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1842     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1843     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1844     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1845     "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.
   1846     "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.
   1847     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1848     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1849     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1850     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1851       {
   1852         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1853         "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.
   1854         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1855             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1856           {
   1857             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1858             "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).
   1859           },
   1860         ],
   1861       },
   1862     ],
   1863     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1864     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1865     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1866     "name": "A String", # [Output Only] Name of the resource.
   1867     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1868     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1869       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1870         {
   1871           "message": "A String", # [Output Only] An optional, human-readable error message.
   1872           "code": "A String", # [Output Only] The error type identifier for this error.
   1873           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1874         },
   1875       ],
   1876     },
   1877     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1878     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1879     "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.
   1880   }</pre>
   1881 </div>
   1882 
   1883 <div class="method">
   1884     <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
   1885   <pre>Sets tags for the specified instance to the data included in the request.
   1886 
   1887 Args:
   1888   project: string, Project ID for this request. (required)
   1889   zone: string, The name of the zone for this request. (required)
   1890   instance: string, Name of the instance scoping this request. (required)
   1891   body: object, The request body. (required)
   1892     The object takes the form of:
   1893 
   1894 { # A set of instance tags.
   1895   "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
   1896     "A String",
   1897   ],
   1898   "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.
   1899       # 
   1900       # To see the latest fingerprint, make get() request to the instance.
   1901 }
   1902 
   1903 
   1904 Returns:
   1905   An object of the form:
   1906 
   1907     { # An Operation resource, used to manage asynchronous API requests.
   1908     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1909     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1910     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1911     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1912     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1913     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1914     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1915     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1916     "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.
   1917     "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.
   1918     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1919     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1920     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1921     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1922       {
   1923         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1924         "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.
   1925         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1926             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1927           {
   1928             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1929             "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).
   1930           },
   1931         ],
   1932       },
   1933     ],
   1934     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1935     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1936     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1937     "name": "A String", # [Output Only] Name of the resource.
   1938     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1939     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1940       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   1941         {
   1942           "message": "A String", # [Output Only] An optional, human-readable error message.
   1943           "code": "A String", # [Output Only] The error type identifier for this error.
   1944           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   1945         },
   1946       ],
   1947     },
   1948     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   1949     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   1950     "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.
   1951   }</pre>
   1952 </div>
   1953 
   1954 <div class="method">
   1955     <code class="details" id="start">start(project, zone, instance)</code>
   1956   <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
   1957 
   1958 Args:
   1959   project: string, Project ID for this request. (required)
   1960   zone: string, The name of the zone for this request. (required)
   1961   instance: string, Name of the instance resource to start. (required)
   1962 
   1963 Returns:
   1964   An object of the form:
   1965 
   1966     { # An Operation resource, used to manage asynchronous API requests.
   1967     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   1968     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   1969     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   1970     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   1971     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   1972     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   1973     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   1974     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   1975     "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.
   1976     "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.
   1977     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   1978     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   1979     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   1980     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   1981       {
   1982         "message": "A String", # [Output Only] A human-readable description of the warning code.
   1983         "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.
   1984         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   1985             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   1986           {
   1987             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   1988             "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).
   1989           },
   1990         ],
   1991       },
   1992     ],
   1993     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   1994     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   1995     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   1996     "name": "A String", # [Output Only] Name of the resource.
   1997     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   1998     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   1999       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2000         {
   2001           "message": "A String", # [Output Only] An optional, human-readable error message.
   2002           "code": "A String", # [Output Only] The error type identifier for this error.
   2003           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2004         },
   2005       ],
   2006     },
   2007     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2008     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2009     "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.
   2010   }</pre>
   2011 </div>
   2012 
   2013 <div class="method">
   2014     <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body)</code>
   2015   <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
   2016 
   2017 Args:
   2018   project: string, Project ID for this request. (required)
   2019   zone: string, The name of the zone for this request. (required)
   2020   instance: string, Name of the instance resource to start. (required)
   2021   body: object, The request body. (required)
   2022     The object takes the form of:
   2023 
   2024 {
   2025     "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
   2026         # 
   2027         # In order to start the instance, the disk url and its corresponding key must be provided.
   2028         # 
   2029         # If the disk is not protected with a customer-supplied encryption key it should not be specified.
   2030       {
   2031         "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
   2032           "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
   2033           "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
   2034         },
   2035         "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
   2036       },
   2037     ],
   2038   }
   2039 
   2040 
   2041 Returns:
   2042   An object of the form:
   2043 
   2044     { # An Operation resource, used to manage asynchronous API requests.
   2045     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2046     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2047     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2048     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2049     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2050     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2051     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2052     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2053     "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.
   2054     "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.
   2055     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2056     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2057     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2058     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2059       {
   2060         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2061         "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.
   2062         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2063             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2064           {
   2065             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2066             "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).
   2067           },
   2068         ],
   2069       },
   2070     ],
   2071     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2072     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2073     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2074     "name": "A String", # [Output Only] Name of the resource.
   2075     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2076     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2077       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2078         {
   2079           "message": "A String", # [Output Only] An optional, human-readable error message.
   2080           "code": "A String", # [Output Only] The error type identifier for this error.
   2081           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2082         },
   2083       ],
   2084     },
   2085     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2086     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2087     "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.
   2088   }</pre>
   2089 </div>
   2090 
   2091 <div class="method">
   2092     <code class="details" id="stop">stop(project, zone, instance)</code>
   2093   <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.
   2094 
   2095 Args:
   2096   project: string, Project ID for this request. (required)
   2097   zone: string, The name of the zone for this request. (required)
   2098   instance: string, Name of the instance resource to stop. (required)
   2099 
   2100 Returns:
   2101   An object of the form:
   2102 
   2103     { # An Operation resource, used to manage asynchronous API requests.
   2104     "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
   2105     "clientOperationId": "A String", # [Output Only] Reserved for future use.
   2106     "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
   2107     "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   2108     "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
   2109     "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
   2110     "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
   2111     "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
   2112     "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.
   2113     "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.
   2114     "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
   2115     "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
   2116     "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
   2117     "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
   2118       {
   2119         "message": "A String", # [Output Only] A human-readable description of the warning code.
   2120         "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.
   2121         "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
   2122             # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
   2123           {
   2124             "value": "A String", # [Output Only] A warning data value corresponding to the key.
   2125             "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).
   2126           },
   2127         ],
   2128       },
   2129     ],
   2130     "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com.
   2131     "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
   2132     "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
   2133     "name": "A String", # [Output Only] Name of the resource.
   2134     "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
   2135     "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
   2136       "errors": [ # [Output Only] The array of errors encountered while processing this operation.
   2137         {
   2138           "message": "A String", # [Output Only] An optional, human-readable error message.
   2139           "code": "A String", # [Output Only] The error type identifier for this error.
   2140           "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
   2141         },
   2142       ],
   2143     },
   2144     "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
   2145     "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
   2146     "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.
   2147   }</pre>
   2148 </div>
   2149 
   2150 </body></html>