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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains the parameters for modifying a volume, including the target size, volume type, IOPS, or throughput.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ModifyVolumeInput {
/// <p>Specifies the identifier of the volume to modify.</p>
pub volume_id: ::std::option::Option<::std::string::String>,
/// <p>Specifies the target size of the volume, in GiB. The target size must be greater than or equal to the current size of the volume. If you don't specify a size, the current size is retained.</p>
pub size_in_gb: ::std::option::Option<i32>,
/// <p>Specifies the target Amazon Elastic Block Store (Amazon EBS) volume type. If you don't specify a volume type, the current volume type is retained.</p>
pub volume_type: ::std::option::Option<crate::types::VolumeTypeEnum>,
/// <p>Specifies the target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes. If you don't specify IOPS and keep the same volume type, the current IOPS rate is retained.</p>
pub iops: ::std::option::Option<i32>,
/// <p>Specifies the target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes. If you don't specify throughput and the volume remains <code>gp3</code>, the current throughput is retained.</p>
pub throughput: ::std::option::Option<i32>,
/// <p>Unique token to ensure idempotent volume modification, preventing duplicate volume modifications.</p>
pub client_token: ::std::option::Option<::std::string::String>,
}
impl ModifyVolumeInput {
/// <p>Specifies the identifier of the volume to modify.</p>
pub fn volume_id(&self) -> ::std::option::Option<&str> {
self.volume_id.as_deref()
}
/// <p>Specifies the target size of the volume, in GiB. The target size must be greater than or equal to the current size of the volume. If you don't specify a size, the current size is retained.</p>
pub fn size_in_gb(&self) -> ::std::option::Option<i32> {
self.size_in_gb
}
/// <p>Specifies the target Amazon Elastic Block Store (Amazon EBS) volume type. If you don't specify a volume type, the current volume type is retained.</p>
pub fn volume_type(&self) -> ::std::option::Option<&crate::types::VolumeTypeEnum> {
self.volume_type.as_ref()
}
/// <p>Specifies the target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes. If you don't specify IOPS and keep the same volume type, the current IOPS rate is retained.</p>
pub fn iops(&self) -> ::std::option::Option<i32> {
self.iops
}
/// <p>Specifies the target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes. If you don't specify throughput and the volume remains <code>gp3</code>, the current throughput is retained.</p>
pub fn throughput(&self) -> ::std::option::Option<i32> {
self.throughput
}
/// <p>Unique token to ensure idempotent volume modification, preventing duplicate volume modifications.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl ::std::fmt::Debug for ModifyVolumeInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ModifyVolumeInput");
formatter.field("volume_id", &self.volume_id);
formatter.field("size_in_gb", &self.size_in_gb);
formatter.field("volume_type", &self.volume_type);
formatter.field("iops", &self.iops);
formatter.field("throughput", &self.throughput);
formatter.field("client_token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl ModifyVolumeInput {
/// Creates a new builder-style object to manufacture [`ModifyVolumeInput`](crate::operation::modify_volume::ModifyVolumeInput).
pub fn builder() -> crate::operation::modify_volume::builders::ModifyVolumeInputBuilder {
crate::operation::modify_volume::builders::ModifyVolumeInputBuilder::default()
}
}
/// A builder for [`ModifyVolumeInput`](crate::operation::modify_volume::ModifyVolumeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ModifyVolumeInputBuilder {
pub(crate) volume_id: ::std::option::Option<::std::string::String>,
pub(crate) size_in_gb: ::std::option::Option<i32>,
pub(crate) volume_type: ::std::option::Option<crate::types::VolumeTypeEnum>,
pub(crate) iops: ::std::option::Option<i32>,
pub(crate) throughput: ::std::option::Option<i32>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl ModifyVolumeInputBuilder {
/// <p>Specifies the identifier of the volume to modify.</p>
/// This field is required.
pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.volume_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the identifier of the volume to modify.</p>
pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.volume_id = input;
self
}
/// <p>Specifies the identifier of the volume to modify.</p>
pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
&self.volume_id
}
/// <p>Specifies the target size of the volume, in GiB. The target size must be greater than or equal to the current size of the volume. If you don't specify a size, the current size is retained.</p>
pub fn size_in_gb(mut self, input: i32) -> Self {
self.size_in_gb = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the target size of the volume, in GiB. The target size must be greater than or equal to the current size of the volume. If you don't specify a size, the current size is retained.</p>
pub fn set_size_in_gb(mut self, input: ::std::option::Option<i32>) -> Self {
self.size_in_gb = input;
self
}
/// <p>Specifies the target size of the volume, in GiB. The target size must be greater than or equal to the current size of the volume. If you don't specify a size, the current size is retained.</p>
pub fn get_size_in_gb(&self) -> &::std::option::Option<i32> {
&self.size_in_gb
}
/// <p>Specifies the target Amazon Elastic Block Store (Amazon EBS) volume type. If you don't specify a volume type, the current volume type is retained.</p>
pub fn volume_type(mut self, input: crate::types::VolumeTypeEnum) -> Self {
self.volume_type = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the target Amazon Elastic Block Store (Amazon EBS) volume type. If you don't specify a volume type, the current volume type is retained.</p>
pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeTypeEnum>) -> Self {
self.volume_type = input;
self
}
/// <p>Specifies the target Amazon Elastic Block Store (Amazon EBS) volume type. If you don't specify a volume type, the current volume type is retained.</p>
pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeTypeEnum> {
&self.volume_type
}
/// <p>Specifies the target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes. If you don't specify IOPS and keep the same volume type, the current IOPS rate is retained.</p>
pub fn iops(mut self, input: i32) -> Self {
self.iops = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes. If you don't specify IOPS and keep the same volume type, the current IOPS rate is retained.</p>
pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
self.iops = input;
self
}
/// <p>Specifies the target IOPS rate of the volume. This parameter is valid only for <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes. If you don't specify IOPS and keep the same volume type, the current IOPS rate is retained.</p>
pub fn get_iops(&self) -> &::std::option::Option<i32> {
&self.iops
}
/// <p>Specifies the target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes. If you don't specify throughput and the volume remains <code>gp3</code>, the current throughput is retained.</p>
pub fn throughput(mut self, input: i32) -> Self {
self.throughput = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes. If you don't specify throughput and the volume remains <code>gp3</code>, the current throughput is retained.</p>
pub fn set_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
self.throughput = input;
self
}
/// <p>Specifies the target throughput of the volume, in MiB/s. This parameter is valid only for <code>gp3</code> volumes. If you don't specify throughput and the volume remains <code>gp3</code>, the current throughput is retained.</p>
pub fn get_throughput(&self) -> &::std::option::Option<i32> {
&self.throughput
}
/// <p>Unique token to ensure idempotent volume modification, preventing duplicate volume modifications.</p>
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// <p>Unique token to ensure idempotent volume modification, preventing duplicate volume modifications.</p>
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// <p>Unique token to ensure idempotent volume modification, preventing duplicate volume modifications.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// Consumes the builder and constructs a [`ModifyVolumeInput`](crate::operation::modify_volume::ModifyVolumeInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::modify_volume::ModifyVolumeInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::modify_volume::ModifyVolumeInput {
volume_id: self.volume_id,
size_in_gb: self.size_in_gb,
volume_type: self.volume_type,
iops: self.iops,
throughput: self.throughput,
client_token: self.client_token,
})
}
}
impl ::std::fmt::Debug for ModifyVolumeInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ModifyVolumeInputBuilder");
formatter.field("volume_id", &self.volume_id);
formatter.field("size_in_gb", &self.size_in_gb);
formatter.field("volume_type", &self.volume_type);
formatter.field("iops", &self.iops);
formatter.field("throughput", &self.throughput);
formatter.field("client_token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}