rustack_ssm_model/output.rs
1//! SSM output types for Phase 0, Phase 1, and Phase 2 operations.
2//!
3//! All output structs use `PascalCase` JSON field naming to match the SSM
4//! wire protocol (`awsJson1_1`). Optional fields are omitted when `None`.
5
6use serde::{Deserialize, Serialize};
7
8use crate::types::{Parameter, ParameterHistory, ParameterMetadata, Tag};
9
10// ---------------------------------------------------------------------------
11// PutParameter
12// ---------------------------------------------------------------------------
13
14/// Output for the `PutParameter` operation.
15#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16#[serde(rename_all = "PascalCase")]
17pub struct PutParameterOutput {
18 /// The version of the parameter.
19 pub version: i64,
20
21 /// The tier of the parameter.
22 pub tier: String,
23}
24
25// ---------------------------------------------------------------------------
26// GetParameter
27// ---------------------------------------------------------------------------
28
29/// Output for the `GetParameter` operation.
30#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31#[serde(rename_all = "PascalCase")]
32pub struct GetParameterOutput {
33 /// The parameter details.
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub parameter: Option<Parameter>,
36}
37
38// ---------------------------------------------------------------------------
39// GetParameters
40// ---------------------------------------------------------------------------
41
42/// Output for the `GetParameters` operation.
43#[derive(Debug, Clone, Default, Serialize, Deserialize)]
44#[serde(rename_all = "PascalCase")]
45pub struct GetParametersOutput {
46 /// The parameters that were found.
47 #[serde(default)]
48 pub parameters: Vec<Parameter>,
49
50 /// The names of parameters that could not be found.
51 #[serde(default)]
52 pub invalid_parameters: Vec<String>,
53}
54
55// ---------------------------------------------------------------------------
56// GetParametersByPath
57// ---------------------------------------------------------------------------
58
59/// Output for the `GetParametersByPath` operation.
60#[derive(Debug, Clone, Default, Serialize, Deserialize)]
61#[serde(rename_all = "PascalCase")]
62pub struct GetParametersByPathOutput {
63 /// The parameters that match the path.
64 #[serde(default)]
65 pub parameters: Vec<Parameter>,
66
67 /// The token for the next page of results, if any.
68 #[serde(skip_serializing_if = "Option::is_none")]
69 pub next_token: Option<String>,
70}
71
72// ---------------------------------------------------------------------------
73// DeleteParameter
74// ---------------------------------------------------------------------------
75
76/// Output for the `DeleteParameter` operation.
77#[derive(Debug, Clone, Default, Serialize, Deserialize)]
78#[serde(rename_all = "PascalCase")]
79pub struct DeleteParameterOutput {}
80
81// ---------------------------------------------------------------------------
82// DeleteParameters
83// ---------------------------------------------------------------------------
84
85/// Output for the `DeleteParameters` operation.
86#[derive(Debug, Clone, Default, Serialize, Deserialize)]
87#[serde(rename_all = "PascalCase")]
88pub struct DeleteParametersOutput {
89 /// The names of parameters that were successfully deleted.
90 #[serde(default)]
91 pub deleted_parameters: Vec<String>,
92
93 /// The names of parameters that could not be found.
94 #[serde(default)]
95 pub invalid_parameters: Vec<String>,
96}
97
98// ---------------------------------------------------------------------------
99// Phase 1: DescribeParameters
100// ---------------------------------------------------------------------------
101
102/// Output for the `DescribeParameters` operation.
103#[derive(Debug, Clone, Default, Serialize, Deserialize)]
104#[serde(rename_all = "PascalCase")]
105pub struct DescribeParametersOutput {
106 /// The parameter metadata entries.
107 #[serde(default, skip_serializing_if = "Vec::is_empty")]
108 pub parameters: Vec<ParameterMetadata>,
109
110 /// The token for the next page of results, if any.
111 #[serde(skip_serializing_if = "Option::is_none")]
112 pub next_token: Option<String>,
113}
114
115// ---------------------------------------------------------------------------
116// Phase 1: GetParameterHistory
117// ---------------------------------------------------------------------------
118
119/// Output for the `GetParameterHistory` operation.
120#[derive(Debug, Clone, Default, Serialize, Deserialize)]
121#[serde(rename_all = "PascalCase")]
122pub struct GetParameterHistoryOutput {
123 /// The version history entries.
124 #[serde(default, skip_serializing_if = "Vec::is_empty")]
125 pub parameters: Vec<ParameterHistory>,
126
127 /// The token for the next page of results, if any.
128 #[serde(skip_serializing_if = "Option::is_none")]
129 pub next_token: Option<String>,
130}
131
132// ---------------------------------------------------------------------------
133// Phase 1: AddTagsToResource
134// ---------------------------------------------------------------------------
135
136/// Output for the `AddTagsToResource` operation (empty).
137#[derive(Debug, Clone, Default, Serialize, Deserialize)]
138#[serde(rename_all = "PascalCase")]
139pub struct AddTagsToResourceOutput {}
140
141// ---------------------------------------------------------------------------
142// Phase 1: RemoveTagsFromResource
143// ---------------------------------------------------------------------------
144
145/// Output for the `RemoveTagsFromResource` operation (empty).
146#[derive(Debug, Clone, Default, Serialize, Deserialize)]
147#[serde(rename_all = "PascalCase")]
148pub struct RemoveTagsFromResourceOutput {}
149
150// ---------------------------------------------------------------------------
151// Phase 1: ListTagsForResource
152// ---------------------------------------------------------------------------
153
154/// Output for the `ListTagsForResource` operation.
155#[derive(Debug, Clone, Default, Serialize, Deserialize)]
156#[serde(rename_all = "PascalCase")]
157pub struct ListTagsForResourceOutput {
158 /// The tags associated with the resource.
159 #[serde(default, skip_serializing_if = "Vec::is_empty")]
160 pub tag_list: Vec<Tag>,
161}
162
163// ---------------------------------------------------------------------------
164// Phase 2: LabelParameterVersion
165// ---------------------------------------------------------------------------
166
167/// Output for the `LabelParameterVersion` operation.
168#[derive(Debug, Clone, Default, Serialize, Deserialize)]
169#[serde(rename_all = "PascalCase")]
170pub struct LabelParameterVersionOutput {
171 /// Labels that failed validation.
172 #[serde(default, skip_serializing_if = "Vec::is_empty")]
173 pub invalid_labels: Vec<String>,
174
175 /// The version number that was labeled.
176 pub parameter_version: i64,
177}
178
179// ---------------------------------------------------------------------------
180// Phase 2: UnlabelParameterVersion
181// ---------------------------------------------------------------------------
182
183/// Output for the `UnlabelParameterVersion` operation.
184#[derive(Debug, Clone, Default, Serialize, Deserialize)]
185#[serde(rename_all = "PascalCase")]
186pub struct UnlabelParameterVersionOutput {
187 /// Labels that were not found on the specified version.
188 #[serde(default, skip_serializing_if = "Vec::is_empty")]
189 pub invalid_labels: Vec<String>,
190
191 /// Labels that were successfully removed.
192 #[serde(default, skip_serializing_if = "Vec::is_empty")]
193 pub removed_labels: Vec<String>,
194}