#[non_exhaustive]pub struct Environment {
pub name: String,
pub id: String,
pub docker_image: String,
pub state: State,
pub web_host: String,
pub ssh_username: String,
pub ssh_host: String,
pub ssh_port: i32,
pub public_keys: Vec<String>,
/* private fields */
}Expand 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 at least an environment with the ID “default”.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringImmutable. 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.
id: StringOutput only. The environment’s identifier, unique among the user’s environments.
docker_image: StringRequired. Immutable. Full path to the Docker image used to run this environment, e.g. “gcr.io/dev-con/cloud-devshell:latest”.
state: StateOutput only. Current execution state of this environment.
web_host: StringOutput only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
ssh_username: StringOutput only. Username that clients should use when initiating SSH sessions with the environment.
ssh_host: StringOutput only. Host to which clients can connect to initiate SSH sessions with the environment.
ssh_port: i32Output only. Port to which clients can connect to initiate SSH sessions with the environment.
public_keys: Vec<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.
Implementations§
Source§impl Environment
impl Environment
pub fn new() -> Self
Sourcepub fn set_docker_image<T: Into<String>>(self, v: T) -> Self
pub fn set_docker_image<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_web_host<T: Into<String>>(self, v: T) -> Self
pub fn set_web_host<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_ssh_username<T: Into<String>>(self, v: T) -> Self
pub fn set_ssh_username<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_ssh_host<T: Into<String>>(self, v: T) -> Self
pub fn set_ssh_host<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_ssh_port<T: Into<i32>>(self, v: T) -> Self
pub fn set_ssh_port<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_public_keys<T, V>(self, v: T) -> Self
pub fn set_public_keys<T, V>(self, v: T) -> Self
Sets the value of public_keys.
§Example
let x = Environment::new().set_public_keys(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more