1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Information about a Session Manager connection to a managed node.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct Session {
|
7 + | /// <p>The ID of the session.</p>
|
8 + | pub session_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The managed node that the Session Manager session connected to.</p>
|
10 + | pub target: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>The status of the session. For example, "Connected" or "Terminated".</p>
|
12 + | pub status: ::std::option::Option<crate::types::SessionStatus>,
|
13 + | /// <p>The date and time, in ISO-8601 Extended format, when the session began.</p>
|
14 + | pub start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
15 + | /// <p>The date and time, in ISO-8601 Extended format, when the session was terminated.</p>
|
16 + | pub end_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
17 + | /// <p>The name of the Session Manager SSM document used to define the parameters and plugin settings for the session. For example, <code>SSM-SessionManagerRunShell</code>.</p>
|
18 + | pub document_name: ::std::option::Option<::std::string::String>,
|
19 + | /// <p>The ID of the Amazon Web Services user that started the session.</p>
|
20 + | pub owner: ::std::option::Option<::std::string::String>,
|
21 + | /// <p>The reason for connecting to the instance.</p>
|
22 + | pub reason: ::std::option::Option<::std::string::String>,
|
23 + | /// <p>Reserved for future use.</p>
|
24 + | pub details: ::std::option::Option<::std::string::String>,
|
25 + | /// <p>Reserved for future use.</p>
|
26 + | pub output_url: ::std::option::Option<crate::types::SessionManagerOutputUrl>,
|
27 + | /// <p>The maximum duration of a session before it terminates.</p>
|
28 + | pub max_session_duration: ::std::option::Option<::std::string::String>,
|
29 + | /// <p><code>Standard</code> access type is the default for Session Manager sessions. <code>JustInTime</code> is the access type for <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-just-in-time-node-access.html">Just-in-time node access</a>.</p>
|
30 + | pub access_type: ::std::option::Option<crate::types::AccessType>,
|
31 + | }
|
32 + | impl Session {
|
33 + | /// <p>The ID of the session.</p>
|
34 + | pub fn session_id(&self) -> ::std::option::Option<&str> {
|
35 + | self.session_id.as_deref()
|
36 + | }
|
37 + | /// <p>The managed node that the Session Manager session connected to.</p>
|
38 + | pub fn target(&self) -> ::std::option::Option<&str> {
|
39 + | self.target.as_deref()
|
40 + | }
|
41 + | /// <p>The status of the session. For example, "Connected" or "Terminated".</p>
|
42 + | pub fn status(&self) -> ::std::option::Option<&crate::types::SessionStatus> {
|
43 + | self.status.as_ref()
|
44 + | }
|
45 + | /// <p>The date and time, in ISO-8601 Extended format, when the session began.</p>
|
46 + | pub fn start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
47 + | self.start_date.as_ref()
|
48 + | }
|
49 + | /// <p>The date and time, in ISO-8601 Extended format, when the session was terminated.</p>
|
50 + | pub fn end_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
51 + | self.end_date.as_ref()
|
52 + | }
|
53 + | /// <p>The name of the Session Manager SSM document used to define the parameters and plugin settings for the session. For example, <code>SSM-SessionManagerRunShell</code>.</p>
|
54 + | pub fn document_name(&self) -> ::std::option::Option<&str> {
|
55 + | self.document_name.as_deref()
|
56 + | }
|
57 + | /// <p>The ID of the Amazon Web Services user that started the session.</p>
|
58 + | pub fn owner(&self) -> ::std::option::Option<&str> {
|
59 + | self.owner.as_deref()
|
60 + | }
|
61 + | /// <p>The reason for connecting to the instance.</p>
|
62 + | pub fn reason(&self) -> ::std::option::Option<&str> {
|
63 + | self.reason.as_deref()
|
64 + | }
|
65 + | /// <p>Reserved for future use.</p>
|
66 + | pub fn details(&self) -> ::std::option::Option<&str> {
|
67 + | self.details.as_deref()
|
68 + | }
|
69 + | /// <p>Reserved for future use.</p>
|
70 + | pub fn output_url(&self) -> ::std::option::Option<&crate::types::SessionManagerOutputUrl> {
|
71 + | self.output_url.as_ref()
|
72 + | }
|
73 + | /// <p>The maximum duration of a session before it terminates.</p>
|
74 + | pub fn max_session_duration(&self) -> ::std::option::Option<&str> {
|
75 + | self.max_session_duration.as_deref()
|
76 + | }
|
77 + | /// <p><code>Standard</code> access type is the default for Session Manager sessions. <code>JustInTime</code> is the access type for <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-just-in-time-node-access.html">Just-in-time node access</a>.</p>
|
78 + | pub fn access_type(&self) -> ::std::option::Option<&crate::types::AccessType> {
|
79 + | self.access_type.as_ref()
|
80 + | }
|
81 + | }
|
82 + | static SESSION_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
83 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$SessionId", "com.amazonaws.ssm", "Session"),
|
84 + | ::aws_smithy_schema::ShapeType::String,
|
85 + | "SessionId",
|
86 + | 0,
|
87 + | );
|
88 + | static SESSION_MEMBER_TARGET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
89 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$Target", "com.amazonaws.ssm", "Session"),
|
90 + | ::aws_smithy_schema::ShapeType::String,
|
91 + | "Target",
|
92 + | 1,
|
93 + | );
|
94 + | static SESSION_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
95 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$Status", "com.amazonaws.ssm", "Session"),
|
96 + | ::aws_smithy_schema::ShapeType::String,
|
97 + | "Status",
|
98 + | 2,
|
99 + | );
|
100 + | static SESSION_MEMBER_START_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
101 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$StartDate", "com.amazonaws.ssm", "Session"),
|
102 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
103 + | "StartDate",
|
104 + | 3,
|
105 + | );
|
106 + | static SESSION_MEMBER_END_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
107 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$EndDate", "com.amazonaws.ssm", "Session"),
|
108 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
109 + | "EndDate",
|
110 + | 4,
|
111 + | );
|
112 + | static SESSION_MEMBER_DOCUMENT_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$DocumentName", "com.amazonaws.ssm", "Session"),
|
114 + | ::aws_smithy_schema::ShapeType::String,
|
115 + | "DocumentName",
|
116 + | 5,
|
117 + | );
|
118 + | static SESSION_MEMBER_OWNER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
119 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$Owner", "com.amazonaws.ssm", "Session"),
|
120 + | ::aws_smithy_schema::ShapeType::String,
|
121 + | "Owner",
|
122 + | 6,
|
123 + | );
|
124 + | static SESSION_MEMBER_REASON: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
125 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$Reason", "com.amazonaws.ssm", "Session"),
|
126 + | ::aws_smithy_schema::ShapeType::String,
|
127 + | "Reason",
|
128 + | 7,
|
129 + | );
|
130 + | static SESSION_MEMBER_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
131 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$Details", "com.amazonaws.ssm", "Session"),
|
132 + | ::aws_smithy_schema::ShapeType::String,
|
133 + | "Details",
|
134 + | 8,
|
135 + | );
|
136 + | static SESSION_MEMBER_OUTPUT_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
137 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$OutputUrl", "com.amazonaws.ssm", "Session"),
|
138 + | ::aws_smithy_schema::ShapeType::Structure,
|
139 + | "OutputUrl",
|
140 + | 9,
|
141 + | );
|
142 + | static SESSION_MEMBER_MAX_SESSION_DURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
143 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$MaxSessionDuration", "com.amazonaws.ssm", "Session"),
|
144 + | ::aws_smithy_schema::ShapeType::String,
|
145 + | "MaxSessionDuration",
|
146 + | 10,
|
147 + | );
|
148 + | static SESSION_MEMBER_ACCESS_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
149 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session$AccessType", "com.amazonaws.ssm", "Session"),
|
150 + | ::aws_smithy_schema::ShapeType::String,
|
151 + | "AccessType",
|
152 + | 11,
|
153 + | );
|
154 + | static SESSION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
155 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Session", "com.amazonaws.ssm", "Session"),
|
156 + | ::aws_smithy_schema::ShapeType::Structure,
|
157 + | &[
|
158 + | &SESSION_MEMBER_SESSION_ID,
|
159 + | &SESSION_MEMBER_TARGET,
|
160 + | &SESSION_MEMBER_STATUS,
|
161 + | &SESSION_MEMBER_START_DATE,
|
162 + | &SESSION_MEMBER_END_DATE,
|
163 + | &SESSION_MEMBER_DOCUMENT_NAME,
|
164 + | &SESSION_MEMBER_OWNER,
|
165 + | &SESSION_MEMBER_REASON,
|
166 + | &SESSION_MEMBER_DETAILS,
|
167 + | &SESSION_MEMBER_OUTPUT_URL,
|
168 + | &SESSION_MEMBER_MAX_SESSION_DURATION,
|
169 + | &SESSION_MEMBER_ACCESS_TYPE,
|
170 + | ],
|
171 + | );
|
172 + | impl Session {
|
173 + | /// The schema for this shape.
|
174 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SESSION_SCHEMA;
|
175 + | }
|
176 + | impl ::aws_smithy_schema::serde::SerializableStruct for Session {
|
177 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
178 + | fn serialize_members(
|
179 + | &self,
|
180 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
181 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
182 + | if let Some(ref val) = self.session_id {
|
183 + | ser.write_string(&SESSION_MEMBER_SESSION_ID, val)?;
|
184 + | }
|
185 + | if let Some(ref val) = self.target {
|
186 + | ser.write_string(&SESSION_MEMBER_TARGET, val)?;
|
187 + | }
|
188 + | if let Some(ref val) = self.status {
|
189 + | ser.write_string(&SESSION_MEMBER_STATUS, val.as_str())?;
|
190 + | }
|
191 + | if let Some(ref val) = self.start_date {
|
192 + | ser.write_timestamp(&SESSION_MEMBER_START_DATE, val)?;
|
193 + | }
|
194 + | if let Some(ref val) = self.end_date {
|
195 + | ser.write_timestamp(&SESSION_MEMBER_END_DATE, val)?;
|
196 + | }
|
197 + | if let Some(ref val) = self.document_name {
|
198 + | ser.write_string(&SESSION_MEMBER_DOCUMENT_NAME, val)?;
|
199 + | }
|
200 + | if let Some(ref val) = self.owner {
|
201 + | ser.write_string(&SESSION_MEMBER_OWNER, val)?;
|
202 + | }
|
203 + | if let Some(ref val) = self.reason {
|
204 + | ser.write_string(&SESSION_MEMBER_REASON, val)?;
|
205 + | }
|
206 + | if let Some(ref val) = self.details {
|
207 + | ser.write_string(&SESSION_MEMBER_DETAILS, val)?;
|
208 + | }
|
209 + | if let Some(ref val) = self.output_url {
|
210 + | ser.write_struct(&SESSION_MEMBER_OUTPUT_URL, val)?;
|
211 + | }
|
212 + | if let Some(ref val) = self.max_session_duration {
|
213 + | ser.write_string(&SESSION_MEMBER_MAX_SESSION_DURATION, val)?;
|
214 + | }
|
215 + | if let Some(ref val) = self.access_type {
|
216 + | ser.write_string(&SESSION_MEMBER_ACCESS_TYPE, val.as_str())?;
|
217 + | }
|
218 + | Ok(())
|
219 + | }
|
220 + | }
|
221 + | impl Session {
|
222 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
223 + | pub fn deserialize(
|
224 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
225 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
226 + | #[allow(unused_variables, unused_mut)]
|
227 + | let mut builder = Self::builder();
|
228 + | #[allow(
|
229 + | unused_variables,
|
230 + | unreachable_code,
|
231 + | clippy::single_match,
|
232 + | clippy::match_single_binding,
|
233 + | clippy::diverging_sub_expression
|
234 + | )]
|
235 + | deserializer.read_struct(&SESSION_SCHEMA, &mut |member, deser| {
|
236 + | match member.member_index() {
|
237 + | Some(0) => {
|
238 + | if deser.is_null() {
|
239 + | deser.read_null()?;
|
240 + | } else {
|
241 + | builder.session_id = Some(deser.read_string(member)?);
|
242 + | }
|
243 + | }
|
244 + | Some(1) => {
|
245 + | if deser.is_null() {
|
246 + | deser.read_null()?;
|
247 + | } else {
|
248 + | builder.target = Some(deser.read_string(member)?);
|
249 + | }
|
250 + | }
|
251 + | Some(2) => {
|
252 + | if deser.is_null() {
|
253 + | deser.read_null()?;
|
254 + | } else {
|
255 + | builder.status = Some(crate::types::SessionStatus::from(deser.read_string(member)?.as_str()));
|
256 + | }
|
257 + | }
|
258 + | Some(3) => {
|
259 + | if deser.is_null() {
|
260 + | deser.read_null()?;
|
261 + | } else {
|
262 + | builder.start_date = Some(deser.read_timestamp(member)?);
|
263 + | }
|
264 + | }
|
265 + | Some(4) => {
|
266 + | if deser.is_null() {
|
267 + | deser.read_null()?;
|
268 + | } else {
|
269 + | builder.end_date = Some(deser.read_timestamp(member)?);
|
270 + | }
|
271 + | }
|
272 + | Some(5) => {
|
273 + | if deser.is_null() {
|
274 + | deser.read_null()?;
|
275 + | } else {
|
276 + | builder.document_name = Some(deser.read_string(member)?);
|
277 + | }
|
278 + | }
|
279 + | Some(6) => {
|
280 + | if deser.is_null() {
|
281 + | deser.read_null()?;
|
282 + | } else {
|
283 + | builder.owner = Some(deser.read_string(member)?);
|
284 + | }
|
285 + | }
|
286 + | Some(7) => {
|
287 + | if deser.is_null() {
|
288 + | deser.read_null()?;
|
289 + | } else {
|
290 + | builder.reason = Some(deser.read_string(member)?);
|
291 + | }
|
292 + | }
|
293 + | Some(8) => {
|
294 + | if deser.is_null() {
|
295 + | deser.read_null()?;
|
296 + | } else {
|
297 + | builder.details = Some(deser.read_string(member)?);
|
298 + | }
|
299 + | }
|
300 + | Some(9) => {
|
301 + | if deser.is_null() {
|
302 + | deser.read_null()?;
|
303 + | } else {
|
304 + | builder.output_url = Some(crate::types::SessionManagerOutputUrl::deserialize(deser)?);
|
305 + | }
|
306 + | }
|
307 + | Some(10) => {
|
308 + | if deser.is_null() {
|
309 + | deser.read_null()?;
|
310 + | } else {
|
311 + | builder.max_session_duration = Some(deser.read_string(member)?);
|
312 + | }
|
313 + | }
|
314 + | Some(11) => {
|
315 + | if deser.is_null() {
|
316 + | deser.read_null()?;
|
317 + | } else {
|
318 + | builder.access_type = Some(crate::types::AccessType::from(deser.read_string(member)?.as_str()));
|
319 + | }
|
320 + | }
|
321 + | _ => {}
|
322 + | }
|
323 + | Ok(())
|
324 + | })?;
|
325 + | Ok(builder.build())
|
326 + | }
|
327 + | }
|
328 + | impl Session {
|
329 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
330 + | pub fn deserialize_with_response(
|
331 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
332 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
333 + | _status: u16,
|
334 + | _body: &[u8],
|
335 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
336 + | Self::deserialize(deserializer)
|
337 + | }
|
338 + | }
|
339 + | impl Session {
|
340 + | /// Creates a new builder-style object to manufacture [`Session`](crate::types::Session).
|
341 + | pub fn builder() -> crate::types::builders::SessionBuilder {
|
342 + | crate::types::builders::SessionBuilder::default()
|
343 + | }
|
344 + | }
|
345 + |
|
346 + | /// A builder for [`Session`](crate::types::Session).
|
347 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
348 + | #[non_exhaustive]
|
349 + | pub struct SessionBuilder {
|
350 + | pub(crate) session_id: ::std::option::Option<::std::string::String>,
|
351 + | pub(crate) target: ::std::option::Option<::std::string::String>,
|
352 + | pub(crate) status: ::std::option::Option<crate::types::SessionStatus>,
|
353 + | pub(crate) start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
354 + | pub(crate) end_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
355 + | pub(crate) document_name: ::std::option::Option<::std::string::String>,
|
356 + | pub(crate) owner: ::std::option::Option<::std::string::String>,
|
357 + | pub(crate) reason: ::std::option::Option<::std::string::String>,
|
358 + | pub(crate) details: ::std::option::Option<::std::string::String>,
|
359 + | pub(crate) output_url: ::std::option::Option<crate::types::SessionManagerOutputUrl>,
|
360 + | pub(crate) max_session_duration: ::std::option::Option<::std::string::String>,
|
361 + | pub(crate) access_type: ::std::option::Option<crate::types::AccessType>,
|
362 + | }
|
363 + | impl SessionBuilder {
|
364 + | /// <p>The ID of the session.</p>
|
365 + | pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
366 + | self.session_id = ::std::option::Option::Some(input.into());
|
367 + | self
|
368 + | }
|
369 + | /// <p>The ID of the session.</p>
|
370 + | pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
371 + | self.session_id = input;
|
372 + | self
|
373 + | }
|
374 + | /// <p>The ID of the session.</p>
|
375 + | pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
|
376 + | &self.session_id
|
377 + | }
|
378 + | /// <p>The managed node that the Session Manager session connected to.</p>
|
379 + | pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
380 + | self.target = ::std::option::Option::Some(input.into());
|
381 + | self
|
382 + | }
|
383 + | /// <p>The managed node that the Session Manager session connected to.</p>
|
384 + | pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
385 + | self.target = input;
|
386 + | self
|
387 + | }
|
388 + | /// <p>The managed node that the Session Manager session connected to.</p>
|
389 + | pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
|
390 + | &self.target
|
391 + | }
|
392 + | /// <p>The status of the session. For example, "Connected" or "Terminated".</p>
|
393 + | pub fn status(mut self, input: crate::types::SessionStatus) -> Self {
|
394 + | self.status = ::std::option::Option::Some(input);
|
395 + | self
|
396 + | }
|
397 + | /// <p>The status of the session. For example, "Connected" or "Terminated".</p>
|
398 + | pub fn set_status(mut self, input: ::std::option::Option<crate::types::SessionStatus>) -> Self {
|
399 + | self.status = input;
|
400 + | self
|
401 + | }
|
402 + | /// <p>The status of the session. For example, "Connected" or "Terminated".</p>
|
403 + | pub fn get_status(&self) -> &::std::option::Option<crate::types::SessionStatus> {
|
404 + | &self.status
|
405 + | }
|
406 + | /// <p>The date and time, in ISO-8601 Extended format, when the session began.</p>
|
407 + | pub fn start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
408 + | self.start_date = ::std::option::Option::Some(input);
|
409 + | self
|
410 + | }
|
411 + | /// <p>The date and time, in ISO-8601 Extended format, when the session began.</p>
|
412 + | pub fn set_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
413 + | self.start_date = input;
|
414 + | self
|
415 + | }
|
416 + | /// <p>The date and time, in ISO-8601 Extended format, when the session began.</p>
|
417 + | pub fn get_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
418 + | &self.start_date
|
419 + | }
|
420 + | /// <p>The date and time, in ISO-8601 Extended format, when the session was terminated.</p>
|
421 + | pub fn end_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
422 + | self.end_date = ::std::option::Option::Some(input);
|
423 + | self
|
424 + | }
|
425 + | /// <p>The date and time, in ISO-8601 Extended format, when the session was terminated.</p>
|
426 + | pub fn set_end_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
427 + | self.end_date = input;
|
428 + | self
|
429 + | }
|
430 + | /// <p>The date and time, in ISO-8601 Extended format, when the session was terminated.</p>
|
431 + | pub fn get_end_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
432 + | &self.end_date
|
433 + | }
|
434 + | /// <p>The name of the Session Manager SSM document used to define the parameters and plugin settings for the session. For example, <code>SSM-SessionManagerRunShell</code>.</p>
|
435 + | pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
436 + | self.document_name = ::std::option::Option::Some(input.into());
|
437 + | self
|
438 + | }
|
439 + | /// <p>The name of the Session Manager SSM document used to define the parameters and plugin settings for the session. For example, <code>SSM-SessionManagerRunShell</code>.</p>
|
440 + | pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
441 + | self.document_name = input;
|
442 + | self
|
443 + | }
|
444 + | /// <p>The name of the Session Manager SSM document used to define the parameters and plugin settings for the session. For example, <code>SSM-SessionManagerRunShell</code>.</p>
|
445 + | pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
|
446 + | &self.document_name
|
447 + | }
|
448 + | /// <p>The ID of the Amazon Web Services user that started the session.</p>
|
449 + | pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
450 + | self.owner = ::std::option::Option::Some(input.into());
|
451 + | self
|
452 + | }
|
453 + | /// <p>The ID of the Amazon Web Services user that started the session.</p>
|
454 + | pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
455 + | self.owner = input;
|
456 + | self
|
457 + | }
|
458 + | /// <p>The ID of the Amazon Web Services user that started the session.</p>
|
459 + | pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
|
460 + | &self.owner
|
461 + | }
|
462 + | /// <p>The reason for connecting to the instance.</p>
|
463 + | pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
464 + | self.reason = ::std::option::Option::Some(input.into());
|
465 + | self
|
466 + | }
|
467 + | /// <p>The reason for connecting to the instance.</p>
|
468 + | pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
469 + | self.reason = input;
|
470 + | self
|
471 + | }
|
472 + | /// <p>The reason for connecting to the instance.</p>
|
473 + | pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
|
474 + | &self.reason
|
475 + | }
|
476 + | /// <p>Reserved for future use.</p>
|
477 + | pub fn details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
478 + | self.details = ::std::option::Option::Some(input.into());
|
479 + | self
|
480 + | }
|
481 + | /// <p>Reserved for future use.</p>
|
482 + | pub fn set_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
483 + | self.details = input;
|
484 + | self
|
485 + | }
|
486 + | /// <p>Reserved for future use.</p>
|
487 + | pub fn get_details(&self) -> &::std::option::Option<::std::string::String> {
|
488 + | &self.details
|
489 + | }
|
490 + | /// <p>Reserved for future use.</p>
|
491 + | pub fn output_url(mut self, input: crate::types::SessionManagerOutputUrl) -> Self {
|
492 + | self.output_url = ::std::option::Option::Some(input);
|
493 + | self
|
494 + | }
|
495 + | /// <p>Reserved for future use.</p>
|
496 + | pub fn set_output_url(mut self, input: ::std::option::Option<crate::types::SessionManagerOutputUrl>) -> Self {
|
497 + | self.output_url = input;
|
498 + | self
|
499 + | }
|
500 + | /// <p>Reserved for future use.</p>
|
501 + | pub fn get_output_url(&self) -> &::std::option::Option<crate::types::SessionManagerOutputUrl> {
|
502 + | &self.output_url
|
503 + | }
|
504 + | /// <p>The maximum duration of a session before it terminates.</p>
|
505 + | pub fn max_session_duration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
506 + | self.max_session_duration = ::std::option::Option::Some(input.into());
|
507 + | self
|
508 + | }
|
509 + | /// <p>The maximum duration of a session before it terminates.</p>
|
510 + | pub fn set_max_session_duration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
511 + | self.max_session_duration = input;
|
512 + | self
|
513 + | }
|
514 + | /// <p>The maximum duration of a session before it terminates.</p>
|
515 + | pub fn get_max_session_duration(&self) -> &::std::option::Option<::std::string::String> {
|
516 + | &self.max_session_duration
|
517 + | }
|
518 + | /// <p><code>Standard</code> access type is the default for Session Manager sessions. <code>JustInTime</code> is the access type for <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-just-in-time-node-access.html">Just-in-time node access</a>.</p>
|
519 + | pub fn access_type(mut self, input: crate::types::AccessType) -> Self {
|
520 + | self.access_type = ::std::option::Option::Some(input);
|
521 + | self
|
522 + | }
|
523 + | /// <p><code>Standard</code> access type is the default for Session Manager sessions. <code>JustInTime</code> is the access type for <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-just-in-time-node-access.html">Just-in-time node access</a>.</p>
|
524 + | pub fn set_access_type(mut self, input: ::std::option::Option<crate::types::AccessType>) -> Self {
|
525 + | self.access_type = input;
|
526 + | self
|
527 + | }
|
528 + | /// <p><code>Standard</code> access type is the default for Session Manager sessions. <code>JustInTime</code> is the access type for <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-just-in-time-node-access.html">Just-in-time node access</a>.</p>
|
529 + | pub fn get_access_type(&self) -> &::std::option::Option<crate::types::AccessType> {
|
530 + | &self.access_type
|
531 + | }
|
532 + | /// Consumes the builder and constructs a [`Session`](crate::types::Session).
|
533 + | pub fn build(self) -> crate::types::Session {
|
534 + | crate::types::Session {
|
535 + | session_id: self.session_id,
|
536 + | target: self.target,
|
537 + | status: self.status,
|
538 + | start_date: self.start_date,
|
539 + | end_date: self.end_date,
|
540 + | document_name: self.document_name,
|
541 + | owner: self.owner,
|
542 + | reason: self.reason,
|
543 + | details: self.details,
|
544 + | output_url: self.output_url,
|
545 + | max_session_duration: self.max_session_duration,
|
546 + | access_type: self.access_type,
|
547 + | }
|
548 + | }
|
549 + | }
|