1 - | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// <p>The inventory table configuration for an S3 Metadata configuration.</p>
|
4 - | #[non_exhaustive]
|
5 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 - | pub struct InventoryTableConfigurationResult {
|
7 - | /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
|
8 - | pub configuration_state: crate::types::InventoryConfigurationState,
|
9 - | /// <p>The status of the inventory table. The status values are:</p>
|
10 - | /// <ul>
|
11 - | /// <li>
|
12 - | /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
|
13 - | /// <li>
|
14 - | /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
|
15 - | /// <li>
|
16 - | /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
|
17 - | /// <li>
|
18 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
|
19 - | /// </ul>
|
20 - | pub table_status: ::std::option::Option<::std::string::String>,
|
21 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
22 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
23 - | /// </note>
|
24 - | pub error: ::std::option::Option<crate::types::ErrorDetails>,
|
25 - | /// <p>The name of the inventory table.</p>
|
26 - | pub table_name: ::std::option::Option<::std::string::String>,
|
27 - | /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
|
28 - | pub table_arn: ::std::option::Option<::std::string::String>,
|
29 - | }
|
30 - | impl InventoryTableConfigurationResult {
|
31 - | /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
|
32 - | pub fn configuration_state(&self) -> &crate::types::InventoryConfigurationState {
|
33 - | &self.configuration_state
|
34 - | }
|
35 - | /// <p>The status of the inventory table. The status values are:</p>
|
36 - | /// <ul>
|
37 - | /// <li>
|
38 - | /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
|
39 - | /// <li>
|
40 - | /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
|
41 - | /// <li>
|
42 - | /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
|
43 - | /// <li>
|
44 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
|
45 - | /// </ul>
|
46 - | pub fn table_status(&self) -> ::std::option::Option<&str> {
|
47 - | self.table_status.as_deref()
|
48 - | }
|
49 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
50 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
51 - | /// </note>
|
52 - | pub fn error(&self) -> ::std::option::Option<&crate::types::ErrorDetails> {
|
53 - | self.error.as_ref()
|
54 - | }
|
55 - | /// <p>The name of the inventory table.</p>
|
56 - | pub fn table_name(&self) -> ::std::option::Option<&str> {
|
57 - | self.table_name.as_deref()
|
58 - | }
|
59 - | /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
|
60 - | pub fn table_arn(&self) -> ::std::option::Option<&str> {
|
61 - | self.table_arn.as_deref()
|
62 - | }
|
63 - | }
|
64 - | impl InventoryTableConfigurationResult {
|
65 - | /// Creates a new builder-style object to manufacture [`InventoryTableConfigurationResult`](crate::types::InventoryTableConfigurationResult).
|
66 - | pub fn builder() -> crate::types::builders::InventoryTableConfigurationResultBuilder {
|
67 - | crate::types::builders::InventoryTableConfigurationResultBuilder::default()
|
68 - | }
|
69 - | }
|
70 - |
|
71 - | /// A builder for [`InventoryTableConfigurationResult`](crate::types::InventoryTableConfigurationResult).
|
72 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
73 - | #[non_exhaustive]
|
74 - | pub struct InventoryTableConfigurationResultBuilder {
|
75 - | pub(crate) configuration_state: ::std::option::Option<crate::types::InventoryConfigurationState>,
|
76 - | pub(crate) table_status: ::std::option::Option<::std::string::String>,
|
77 - | pub(crate) error: ::std::option::Option<crate::types::ErrorDetails>,
|
78 - | pub(crate) table_name: ::std::option::Option<::std::string::String>,
|
79 - | pub(crate) table_arn: ::std::option::Option<::std::string::String>,
|
80 - | }
|
81 - | impl InventoryTableConfigurationResultBuilder {
|
82 - | /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
|
83 - | /// This field is required.
|
84 - | pub fn configuration_state(mut self, input: crate::types::InventoryConfigurationState) -> Self {
|
85 - | self.configuration_state = ::std::option::Option::Some(input);
|
86 - | self
|
87 - | }
|
88 - | /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
|
89 - | pub fn set_configuration_state(mut self, input: ::std::option::Option<crate::types::InventoryConfigurationState>) -> Self {
|
90 - | self.configuration_state = input;
|
91 - | self
|
92 - | }
|
93 - | /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
|
94 - | pub fn get_configuration_state(&self) -> &::std::option::Option<crate::types::InventoryConfigurationState> {
|
95 - | &self.configuration_state
|
96 - | }
|
97 - | /// <p>The status of the inventory table. The status values are:</p>
|
98 - | /// <ul>
|
99 - | /// <li>
|
100 - | /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
|
101 - | /// <li>
|
102 - | /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
|
103 - | /// <li>
|
104 - | /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
|
105 - | /// <li>
|
106 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
|
107 - | /// </ul>
|
108 - | pub fn table_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
109 - | self.table_status = ::std::option::Option::Some(input.into());
|
110 - | self
|
111 - | }
|
112 - | /// <p>The status of the inventory table. The status values are:</p>
|
113 - | /// <ul>
|
114 - | /// <li>
|
115 - | /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
|
116 - | /// <li>
|
117 - | /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
|
118 - | /// <li>
|
119 - | /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
|
120 - | /// <li>
|
121 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
|
122 - | /// </ul>
|
123 - | pub fn set_table_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
124 - | self.table_status = input;
|
125 - | self
|
126 - | }
|
127 - | /// <p>The status of the inventory table. The status values are:</p>
|
128 - | /// <ul>
|
129 - | /// <li>
|
130 - | /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
|
131 - | /// <li>
|
132 - | /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
|
133 - | /// <li>
|
134 - | /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
|
135 - | /// <li>
|
136 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
|
137 - | /// </ul>
|
138 - | pub fn get_table_status(&self) -> &::std::option::Option<::std::string::String> {
|
139 - | &self.table_status
|
140 - | }
|
141 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
142 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
143 - | /// </note>
|
144 - | pub fn error(mut self, input: crate::types::ErrorDetails) -> Self {
|
145 - | self.error = ::std::option::Option::Some(input);
|
146 - | self
|
147 - | }
|
148 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
149 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
150 - | /// </note>
|
151 - | pub fn set_error(mut self, input: ::std::option::Option<crate::types::ErrorDetails>) -> Self {
|
152 - | self.error = input;
|
153 - | self
|
154 - | }
|
155 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
156 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
157 - | /// </note>
|
158 - | pub fn get_error(&self) -> &::std::option::Option<crate::types::ErrorDetails> {
|
159 - | &self.error
|
160 - | }
|
161 - | /// <p>The name of the inventory table.</p>
|
162 - | pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
163 - | self.table_name = ::std::option::Option::Some(input.into());
|
164 - | self
|
165 - | }
|
166 - | /// <p>The name of the inventory table.</p>
|
167 - | pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
168 - | self.table_name = input;
|
169 - | self
|
170 - | }
|
171 - | /// <p>The name of the inventory table.</p>
|
172 - | pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
|
173 - | &self.table_name
|
174 - | }
|
175 - | /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
|
176 - | pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
177 - | self.table_arn = ::std::option::Option::Some(input.into());
|
178 - | self
|
179 - | }
|
180 - | /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
|
181 - | pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
182 - | self.table_arn = input;
|
183 - | self
|
184 - | }
|
185 - | /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
|
186 - | pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> {
|
187 - | &self.table_arn
|
188 - | }
|
189 - | /// Consumes the builder and constructs a [`InventoryTableConfigurationResult`](crate::types::InventoryTableConfigurationResult).
|
190 - | /// This method will fail if any of the following fields are not set:
|
191 - | /// - [`configuration_state`](crate::types::builders::InventoryTableConfigurationResultBuilder::configuration_state)
|
192 - | pub fn build(self) -> ::std::result::Result<crate::types::InventoryTableConfigurationResult, ::aws_smithy_types::error::operation::BuildError> {
|
193 - | ::std::result::Result::Ok(crate::types::InventoryTableConfigurationResult {
|
194 - | configuration_state: self.configuration_state.ok_or_else(|| {
|
195 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
196 - | "configuration_state",
|
197 - | "configuration_state was not specified but it is required when building InventoryTableConfigurationResult",
|
198 - | )
|
199 - | })?,
|
200 - | table_status: self.table_status,
|
201 - | error: self.error,
|
202 - | table_name: self.table_name,
|
203 - | table_arn: self.table_arn,
|
204 - | })
|
205 - | }
|
206 - | }
|