aws_sdk_sagemaker/operation/describe_app/
_describe_app_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 DescribeAppOutput {
6    /// <p>The Amazon Resource Name (ARN) of the app.</p>
7    pub app_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The type of app.</p>
9    pub app_type: ::std::option::Option<crate::types::AppType>,
10    /// <p>The name of the app.</p>
11    pub app_name: ::std::option::Option<::std::string::String>,
12    /// <p>The domain ID.</p>
13    pub domain_id: ::std::option::Option<::std::string::String>,
14    /// <p>The user profile name.</p>
15    pub user_profile_name: ::std::option::Option<::std::string::String>,
16    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
17    pub space_name: ::std::option::Option<::std::string::String>,
18    /// <p>The status.</p>
19    pub status: ::std::option::Option<crate::types::AppStatus>,
20    /// <p>The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used.</p>
21    pub effective_trusted_identity_propagation_status: ::std::option::Option<crate::types::FeatureStatus>,
22    /// <p>Indicates whether the application is launched in recovery mode.</p>
23    pub recovery_mode: ::std::option::Option<bool>,
24    /// <p>The timestamp of the last health check.</p>
25    pub last_health_check_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
26    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
27    pub last_user_activity_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
28    /// <p>The creation time of the application.</p><note>
29    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
30    /// </note>
31    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32    /// <p>The failure reason.</p>
33    pub failure_reason: ::std::option::Option<::std::string::String>,
34    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
35    pub resource_spec: ::std::option::Option<crate::types::ResourceSpec>,
36    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
37    pub built_in_lifecycle_config_arn: ::std::option::Option<::std::string::String>,
38    _request_id: Option<String>,
39}
40impl DescribeAppOutput {
41    /// <p>The Amazon Resource Name (ARN) of the app.</p>
42    pub fn app_arn(&self) -> ::std::option::Option<&str> {
43        self.app_arn.as_deref()
44    }
45    /// <p>The type of app.</p>
46    pub fn app_type(&self) -> ::std::option::Option<&crate::types::AppType> {
47        self.app_type.as_ref()
48    }
49    /// <p>The name of the app.</p>
50    pub fn app_name(&self) -> ::std::option::Option<&str> {
51        self.app_name.as_deref()
52    }
53    /// <p>The domain ID.</p>
54    pub fn domain_id(&self) -> ::std::option::Option<&str> {
55        self.domain_id.as_deref()
56    }
57    /// <p>The user profile name.</p>
58    pub fn user_profile_name(&self) -> ::std::option::Option<&str> {
59        self.user_profile_name.as_deref()
60    }
61    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
62    pub fn space_name(&self) -> ::std::option::Option<&str> {
63        self.space_name.as_deref()
64    }
65    /// <p>The status.</p>
66    pub fn status(&self) -> ::std::option::Option<&crate::types::AppStatus> {
67        self.status.as_ref()
68    }
69    /// <p>The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used.</p>
70    pub fn effective_trusted_identity_propagation_status(&self) -> ::std::option::Option<&crate::types::FeatureStatus> {
71        self.effective_trusted_identity_propagation_status.as_ref()
72    }
73    /// <p>Indicates whether the application is launched in recovery mode.</p>
74    pub fn recovery_mode(&self) -> ::std::option::Option<bool> {
75        self.recovery_mode
76    }
77    /// <p>The timestamp of the last health check.</p>
78    pub fn last_health_check_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79        self.last_health_check_timestamp.as_ref()
80    }
81    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
82    pub fn last_user_activity_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
83        self.last_user_activity_timestamp.as_ref()
84    }
85    /// <p>The creation time of the application.</p><note>
86    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
87    /// </note>
88    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
89        self.creation_time.as_ref()
90    }
91    /// <p>The failure reason.</p>
92    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
93        self.failure_reason.as_deref()
94    }
95    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
96    pub fn resource_spec(&self) -> ::std::option::Option<&crate::types::ResourceSpec> {
97        self.resource_spec.as_ref()
98    }
99    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
100    pub fn built_in_lifecycle_config_arn(&self) -> ::std::option::Option<&str> {
101        self.built_in_lifecycle_config_arn.as_deref()
102    }
103}
104impl ::aws_types::request_id::RequestId for DescribeAppOutput {
105    fn request_id(&self) -> Option<&str> {
106        self._request_id.as_deref()
107    }
108}
109impl DescribeAppOutput {
110    /// Creates a new builder-style object to manufacture [`DescribeAppOutput`](crate::operation::describe_app::DescribeAppOutput).
111    pub fn builder() -> crate::operation::describe_app::builders::DescribeAppOutputBuilder {
112        crate::operation::describe_app::builders::DescribeAppOutputBuilder::default()
113    }
114}
115
116/// A builder for [`DescribeAppOutput`](crate::operation::describe_app::DescribeAppOutput).
117#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
118#[non_exhaustive]
119pub struct DescribeAppOutputBuilder {
120    pub(crate) app_arn: ::std::option::Option<::std::string::String>,
121    pub(crate) app_type: ::std::option::Option<crate::types::AppType>,
122    pub(crate) app_name: ::std::option::Option<::std::string::String>,
123    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
124    pub(crate) user_profile_name: ::std::option::Option<::std::string::String>,
125    pub(crate) space_name: ::std::option::Option<::std::string::String>,
126    pub(crate) status: ::std::option::Option<crate::types::AppStatus>,
127    pub(crate) effective_trusted_identity_propagation_status: ::std::option::Option<crate::types::FeatureStatus>,
128    pub(crate) recovery_mode: ::std::option::Option<bool>,
129    pub(crate) last_health_check_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
130    pub(crate) last_user_activity_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
131    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
132    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
133    pub(crate) resource_spec: ::std::option::Option<crate::types::ResourceSpec>,
134    pub(crate) built_in_lifecycle_config_arn: ::std::option::Option<::std::string::String>,
135    _request_id: Option<String>,
136}
137impl DescribeAppOutputBuilder {
138    /// <p>The Amazon Resource Name (ARN) of the app.</p>
139    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.app_arn = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The Amazon Resource Name (ARN) of the app.</p>
144    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.app_arn = input;
146        self
147    }
148    /// <p>The Amazon Resource Name (ARN) of the app.</p>
149    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
150        &self.app_arn
151    }
152    /// <p>The type of app.</p>
153    pub fn app_type(mut self, input: crate::types::AppType) -> Self {
154        self.app_type = ::std::option::Option::Some(input);
155        self
156    }
157    /// <p>The type of app.</p>
158    pub fn set_app_type(mut self, input: ::std::option::Option<crate::types::AppType>) -> Self {
159        self.app_type = input;
160        self
161    }
162    /// <p>The type of app.</p>
163    pub fn get_app_type(&self) -> &::std::option::Option<crate::types::AppType> {
164        &self.app_type
165    }
166    /// <p>The name of the app.</p>
167    pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168        self.app_name = ::std::option::Option::Some(input.into());
169        self
170    }
171    /// <p>The name of the app.</p>
172    pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.app_name = input;
174        self
175    }
176    /// <p>The name of the app.</p>
177    pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
178        &self.app_name
179    }
180    /// <p>The domain ID.</p>
181    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.domain_id = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>The domain ID.</p>
186    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.domain_id = input;
188        self
189    }
190    /// <p>The domain ID.</p>
191    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
192        &self.domain_id
193    }
194    /// <p>The user profile name.</p>
195    pub fn user_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.user_profile_name = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <p>The user profile name.</p>
200    pub fn set_user_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.user_profile_name = input;
202        self
203    }
204    /// <p>The user profile name.</p>
205    pub fn get_user_profile_name(&self) -> &::std::option::Option<::std::string::String> {
206        &self.user_profile_name
207    }
208    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
209    pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.space_name = ::std::option::Option::Some(input.into());
211        self
212    }
213    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
214    pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215        self.space_name = input;
216        self
217    }
218    /// <p>The name of the space. If this value is not set, then <code>UserProfileName</code> must be set.</p>
219    pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
220        &self.space_name
221    }
222    /// <p>The status.</p>
223    pub fn status(mut self, input: crate::types::AppStatus) -> Self {
224        self.status = ::std::option::Option::Some(input);
225        self
226    }
227    /// <p>The status.</p>
228    pub fn set_status(mut self, input: ::std::option::Option<crate::types::AppStatus>) -> Self {
229        self.status = input;
230        self
231    }
232    /// <p>The status.</p>
233    pub fn get_status(&self) -> &::std::option::Option<crate::types::AppStatus> {
234        &self.status
235    }
236    /// <p>The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used.</p>
237    pub fn effective_trusted_identity_propagation_status(mut self, input: crate::types::FeatureStatus) -> Self {
238        self.effective_trusted_identity_propagation_status = ::std::option::Option::Some(input);
239        self
240    }
241    /// <p>The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used.</p>
242    pub fn set_effective_trusted_identity_propagation_status(mut self, input: ::std::option::Option<crate::types::FeatureStatus>) -> Self {
243        self.effective_trusted_identity_propagation_status = input;
244        self
245    }
246    /// <p>The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used.</p>
247    pub fn get_effective_trusted_identity_propagation_status(&self) -> &::std::option::Option<crate::types::FeatureStatus> {
248        &self.effective_trusted_identity_propagation_status
249    }
250    /// <p>Indicates whether the application is launched in recovery mode.</p>
251    pub fn recovery_mode(mut self, input: bool) -> Self {
252        self.recovery_mode = ::std::option::Option::Some(input);
253        self
254    }
255    /// <p>Indicates whether the application is launched in recovery mode.</p>
256    pub fn set_recovery_mode(mut self, input: ::std::option::Option<bool>) -> Self {
257        self.recovery_mode = input;
258        self
259    }
260    /// <p>Indicates whether the application is launched in recovery mode.</p>
261    pub fn get_recovery_mode(&self) -> &::std::option::Option<bool> {
262        &self.recovery_mode
263    }
264    /// <p>The timestamp of the last health check.</p>
265    pub fn last_health_check_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
266        self.last_health_check_timestamp = ::std::option::Option::Some(input);
267        self
268    }
269    /// <p>The timestamp of the last health check.</p>
270    pub fn set_last_health_check_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
271        self.last_health_check_timestamp = input;
272        self
273    }
274    /// <p>The timestamp of the last health check.</p>
275    pub fn get_last_health_check_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
276        &self.last_health_check_timestamp
277    }
278    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
279    pub fn last_user_activity_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
280        self.last_user_activity_timestamp = ::std::option::Option::Some(input);
281        self
282    }
283    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
284    pub fn set_last_user_activity_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
285        self.last_user_activity_timestamp = input;
286        self
287    }
288    /// <p>The timestamp of the last user's activity. <code>LastUserActivityTimestamp</code> is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as <code>LastHealthCheckTimestamp</code>.</p>
289    pub fn get_last_user_activity_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
290        &self.last_user_activity_timestamp
291    }
292    /// <p>The creation time of the application.</p><note>
293    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
294    /// </note>
295    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
296        self.creation_time = ::std::option::Option::Some(input);
297        self
298    }
299    /// <p>The creation time of the application.</p><note>
300    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
301    /// </note>
302    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
303        self.creation_time = input;
304        self
305    }
306    /// <p>The creation time of the application.</p><note>
307    /// <p>After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.</p>
308    /// </note>
309    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
310        &self.creation_time
311    }
312    /// <p>The failure reason.</p>
313    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
314        self.failure_reason = ::std::option::Option::Some(input.into());
315        self
316    }
317    /// <p>The failure reason.</p>
318    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
319        self.failure_reason = input;
320        self
321    }
322    /// <p>The failure reason.</p>
323    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
324        &self.failure_reason
325    }
326    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
327    pub fn resource_spec(mut self, input: crate::types::ResourceSpec) -> Self {
328        self.resource_spec = ::std::option::Option::Some(input);
329        self
330    }
331    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
332    pub fn set_resource_spec(mut self, input: ::std::option::Option<crate::types::ResourceSpec>) -> Self {
333        self.resource_spec = input;
334        self
335    }
336    /// <p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p>
337    pub fn get_resource_spec(&self) -> &::std::option::Option<crate::types::ResourceSpec> {
338        &self.resource_spec
339    }
340    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
341    pub fn built_in_lifecycle_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342        self.built_in_lifecycle_config_arn = ::std::option::Option::Some(input.into());
343        self
344    }
345    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
346    pub fn set_built_in_lifecycle_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
347        self.built_in_lifecycle_config_arn = input;
348        self
349    }
350    /// <p>The lifecycle configuration that runs before the default lifecycle configuration</p>
351    pub fn get_built_in_lifecycle_config_arn(&self) -> &::std::option::Option<::std::string::String> {
352        &self.built_in_lifecycle_config_arn
353    }
354    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
355        self._request_id = Some(request_id.into());
356        self
357    }
358
359    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
360        self._request_id = request_id;
361        self
362    }
363    /// Consumes the builder and constructs a [`DescribeAppOutput`](crate::operation::describe_app::DescribeAppOutput).
364    pub fn build(self) -> crate::operation::describe_app::DescribeAppOutput {
365        crate::operation::describe_app::DescribeAppOutput {
366            app_arn: self.app_arn,
367            app_type: self.app_type,
368            app_name: self.app_name,
369            domain_id: self.domain_id,
370            user_profile_name: self.user_profile_name,
371            space_name: self.space_name,
372            status: self.status,
373            effective_trusted_identity_propagation_status: self.effective_trusted_identity_propagation_status,
374            recovery_mode: self.recovery_mode,
375            last_health_check_timestamp: self.last_health_check_timestamp,
376            last_user_activity_timestamp: self.last_user_activity_timestamp,
377            creation_time: self.creation_time,
378            failure_reason: self.failure_reason,
379            resource_spec: self.resource_spec,
380            built_in_lifecycle_config_arn: self.built_in_lifecycle_config_arn,
381            _request_id: self._request_id,
382        }
383    }
384}