John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 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.projects.html">projects</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#get">get(project)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 79 | <p class="firstline">Returns the specified Project resource.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 80 | <p class="toc_element"> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 81 | <code><a href="#moveDisk">moveDisk(project, body)</a></code></p> |
| 82 | <p class="firstline">Moves a persistent disk from one zone to another.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#moveInstance">moveInstance(project, body)</a></code></p> |
| 85 | <p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p> |
| 86 | <p class="toc_element"> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 87 | <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</a></code></p> |
| 88 | <p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
| 90 | <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body)</a></code></p> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 91 | <p class="firstline">Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
| 94 | <code class="details" id="get">get(project)</code> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 95 | <pre>Returns the specified Project resource. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 96 | |
| 97 | Args: |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 98 | project: string, Project ID for this request. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 99 | |
| 100 | Returns: |
| 101 | An object of the form: |
| 102 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 103 | { # A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 104 | "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 105 | "enabledFeatures": [ # Restricted features enabled for use on this project. |
| 106 | "A String", |
| 107 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 108 | "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 109 | "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| 110 | { |
| 111 | "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. |
| 112 | "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. |
| 113 | }, |
| 114 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 115 | "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata. |
| 116 | "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. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 117 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 118 | "quotas": [ # [Output Only] Quotas assigned to this project. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 119 | { # A quotas entry. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 120 | "usage": 3.14, # [Output Only] Current usage of this metric. |
| 121 | "metric": "A String", # [Output Only] Name of the quota metric. |
| 122 | "limit": 3.14, # [Output Only] Quota limit for this metric. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 123 | }, |
| 124 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 125 | "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine. |
| 126 | "usageExportLocation": { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored. |
| 127 | "bucketName": "A String", # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 128 | "reportNamePrefix": "A String", # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 129 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 130 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 131 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 132 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 133 | "description": "A String", # An optional textual description of the resource. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 134 | }</pre> |
| 135 | </div> |
| 136 | |
| 137 | <div class="method"> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 138 | <code class="details" id="moveDisk">moveDisk(project, body)</code> |
| 139 | <pre>Moves a persistent disk from one zone to another. |
| 140 | |
| 141 | Args: |
| 142 | project: string, Project ID for this request. (required) |
| 143 | body: object, The request body. (required) |
| 144 | The object takes the form of: |
| 145 | |
| 146 | { |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 147 | "targetDisk": "A String", # The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: |
| 148 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk |
| 149 | # - projects/project/zones/zone/disks/disk |
| 150 | # - zones/zone/disks/disk |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 151 | "destinationZone": "A String", # The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 152 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone |
| 153 | # - projects/project/zones/zone |
| 154 | # - zones/zone |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | |
| 158 | Returns: |
| 159 | An object of the form: |
| 160 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 161 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 162 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 163 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 164 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 166 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 167 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 168 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 169 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 170 | "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. |
| 171 | "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. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 172 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 173 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 174 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 175 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 176 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 177 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 178 | "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. |
| 179 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 180 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 181 | { |
| 182 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 183 | "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). |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 184 | }, |
| 185 | ], |
| 186 | }, |
| 187 | ], |
| 188 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 189 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 190 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 191 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 192 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 193 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 194 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 195 | { |
| 196 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 197 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 198 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 199 | }, |
| 200 | ], |
| 201 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 202 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 203 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 204 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 205 | }</pre> |
| 206 | </div> |
| 207 | |
| 208 | <div class="method"> |
| 209 | <code class="details" id="moveInstance">moveInstance(project, body)</code> |
| 210 | <pre>Moves an instance and its attached persistent disks from one zone to another. |
| 211 | |
| 212 | Args: |
| 213 | project: string, Project ID for this request. (required) |
| 214 | body: object, The request body. (required) |
| 215 | The object takes the form of: |
| 216 | |
| 217 | { |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 218 | "targetInstance": "A String", # The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: |
| 219 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance |
| 220 | # - projects/project/zones/zone/instances/instance |
| 221 | # - zones/zone/instances/instance |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 222 | "destinationZone": "A String", # The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 223 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone |
| 224 | # - projects/project/zones/zone |
| 225 | # - zones/zone |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | |
| 229 | Returns: |
| 230 | An object of the form: |
| 231 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 232 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 233 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 234 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 235 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 236 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 237 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 238 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 239 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 240 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 241 | "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. |
| 242 | "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. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 243 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 244 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 245 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 246 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 247 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 248 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 249 | "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. |
| 250 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 251 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 252 | { |
| 253 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 254 | "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). |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 255 | }, |
| 256 | ], |
| 257 | }, |
| 258 | ], |
| 259 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 260 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 261 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 262 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 263 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 264 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 265 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 266 | { |
| 267 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 268 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 269 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 270 | }, |
| 271 | ], |
| 272 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 273 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 274 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 275 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 276 | }</pre> |
| 277 | </div> |
| 278 | |
| 279 | <div class="method"> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 280 | <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</code> |
| 281 | <pre>Sets metadata common to all instances within the specified project using the data included in the request. |
| 282 | |
| 283 | Args: |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 284 | project: string, Project ID for this request. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 285 | body: object, The request body. (required) |
| 286 | The object takes the form of: |
| 287 | |
| 288 | { # A metadata key/value entry. |
| 289 | "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| 290 | { |
| 291 | "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. |
| 292 | "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. |
| 293 | }, |
| 294 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 295 | "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata. |
| 296 | "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. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | |
| 300 | Returns: |
| 301 | An object of the form: |
| 302 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 303 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 304 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 305 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 306 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 307 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 308 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 309 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 310 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 311 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 312 | "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. |
| 313 | "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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 314 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 315 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 316 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 317 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 318 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 319 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 320 | "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. |
| 321 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 322 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 323 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 324 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 325 | "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). |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 326 | }, |
| 327 | ], |
| 328 | }, |
| 329 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 330 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 331 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 332 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 333 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 334 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 335 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 336 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 337 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 338 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 339 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 340 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 341 | }, |
| 342 | ], |
| 343 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 344 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 345 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 346 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 347 | }</pre> |
| 348 | </div> |
| 349 | |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 350 | <div class="method"> |
| 351 | <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body)</code> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 352 | <pre>Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 353 | |
| 354 | Args: |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 355 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 356 | body: object, The request body. (required) |
| 357 | The object takes the form of: |
| 358 | |
| 359 | { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 360 | "bucketName": "A String", # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 361 | "reportNamePrefix": "A String", # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | |
| 365 | Returns: |
| 366 | An object of the form: |
| 367 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 368 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 369 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 370 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 371 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 372 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 373 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 374 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 375 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 376 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 377 | "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. |
| 378 | "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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 379 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 380 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 381 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 382 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 383 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 384 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 385 | "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. |
| 386 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 387 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 388 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 389 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 390 | "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). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 391 | }, |
| 392 | ], |
| 393 | }, |
| 394 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 395 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 396 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 397 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 398 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 399 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 400 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 401 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 402 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 403 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 404 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame^] | 405 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 406 | }, |
| 407 | ], |
| 408 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 409 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 410 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 411 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 412 | }</pre> |
| 413 | </div> |
| 414 | |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 415 | </body></html> |