Debian Codegraph @

docs/dyn/cloudshell_v1.users.environments.html

raw
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="cloudshell_v1.html">Cloud Shell API</a> . <a href="cloudshell_v1.users.html">users</a> . <a href="cloudshell_v1.users.environments.html">environments</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#addPublicKey">addPublicKey(environment, body=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Adds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same content already exists, this will error with ALREADY_EXISTS.</p>
80 <p class="toc_element">
81 <code><a href="#authorize">authorize(name, body=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.</p>
83 <p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85 <p class="firstline">Close httplib2 connections.</p>
86 <p class="toc_element">
87 <code><a href="#generateAccessToken">generateAccessToken(environment, expireTime=None, ttl=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Generates an access token for the user's environment.</p>
89 <p class="toc_element">
90 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
91 <p class="firstline">Gets an environment. Returns NOT_FOUND if the environment does not exist.</p>
92 <p class="toc_element">
93 <code><a href="#removePublicKey">removePublicKey(environment, body=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.</p>
95 <p class="toc_element">
96 <code><a href="#start">start(name, body=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Starts an existing environment, allowing clients to connect to it. The returned operation will contain an instance of StartEnvironmentMetadata in its metadata field. Users can wait for the environment to start by polling this operation via GetOperation. Once the environment has finished starting and is ready to accept connections, the operation will contain a StartEnvironmentResponse in its response field.</p>
98 <h3>Method Details</h3>
99 <div class="method">
100 <code class="details" id="addPublicKey">addPublicKey(environment, body=None, x__xgafv=None)</code>
101 <pre>Adds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same content already exists, this will error with ALREADY_EXISTS.
102
103 Args:
104 environment: string, Environment this key should be added to, e.g. `users/me/environments/default`. (required)
105 body: object, The request body.
106 The object takes the form of:
107
108 { # Request message for AddPublicKey.
109 &quot;key&quot;: &quot;A String&quot;, # Key that should be added to the environment. Supported formats are `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as &lt;format&gt; &lt;content&gt;, where &lt;content&gt; part is encoded with Base64.
110 }
111
112 x__xgafv: string, V1 error format.
113 Allowed values
114 1 - v1 error format
115 2 - v2 error format
116
117 Returns:
118 An object of the form:
119
120 { # This resource represents a long-running operation that is the result of a network API call.
121 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
122 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
123 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
124 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
125 {
126 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
127 },
128 ],
129 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
130 },
131 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
132 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
133 },
134 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
135 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
136 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
137 },
138 }</pre>
139 </div>
140
141 <div class="method">
142 <code class="details" id="authorize">authorize(name, body=None, x__xgafv=None)</code>
143 <pre>Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.
144
145 Args:
146 name: string, Name of the resource that should receive the credentials, for example `users/me/environments/default` or `users/[email protected]/environments/default`. (required)
147 body: object, The request body.
148 The object takes the form of:
149
150 { # Request message for AuthorizeEnvironment.
151 &quot;accessToken&quot;: &quot;A String&quot;, # The OAuth access token that should be sent to the environment.
152 &quot;expireTime&quot;: &quot;A String&quot;, # The time when the credentials expire. If not set, defaults to one hour from when the server received the request.
153 &quot;idToken&quot;: &quot;A String&quot;, # The OAuth ID token that should be sent to the environment.
154 }
155
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161 Returns:
162 An object of the form:
163
164 { # This resource represents a long-running operation that is the result of a network API call.
165 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
166 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
167 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
168 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
169 {
170 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
171 },
172 ],
173 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
174 },
175 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
176 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
177 },
178 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
179 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
180 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
181 },
182 }</pre>
183 </div>
184
185 <div class="method">
186 <code class="details" id="close">close()</code>
187 <pre>Close httplib2 connections.</pre>
188 </div>
189
190 <div class="method">
191 <code class="details" id="generateAccessToken">generateAccessToken(environment, expireTime=None, ttl=None, x__xgafv=None)</code>
192 <pre>Generates an access token for the user&#x27;s environment.
193
194 Args:
195 environment: string, Required. The environment to generate the access token for. (required)
196 expireTime: string, Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token&#x27;s expiration time will be set to a default value of 1 hour in the future.
197 ttl: string, Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token&#x27;s lifetime will be set to a default value of 1 hour.
198 x__xgafv: string, V1 error format.
199 Allowed values
200 1 - v1 error format
201 2 - v2 error format
202
203 Returns:
204 An object of the form:
205
206 { # Response message for GenerateAccessToken.
207 &quot;accessToken&quot;: &quot;A String&quot;, # The access token.
208 }</pre>
209 </div>
210
211 <div class="method">
212 <code class="details" id="get">get(name, x__xgafv=None)</code>
213 <pre>Gets an environment. Returns NOT_FOUND if the environment does not exist.
214
215 Args:
216 name: string, Required. Name of the requested resource, for example `users/me/environments/default` or `users/[email protected]/environments/default`. (required)
217 x__xgafv: string, V1 error format.
218 Allowed values
219 1 - v1 error format
220 2 - v2 error format
221
222 Returns:
223 An object of the form:
224
225 { # A Cloud Shell environment, which is defined as the combination of a Docker image specifying what is installed on the environment and a home directory containing the user&#x27;s data that will remain across sessions. Each user has at least an environment with the ID &quot;default&quot;.
226 &quot;dockerImage&quot;: &quot;A String&quot;, # Required. Immutable. Full path to the Docker image used to run this environment, e.g. &quot;gcr.io/dev-con/cloud-devshell:latest&quot;.
227 &quot;id&quot;: &quot;A String&quot;, # Output only. The environment&#x27;s identifier, unique among the user&#x27;s environments.
228 &quot;name&quot;: &quot;A String&quot;, # Immutable. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the email address of the user to whom this environment belongs, and `{environment_id}` is the identifier of this environment. For example, `users/[email protected]/environments/default`.
229 &quot;publicKeys&quot;: [ # Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
230 &quot;A String&quot;,
231 ],
232 &quot;sshHost&quot;: &quot;A String&quot;, # Output only. Host to which clients can connect to initiate SSH sessions with the environment.
233 &quot;sshPort&quot;: 42, # Output only. Port to which clients can connect to initiate SSH sessions with the environment.
234 &quot;sshUsername&quot;: &quot;A String&quot;, # Output only. Username that clients should use when initiating SSH sessions with the environment.
235 &quot;state&quot;: &quot;A String&quot;, # Output only. Current execution state of this environment.
236 &quot;webHost&quot;: &quot;A String&quot;, # Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
237 }</pre>
238 </div>
239
240 <div class="method">
241 <code class="details" id="removePublicKey">removePublicKey(environment, body=None, x__xgafv=None)</code>
242 <pre>Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.
243
244 Args:
245 environment: string, Environment this key should be removed from, e.g. `users/me/environments/default`. (required)
246 body: object, The request body.
247 The object takes the form of:
248
249 { # Request message for RemovePublicKey.
250 &quot;key&quot;: &quot;A String&quot;, # Key that should be removed from the environment.
251 }
252
253 x__xgafv: string, V1 error format.
254 Allowed values
255 1 - v1 error format
256 2 - v2 error format
257
258 Returns:
259 An object of the form:
260
261 { # This resource represents a long-running operation that is the result of a network API call.
262 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
263 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
264 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
265 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
266 {
267 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
268 },
269 ],
270 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
271 },
272 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
273 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
274 },
275 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
276 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
277 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
278 },
279 }</pre>
280 </div>
281
282 <div class="method">
283 <code class="details" id="start">start(name, body=None, x__xgafv=None)</code>
284 <pre>Starts an existing environment, allowing clients to connect to it. The returned operation will contain an instance of StartEnvironmentMetadata in its metadata field. Users can wait for the environment to start by polling this operation via GetOperation. Once the environment has finished starting and is ready to accept connections, the operation will contain a StartEnvironmentResponse in its response field.
285
286 Args:
287 name: string, Name of the resource that should be started, for example `users/me/environments/default` or `users/[email protected]/environments/default`. (required)
288 body: object, The request body.
289 The object takes the form of:
290
291 { # Request message for StartEnvironment.
292 &quot;accessToken&quot;: &quot;A String&quot;, # The initial access token passed to the environment. If this is present and valid, the environment will be pre-authenticated with gcloud so that the user can run gcloud commands in Cloud Shell without having to log in. This code can be updated later by calling AuthorizeEnvironment.
293 &quot;publicKeys&quot;: [ # Public keys that should be added to the environment before it is started.
294 &quot;A String&quot;,
295 ],
296 }
297
298 x__xgafv: string, V1 error format.
299 Allowed values
300 1 - v1 error format
301 2 - v2 error format
302
303 Returns:
304 An object of the form:
305
306 { # This resource represents a long-running operation that is the result of a network API call.
307 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
308 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
309 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
310 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
311 {
312 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
313 },
314 ],
315 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
316 },
317 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
318 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
319 },
320 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
321 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
322 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
323 },
324 }</pre>
325 </div>
326
327 </body></html>