aws_lite_rs/types/sagemaker.rs
1//! Types for the Amazon SageMaker API (v1).
2//!
3//! Auto-generated from the AWS Botocore Model.
4//! **Do not edit manually** — modify the manifest and re-run codegen.
5
6use serde::{Deserialize, Serialize};
7
8///
9/// **AWS API**: `sagemaker.v1.ListNotebookInstancesInput`
10///
11/// ## Coverage
12/// 6 of 13 fields included.
13/// Omitted fields:
14/// - `CreationTimeBefore` — not selected in manifest
15/// - `CreationTimeAfter` — not selected in manifest
16/// - `LastModifiedTimeBefore` — not selected in manifest
17/// - `LastModifiedTimeAfter` — not selected in manifest
18/// - `NotebookInstanceLifecycleConfigNameContains` — not selected in manifest
19/// - `DefaultCodeRepositoryContains` — not selected in manifest
20/// - `AdditionalCodeRepositoryEquals` — not selected in manifest
21#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22#[serde(rename_all = "PascalCase")]
23pub struct ListNotebookInstancesInput {
24 /// If the previous call to the ListNotebookInstances is truncated, the response includes a
25 /// NextToken. You can use this token in your subsequent ListNotebookInstances request to
26 /// fetch the next set of notebook instances. You might specify a filter or a sort order in
27 /// your request. When response is truncated, you must use the same values for the filer and
28 /// sort order in the next request.
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub next_token: Option<String>,
31
32 /// The maximum number of notebook instances to return.
33 #[serde(skip_serializing_if = "Option::is_none")]
34 pub max_results: Option<i32>,
35
36 /// The field to sort results by. The default is Name.
37 #[serde(skip_serializing_if = "Option::is_none")]
38 pub sort_by: Option<String>,
39
40 /// The sort order for results.
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub sort_order: Option<String>,
43
44 /// A filter that returns only notebook instances with the specified status.
45 #[serde(skip_serializing_if = "Option::is_none")]
46 pub status_equals: Option<String>,
47
48 /// A string in the notebook instances' name. This filter returns only notebook instances
49 /// whose name contains the specified string.
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub name_contains: Option<String>,
52}
53
54impl ListNotebookInstancesInput {
55 #[cfg(any(test, feature = "test-support"))]
56 /// Create a fixture instance for testing.
57 pub fn fixture() -> Self {
58 Self {
59 next_token: Some("test-next_token".into()),
60 max_results: Some(100),
61 sort_by: Some("test-sort_by".into()),
62 sort_order: Some("test-sort_order".into()),
63 status_equals: Some("test-status_equals".into()),
64 name_contains: Some("test-name_contains".into()),
65 }
66 }
67}
68
69///
70/// **AWS API**: `sagemaker.v1.ListNotebookInstancesOutput`
71#[derive(Debug, Clone, Default, Serialize, Deserialize)]
72#[serde(rename_all = "PascalCase")]
73pub struct ListNotebookInstancesOutput {
74 /// An array of NotebookInstanceSummary objects, one for each notebook instance.
75 #[serde(default)]
76 #[serde(skip_serializing_if = "Vec::is_empty")]
77 pub notebook_instances: Vec<NotebookInstanceSummary>,
78
79 /// If the response to the previous ListNotebookInstances request was truncated, SageMaker
80 /// AI returns this token. To retrieve the next set of notebook instances, use the token in
81 /// the next request.
82 #[serde(skip_serializing_if = "Option::is_none")]
83 pub next_token: Option<String>,
84}
85
86impl ListNotebookInstancesOutput {
87 #[cfg(any(test, feature = "test-support"))]
88 /// Create a fixture instance for testing.
89 pub fn fixture() -> Self {
90 Self {
91 notebook_instances: vec![],
92 next_token: Some("test-next_token".into()),
93 }
94 }
95}
96
97/// Provides summary information for an SageMaker AI notebook instance.
98///
99/// **AWS API**: `sagemaker.v1.NotebookInstanceSummary`
100///
101/// ## Coverage
102/// 7 of 10 fields included.
103/// Omitted fields:
104/// - `NotebookInstanceLifecycleConfigName` — not selected in manifest
105/// - `DefaultCodeRepository` — not selected in manifest
106/// - `AdditionalCodeRepositories` — not selected in manifest
107#[derive(Debug, Clone, Default, Serialize, Deserialize)]
108#[serde(rename_all = "PascalCase")]
109pub struct NotebookInstanceSummary {
110 /// The name of the notebook instance that you want a summary for.
111 pub notebook_instance_name: String,
112
113 /// The Amazon Resource Name (ARN) of the notebook instance.
114 pub notebook_instance_arn: String,
115
116 /// The status of the notebook instance.
117 #[serde(skip_serializing_if = "Option::is_none")]
118 pub notebook_instance_status: Option<String>,
119
120 /// The type of ML compute instance that the notebook instance is running on.
121 #[serde(skip_serializing_if = "Option::is_none")]
122 pub instance_type: Option<String>,
123
124 /// A timestamp that shows when the notebook instance was created.
125 #[serde(skip_serializing_if = "Option::is_none")]
126 pub creation_time: Option<f64>,
127
128 /// A timestamp that shows when the notebook instance was last modified.
129 #[serde(skip_serializing_if = "Option::is_none")]
130 pub last_modified_time: Option<f64>,
131
132 /// The URL that you use to connect to the Jupyter notebook running in your notebook
133 /// instance.
134 #[serde(skip_serializing_if = "Option::is_none")]
135 pub url: Option<String>,
136}
137
138impl NotebookInstanceSummary {
139 #[cfg(any(test, feature = "test-support"))]
140 /// Create a fixture instance for testing.
141 pub fn fixture() -> Self {
142 Self {
143 notebook_instance_name: "test-notebook_instance_name".into(),
144 notebook_instance_arn: "test-notebook_instance_arn".into(),
145 notebook_instance_status: Some("test-notebook_instance_status".into()),
146 instance_type: Some("test-instance_type".into()),
147 url: Some("test-url".into()),
148 ..Default::default()
149 }
150 }
151}
152
153///
154/// **AWS API**: `sagemaker.v1.StopNotebookInstanceInput`
155#[derive(Debug, Clone, Default, Serialize, Deserialize)]
156#[serde(rename_all = "PascalCase")]
157pub struct StopNotebookInstanceInput {
158 /// The name of the notebook instance to terminate.
159 pub notebook_instance_name: String,
160}
161
162impl StopNotebookInstanceInput {
163 #[cfg(any(test, feature = "test-support"))]
164 /// Create a fixture instance for testing.
165 pub fn fixture() -> Self {
166 Self {
167 notebook_instance_name: "test-notebook_instance_name".into(),
168 }
169 }
170}