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
229
230
231
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies information about the replication destination bucket and its settings for an S3 on Outposts replication configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Destination {
/// <p>The destination bucket owner's account ID.</p>
pub account: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the access point for the destination bucket where you want S3 on Outposts to store the replication results.</p>
pub bucket: ::std::string::String,
/// <p>A container that specifies S3 Replication Time Control (S3 RTC) settings, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub replication_time: ::std::option::Option<crate::types::ReplicationTime>,
/// <p>Specify this property only in a cross-account scenario (where the source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this property is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub access_control_translation: ::std::option::Option<crate::types::AccessControlTranslation>,
/// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
/// <p>A container that specifies replication metrics-related settings.</p>
pub metrics: ::std::option::Option<crate::types::Metrics>,
/// <p>The storage class to use when replicating objects. All objects stored on S3 on Outposts are stored in the <code>OUTPOSTS</code> storage class. S3 on Outposts uses the <code>OUTPOSTS</code> storage class to create the object replicas.</p><note>
/// <p>Values other than <code>OUTPOSTS</code> aren't supported by Amazon S3 on Outposts.</p>
/// </note>
pub storage_class: ::std::option::Option<crate::types::ReplicationStorageClass>,
}
impl Destination {
/// <p>The destination bucket owner's account ID.</p>
pub fn account(&self) -> ::std::option::Option<&str> {
self.account.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the access point for the destination bucket where you want S3 on Outposts to store the replication results.</p>
pub fn bucket(&self) -> &str {
use std::ops::Deref;
self.bucket.deref()
}
/// <p>A container that specifies S3 Replication Time Control (S3 RTC) settings, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn replication_time(&self) -> ::std::option::Option<&crate::types::ReplicationTime> {
self.replication_time.as_ref()
}
/// <p>Specify this property only in a cross-account scenario (where the source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this property is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn access_control_translation(&self) -> ::std::option::Option<&crate::types::AccessControlTranslation> {
self.access_control_translation.as_ref()
}
/// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
self.encryption_configuration.as_ref()
}
/// <p>A container that specifies replication metrics-related settings.</p>
pub fn metrics(&self) -> ::std::option::Option<&crate::types::Metrics> {
self.metrics.as_ref()
}
/// <p>The storage class to use when replicating objects. All objects stored on S3 on Outposts are stored in the <code>OUTPOSTS</code> storage class. S3 on Outposts uses the <code>OUTPOSTS</code> storage class to create the object replicas.</p><note>
/// <p>Values other than <code>OUTPOSTS</code> aren't supported by Amazon S3 on Outposts.</p>
/// </note>
pub fn storage_class(&self) -> ::std::option::Option<&crate::types::ReplicationStorageClass> {
self.storage_class.as_ref()
}
}
impl Destination {
/// Creates a new builder-style object to manufacture [`Destination`](crate::types::Destination).
pub fn builder() -> crate::types::builders::DestinationBuilder {
crate::types::builders::DestinationBuilder::default()
}
}
/// A builder for [`Destination`](crate::types::Destination).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DestinationBuilder {
pub(crate) account: ::std::option::Option<::std::string::String>,
pub(crate) bucket: ::std::option::Option<::std::string::String>,
pub(crate) replication_time: ::std::option::Option<crate::types::ReplicationTime>,
pub(crate) access_control_translation: ::std::option::Option<crate::types::AccessControlTranslation>,
pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
pub(crate) metrics: ::std::option::Option<crate::types::Metrics>,
pub(crate) storage_class: ::std::option::Option<crate::types::ReplicationStorageClass>,
}
impl DestinationBuilder {
/// <p>The destination bucket owner's account ID.</p>
pub fn account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account = ::std::option::Option::Some(input.into());
self
}
/// <p>The destination bucket owner's account ID.</p>
pub fn set_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account = input;
self
}
/// <p>The destination bucket owner's account ID.</p>
pub fn get_account(&self) -> &::std::option::Option<::std::string::String> {
&self.account
}
/// <p>The Amazon Resource Name (ARN) of the access point for the destination bucket where you want S3 on Outposts to store the replication results.</p>
/// This field is required.
pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bucket = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the access point for the destination bucket where you want S3 on Outposts to store the replication results.</p>
pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bucket = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the access point for the destination bucket where you want S3 on Outposts to store the replication results.</p>
pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
&self.bucket
}
/// <p>A container that specifies S3 Replication Time Control (S3 RTC) settings, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn replication_time(mut self, input: crate::types::ReplicationTime) -> Self {
self.replication_time = ::std::option::Option::Some(input);
self
}
/// <p>A container that specifies S3 Replication Time Control (S3 RTC) settings, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn set_replication_time(mut self, input: ::std::option::Option<crate::types::ReplicationTime>) -> Self {
self.replication_time = input;
self
}
/// <p>A container that specifies S3 Replication Time Control (S3 RTC) settings, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn get_replication_time(&self) -> &::std::option::Option<crate::types::ReplicationTime> {
&self.replication_time
}
/// <p>Specify this property only in a cross-account scenario (where the source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this property is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn access_control_translation(mut self, input: crate::types::AccessControlTranslation) -> Self {
self.access_control_translation = ::std::option::Option::Some(input);
self
}
/// <p>Specify this property only in a cross-account scenario (where the source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this property is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn set_access_control_translation(mut self, input: ::std::option::Option<crate::types::AccessControlTranslation>) -> Self {
self.access_control_translation = input;
self
}
/// <p>Specify this property only in a cross-account scenario (where the source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this property is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn get_access_control_translation(&self) -> &::std::option::Option<crate::types::AccessControlTranslation> {
&self.access_control_translation
}
/// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
self.encryption_configuration = ::std::option::Option::Some(input);
self
}
/// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
self.encryption_configuration = input;
self
}
/// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p><note>
/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
&self.encryption_configuration
}
/// <p>A container that specifies replication metrics-related settings.</p>
pub fn metrics(mut self, input: crate::types::Metrics) -> Self {
self.metrics = ::std::option::Option::Some(input);
self
}
/// <p>A container that specifies replication metrics-related settings.</p>
pub fn set_metrics(mut self, input: ::std::option::Option<crate::types::Metrics>) -> Self {
self.metrics = input;
self
}
/// <p>A container that specifies replication metrics-related settings.</p>
pub fn get_metrics(&self) -> &::std::option::Option<crate::types::Metrics> {
&self.metrics
}
/// <p>The storage class to use when replicating objects. All objects stored on S3 on Outposts are stored in the <code>OUTPOSTS</code> storage class. S3 on Outposts uses the <code>OUTPOSTS</code> storage class to create the object replicas.</p><note>
/// <p>Values other than <code>OUTPOSTS</code> aren't supported by Amazon S3 on Outposts.</p>
/// </note>
pub fn storage_class(mut self, input: crate::types::ReplicationStorageClass) -> Self {
self.storage_class = ::std::option::Option::Some(input);
self
}
/// <p>The storage class to use when replicating objects. All objects stored on S3 on Outposts are stored in the <code>OUTPOSTS</code> storage class. S3 on Outposts uses the <code>OUTPOSTS</code> storage class to create the object replicas.</p><note>
/// <p>Values other than <code>OUTPOSTS</code> aren't supported by Amazon S3 on Outposts.</p>
/// </note>
pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::ReplicationStorageClass>) -> Self {
self.storage_class = input;
self
}
/// <p>The storage class to use when replicating objects. All objects stored on S3 on Outposts are stored in the <code>OUTPOSTS</code> storage class. S3 on Outposts uses the <code>OUTPOSTS</code> storage class to create the object replicas.</p><note>
/// <p>Values other than <code>OUTPOSTS</code> aren't supported by Amazon S3 on Outposts.</p>
/// </note>
pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::ReplicationStorageClass> {
&self.storage_class
}
/// Consumes the builder and constructs a [`Destination`](crate::types::Destination).
/// This method will fail if any of the following fields are not set:
/// - [`bucket`](crate::types::builders::DestinationBuilder::bucket)
pub fn build(self) -> ::std::result::Result<crate::types::Destination, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Destination {
account: self.account,
bucket: self.bucket.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"bucket",
"bucket was not specified but it is required when building Destination",
)
})?,
replication_time: self.replication_time,
access_control_translation: self.access_control_translation,
encryption_configuration: self.encryption_configuration,
metrics: self.metrics,
storage_class: self.storage_class,
})
}
}