blob: 26b37cdafed612cc1e2a882ba7c0d08ec231667c [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<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="cloudshell_v1alpha1.html">Cloud Shell API</a> . <a href="cloudshell_v1alpha1.users.html">users</a> . <a href="cloudshell_v1alpha1.users.environments.html">environments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudshell_v1alpha1.users.environments.publicKeys.html">publicKeys()</a></code>
79</p>
80<p class="firstline">Returns the publicKeys Resource.</p>
81
82<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#authorize">authorize(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Sends OAuth credentials to a running environment on behalf of a user. When</p>
85<p class="toc_element">
86 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Gets an environment. Returns NOT_FOUND if the environment does not exist.</p>
88<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070089 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090<p class="firstline">Updates an existing environment.</p>
91<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070092 <code><a href="#start">start(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093<p class="firstline">Starts an existing environment, allowing clients to connect to it. The</p>
94<h3>Method Details</h3>
95<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code class="details" id="authorize">authorize(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097 <pre>Sends OAuth credentials to a running environment on behalf of a user. When
98this completes, the environment will be authorized to run various Google
99Cloud command line tools without requiring the user to manually
100authenticate.
101
102Args:
103 name: string, Name of the resource that should receive the credentials, for example
104`users/me/environments/default` or
105`users/someone@example.com/environments/default`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 The object takes the form of:
108
109{ # Request message for AuthorizeEnvironment.
110 "expireTime": "A String", # The time when the credentials expire. If not set, defaults to one hour from
111 # when the server received the request.
112 "idToken": "A String", # The OAuth ID token that should be sent to the environment.
113 "accessToken": "A String", # The OAuth access token that should be sent to the environment.
114 }
115
116 x__xgafv: string, V1 error format.
117 Allowed values
118 1 - v1 error format
119 2 - v2 error format
120
121Returns:
122 An object of the form:
123
124 { # A generic empty message that you can re-use to avoid defining duplicated
125 # empty messages in your APIs. A typical example is to use it as the request
126 # or the response type of an API method. For instance:
127 #
128 # service Foo {
129 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
130 # }
131 #
132 # The JSON representation for `Empty` is empty JSON object `{}`.
133 }</pre>
134</div>
135
136<div class="method">
137 <code class="details" id="get">get(name, x__xgafv=None)</code>
138 <pre>Gets an environment. Returns NOT_FOUND if the environment does not exist.
139
140Args:
141 name: string, Name of the requested resource, for example `users/me/environments/default`
142or `users/someone@example.com/environments/default`. (required)
143 x__xgafv: string, V1 error format.
144 Allowed values
145 1 - v1 error format
146 2 - v2 error format
147
148Returns:
149 An object of the form:
150
151 { # A Cloud Shell environment, which is defined as the combination of a Docker
152 # image specifying what is installed on the environment and a home directory
153 # containing the user's data that will remain across sessions. Each user has a
154 # single environment with the ID "default".
155 "name": "A String", # Output only. Full name of this resource, in the format
156 # `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
157 # email address of the user to whom this environment belongs, and
158 # `{environment_id}` is the identifier of this environment. For example,
159 # `users/someone@example.com/environments/default`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700160 "webHost": "A String", # Output only. Host to which clients can connect to initiate HTTPS or WSS
161 # connections with the environment.
162 "vmSizeExpireTime": "A String", # Output only. The time when the Environment will expire back to the default
163 # VM size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164 "dockerImage": "A String", # Required. Full path to the Docker image used to run this environment, e.g.
165 # "gcr.io/dev-con/cloud-devshell:latest".
166 "publicKeys": [ # Output only. Public keys associated with the environment. Clients can
167 # connect to this environment via SSH only if they possess a private key
168 # corresponding to at least one of these public keys. Keys can be added to or
169 # removed from the environment using the CreatePublicKey and DeletePublicKey
170 # methods.
171 { # A public SSH key, corresponding to a private SSH key held by the client.
172 "name": "A String", # Output only. Full name of this resource, in the format
173 # `users/{owner_email}/environments/{environment_id}/publicKeys/{key_id}`.
174 # `{owner_email}` is the email address of the user to whom the key belongs.
175 # `{environment_id}` is the identifier of the environment to which the key
176 # grants access. `{key_id}` is the unique identifier of the key. For example,
177 # `users/someone@example.com/environments/default/publicKeys/myKey`.
178 "key": "A String", # Required. Content of this key.
179 "format": "A String", # Required. Format of this key's content.
180 },
181 ],
182 "state": "A String", # Output only. Current execution state of this environment.
183 "sshHost": "A String", # Output only. Host to which clients can connect to initiate SSH sessions
184 # with the environment.
185 "sshPort": 42, # Output only. Port to which clients can connect to initiate SSH sessions
186 # with the environment.
187 "sshUsername": "A String", # Output only. Username that clients should use when initiating SSH sessions
188 # with the environment.
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 "webPorts": [ # Output only. Ports to which clients can connect to initiate HTTPS or WSS
190 # connections with the environment.
191 42,
192 ],
193 "id": "A String", # Output only. The environment's identifier, unique among the user's
194 # environments.
195 "size": "A String", # Indicates the size of the backing VM running the environment. If set to
196 # something other than DEFAULT, it will be reverted to the default VM size
197 # after vm_size_expire_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 }</pre>
199</div>
200
201<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700202 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 <pre>Updates an existing environment.
204
205Args:
206 name: string, Name of the resource to be updated, for example
207`users/me/environments/default` or
208`users/someone@example.com/environments/default`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 The object takes the form of:
211
212{ # A Cloud Shell environment, which is defined as the combination of a Docker
213 # image specifying what is installed on the environment and a home directory
214 # containing the user's data that will remain across sessions. Each user has a
215 # single environment with the ID "default".
216 "name": "A String", # Output only. Full name of this resource, in the format
217 # `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
218 # email address of the user to whom this environment belongs, and
219 # `{environment_id}` is the identifier of this environment. For example,
220 # `users/someone@example.com/environments/default`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 "webHost": "A String", # Output only. Host to which clients can connect to initiate HTTPS or WSS
222 # connections with the environment.
223 "vmSizeExpireTime": "A String", # Output only. The time when the Environment will expire back to the default
224 # VM size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 "dockerImage": "A String", # Required. Full path to the Docker image used to run this environment, e.g.
226 # "gcr.io/dev-con/cloud-devshell:latest".
227 "publicKeys": [ # Output only. Public keys associated with the environment. Clients can
228 # connect to this environment via SSH only if they possess a private key
229 # corresponding to at least one of these public keys. Keys can be added to or
230 # removed from the environment using the CreatePublicKey and DeletePublicKey
231 # methods.
232 { # A public SSH key, corresponding to a private SSH key held by the client.
233 "name": "A String", # Output only. Full name of this resource, in the format
234 # `users/{owner_email}/environments/{environment_id}/publicKeys/{key_id}`.
235 # `{owner_email}` is the email address of the user to whom the key belongs.
236 # `{environment_id}` is the identifier of the environment to which the key
237 # grants access. `{key_id}` is the unique identifier of the key. For example,
238 # `users/someone@example.com/environments/default/publicKeys/myKey`.
239 "key": "A String", # Required. Content of this key.
240 "format": "A String", # Required. Format of this key's content.
241 },
242 ],
243 "state": "A String", # Output only. Current execution state of this environment.
244 "sshHost": "A String", # Output only. Host to which clients can connect to initiate SSH sessions
245 # with the environment.
246 "sshPort": 42, # Output only. Port to which clients can connect to initiate SSH sessions
247 # with the environment.
248 "sshUsername": "A String", # Output only. Username that clients should use when initiating SSH sessions
249 # with the environment.
Dan O'Mearadd494642020-05-01 07:42:23 -0700250 "webPorts": [ # Output only. Ports to which clients can connect to initiate HTTPS or WSS
251 # connections with the environment.
252 42,
253 ],
254 "id": "A String", # Output only. The environment's identifier, unique among the user's
255 # environments.
256 "size": "A String", # Indicates the size of the backing VM running the environment. If set to
257 # something other than DEFAULT, it will be reverted to the default VM size
258 # after vm_size_expire_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 }
260
261 updateMask: string, Mask specifying which fields in the environment should be updated.
262 x__xgafv: string, V1 error format.
263 Allowed values
264 1 - v1 error format
265 2 - v2 error format
266
267Returns:
268 An object of the form:
269
270 { # A Cloud Shell environment, which is defined as the combination of a Docker
271 # image specifying what is installed on the environment and a home directory
272 # containing the user's data that will remain across sessions. Each user has a
273 # single environment with the ID "default".
274 "name": "A String", # Output only. Full name of this resource, in the format
275 # `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
276 # email address of the user to whom this environment belongs, and
277 # `{environment_id}` is the identifier of this environment. For example,
278 # `users/someone@example.com/environments/default`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 "webHost": "A String", # Output only. Host to which clients can connect to initiate HTTPS or WSS
280 # connections with the environment.
281 "vmSizeExpireTime": "A String", # Output only. The time when the Environment will expire back to the default
282 # VM size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 "dockerImage": "A String", # Required. Full path to the Docker image used to run this environment, e.g.
284 # "gcr.io/dev-con/cloud-devshell:latest".
285 "publicKeys": [ # Output only. Public keys associated with the environment. Clients can
286 # connect to this environment via SSH only if they possess a private key
287 # corresponding to at least one of these public keys. Keys can be added to or
288 # removed from the environment using the CreatePublicKey and DeletePublicKey
289 # methods.
290 { # A public SSH key, corresponding to a private SSH key held by the client.
291 "name": "A String", # Output only. Full name of this resource, in the format
292 # `users/{owner_email}/environments/{environment_id}/publicKeys/{key_id}`.
293 # `{owner_email}` is the email address of the user to whom the key belongs.
294 # `{environment_id}` is the identifier of the environment to which the key
295 # grants access. `{key_id}` is the unique identifier of the key. For example,
296 # `users/someone@example.com/environments/default/publicKeys/myKey`.
297 "key": "A String", # Required. Content of this key.
298 "format": "A String", # Required. Format of this key's content.
299 },
300 ],
301 "state": "A String", # Output only. Current execution state of this environment.
302 "sshHost": "A String", # Output only. Host to which clients can connect to initiate SSH sessions
303 # with the environment.
304 "sshPort": 42, # Output only. Port to which clients can connect to initiate SSH sessions
305 # with the environment.
306 "sshUsername": "A String", # Output only. Username that clients should use when initiating SSH sessions
307 # with the environment.
Dan O'Mearadd494642020-05-01 07:42:23 -0700308 "webPorts": [ # Output only. Ports to which clients can connect to initiate HTTPS or WSS
309 # connections with the environment.
310 42,
311 ],
312 "id": "A String", # Output only. The environment's identifier, unique among the user's
313 # environments.
314 "size": "A String", # Indicates the size of the backing VM running the environment. If set to
315 # something other than DEFAULT, it will be reverted to the default VM size
316 # after vm_size_expire_time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 }</pre>
318</div>
319
320<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 <code class="details" id="start">start(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 <pre>Starts an existing environment, allowing clients to connect to it. The
323returned operation will contain an instance of StartEnvironmentMetadata in
324its metadata field. Users can wait for the environment to start by polling
325this operation via GetOperation. Once the environment has finished starting
326and is ready to accept connections, the operation will contain a
327StartEnvironmentResponse in its response field.
328
329Args:
330 name: string, Name of the resource that should be started, for example
331`users/me/environments/default` or
332`users/someone@example.com/environments/default`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 The object takes the form of:
335
336{ # Request message for StartEnvironment.
337 "accessToken": "A String", # The initial access token passed to the environment. If this is present and
338 # valid, the environment will be pre-authenticated with gcloud so that the
339 # user can run gcloud commands in Cloud Shell without having to log in. This
340 # code can be updated later by calling AuthorizeEnvironment.
341 }
342
343 x__xgafv: string, V1 error format.
344 Allowed values
345 1 - v1 error format
346 2 - v2 error format
347
348Returns:
349 An object of the form:
350
351 { # This resource represents a long-running operation that is the result of a
352 # network API call.
Dan O'Mearadd494642020-05-01 07:42:23 -0700353 "metadata": { # Service-specific metadata associated with the operation. It typically
354 # contains progress information and common metadata such as create time.
355 # Some services might not provide such metadata. Any method that returns a
356 # long-running operation should document the metadata type, if any.
357 "a_key": "", # Properties of the object. Contains field @type with type URL.
358 },
359 "done": True or False, # If the value is `false`, it means the operation is still in progress.
360 # If `true`, the operation is completed, and either `error` or `response` is
361 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700362 "response": { # The normal response of the operation in case of success. If the original
363 # method returns no data on success, such as `Delete`, the response is
364 # `google.protobuf.Empty`. If the original method is standard
365 # `Get`/`Create`/`Update`, the response should be the resource. For other
366 # methods, the response should have the type `XxxResponse`, where `Xxx`
367 # is the original method name. For example, if the original method name
368 # is `TakeSnapshot()`, the inferred response type is
369 # `TakeSnapshotResponse`.
370 "a_key": "", # Properties of the object. Contains field @type with type URL.
371 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700372 "name": "A String", # The server-assigned name, which is only unique within the same service that
373 # originally returns it. If you use the default HTTP mapping, the
374 # `name` should be a resource name ending with `operations/{unique_id}`.
375 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
376 # different programming environments, including REST APIs and RPC APIs. It is
377 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
378 # three pieces of data: error code, error message, and error details.
379 #
380 # You can find out more about this error model and how to work with it in the
381 # [API Design Guide](https://cloud.google.com/apis/design/errors).
382 "message": "A String", # A developer-facing error message, which should be in English. Any
383 # user-facing error message should be localized and sent in the
384 # google.rpc.Status.details field, or localized by the client.
385 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
386 "details": [ # A list of messages that carry the error details. There is a common set of
387 # message types for APIs to use.
388 {
389 "a_key": "", # Properties of the object. Contains field @type with type URL.
390 },
391 ],
392 },
393 }</pre>
394</div>
395
396</body></html>