blob: 12834f2552aa7566d6ffa2f25bb5cef655b1c0ed [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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.snapshots.html">snapshots</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, snapshot)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070079<p class="firstline">Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
81 <code><a href="#get">get(project, snapshot)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070082<p class="firstline">Returns the specified Snapshot resource.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070085<p class="firstline">Retrieves the list of Snapshot resources contained within the specified project.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="delete">delete(project, snapshot)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -070092 <pre>Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.
93
94For more information, see Deleting snaphots.
John Asmuth614db982014-04-24 15:46:26 -040095
96Args:
97 project: string, Name of the project scoping this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -070098 snapshot: string, Name of the Snapshot resource to delete. (required)
John Asmuth614db982014-04-24 15:46:26 -040099
100Returns:
101 An object of the form:
102
Takashi Matsuo06694102015-09-11 13:55:40 -0700103 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000104 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700105 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000106 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800107 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000108 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
109 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
110 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000111 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000112 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800113 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000114 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
115 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
116 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400117 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118 "message": "A String", # [Output Only] Optional human-readable details for this warning.
119 "code": "A String", # [Output Only] The warning type identifier for this warning.
120 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400121 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000122 "value": "A String", # [Output Only] A warning data value corresponding to the key.
123 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400124 },
125 ],
126 },
127 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000128 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
129 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
130 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
131 "name": "A String", # [Output Only] Name of the resource.
132 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
133 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800134 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400135 {
Craig Citroe633be12015-03-02 13:40:36 -0800136 "message": "A String", # [Output Only] An optional, human-readable error message.
137 "code": "A String", # [Output Only] The error type identifier for this error.
138 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400139 },
140 ],
141 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000142 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700143 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000144 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400145 }</pre>
146</div>
147
148<div class="method">
149 <code class="details" id="get">get(project, snapshot)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700150 <pre>Returns the specified Snapshot resource.
John Asmuth614db982014-04-24 15:46:26 -0400151
152Args:
153 project: string, Name of the project scoping this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700154 snapshot: string, Name of the Snapshot resource to return. (required)
John Asmuth614db982014-04-24 15:46:26 -0400155
156Returns:
157 An object of the form:
158
159 { # A persistent disk snapshot resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700160 "status": "A String", # [Output Only] The status of the snapshot.
161 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
162 "storageBytes": "A String", # [Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
John Asmuth614db982014-04-24 15:46:26 -0400163 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700164 "sourceDisk": "A String", # The source disk used to create this snapshot.
Takashi Matsuo06694102015-09-11 13:55:40 -0700165 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation.
166 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
167 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
Craig Citro065b5302014-08-14 00:47:23 -0700168 "licenses": [ # Public visible licenses.
169 "A String",
170 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700171 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
172 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
173 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
174 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400175 }</pre>
176</div>
177
178<div class="method">
179 <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700180 <pre>Retrieves the list of Snapshot resources contained within the specified project.
John Asmuth614db982014-04-24 15:46:26 -0400181
182Args:
183 project: string, Name of the project scoping this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000184 maxResults: integer, Maximum count of results to be returned.
Takashi Matsuo06694102015-09-11 13:55:40 -0700185 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
186 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.
187
188The 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 (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.
189
190For example, filter=name ne example-instance.
John Asmuth614db982014-04-24 15:46:26 -0400191
192Returns:
193 An object of the form:
194
Takashi Matsuo06694102015-09-11 13:55:40 -0700195 { # Contains a list of Snapshot resources.
196 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
Craig Citroe633be12015-03-02 13:40:36 -0800197 "items": [ # A list of Snapshot resources.
John Asmuth614db982014-04-24 15:46:26 -0400198 { # A persistent disk snapshot resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700199 "status": "A String", # [Output Only] The status of the snapshot.
200 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
201 "storageBytes": "A String", # [Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
John Asmuth614db982014-04-24 15:46:26 -0400202 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700203 "sourceDisk": "A String", # The source disk used to create this snapshot.
Takashi Matsuo06694102015-09-11 13:55:40 -0700204 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation.
205 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
206 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
Craig Citro065b5302014-08-14 00:47:23 -0700207 "licenses": [ # Public visible licenses.
208 "A String",
209 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700210 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
211 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
212 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
213 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
John Asmuth614db982014-04-24 15:46:26 -0400214 },
215 ],
216 "kind": "compute#snapshotList", # Type of resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700217 "id": "A String", # [Output Only] Unique identifier for the resource. Defined by the server.
218 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400219 }</pre>
220</div>
221
222<div class="method">
223 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
224 <pre>Retrieves the next page of results.
225
226Args:
227 previous_request: The request for the previous page. (required)
228 previous_response: The response from the request for the previous page. (required)
229
230Returns:
231 A request object that you can call 'execute()' on to request the next
232 page. Returns None if there are no more items in the collection.
233 </pre>
234</div>
235
236</body></html>