Class: Google::Apis::CloudshellV1::Environment

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudshell_v1/classes.rb,
generated/google/apis/cloudshell_v1/representations.rb,
generated/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 a single environment with the ID "default".

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Environment

Returns a new instance of Environment



140
141
142
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 140

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#docker_imageString

Required. 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

Returns:

  • (String)


68
69
70
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 68

def docker_image
  @docker_image
end

#https_portsArray<Fixnum>

Output only. List of ports users can connect to on the environment. Corresponds to the JSON property httpsPorts

Returns:

  • (Array<Fixnum>)


73
74
75
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 73

def https_ports
  @https_ports
end

#idString

Output only. The environment's identifier, which is always "default". Corresponds to the JSON property id

Returns:

  • (String)


78
79
80
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 78

def id
  @id
end

#nameString

Output only. 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 propertyname`

Returns:

  • (String)


87
88
89
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 87

def name
  @name
end

#public_keysArray<Google::Apis::CloudshellV1::PublicKey>

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. Corresponds to the JSON property publicKeys



96
97
98
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 96

def public_keys
  @public_keys
end

#sizeString

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. Corresponds to the JSON property size

Returns:

  • (String)


103
104
105
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 103

def size
  @size
end

#ssh_hostString

Output only. Host to which clients can connect to initiate SSH sessions with the environment. Corresponds to the JSON property sshHost

Returns:

  • (String)


109
110
111
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 109

def ssh_host
  @ssh_host
end

#ssh_portFixnum

Output only. Port to which clients can connect to initiate SSH sessions with the environment. Corresponds to the JSON property sshPort

Returns:

  • (Fixnum)


115
116
117
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 115

def ssh_port
  @ssh_port
end

#ssh_usernameString

Output only. Username that clients should use when initiating SSH sessions with the environment. Corresponds to the JSON property sshUsername

Returns:

  • (String)


121
122
123
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 121

def ssh_username
  @ssh_username
end

#stateString

Output only. Current execution state of this environment. Corresponds to the JSON property state

Returns:

  • (String)


126
127
128
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 126

def state
  @state
end

#vm_size_expire_timeString

Output only. The time when the Environment will expire back to the default VM size. Corresponds to the JSON property vmSizeExpireTime

Returns:

  • (String)


132
133
134
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 132

def vm_size_expire_time
  @vm_size_expire_time
end

#web_hostString

Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment. Corresponds to the JSON property webHost

Returns:

  • (String)


138
139
140
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 138

def web_host
  @web_host
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'generated/google/apis/cloudshell_v1/classes.rb', line 145

def update!(**args)
  @docker_image = args[:docker_image] if args.key?(:docker_image)
  @https_ports = args[:https_ports] if args.key?(:https_ports)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @public_keys = args[:public_keys] if args.key?(:public_keys)
  @size = args[:size] if args.key?(:size)
  @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)
  @vm_size_expire_time = args[:vm_size_expire_time] if args.key?(:vm_size_expire_time)
  @web_host = args[:web_host] if args.key?(:web_host)
end