• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "batchPath": "batch",
3  "icons": {
4    "x32": "http://www.google.com/images/icons/product/search-32.gif",
5    "x16": "http://www.google.com/images/icons/product/search-16.gif"
6  },
7  "ownerDomain": "google.com",
8  "resources": {
9    "users": {
10      "resources": {
11        "environments": {
12          "methods": {
13            "patch": {
14              "id": "cloudshell.users.environments.patch",
15              "parameters": {
16                "name": {
17                  "description": "Name of the resource to be updated, for example `users/me/environments/default` or `users/someone@example.com/environments/default`.",
18                  "pattern": "^users/[^/]+/environments/[^/]+$",
19                  "location": "path",
20                  "required": true,
21                  "type": "string"
22                },
23                "updateMask": {
24                  "type": "string",
25                  "format": "google-fieldmask",
26                  "description": "Mask specifying which fields in the environment should be updated.",
27                  "location": "query"
28                }
29              },
30              "request": {
31                "$ref": "Environment"
32              },
33              "flatPath": "v1alpha1/users/{usersId}/environments/{environmentsId}",
34              "path": "v1alpha1/{+name}",
35              "parameterOrder": [
36                "name"
37              ],
38              "description": "Updates an existing environment.",
39              "response": {
40                "$ref": "Environment"
41              },
42              "scopes": [
43                "https://www.googleapis.com/auth/cloud-platform"
44              ],
45              "httpMethod": "PATCH"
46            },
47            "get": {
48              "response": {
49                "$ref": "Environment"
50              },
51              "scopes": [
52                "https://www.googleapis.com/auth/cloud-platform"
53              ],
54              "parameters": {
55                "name": {
56                  "pattern": "^users/[^/]+/environments/[^/]+$",
57                  "location": "path",
58                  "required": true,
59                  "description": "Name of the requested resource, for example `users/me/environments/default` or `users/someone@example.com/environments/default`.",
60                  "type": "string"
61                }
62              },
63              "parameterOrder": [
64                "name"
65              ],
66              "path": "v1alpha1/{+name}",
67              "flatPath": "v1alpha1/users/{usersId}/environments/{environmentsId}",
68              "description": "Gets an environment. Returns NOT_FOUND if the environment does not exist.",
69              "httpMethod": "GET",
70              "id": "cloudshell.users.environments.get"
71            },
72            "start": {
73              "request": {
74                "$ref": "StartEnvironmentRequest"
75              },
76              "flatPath": "v1alpha1/users/{usersId}/environments/{environmentsId}:start",
77              "parameters": {
78                "name": {
79                  "location": "path",
80                  "required": true,
81                  "pattern": "^users/[^/]+/environments/[^/]+$",
82                  "type": "string",
83                  "description": "Name of the resource that should be started, for example `users/me/environments/default` or `users/someone@example.com/environments/default`."
84                }
85              },
86              "description": "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.",
87              "path": "v1alpha1/{+name}:start",
88              "scopes": [
89                "https://www.googleapis.com/auth/cloud-platform"
90              ],
91              "response": {
92                "$ref": "Operation"
93              },
94              "id": "cloudshell.users.environments.start",
95              "parameterOrder": [
96                "name"
97              ],
98              "httpMethod": "POST"
99            },
100            "authorize": {
101              "id": "cloudshell.users.environments.authorize",
102              "flatPath": "v1alpha1/users/{usersId}/environments/{environmentsId}:authorize",
103              "parameters": {
104                "name": {
105                  "description": "Name of the resource that should receive the credentials, for example `users/me/environments/default` or `users/someone@example.com/environments/default`.",
106                  "type": "string",
107                  "required": true,
108                  "pattern": "^users/[^/]+/environments/[^/]+$",
109                  "location": "path"
110                }
111              },
112              "response": {
113                "$ref": "Empty"
114              },
115              "scopes": [
116                "https://www.googleapis.com/auth/cloud-platform"
117              ],
118              "path": "v1alpha1/{+name}:authorize",
119              "description": "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.",
120              "request": {
121                "$ref": "AuthorizeEnvironmentRequest"
122              },
123              "httpMethod": "POST",
124              "parameterOrder": [
125                "name"
126              ]
127            }
128          },
129          "resources": {
130            "publicKeys": {
131              "methods": {
132                "create": {
133                  "flatPath": "v1alpha1/users/{usersId}/environments/{environmentsId}/publicKeys",
134                  "response": {
135                    "$ref": "PublicKey"
136                  },
137                  "httpMethod": "POST",
138                  "parameterOrder": [
139                    "parent"
140                  ],
141                  "parameters": {
142                    "parent": {
143                      "pattern": "^users/[^/]+/environments/[^/]+$",
144                      "required": true,
145                      "location": "path",
146                      "type": "string",
147                      "description": "Parent resource name, e.g. `users/me/environments/default`."
148                    }
149                  },
150                  "scopes": [
151                    "https://www.googleapis.com/auth/cloud-platform"
152                  ],
153                  "path": "v1alpha1/{+parent}/publicKeys",
154                  "id": "cloudshell.users.environments.publicKeys.create",
155                  "request": {
156                    "$ref": "CreatePublicKeyRequest"
157                  },
158                  "description": "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 format and content already exists, this will return the existing key."
159                },
160                "delete": {
161                  "response": {
162                    "$ref": "Empty"
163                  },
164                  "scopes": [
165                    "https://www.googleapis.com/auth/cloud-platform"
166                  ],
167                  "parameterOrder": [
168                    "name"
169                  ],
170                  "path": "v1alpha1/{+name}",
171                  "id": "cloudshell.users.environments.publicKeys.delete",
172                  "parameters": {
173                    "name": {
174                      "location": "path",
175                      "type": "string",
176                      "required": true,
177                      "pattern": "^users/[^/]+/environments/[^/]+/publicKeys/[^/]+$",
178                      "description": "Name of the resource to be deleted, e.g. `users/me/environments/default/publicKeys/my-key`."
179                    }
180                  },
181                  "flatPath": "v1alpha1/users/{usersId}/environments/{environmentsId}/publicKeys/{publicKeysId}",
182                  "httpMethod": "DELETE",
183                  "description": "Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key."
184                }
185              }
186            }
187          }
188        }
189      }
190    }
191  },
192  "description": "Allows users to start, configure, and connect to interactive shell sessions running in the cloud. ",
193  "auth": {
194    "oauth2": {
195      "scopes": {
196        "https://www.googleapis.com/auth/cloud-platform": {
197          "description": "View and manage your data across Google Cloud Platform services"
198        }
199      }
200    }
201  },
202  "basePath": "",
203  "documentationLink": "https://cloud.google.com/shell/docs/",
204  "rootUrl": "https://cloudshell.googleapis.com/",
205  "id": "cloudshell:v1alpha1",
206  "fullyEncodeReservedExpansion": true,
207  "title": "Cloud Shell API",
208  "protocol": "rest",
209  "version_module": true,
210  "discoveryVersion": "v1",
211  "version": "v1alpha1",
212  "canonicalName": "Cloud Shell",
213  "revision": "20200803",
214  "kind": "discovery#restDescription",
215  "mtlsRootUrl": "https://cloudshell.mtls.googleapis.com/",
216  "ownerName": "Google",
217  "servicePath": "",
218  "baseUrl": "https://cloudshell.googleapis.com/",
219  "parameters": {
220    "fields": {
221      "location": "query",
222      "description": "Selector specifying which fields to include in a partial response.",
223      "type": "string"
224    },
225    "alt": {
226      "description": "Data format for response.",
227      "default": "json",
228      "enumDescriptions": [
229        "Responses with Content-Type of application/json",
230        "Media download with context-dependent Content-Type",
231        "Responses with Content-Type of application/x-protobuf"
232      ],
233      "enum": [
234        "json",
235        "media",
236        "proto"
237      ],
238      "type": "string",
239      "location": "query"
240    },
241    "uploadType": {
242      "type": "string",
243      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
244      "location": "query"
245    },
246    "upload_protocol": {
247      "location": "query",
248      "type": "string",
249      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
250    },
251    "access_token": {
252      "type": "string",
253      "description": "OAuth access token.",
254      "location": "query"
255    },
256    "callback": {
257      "type": "string",
258      "description": "JSONP",
259      "location": "query"
260    },
261    "key": {
262      "location": "query",
263      "type": "string",
264      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
265    },
266    "quotaUser": {
267      "location": "query",
268      "type": "string",
269      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
270    },
271    "oauth_token": {
272      "description": "OAuth 2.0 token for the current user.",
273      "type": "string",
274      "location": "query"
275    },
276    "$.xgafv": {
277      "enumDescriptions": [
278        "v1 error format",
279        "v2 error format"
280      ],
281      "location": "query",
282      "enum": [
283        "1",
284        "2"
285      ],
286      "description": "V1 error format.",
287      "type": "string"
288    },
289    "prettyPrint": {
290      "default": "true",
291      "type": "boolean",
292      "description": "Returns response with indentations and line breaks.",
293      "location": "query"
294    }
295  },
296  "schemas": {
297    "CreatePublicKeyRequest": {
298      "properties": {
299        "key": {
300          "description": "Key that should be added to the environment.",
301          "$ref": "PublicKey"
302        }
303      },
304      "type": "object",
305      "id": "CreatePublicKeyRequest",
306      "description": "Request message for CreatePublicKey."
307    },
308    "StartEnvironmentMetadata": {
309      "properties": {
310        "state": {
311          "enumDescriptions": [
312            "The environment's start state is unknown.",
313            "The environment is in the process of being started, but no additional details are available.",
314            "Startup is waiting for the user's disk to be unarchived. This can happen when the user returns to Cloud Shell after not having used it for a while, and suggests that startup will take longer than normal.",
315            "Startup is waiting for a VM to be assigned to the environment. This should normally happen very quickly, but an environment might stay in this state for an extended period of time if the system is experiencing heavy load.",
316            "Startup is waiting for compute resources to be assigned to the environment. This should normally happen very quickly, but an environment might stay in this state for an extended period of time if the system is experiencing heavy load.",
317            "Startup has completed. If the start operation was successful, the user should be able to establish an SSH connection to their environment. Otherwise, the operation will contain details of the failure."
318          ],
319          "type": "string",
320          "description": "Current state of the environment being started.",
321          "enum": [
322            "STATE_UNSPECIFIED",
323            "STARTING",
324            "UNARCHIVING_DISK",
325            "AWAITING_VM",
326            "AWAITING_COMPUTE_RESOURCES",
327            "FINISHED"
328          ]
329        }
330      },
331      "description": "Message included in the metadata field of operations returned from StartEnvironment.",
332      "id": "StartEnvironmentMetadata",
333      "type": "object"
334    },
335    "PublicKey": {
336      "id": "PublicKey",
337      "description": "A public SSH key, corresponding to a private SSH key held by the client.",
338      "properties": {
339        "name": {
340          "type": "string",
341          "description": "Output only. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}/publicKeys/{key_id}`. `{owner_email}` is the email address of the user to whom the key belongs. `{environment_id}` is the identifier of the environment to which the key grants access. `{key_id}` is the unique identifier of the key. For example, `users/someone@example.com/environments/default/publicKeys/myKey`."
342        },
343        "key": {
344          "type": "string",
345          "description": "Required. Content of this key.",
346          "format": "byte"
347        },
348        "format": {
349          "type": "string",
350          "description": "Required. Format of this key's content.",
351          "enumDescriptions": [
352            "Unknown format. Do not use.",
353            "`ssh-dss` key format (see RFC4253).",
354            "`ssh-rsa` key format (see RFC4253).",
355            "`ecdsa-sha2-nistp256` key format (see RFC5656).",
356            "`ecdsa-sha2-nistp384` key format (see RFC5656).",
357            "`ecdsa-sha2-nistp521` key format (see RFC5656)."
358          ],
359          "enum": [
360            "FORMAT_UNSPECIFIED",
361            "SSH_DSS",
362            "SSH_RSA",
363            "ECDSA_SHA2_NISTP256",
364            "ECDSA_SHA2_NISTP384",
365            "ECDSA_SHA2_NISTP521"
366          ]
367        }
368      },
369      "type": "object"
370    },
371    "Status": {
372      "id": "Status",
373      "type": "object",
374      "properties": {
375        "message": {
376          "type": "string",
377          "description": "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."
378        },
379        "details": {
380          "type": "array",
381          "items": {
382            "type": "object",
383            "additionalProperties": {
384              "type": "any",
385              "description": "Properties of the object. Contains field @type with type URL."
386            }
387          },
388          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use."
389        },
390        "code": {
391          "description": "The status code, which should be an enum value of google.rpc.Code.",
392          "type": "integer",
393          "format": "int32"
394        }
395      },
396      "description": "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)."
397    },
398    "Operation": {
399      "id": "Operation",
400      "description": "This resource represents a long-running operation that is the result of a network API call.",
401      "type": "object",
402      "properties": {
403        "done": {
404          "type": "boolean",
405          "description": "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."
406        },
407        "response": {
408          "description": "The normal response of the operation in case of success. 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`.",
409          "additionalProperties": {
410            "type": "any",
411            "description": "Properties of the object. Contains field @type with type URL."
412          },
413          "type": "object"
414        },
415        "name": {
416          "description": "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}`.",
417          "type": "string"
418        },
419        "metadata": {
420          "additionalProperties": {
421            "description": "Properties of the object. Contains field @type with type URL.",
422            "type": "any"
423          },
424          "description": "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.",
425          "type": "object"
426        },
427        "error": {
428          "$ref": "Status",
429          "description": "The error result of the operation in case of failure or cancellation."
430        }
431      }
432    },
433    "Environment": {
434      "type": "object",
435      "id": "Environment",
436      "properties": {
437        "sshPort": {
438          "type": "integer",
439          "format": "int32",
440          "description": "Output only. Port to which clients can connect to initiate SSH sessions with the environment."
441        },
442        "webHost": {
443          "type": "string",
444          "description": "Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment."
445        },
446        "sshUsername": {
447          "description": "Output only. Username that clients should use when initiating SSH sessions with the environment.",
448          "type": "string"
449        },
450        "dockerImage": {
451          "type": "string",
452          "description": "Required. Full path to the Docker image used to run this environment, e.g. \"gcr.io/dev-con/cloud-devshell:latest\"."
453        },
454        "name": {
455          "description": "Output only. 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/someone@example.com/environments/default`.",
456          "type": "string"
457        },
458        "size": {
459          "type": "string",
460          "description": "Indicates the size of the backing VM running the environment. If set to something other than DEFAULT, it will be reverted to the default VM size after vm_size_expire_time.",
461          "enum": [
462            "VM_SIZE_UNSPECIFIED",
463            "DEFAULT",
464            "BOOSTED"
465          ],
466          "enumDescriptions": [
467            "The VM size is unknown.",
468            "The default VM size.",
469            "The boosted VM size."
470          ]
471        },
472        "state": {
473          "enumDescriptions": [
474            "The environment's states is unknown.",
475            "The environment is not running and can't be connected to. Starting the environment will transition it to the STARTING state.",
476            "The environment is being started but is not yet ready to accept connections.",
477            "The environment is running and ready to accept connections. It will automatically transition back to DISABLED after a period of inactivity or if another environment is started.",
478            "The environment is being deleted and can't be connected to."
479          ],
480          "enum": [
481            "STATE_UNSPECIFIED",
482            "DISABLED",
483            "STARTING",
484            "RUNNING",
485            "DELETING"
486          ],
487          "description": "Output only. Current execution state of this environment.",
488          "type": "string"
489        },
490        "webPorts": {
491          "description": "Output only. Ports to which clients can connect to initiate HTTPS or WSS connections with the environment.",
492          "type": "array",
493          "items": {
494            "format": "int32",
495            "type": "integer"
496          }
497        },
498        "sshHost": {
499          "type": "string",
500          "description": "Output only. Host to which clients can connect to initiate SSH sessions with the environment."
501        },
502        "id": {
503          "description": "Output only. The environment's identifier, unique among the user's environments.",
504          "type": "string"
505        },
506        "publicKeys": {
507          "items": {
508            "$ref": "PublicKey"
509          },
510          "type": "array",
511          "description": "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 CreatePublicKey and DeletePublicKey methods."
512        },
513        "vmSizeExpireTime": {
514          "description": "Output only. The time when the Environment will expire back to the default VM size.",
515          "format": "google-datetime",
516          "type": "string"
517        }
518      },
519      "description": "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's data that will remain across sessions. Each user has a single environment with the ID \"default\"."
520    },
521    "StartEnvironmentResponse": {
522      "id": "StartEnvironmentResponse",
523      "properties": {
524        "environment": {
525          "$ref": "Environment",
526          "description": "Environment that was started."
527        }
528      },
529      "type": "object",
530      "description": "Message included in the response field of operations returned from StartEnvironment once the operation is complete."
531    },
532    "StartEnvironmentRequest": {
533      "type": "object",
534      "id": "StartEnvironmentRequest",
535      "properties": {
536        "publicKeys": {
537          "items": {
538            "$ref": "PublicKey"
539          },
540          "description": "Public keys that should be added to the environment before it is started.",
541          "type": "array"
542        },
543        "accessToken": {
544          "type": "string",
545          "description": "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."
546        }
547      },
548      "description": "Request message for StartEnvironment."
549    },
550    "AuthorizeEnvironmentRequest": {
551      "description": "Request message for AuthorizeEnvironment.",
552      "properties": {
553        "expireTime": {
554          "type": "string",
555          "format": "google-datetime",
556          "description": "The time when the credentials expire. If not set, defaults to one hour from when the server received the request."
557        },
558        "idToken": {
559          "type": "string",
560          "description": "The OAuth ID token that should be sent to the environment."
561        },
562        "accessToken": {
563          "description": "The OAuth access token that should be sent to the environment.",
564          "type": "string"
565        }
566      },
567      "type": "object",
568      "id": "AuthorizeEnvironmentRequest"
569    },
570    "Empty": {
571      "properties": {},
572      "id": "Empty",
573      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
574      "type": "object"
575    }
576  },
577  "name": "cloudshell"
578}
579