Skip to main content

aws_sdk_glue/operation/update_crawler/
_update_crawler_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateCrawlerInput {
6    /// <p>Name of the new crawler.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The IAM role or Amazon Resource Name (ARN) of an IAM role that is used by the new crawler to access customer resources.</p>
9    pub role: ::std::option::Option<::std::string::String>,
10    /// <p>The Glue database where results are stored, such as: <code>arn:aws:daylight:us-east-1::database/sometable/*</code>.</p>
11    pub database_name: ::std::option::Option<::std::string::String>,
12    /// <p>A description of the new crawler.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>A list of targets to crawl.</p>
15    pub targets: ::std::option::Option<crate::types::CrawlerTargets>,
16    /// <p>A <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
17    pub schedule: ::std::option::Option<::std::string::String>,
18    /// <p>A list of custom classifiers that the user has registered. By default, all built-in classifiers are included in a crawl, but these custom classifiers always override the default classifiers for a given classification.</p>
19    pub classifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20    /// <p>The table prefix used for catalog tables that are created.</p>
21    pub table_prefix: ::std::option::Option<::std::string::String>,
22    /// <p>The policy for the crawler's update and deletion behavior.</p>
23    pub schema_change_policy: ::std::option::Option<crate::types::SchemaChangePolicy>,
24    /// <p>A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.</p>
25    pub recrawl_policy: ::std::option::Option<crate::types::RecrawlPolicy>,
26    /// <p>Specifies data lineage configuration settings for the crawler.</p>
27    pub lineage_configuration: ::std::option::Option<crate::types::LineageConfiguration>,
28    /// <p>Specifies Lake Formation configuration settings for the crawler.</p>
29    pub lake_formation_configuration: ::std::option::Option<crate::types::LakeFormationConfiguration>,
30    /// <p>Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html">Setting crawler configuration options</a>.</p>
31    pub configuration: ::std::option::Option<::std::string::String>,
32    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used by this crawler.</p>
33    pub crawler_security_configuration: ::std::option::Option<::std::string::String>,
34    /// <p>The ID of the Data Catalog in which to store the crawler's output. If you omit this value, the existing value on the crawler is preserved.</p>
35    pub catalog_id: ::std::option::Option<::std::string::String>,
36}
37impl UpdateCrawlerInput {
38    /// <p>Name of the new crawler.</p>
39    pub fn name(&self) -> ::std::option::Option<&str> {
40        self.name.as_deref()
41    }
42    /// <p>The IAM role or Amazon Resource Name (ARN) of an IAM role that is used by the new crawler to access customer resources.</p>
43    pub fn role(&self) -> ::std::option::Option<&str> {
44        self.role.as_deref()
45    }
46    /// <p>The Glue database where results are stored, such as: <code>arn:aws:daylight:us-east-1::database/sometable/*</code>.</p>
47    pub fn database_name(&self) -> ::std::option::Option<&str> {
48        self.database_name.as_deref()
49    }
50    /// <p>A description of the new crawler.</p>
51    pub fn description(&self) -> ::std::option::Option<&str> {
52        self.description.as_deref()
53    }
54    /// <p>A list of targets to crawl.</p>
55    pub fn targets(&self) -> ::std::option::Option<&crate::types::CrawlerTargets> {
56        self.targets.as_ref()
57    }
58    /// <p>A <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
59    pub fn schedule(&self) -> ::std::option::Option<&str> {
60        self.schedule.as_deref()
61    }
62    /// <p>A list of custom classifiers that the user has registered. By default, all built-in classifiers are included in a crawl, but these custom classifiers always override the default classifiers for a given classification.</p>
63    ///
64    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.classifiers.is_none()`.
65    pub fn classifiers(&self) -> &[::std::string::String] {
66        self.classifiers.as_deref().unwrap_or_default()
67    }
68    /// <p>The table prefix used for catalog tables that are created.</p>
69    pub fn table_prefix(&self) -> ::std::option::Option<&str> {
70        self.table_prefix.as_deref()
71    }
72    /// <p>The policy for the crawler's update and deletion behavior.</p>
73    pub fn schema_change_policy(&self) -> ::std::option::Option<&crate::types::SchemaChangePolicy> {
74        self.schema_change_policy.as_ref()
75    }
76    /// <p>A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.</p>
77    pub fn recrawl_policy(&self) -> ::std::option::Option<&crate::types::RecrawlPolicy> {
78        self.recrawl_policy.as_ref()
79    }
80    /// <p>Specifies data lineage configuration settings for the crawler.</p>
81    pub fn lineage_configuration(&self) -> ::std::option::Option<&crate::types::LineageConfiguration> {
82        self.lineage_configuration.as_ref()
83    }
84    /// <p>Specifies Lake Formation configuration settings for the crawler.</p>
85    pub fn lake_formation_configuration(&self) -> ::std::option::Option<&crate::types::LakeFormationConfiguration> {
86        self.lake_formation_configuration.as_ref()
87    }
88    /// <p>Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html">Setting crawler configuration options</a>.</p>
89    pub fn configuration(&self) -> ::std::option::Option<&str> {
90        self.configuration.as_deref()
91    }
92    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used by this crawler.</p>
93    pub fn crawler_security_configuration(&self) -> ::std::option::Option<&str> {
94        self.crawler_security_configuration.as_deref()
95    }
96    /// <p>The ID of the Data Catalog in which to store the crawler's output. If you omit this value, the existing value on the crawler is preserved.</p>
97    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
98        self.catalog_id.as_deref()
99    }
100}
101impl UpdateCrawlerInput {
102    /// Creates a new builder-style object to manufacture [`UpdateCrawlerInput`](crate::operation::update_crawler::UpdateCrawlerInput).
103    pub fn builder() -> crate::operation::update_crawler::builders::UpdateCrawlerInputBuilder {
104        crate::operation::update_crawler::builders::UpdateCrawlerInputBuilder::default()
105    }
106}
107
108/// A builder for [`UpdateCrawlerInput`](crate::operation::update_crawler::UpdateCrawlerInput).
109#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
110#[non_exhaustive]
111pub struct UpdateCrawlerInputBuilder {
112    pub(crate) name: ::std::option::Option<::std::string::String>,
113    pub(crate) role: ::std::option::Option<::std::string::String>,
114    pub(crate) database_name: ::std::option::Option<::std::string::String>,
115    pub(crate) description: ::std::option::Option<::std::string::String>,
116    pub(crate) targets: ::std::option::Option<crate::types::CrawlerTargets>,
117    pub(crate) schedule: ::std::option::Option<::std::string::String>,
118    pub(crate) classifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
119    pub(crate) table_prefix: ::std::option::Option<::std::string::String>,
120    pub(crate) schema_change_policy: ::std::option::Option<crate::types::SchemaChangePolicy>,
121    pub(crate) recrawl_policy: ::std::option::Option<crate::types::RecrawlPolicy>,
122    pub(crate) lineage_configuration: ::std::option::Option<crate::types::LineageConfiguration>,
123    pub(crate) lake_formation_configuration: ::std::option::Option<crate::types::LakeFormationConfiguration>,
124    pub(crate) configuration: ::std::option::Option<::std::string::String>,
125    pub(crate) crawler_security_configuration: ::std::option::Option<::std::string::String>,
126    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
127}
128impl UpdateCrawlerInputBuilder {
129    /// <p>Name of the new crawler.</p>
130    /// This field is required.
131    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.name = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <p>Name of the new crawler.</p>
136    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.name = input;
138        self
139    }
140    /// <p>Name of the new crawler.</p>
141    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
142        &self.name
143    }
144    /// <p>The IAM role or Amazon Resource Name (ARN) of an IAM role that is used by the new crawler to access customer resources.</p>
145    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.role = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The IAM role or Amazon Resource Name (ARN) of an IAM role that is used by the new crawler to access customer resources.</p>
150    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.role = input;
152        self
153    }
154    /// <p>The IAM role or Amazon Resource Name (ARN) of an IAM role that is used by the new crawler to access customer resources.</p>
155    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
156        &self.role
157    }
158    /// <p>The Glue database where results are stored, such as: <code>arn:aws:daylight:us-east-1::database/sometable/*</code>.</p>
159    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.database_name = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The Glue database where results are stored, such as: <code>arn:aws:daylight:us-east-1::database/sometable/*</code>.</p>
164    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.database_name = input;
166        self
167    }
168    /// <p>The Glue database where results are stored, such as: <code>arn:aws:daylight:us-east-1::database/sometable/*</code>.</p>
169    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
170        &self.database_name
171    }
172    /// <p>A description of the new crawler.</p>
173    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.description = ::std::option::Option::Some(input.into());
175        self
176    }
177    /// <p>A description of the new crawler.</p>
178    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.description = input;
180        self
181    }
182    /// <p>A description of the new crawler.</p>
183    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
184        &self.description
185    }
186    /// <p>A list of targets to crawl.</p>
187    pub fn targets(mut self, input: crate::types::CrawlerTargets) -> Self {
188        self.targets = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>A list of targets to crawl.</p>
192    pub fn set_targets(mut self, input: ::std::option::Option<crate::types::CrawlerTargets>) -> Self {
193        self.targets = input;
194        self
195    }
196    /// <p>A list of targets to crawl.</p>
197    pub fn get_targets(&self) -> &::std::option::Option<crate::types::CrawlerTargets> {
198        &self.targets
199    }
200    /// <p>A <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
201    pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.schedule = ::std::option::Option::Some(input.into());
203        self
204    }
205    /// <p>A <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
206    pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.schedule = input;
208        self
209    }
210    /// <p>A <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
211    pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
212        &self.schedule
213    }
214    /// Appends an item to `classifiers`.
215    ///
216    /// To override the contents of this collection use [`set_classifiers`](Self::set_classifiers).
217    ///
218    /// <p>A list of custom classifiers that the user has registered. By default, all built-in classifiers are included in a crawl, but these custom classifiers always override the default classifiers for a given classification.</p>
219    pub fn classifiers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220        let mut v = self.classifiers.unwrap_or_default();
221        v.push(input.into());
222        self.classifiers = ::std::option::Option::Some(v);
223        self
224    }
225    /// <p>A list of custom classifiers that the user has registered. By default, all built-in classifiers are included in a crawl, but these custom classifiers always override the default classifiers for a given classification.</p>
226    pub fn set_classifiers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
227        self.classifiers = input;
228        self
229    }
230    /// <p>A list of custom classifiers that the user has registered. By default, all built-in classifiers are included in a crawl, but these custom classifiers always override the default classifiers for a given classification.</p>
231    pub fn get_classifiers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
232        &self.classifiers
233    }
234    /// <p>The table prefix used for catalog tables that are created.</p>
235    pub fn table_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
236        self.table_prefix = ::std::option::Option::Some(input.into());
237        self
238    }
239    /// <p>The table prefix used for catalog tables that are created.</p>
240    pub fn set_table_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
241        self.table_prefix = input;
242        self
243    }
244    /// <p>The table prefix used for catalog tables that are created.</p>
245    pub fn get_table_prefix(&self) -> &::std::option::Option<::std::string::String> {
246        &self.table_prefix
247    }
248    /// <p>The policy for the crawler's update and deletion behavior.</p>
249    pub fn schema_change_policy(mut self, input: crate::types::SchemaChangePolicy) -> Self {
250        self.schema_change_policy = ::std::option::Option::Some(input);
251        self
252    }
253    /// <p>The policy for the crawler's update and deletion behavior.</p>
254    pub fn set_schema_change_policy(mut self, input: ::std::option::Option<crate::types::SchemaChangePolicy>) -> Self {
255        self.schema_change_policy = input;
256        self
257    }
258    /// <p>The policy for the crawler's update and deletion behavior.</p>
259    pub fn get_schema_change_policy(&self) -> &::std::option::Option<crate::types::SchemaChangePolicy> {
260        &self.schema_change_policy
261    }
262    /// <p>A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.</p>
263    pub fn recrawl_policy(mut self, input: crate::types::RecrawlPolicy) -> Self {
264        self.recrawl_policy = ::std::option::Option::Some(input);
265        self
266    }
267    /// <p>A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.</p>
268    pub fn set_recrawl_policy(mut self, input: ::std::option::Option<crate::types::RecrawlPolicy>) -> Self {
269        self.recrawl_policy = input;
270        self
271    }
272    /// <p>A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.</p>
273    pub fn get_recrawl_policy(&self) -> &::std::option::Option<crate::types::RecrawlPolicy> {
274        &self.recrawl_policy
275    }
276    /// <p>Specifies data lineage configuration settings for the crawler.</p>
277    pub fn lineage_configuration(mut self, input: crate::types::LineageConfiguration) -> Self {
278        self.lineage_configuration = ::std::option::Option::Some(input);
279        self
280    }
281    /// <p>Specifies data lineage configuration settings for the crawler.</p>
282    pub fn set_lineage_configuration(mut self, input: ::std::option::Option<crate::types::LineageConfiguration>) -> Self {
283        self.lineage_configuration = input;
284        self
285    }
286    /// <p>Specifies data lineage configuration settings for the crawler.</p>
287    pub fn get_lineage_configuration(&self) -> &::std::option::Option<crate::types::LineageConfiguration> {
288        &self.lineage_configuration
289    }
290    /// <p>Specifies Lake Formation configuration settings for the crawler.</p>
291    pub fn lake_formation_configuration(mut self, input: crate::types::LakeFormationConfiguration) -> Self {
292        self.lake_formation_configuration = ::std::option::Option::Some(input);
293        self
294    }
295    /// <p>Specifies Lake Formation configuration settings for the crawler.</p>
296    pub fn set_lake_formation_configuration(mut self, input: ::std::option::Option<crate::types::LakeFormationConfiguration>) -> Self {
297        self.lake_formation_configuration = input;
298        self
299    }
300    /// <p>Specifies Lake Formation configuration settings for the crawler.</p>
301    pub fn get_lake_formation_configuration(&self) -> &::std::option::Option<crate::types::LakeFormationConfiguration> {
302        &self.lake_formation_configuration
303    }
304    /// <p>Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html">Setting crawler configuration options</a>.</p>
305    pub fn configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.configuration = ::std::option::Option::Some(input.into());
307        self
308    }
309    /// <p>Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html">Setting crawler configuration options</a>.</p>
310    pub fn set_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311        self.configuration = input;
312        self
313    }
314    /// <p>Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html">Setting crawler configuration options</a>.</p>
315    pub fn get_configuration(&self) -> &::std::option::Option<::std::string::String> {
316        &self.configuration
317    }
318    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used by this crawler.</p>
319    pub fn crawler_security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320        self.crawler_security_configuration = ::std::option::Option::Some(input.into());
321        self
322    }
323    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used by this crawler.</p>
324    pub fn set_crawler_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
325        self.crawler_security_configuration = input;
326        self
327    }
328    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used by this crawler.</p>
329    pub fn get_crawler_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
330        &self.crawler_security_configuration
331    }
332    /// <p>The ID of the Data Catalog in which to store the crawler's output. If you omit this value, the existing value on the crawler is preserved.</p>
333    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
334        self.catalog_id = ::std::option::Option::Some(input.into());
335        self
336    }
337    /// <p>The ID of the Data Catalog in which to store the crawler's output. If you omit this value, the existing value on the crawler is preserved.</p>
338    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
339        self.catalog_id = input;
340        self
341    }
342    /// <p>The ID of the Data Catalog in which to store the crawler's output. If you omit this value, the existing value on the crawler is preserved.</p>
343    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
344        &self.catalog_id
345    }
346    /// Consumes the builder and constructs a [`UpdateCrawlerInput`](crate::operation::update_crawler::UpdateCrawlerInput).
347    pub fn build(
348        self,
349    ) -> ::std::result::Result<crate::operation::update_crawler::UpdateCrawlerInput, ::aws_smithy_types::error::operation::BuildError> {
350        ::std::result::Result::Ok(crate::operation::update_crawler::UpdateCrawlerInput {
351            name: self.name,
352            role: self.role,
353            database_name: self.database_name,
354            description: self.description,
355            targets: self.targets,
356            schedule: self.schedule,
357            classifiers: self.classifiers,
358            table_prefix: self.table_prefix,
359            schema_change_policy: self.schema_change_policy,
360            recrawl_policy: self.recrawl_policy,
361            lineage_configuration: self.lineage_configuration,
362            lake_formation_configuration: self.lake_formation_configuration,
363            configuration: self.configuration,
364            crawler_security_configuration: self.crawler_security_configuration,
365            catalog_id: self.catalog_id,
366        })
367    }
368}