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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Defines an action to be initiated by a trigger.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Action {
/// <p>The name of a job to be run.</p>
pub job_name: ::std::option::Option<::std::string::String>,
/// <p>The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.</p>
/// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
/// <p>For information about how to specify and consume your own Job arguments, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html">Calling Glue APIs in Python</a> topic in the developer guide.</p>
/// <p>For information about the key-value pairs that Glue consumes to set up your job, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html">Special Parameters Used by Glue</a> topic in the developer guide.</p>
pub arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The <code>JobRun</code> timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. This overrides the timeout value set in the parent job.</p>
/// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
/// <p>When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.</p>
/// <p>Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day.</p>
/// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
pub timeout: ::std::option::Option<i32>,
/// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this action.</p>
pub security_configuration: ::std::option::Option<::std::string::String>,
/// <p>Specifies configuration properties of a job run notification.</p>
pub notification_property: ::std::option::Option<crate::types::NotificationProperty>,
/// <p>The name of the crawler to be used with this action.</p>
pub crawler_name: ::std::option::Option<::std::string::String>,
}
impl Action {
/// <p>The name of a job to be run.</p>
pub fn job_name(&self) -> ::std::option::Option<&str> {
self.job_name.as_deref()
}
/// <p>The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.</p>
/// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
/// <p>For information about how to specify and consume your own Job arguments, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html">Calling Glue APIs in Python</a> topic in the developer guide.</p>
/// <p>For information about the key-value pairs that Glue consumes to set up your job, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html">Special Parameters Used by Glue</a> topic in the developer guide.</p>
pub fn arguments(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.arguments.as_ref()
}
/// <p>The <code>JobRun</code> timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. This overrides the timeout value set in the parent job.</p>
/// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
/// <p>When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.</p>
/// <p>Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day.</p>
/// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
pub fn timeout(&self) -> ::std::option::Option<i32> {
self.timeout
}
/// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this action.</p>
pub fn security_configuration(&self) -> ::std::option::Option<&str> {
self.security_configuration.as_deref()
}
/// <p>Specifies configuration properties of a job run notification.</p>
pub fn notification_property(&self) -> ::std::option::Option<&crate::types::NotificationProperty> {
self.notification_property.as_ref()
}
/// <p>The name of the crawler to be used with this action.</p>
pub fn crawler_name(&self) -> ::std::option::Option<&str> {
self.crawler_name.as_deref()
}
}
impl Action {
/// Creates a new builder-style object to manufacture [`Action`](crate::types::Action).
pub fn builder() -> crate::types::builders::ActionBuilder {
crate::types::builders::ActionBuilder::default()
}
}
/// A builder for [`Action`](crate::types::Action).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActionBuilder {
pub(crate) job_name: ::std::option::Option<::std::string::String>,
pub(crate) arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) timeout: ::std::option::Option<i32>,
pub(crate) security_configuration: ::std::option::Option<::std::string::String>,
pub(crate) notification_property: ::std::option::Option<crate::types::NotificationProperty>,
pub(crate) crawler_name: ::std::option::Option<::std::string::String>,
}
impl ActionBuilder {
/// <p>The name of a job to be run.</p>
pub fn job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of a job to be run.</p>
pub fn set_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_name = input;
self
}
/// <p>The name of a job to be run.</p>
pub fn get_job_name(&self) -> &::std::option::Option<::std::string::String> {
&self.job_name
}
/// Adds a key-value pair to `arguments`.
///
/// To override the contents of this collection use [`set_arguments`](Self::set_arguments).
///
/// <p>The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.</p>
/// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
/// <p>For information about how to specify and consume your own Job arguments, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html">Calling Glue APIs in Python</a> topic in the developer guide.</p>
/// <p>For information about the key-value pairs that Glue consumes to set up your job, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html">Special Parameters Used by Glue</a> topic in the developer guide.</p>
pub fn arguments(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.arguments.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.arguments = ::std::option::Option::Some(hash_map);
self
}
/// <p>The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.</p>
/// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
/// <p>For information about how to specify and consume your own Job arguments, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html">Calling Glue APIs in Python</a> topic in the developer guide.</p>
/// <p>For information about the key-value pairs that Glue consumes to set up your job, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html">Special Parameters Used by Glue</a> topic in the developer guide.</p>
pub fn set_arguments(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.arguments = input;
self
}
/// <p>The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.</p>
/// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
/// <p>For information about how to specify and consume your own Job arguments, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html">Calling Glue APIs in Python</a> topic in the developer guide.</p>
/// <p>For information about the key-value pairs that Glue consumes to set up your job, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html">Special Parameters Used by Glue</a> topic in the developer guide.</p>
pub fn get_arguments(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.arguments
}
/// <p>The <code>JobRun</code> timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. This overrides the timeout value set in the parent job.</p>
/// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
/// <p>When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.</p>
/// <p>Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day.</p>
/// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
pub fn timeout(mut self, input: i32) -> Self {
self.timeout = ::std::option::Option::Some(input);
self
}
/// <p>The <code>JobRun</code> timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. This overrides the timeout value set in the parent job.</p>
/// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
/// <p>When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.</p>
/// <p>Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day.</p>
/// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
self.timeout = input;
self
}
/// <p>The <code>JobRun</code> timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. This overrides the timeout value set in the parent job.</p>
/// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
/// <p>When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.</p>
/// <p>Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day.</p>
/// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
pub fn get_timeout(&self) -> &::std::option::Option<i32> {
&self.timeout
}
/// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this action.</p>
pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.security_configuration = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this action.</p>
pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.security_configuration = input;
self
}
/// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this action.</p>
pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
&self.security_configuration
}
/// <p>Specifies configuration properties of a job run notification.</p>
pub fn notification_property(mut self, input: crate::types::NotificationProperty) -> Self {
self.notification_property = ::std::option::Option::Some(input);
self
}
/// <p>Specifies configuration properties of a job run notification.</p>
pub fn set_notification_property(mut self, input: ::std::option::Option<crate::types::NotificationProperty>) -> Self {
self.notification_property = input;
self
}
/// <p>Specifies configuration properties of a job run notification.</p>
pub fn get_notification_property(&self) -> &::std::option::Option<crate::types::NotificationProperty> {
&self.notification_property
}
/// <p>The name of the crawler to be used with this action.</p>
pub fn crawler_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.crawler_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the crawler to be used with this action.</p>
pub fn set_crawler_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.crawler_name = input;
self
}
/// <p>The name of the crawler to be used with this action.</p>
pub fn get_crawler_name(&self) -> &::std::option::Option<::std::string::String> {
&self.crawler_name
}
/// Consumes the builder and constructs a [`Action`](crate::types::Action).
pub fn build(self) -> crate::types::Action {
crate::types::Action {
job_name: self.job_name,
arguments: self.arguments,
timeout: self.timeout,
security_configuration: self.security_configuration,
notification_property: self.notification_property,
crawler_name: self.crawler_name,
}
}
}