1<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_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="#get">get(name, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets an environment. Returns NOT_FOUND if the environment does not exist.</p> 89<p class="toc_element"> 90 <code><a href="#removePublicKey">removePublicKey(environment, body=None, x__xgafv=None)</a></code></p> 91<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> 92<p class="toc_element"> 93 <code><a href="#start">start(name, body=None, x__xgafv=None)</a></code></p> 94<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> 95<h3>Method Details</h3> 96<div class="method"> 97 <code class="details" id="addPublicKey">addPublicKey(environment, body=None, x__xgafv=None)</code> 98 <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. 99 100Args: 101 environment: string, Environment this key should be added to, e.g. `users/me/environments/default`. (required) 102 body: object, The request body. 103 The object takes the form of: 104 105{ # Request message for AddPublicKey. 106 "key": "A String", # 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 <format> <content>, where <content> part is encoded with Base64. 107} 108 109 x__xgafv: string, V1 error format. 110 Allowed values 111 1 - v1 error format 112 2 - v2 error format 113 114Returns: 115 An object of the form: 116 117 { # This resource represents a long-running operation that is the result of a network API call. 118 "done": 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. 119 "error": { # 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. 120 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 121 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 122 { 123 "a_key": "", # Properties of the object. Contains field @type with type URL. 124 }, 125 ], 126 "message": "A String", # 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. 127 }, 128 "metadata": { # 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. 129 "a_key": "", # Properties of the object. Contains field @type with type URL. 130 }, 131 "name": "A String", # 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}`. 132 "response": { # 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`. 133 "a_key": "", # Properties of the object. Contains field @type with type URL. 134 }, 135}</pre> 136</div> 137 138<div class="method"> 139 <code class="details" id="authorize">authorize(name, body=None, x__xgafv=None)</code> 140 <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. 141 142Args: 143 name: string, Name of the resource that should receive the credentials, for example `users/me/environments/default` or `users/someone@example.com/environments/default`. (required) 144 body: object, The request body. 145 The object takes the form of: 146 147{ # Request message for AuthorizeEnvironment. 148 "accessToken": "A String", # The OAuth access token that should be sent to the environment. 149 "expireTime": "A String", # The time when the credentials expire. If not set, defaults to one hour from when the server received the request. 150 "idToken": "A String", # The OAuth ID token that should be sent to the environment. 151} 152 153 x__xgafv: string, V1 error format. 154 Allowed values 155 1 - v1 error format 156 2 - v2 error format 157 158Returns: 159 An object of the form: 160 161 { # This resource represents a long-running operation that is the result of a network API call. 162 "done": 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. 163 "error": { # 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. 164 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 165 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 166 { 167 "a_key": "", # Properties of the object. Contains field @type with type URL. 168 }, 169 ], 170 "message": "A String", # 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. 171 }, 172 "metadata": { # 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. 173 "a_key": "", # Properties of the object. Contains field @type with type URL. 174 }, 175 "name": "A String", # 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}`. 176 "response": { # 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`. 177 "a_key": "", # Properties of the object. Contains field @type with type URL. 178 }, 179}</pre> 180</div> 181 182<div class="method"> 183 <code class="details" id="close">close()</code> 184 <pre>Close httplib2 connections.</pre> 185</div> 186 187<div class="method"> 188 <code class="details" id="get">get(name, x__xgafv=None)</code> 189 <pre>Gets an environment. Returns NOT_FOUND if the environment does not exist. 190 191Args: 192 name: string, Required. Name of the requested resource, for example `users/me/environments/default` or `users/someone@example.com/environments/default`. (required) 193 x__xgafv: string, V1 error format. 194 Allowed values 195 1 - v1 error format 196 2 - v2 error format 197 198Returns: 199 An object of the form: 200 201 { # 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 at least an environment with the ID "default". 202 "dockerImage": "A String", # Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest". 203 "id": "A String", # Output only. The environment's identifier, unique among the user's environments. 204 "name": "A String", # 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/someone@example.com/environments/default`. 205 "publicKeys": [ # 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. 206 "A String", 207 ], 208 "sshHost": "A String", # Output only. Host to which clients can connect to initiate SSH sessions with the environment. 209 "sshPort": 42, # Output only. Port to which clients can connect to initiate SSH sessions with the environment. 210 "sshUsername": "A String", # Output only. Username that clients should use when initiating SSH sessions with the environment. 211 "state": "A String", # Output only. Current execution state of this environment. 212 "webHost": "A String", # Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment. 213}</pre> 214</div> 215 216<div class="method"> 217 <code class="details" id="removePublicKey">removePublicKey(environment, body=None, x__xgafv=None)</code> 218 <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. 219 220Args: 221 environment: string, Environment this key should be removed from, e.g. `users/me/environments/default`. (required) 222 body: object, The request body. 223 The object takes the form of: 224 225{ # Request message for RemovePublicKey. 226 "key": "A String", # Key that should be removed from the environment. 227} 228 229 x__xgafv: string, V1 error format. 230 Allowed values 231 1 - v1 error format 232 2 - v2 error format 233 234Returns: 235 An object of the form: 236 237 { # This resource represents a long-running operation that is the result of a network API call. 238 "done": 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. 239 "error": { # 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. 240 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 241 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 242 { 243 "a_key": "", # Properties of the object. Contains field @type with type URL. 244 }, 245 ], 246 "message": "A String", # 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. 247 }, 248 "metadata": { # 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. 249 "a_key": "", # Properties of the object. Contains field @type with type URL. 250 }, 251 "name": "A String", # 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}`. 252 "response": { # 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`. 253 "a_key": "", # Properties of the object. Contains field @type with type URL. 254 }, 255}</pre> 256</div> 257 258<div class="method"> 259 <code class="details" id="start">start(name, body=None, x__xgafv=None)</code> 260 <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. 261 262Args: 263 name: string, Name of the resource that should be started, for example `users/me/environments/default` or `users/someone@example.com/environments/default`. (required) 264 body: object, The request body. 265 The object takes the form of: 266 267{ # Request message for StartEnvironment. 268 "accessToken": "A String", # 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. 269 "publicKeys": [ # Public keys that should be added to the environment before it is started. 270 "A String", 271 ], 272} 273 274 x__xgafv: string, V1 error format. 275 Allowed values 276 1 - v1 error format 277 2 - v2 error format 278 279Returns: 280 An object of the form: 281 282 { # This resource represents a long-running operation that is the result of a network API call. 283 "done": 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. 284 "error": { # 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. 285 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 286 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 287 { 288 "a_key": "", # Properties of the object. Contains field @type with type URL. 289 }, 290 ], 291 "message": "A String", # 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. 292 }, 293 "metadata": { # 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. 294 "a_key": "", # Properties of the object. Contains field @type with type URL. 295 }, 296 "name": "A String", # 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}`. 297 "response": { # 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`. 298 "a_key": "", # Properties of the object. Contains field @type with type URL. 299 }, 300}</pre> 301</div> 302 303</body></html>