@@ -36,7 +36,11 @@ class EC2StartInstanceOperator(BaseOperator):
36
36
:ref:`howto/operator:EC2StartInstanceOperator`
37
37
38
38
:param instance_id: id of the AWS EC2 instance
39
- :param aws_conn_id: aws connection to use
39
+ :param aws_conn_id: The Airflow connection used for AWS credentials.
40
+ If this is None or empty then the default boto3 behaviour is used. If
41
+ running Airflow in a distributed manner and aws_conn_id is None or
42
+ empty, then default boto3 configuration would be used (and must be
43
+ maintained on each worker node).
40
44
:param region_name: (optional) aws region name associated with the client
41
45
:param check_interval: time in seconds that the job should wait in
42
46
between each instance state checks until operation is completed
@@ -50,7 +54,7 @@ def __init__(
50
54
self ,
51
55
* ,
52
56
instance_id : str ,
53
- aws_conn_id : str = "aws_default" ,
57
+ aws_conn_id : str | None = "aws_default" ,
54
58
region_name : str | None = None ,
55
59
check_interval : float = 15 ,
56
60
** kwargs ,
@@ -82,7 +86,11 @@ class EC2StopInstanceOperator(BaseOperator):
82
86
:ref:`howto/operator:EC2StopInstanceOperator`
83
87
84
88
:param instance_id: id of the AWS EC2 instance
85
- :param aws_conn_id: aws connection to use
89
+ :param aws_conn_id: The Airflow connection used for AWS credentials.
90
+ If this is None or empty then the default boto3 behaviour is used. If
91
+ running Airflow in a distributed manner and aws_conn_id is None or
92
+ empty, then default boto3 configuration would be used (and must be
93
+ maintained on each worker node).
86
94
:param region_name: (optional) aws region name associated with the client
87
95
:param check_interval: time in seconds that the job should wait in
88
96
between each instance state checks until operation is completed
@@ -96,7 +104,7 @@ def __init__(
96
104
self ,
97
105
* ,
98
106
instance_id : str ,
99
- aws_conn_id : str = "aws_default" ,
107
+ aws_conn_id : str | None = "aws_default" ,
100
108
region_name : str | None = None ,
101
109
check_interval : float = 15 ,
102
110
** kwargs ,
@@ -130,7 +138,11 @@ class EC2CreateInstanceOperator(BaseOperator):
130
138
:param image_id: ID of the AMI used to create the instance.
131
139
:param max_count: Maximum number of instances to launch. Defaults to 1.
132
140
:param min_count: Minimum number of instances to launch. Defaults to 1.
133
- :param aws_conn_id: AWS connection to use
141
+ :param aws_conn_id: The Airflow connection used for AWS credentials.
142
+ If this is None or empty then the default boto3 behaviour is used. If
143
+ running Airflow in a distributed manner and aws_conn_id is None or
144
+ empty, then default boto3 configuration would be used (and must be
145
+ maintained on each worker node).
134
146
:param region_name: AWS region name associated with the client.
135
147
:param poll_interval: Number of seconds to wait before attempting to
136
148
check state of instance. Only used if wait_for_completion is True. Default is 20.
@@ -156,7 +168,7 @@ def __init__(
156
168
image_id : str ,
157
169
max_count : int = 1 ,
158
170
min_count : int = 1 ,
159
- aws_conn_id : str = "aws_default" ,
171
+ aws_conn_id : str | None = "aws_default" ,
160
172
region_name : str | None = None ,
161
173
poll_interval : int = 20 ,
162
174
max_attempts : int = 20 ,
@@ -223,7 +235,11 @@ class EC2TerminateInstanceOperator(BaseOperator):
223
235
:ref:`howto/operator:EC2TerminateInstanceOperator`
224
236
225
237
:param instance_id: ID of the instance to be terminated.
226
- :param aws_conn_id: AWS connection to use
238
+ :param aws_conn_id: The Airflow connection used for AWS credentials.
239
+ If this is None or empty then the default boto3 behaviour is used. If
240
+ running Airflow in a distributed manner and aws_conn_id is None or
241
+ empty, then default boto3 configuration would be used (and must be
242
+ maintained on each worker node).
227
243
:param region_name: AWS region name associated with the client.
228
244
:param poll_interval: Number of seconds to wait before attempting to
229
245
check state of instance. Only used if wait_for_completion is True. Default is 20.
@@ -238,7 +254,7 @@ class EC2TerminateInstanceOperator(BaseOperator):
238
254
def __init__ (
239
255
self ,
240
256
instance_ids : str | list [str ],
241
- aws_conn_id : str = "aws_default" ,
257
+ aws_conn_id : str | None = "aws_default" ,
242
258
region_name : str | None = None ,
243
259
poll_interval : int = 20 ,
244
260
max_attempts : int = 20 ,
@@ -280,7 +296,11 @@ class EC2RebootInstanceOperator(BaseOperator):
280
296
:ref:`howto/operator:EC2RebootInstanceOperator`
281
297
282
298
:param instance_ids: ID of the instance(s) to be rebooted.
283
- :param aws_conn_id: AWS connection to use
299
+ :param aws_conn_id: The Airflow connection used for AWS credentials.
300
+ If this is None or empty then the default boto3 behaviour is used. If
301
+ running Airflow in a distributed manner and aws_conn_id is None or
302
+ empty, then default boto3 configuration would be used (and must be
303
+ maintained on each worker node).
284
304
:param region_name: AWS region name associated with the client.
285
305
:param poll_interval: Number of seconds to wait before attempting to
286
306
check state of instance. Only used if wait_for_completion is True. Default is 20.
@@ -298,7 +318,7 @@ def __init__(
298
318
self ,
299
319
* ,
300
320
instance_ids : str | list [str ],
301
- aws_conn_id : str = "aws_default" ,
321
+ aws_conn_id : str | None = "aws_default" ,
302
322
region_name : str | None = None ,
303
323
poll_interval : int = 20 ,
304
324
max_attempts : int = 20 ,
@@ -339,7 +359,11 @@ class EC2HibernateInstanceOperator(BaseOperator):
339
359
:ref:`howto/operator:EC2HibernateInstanceOperator`
340
360
341
361
:param instance_ids: ID of the instance(s) to be hibernated.
342
- :param aws_conn_id: AWS connection to use
362
+ :param aws_conn_id: The Airflow connection used for AWS credentials.
363
+ If this is None or empty then the default boto3 behaviour is used. If
364
+ running Airflow in a distributed manner and aws_conn_id is None or
365
+ empty, then default boto3 configuration would be used (and must be
366
+ maintained on each worker node).
343
367
:param region_name: AWS region name associated with the client.
344
368
:param poll_interval: Number of seconds to wait before attempting to
345
369
check state of instance. Only used if wait_for_completion is True. Default is 20.
@@ -357,7 +381,7 @@ def __init__(
357
381
self ,
358
382
* ,
359
383
instance_ids : str | list [str ],
360
- aws_conn_id : str = "aws_default" ,
384
+ aws_conn_id : str | None = "aws_default" ,
361
385
region_name : str | None = None ,
362
386
poll_interval : int = 20 ,
363
387
max_attempts : int = 20 ,
0 commit comments