Class: Google::Apis::CloudshellV1::Environment
- Inherits:
-
Object
- Object
- Google::Apis::CloudshellV1::Environment
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudshell_v1/classes.rb,
lib/google/apis/cloudshell_v1/representations.rb,
lib/google/apis/cloudshell_v1/representations.rb
Overview
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".
Instance Attribute Summary collapse
-
#docker_image ⇒ String
Required.
-
#id ⇒ String
Output only.
-
#name ⇒ String
Immutable.
-
#public_keys ⇒ Array<String>
Output only.
-
#ssh_host ⇒ String
Output only.
-
#ssh_port ⇒ Fixnum
Output only.
-
#ssh_username ⇒ String
Output only.
-
#state ⇒ String
Output only.
-
#web_host ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Environment
constructor
A new instance of Environment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Environment
Returns a new instance of Environment.
263 264 265 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 263 def initialize(**args) update!(**args) end |
Instance Attribute Details
#docker_image ⇒ String
Required. Immutable. Full path to the Docker image used to run this
environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".
Corresponds to the JSON property dockerImage
209 210 211 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 209 def docker_image @docker_image end |
#id ⇒ String
Output only. The environment's identifier, unique among the user's
environments.
Corresponds to the JSON property id
215 216 217 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 215 def id @id end |
#name ⇒ String
Immutable. Full name of this resource, in the format users/
owner_email/
environments/
environment_id.
owner_emailis 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.
Corresponds to the JSON property
name`
224 225 226 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 224 def name @name end |
#public_keys ⇒ Array<String>
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.
Corresponds to the JSON property publicKeys
232 233 234 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 232 def public_keys @public_keys end |
#ssh_host ⇒ String
Output only. Host to which clients can connect to initiate SSH sessions with
the environment.
Corresponds to the JSON property sshHost
238 239 240 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 238 def ssh_host @ssh_host end |
#ssh_port ⇒ Fixnum
Output only. Port to which clients can connect to initiate SSH sessions with
the environment.
Corresponds to the JSON property sshPort
244 245 246 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 244 def ssh_port @ssh_port end |
#ssh_username ⇒ String
Output only. Username that clients should use when initiating SSH sessions
with the environment.
Corresponds to the JSON property sshUsername
250 251 252 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 250 def ssh_username @ssh_username end |
#state ⇒ String
Output only. Current execution state of this environment.
Corresponds to the JSON property state
255 256 257 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 255 def state @state end |
#web_host ⇒ String
Output only. Host to which clients can connect to initiate HTTPS or WSS
connections with the environment.
Corresponds to the JSON property webHost
261 262 263 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 261 def web_host @web_host end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/google/apis/cloudshell_v1/classes.rb', line 268 def update!(**args) @docker_image = args[:docker_image] if args.key?(:docker_image) @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) @public_keys = args[:public_keys] if args.key?(:public_keys) @ssh_host = args[:ssh_host] if args.key?(:ssh_host) @ssh_port = args[:ssh_port] if args.key?(:ssh_port) @ssh_username = args[:ssh_username] if args.key?(:ssh_username) @state = args[:state] if args.key?(:state) @web_host = args[:web_host] if args.key?(:web_host) end |