aws_sdk_ssm/operation/start_session/_start_session_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartSessionOutput {
6 /// <p>The ID of the session.</p>
7 pub session_id: ::std::option::Option<::std::string::String>,
8 /// <p>An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.</p>
9 pub token_value: ::std::option::Option<::std::string::String>,
10 /// <p>A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and receive output from the node. Format: <code>wss://ssmmessages.<b>region</b>.amazonaws.com/v1/data-channel/<b>session-id</b>?stream=(input|output)</code></p>
11 /// <p><b>region</b> represents the Region identifier for an Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as <code>us-east-2</code> for the US East (Ohio) Region. For a list of supported <b>region</b> values, see the <b>Region</b> column in <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region">Systems Manager service endpoints</a> in the <i>Amazon Web Services General Reference</i>.</p>
12 /// <p><b>session-id</b> represents the ID of a Session Manager session, such as <code>1a2b3c4dEXAMPLE</code>.</p>
13 pub stream_url: ::std::option::Option<::std::string::String>,
14 _request_id: Option<String>,
15}
16impl StartSessionOutput {
17 /// <p>The ID of the session.</p>
18 pub fn session_id(&self) -> ::std::option::Option<&str> {
19 self.session_id.as_deref()
20 }
21 /// <p>An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.</p>
22 pub fn token_value(&self) -> ::std::option::Option<&str> {
23 self.token_value.as_deref()
24 }
25 /// <p>A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and receive output from the node. Format: <code>wss://ssmmessages.<b>region</b>.amazonaws.com/v1/data-channel/<b>session-id</b>?stream=(input|output)</code></p>
26 /// <p><b>region</b> represents the Region identifier for an Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as <code>us-east-2</code> for the US East (Ohio) Region. For a list of supported <b>region</b> values, see the <b>Region</b> column in <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region">Systems Manager service endpoints</a> in the <i>Amazon Web Services General Reference</i>.</p>
27 /// <p><b>session-id</b> represents the ID of a Session Manager session, such as <code>1a2b3c4dEXAMPLE</code>.</p>
28 pub fn stream_url(&self) -> ::std::option::Option<&str> {
29 self.stream_url.as_deref()
30 }
31}
32impl ::aws_types::request_id::RequestId for StartSessionOutput {
33 fn request_id(&self) -> Option<&str> {
34 self._request_id.as_deref()
35 }
36}
37impl StartSessionOutput {
38 /// Creates a new builder-style object to manufacture [`StartSessionOutput`](crate::operation::start_session::StartSessionOutput).
39 pub fn builder() -> crate::operation::start_session::builders::StartSessionOutputBuilder {
40 crate::operation::start_session::builders::StartSessionOutputBuilder::default()
41 }
42}
43
44/// A builder for [`StartSessionOutput`](crate::operation::start_session::StartSessionOutput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct StartSessionOutputBuilder {
48 pub(crate) session_id: ::std::option::Option<::std::string::String>,
49 pub(crate) token_value: ::std::option::Option<::std::string::String>,
50 pub(crate) stream_url: ::std::option::Option<::std::string::String>,
51 _request_id: Option<String>,
52}
53impl StartSessionOutputBuilder {
54 /// <p>The ID of the session.</p>
55 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.session_id = ::std::option::Option::Some(input.into());
57 self
58 }
59 /// <p>The ID of the session.</p>
60 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.session_id = input;
62 self
63 }
64 /// <p>The ID of the session.</p>
65 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
66 &self.session_id
67 }
68 /// <p>An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.</p>
69 pub fn token_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.token_value = ::std::option::Option::Some(input.into());
71 self
72 }
73 /// <p>An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.</p>
74 pub fn set_token_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.token_value = input;
76 self
77 }
78 /// <p>An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.</p>
79 pub fn get_token_value(&self) -> &::std::option::Option<::std::string::String> {
80 &self.token_value
81 }
82 /// <p>A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and receive output from the node. Format: <code>wss://ssmmessages.<b>region</b>.amazonaws.com/v1/data-channel/<b>session-id</b>?stream=(input|output)</code></p>
83 /// <p><b>region</b> represents the Region identifier for an Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as <code>us-east-2</code> for the US East (Ohio) Region. For a list of supported <b>region</b> values, see the <b>Region</b> column in <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region">Systems Manager service endpoints</a> in the <i>Amazon Web Services General Reference</i>.</p>
84 /// <p><b>session-id</b> represents the ID of a Session Manager session, such as <code>1a2b3c4dEXAMPLE</code>.</p>
85 pub fn stream_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.stream_url = ::std::option::Option::Some(input.into());
87 self
88 }
89 /// <p>A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and receive output from the node. Format: <code>wss://ssmmessages.<b>region</b>.amazonaws.com/v1/data-channel/<b>session-id</b>?stream=(input|output)</code></p>
90 /// <p><b>region</b> represents the Region identifier for an Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as <code>us-east-2</code> for the US East (Ohio) Region. For a list of supported <b>region</b> values, see the <b>Region</b> column in <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region">Systems Manager service endpoints</a> in the <i>Amazon Web Services General Reference</i>.</p>
91 /// <p><b>session-id</b> represents the ID of a Session Manager session, such as <code>1a2b3c4dEXAMPLE</code>.</p>
92 pub fn set_stream_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.stream_url = input;
94 self
95 }
96 /// <p>A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and receive output from the node. Format: <code>wss://ssmmessages.<b>region</b>.amazonaws.com/v1/data-channel/<b>session-id</b>?stream=(input|output)</code></p>
97 /// <p><b>region</b> represents the Region identifier for an Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as <code>us-east-2</code> for the US East (Ohio) Region. For a list of supported <b>region</b> values, see the <b>Region</b> column in <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region">Systems Manager service endpoints</a> in the <i>Amazon Web Services General Reference</i>.</p>
98 /// <p><b>session-id</b> represents the ID of a Session Manager session, such as <code>1a2b3c4dEXAMPLE</code>.</p>
99 pub fn get_stream_url(&self) -> &::std::option::Option<::std::string::String> {
100 &self.stream_url
101 }
102 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
103 self._request_id = Some(request_id.into());
104 self
105 }
106
107 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
108 self._request_id = request_id;
109 self
110 }
111 /// Consumes the builder and constructs a [`StartSessionOutput`](crate::operation::start_session::StartSessionOutput).
112 pub fn build(self) -> crate::operation::start_session::StartSessionOutput {
113 crate::operation::start_session::StartSessionOutput {
114 session_id: self.session_id,
115 token_value: self.token_value,
116 stream_url: self.stream_url,
117 _request_id: self._request_id,
118 }
119 }
120}