1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetCommandInvocationInput {
/// <p>(Required) The parent command ID of the invocation plugin.</p>
pub command_id: ::std::option::Option<::std::string::String>,
/// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
pub instance_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
/// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
pub plugin_name: ::std::option::Option<::std::string::String>,
}
impl GetCommandInvocationInput {
/// <p>(Required) The parent command ID of the invocation plugin.</p>
pub fn command_id(&self) -> ::std::option::Option<&str> {
self.command_id.as_deref()
}
/// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
/// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
/// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
pub fn plugin_name(&self) -> ::std::option::Option<&str> {
self.plugin_name.as_deref()
}
}
static GETCOMMANDINVOCATIONINPUT_MEMBER_COMMAND_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#GetCommandInvocationInput$CommandId",
"com.amazonaws.ssm.synthetic",
"GetCommandInvocationInput",
),
::aws_smithy_schema::ShapeType::String,
"CommandId",
0,
);
static GETCOMMANDINVOCATIONINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#GetCommandInvocationInput$InstanceId",
"com.amazonaws.ssm.synthetic",
"GetCommandInvocationInput",
),
::aws_smithy_schema::ShapeType::String,
"InstanceId",
1,
);
static GETCOMMANDINVOCATIONINPUT_MEMBER_PLUGIN_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#GetCommandInvocationInput$PluginName",
"com.amazonaws.ssm.synthetic",
"GetCommandInvocationInput",
),
::aws_smithy_schema::ShapeType::String,
"PluginName",
2,
);
static GETCOMMANDINVOCATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#GetCommandInvocationInput",
"com.amazonaws.ssm.synthetic",
"GetCommandInvocationInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&GETCOMMANDINVOCATIONINPUT_MEMBER_COMMAND_ID,
&GETCOMMANDINVOCATIONINPUT_MEMBER_INSTANCE_ID,
&GETCOMMANDINVOCATIONINPUT_MEMBER_PLUGIN_NAME,
],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("GetCommandInvocationRequest");
impl GetCommandInvocationInput {
/// The schema for this shape.
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETCOMMANDINVOCATIONINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for GetCommandInvocationInput {
fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
Self::SCHEMA
}
#[allow(unused_variables, clippy::diverging_sub_expression)]
fn serialize_members(
&self,
ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
if let Some(ref val) = self.command_id {
ser.write_string(&GETCOMMANDINVOCATIONINPUT_MEMBER_COMMAND_ID, val)?;
}
if let Some(ref val) = self.instance_id {
ser.write_string(&GETCOMMANDINVOCATIONINPUT_MEMBER_INSTANCE_ID, val)?;
}
if let Some(ref val) = self.plugin_name {
ser.write_string(&GETCOMMANDINVOCATIONINPUT_MEMBER_PLUGIN_NAME, val)?;
}
Ok(())
}
}
impl crate::operation::get_command_invocation::builders::GetCommandInvocationInputBuilder {
#[allow(
unused_variables,
unreachable_code,
clippy::single_match,
clippy::match_single_binding,
clippy::diverging_sub_expression
)]
pub(crate) fn deserialize_members(
&mut self,
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
deserializer.read_struct(&GETCOMMANDINVOCATIONINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.command_id = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.instance_id = Some(deser.read_string(member)?);
}
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.plugin_name = Some(deser.read_string(member)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl GetCommandInvocationInput {
/// Deserializes this structure from a [`ShapeDeserializer`].
pub fn deserialize(
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
let mut builder = Self::builder();
builder.deserialize_members(deserializer)?;
builder.command_id = builder.command_id.or(Some(String::new()));
builder.instance_id = builder.instance_id.or(Some(String::new()));
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}
impl GetCommandInvocationInput {
/// Creates a new builder-style object to manufacture [`GetCommandInvocationInput`](crate::operation::get_command_invocation::GetCommandInvocationInput).
pub fn builder() -> crate::operation::get_command_invocation::builders::GetCommandInvocationInputBuilder {
crate::operation::get_command_invocation::builders::GetCommandInvocationInputBuilder::default()
}
}
/// A builder for [`GetCommandInvocationInput`](crate::operation::get_command_invocation::GetCommandInvocationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetCommandInvocationInputBuilder {
pub(crate) command_id: ::std::option::Option<::std::string::String>,
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) plugin_name: ::std::option::Option<::std::string::String>,
}
impl GetCommandInvocationInputBuilder {
/// <p>(Required) The parent command ID of the invocation plugin.</p>
/// This field is required.
pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.command_id = ::std::option::Option::Some(input.into());
self
}
/// <p>(Required) The parent command ID of the invocation plugin.</p>
pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.command_id = input;
self
}
/// <p>(Required) The parent command ID of the invocation plugin.</p>
pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
&self.command_id
}
/// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
/// This field is required.
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
/// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
/// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
/// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
/// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
pub fn plugin_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.plugin_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
/// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
pub fn set_plugin_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.plugin_name = input;
self
}
/// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
/// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
pub fn get_plugin_name(&self) -> &::std::option::Option<::std::string::String> {
&self.plugin_name
}
/// Consumes the builder and constructs a [`GetCommandInvocationInput`](crate::operation::get_command_invocation::GetCommandInvocationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_command_invocation::GetCommandInvocationInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_command_invocation::GetCommandInvocationInput {
command_id: self.command_id,
instance_id: self.instance_id,
plugin_name: self.plugin_name,
})
}
}