blib/lib/Paws/MWAA/CreateEnvironment.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::MWAA::CreateEnvironment;
3 use Moose;
4 has AirflowConfigurationOptions => (is => 'ro', isa => 'Paws::MWAA::SyntheticCreateEnvironmentInputAirflowConfigurationOptions');
5 has AirflowVersion => (is => 'ro', isa => 'Str');
6 has DagS3Path => (is => 'ro', isa => 'Str', required => 1);
7 has EnvironmentClass => (is => 'ro', isa => 'Str');
8 has ExecutionRoleArn => (is => 'ro', isa => 'Str', required => 1);
9 has KmsKey => (is => 'ro', isa => 'Str');
10 has LoggingConfiguration => (is => 'ro', isa => 'Paws::MWAA::LoggingConfigurationInput');
11 has MaxWorkers => (is => 'ro', isa => 'Int');
12 has MinWorkers => (is => 'ro', isa => 'Int');
13 has Name => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'Name', required => 1);
14 has NetworkConfiguration => (is => 'ro', isa => 'Paws::MWAA::NetworkConfiguration', required => 1);
15 has PluginsS3ObjectVersion => (is => 'ro', isa => 'Str');
16 has PluginsS3Path => (is => 'ro', isa => 'Str');
17 has RequirementsS3ObjectVersion => (is => 'ro', isa => 'Str');
18 has RequirementsS3Path => (is => 'ro', isa => 'Str');
19 has Schedulers => (is => 'ro', isa => 'Int');
20 has SourceBucketArn => (is => 'ro', isa => 'Str', required => 1);
21 has Tags => (is => 'ro', isa => 'Paws::MWAA::TagMap');
22 has WebserverAccessMode => (is => 'ro', isa => 'Str');
23 has WeeklyMaintenanceWindowStart => (is => 'ro', isa => 'Str');
24  
25 use MooseX::ClassAttribute;
26  
27 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateEnvironment');
28 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/environments/{Name}');
29 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
30 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::MWAA::CreateEnvironmentOutput');
31 1;
32  
33 ### main pod documentation begin ###
34  
35 =head1 NAME
36  
37 Paws::MWAA::CreateEnvironment - Arguments for method CreateEnvironment on L<Paws::MWAA>
38  
39 =head1 DESCRIPTION
40  
41 This class represents the parameters used for calling the method CreateEnvironment on the
42 L<AmazonMWAA|Paws::MWAA> service. Use the attributes of this class
43 as arguments to method CreateEnvironment.
44  
45 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateEnvironment.
46  
47 =head1 SYNOPSIS
48  
49 my $airflow = Paws->service('MWAA');
50 my $CreateEnvironmentOutput = $airflow->CreateEnvironment(
51 DagS3Path => 'MyRelativePath',
52 ExecutionRoleArn => 'MyIamRoleArn',
53 Name => 'MyEnvironmentName',
54 NetworkConfiguration => {
55 SecurityGroupIds => [
56 'MySecurityGroupId', ... # min: 1, max: 1024
57 ], # min: 1, max: 5; OPTIONAL
58 SubnetIds => [
59 'MySubnetId', ... # min: 1, max: 1024
60 ], # min: 2, max: 2; OPTIONAL
61 },
62 SourceBucketArn => 'MyS3BucketArn',
63 AirflowConfigurationOptions => {
64 'MyConfigKey' =>
65 'MyConfigValue', # key: min: 1, max: 64, value: min: 1, max: 256
66 }, # OPTIONAL
67 AirflowVersion => 'MyAirflowVersion', # OPTIONAL
68 EnvironmentClass => 'MyEnvironmentClass', # OPTIONAL
69 KmsKey => 'MyKmsKey', # OPTIONAL
70 LoggingConfiguration => {
71 DagProcessingLogs => {
72 Enabled => 1,
73 LogLevel =>
74 'CRITICAL', # values: CRITICAL, ERROR, WARNING, INFO, DEBUG
75  
76 }, # OPTIONAL
77 SchedulerLogs => {
78 Enabled => 1,
79 LogLevel =>
80 'CRITICAL', # values: CRITICAL, ERROR, WARNING, INFO, DEBUG
81  
82 }, # OPTIONAL
83 TaskLogs => {
84 Enabled => 1,
85 LogLevel =>
86 'CRITICAL', # values: CRITICAL, ERROR, WARNING, INFO, DEBUG
87  
88 }, # OPTIONAL
89 WebserverLogs => {
90 Enabled => 1,
91 LogLevel =>
92 'CRITICAL', # values: CRITICAL, ERROR, WARNING, INFO, DEBUG
93  
94 }, # OPTIONAL
95 WorkerLogs => {
96 Enabled => 1,
97 LogLevel =>
98 'CRITICAL', # values: CRITICAL, ERROR, WARNING, INFO, DEBUG
99  
100 }, # OPTIONAL
101 }, # OPTIONAL
102 MaxWorkers => 1, # OPTIONAL
103 MinWorkers => 1, # OPTIONAL
104 PluginsS3ObjectVersion => 'MyS3ObjectVersion', # OPTIONAL
105 PluginsS3Path => 'MyRelativePath', # OPTIONAL
106 RequirementsS3ObjectVersion => 'MyS3ObjectVersion', # OPTIONAL
107 RequirementsS3Path => 'MyRelativePath', # OPTIONAL
108 Schedulers => 1, # OPTIONAL
109 Tags => {
110 'MyTagKey' =>
111 'MyTagValue', # key: min: 1, max: 128, value: min: 1, max: 256
112 }, # OPTIONAL
113 WebserverAccessMode => 'PRIVATE_ONLY', # OPTIONAL
114 WeeklyMaintenanceWindowStart =>
115 'MyWeeklyMaintenanceWindowStart', # OPTIONAL
116 );
117  
118 # Results:
119 my $Arn = $CreateEnvironmentOutput->Arn;
120  
121 # Returns a L<Paws::MWAA::CreateEnvironmentOutput> object.
122  
123 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
124 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/airflow/CreateEnvironment>
125  
126 =head1 ATTRIBUTES
127  
128  
129 =head2 AirflowConfigurationOptions => L<Paws::MWAA::SyntheticCreateEnvironmentInputAirflowConfigurationOptions>
130  
131 A list of key-value pairs containing the Apache Airflow configuration
132 options you want to attach to your environment. To learn more, see
133 Apache Airflow configuration options
134 (https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html).
135  
136  
137  
138 =head2 AirflowVersion => Str
139  
140 The Apache Airflow version for your environment. For example,
141 C<v1.10.12>. If no value is specified, defaults to the latest version.
142 Valid values: C<v1.10.12>.
143  
144  
145  
146 =head2 B<REQUIRED> DagS3Path => Str
147  
148 The relative path to the DAGs folder on your Amazon S3 bucket. For
149 example, C<dags>. To learn more, see Adding or updating DAGs
150 (https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html).
151  
152  
153  
154 =head2 EnvironmentClass => Str
155  
156 The environment class type. Valid values: C<mw1.small>, C<mw1.medium>,
157 C<mw1.large>. To learn more, see Amazon MWAA environment class
158 (https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html).
159  
160  
161  
162 =head2 B<REQUIRED> ExecutionRoleArn => Str
163  
164 The Amazon Resource Name (ARN) of the execution role for your
165 environment. An execution role is an AWS Identity and Access Management
166 (IAM) role that grants MWAA permission to access AWS services and
167 resources used by your environment. For example,
168 C<arn:aws:iam::123456789:role/my-execution-role>. To learn more, see
169 Amazon MWAA Execution role
170 (https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html).
171  
172  
173  
174 =head2 KmsKey => Str
175  
176 The AWS Key Management Service (KMS) key to encrypt the data in your
177 environment. You can use an AWS owned CMK, or a Customer managed CMK
178 (advanced). To learn more, see Get started with Amazon Managed
179 Workflows for Apache Airflow
180 (https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html).
181  
182  
183  
184 =head2 LoggingConfiguration => L<Paws::MWAA::LoggingConfigurationInput>
185  
186 Defines the Apache Airflow logs to send to CloudWatch Logs:
187 C<DagProcessingLogs>, C<SchedulerLogs>, C<TaskLogs>, C<WebserverLogs>,
188 C<WorkerLogs>.
189  
190  
191  
192 =head2 MaxWorkers => Int
193  
194 The maximum number of workers that you want to run in your environment.
195 MWAA scales the number of Apache Airflow workers up to the number you
196 specify in the C<MaxWorkers> field. For example, C<20>. When there are
197 no more tasks running, and no more in the queue, MWAA disposes of the
198 extra workers leaving the one worker that is included with your
199 environment, or the number you specify in C<MinWorkers>.
200  
201  
202  
203 =head2 MinWorkers => Int
204  
205 The minimum number of workers that you want to run in your environment.
206 MWAA scales the number of Apache Airflow workers up to the number you
207 specify in the C<MaxWorkers> field. When there are no more tasks
208 running, and no more in the queue, MWAA disposes of the extra workers
209 leaving the worker count you specify in the C<MinWorkers> field. For
210 example, C<2>.
211  
212  
213  
214 =head2 B<REQUIRED> Name => Str
215  
216 The name of the Amazon MWAA environment. For example,
217 C<MyMWAAEnvironment>.
218  
219  
220  
221 =head2 B<REQUIRED> NetworkConfiguration => L<Paws::MWAA::NetworkConfiguration>
222  
223 The VPC networking components used to secure and enable network traffic
224 between the AWS resources for your environment. To learn more, see
225 About networking on Amazon MWAA
226 (https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html).
227  
228  
229  
230 =head2 PluginsS3ObjectVersion => Str
231  
232 The version of the plugins.zip file on your Amazon S3 bucket. A version
233 must be specified each time a plugins.zip file is updated. To learn
234 more, see How S3 Versioning works
235 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html).
236  
237  
238  
239 =head2 PluginsS3Path => Str
240  
241 The relative path to the C<plugins.zip> file on your Amazon S3 bucket.
242 For example, C<plugins.zip>. If specified, then the plugins.zip version
243 is required. To learn more, see Installing custom plugins
244 (https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html).
245  
246  
247  
248 =head2 RequirementsS3ObjectVersion => Str
249  
250 The version of the requirements.txt file on your Amazon S3 bucket. A
251 version must be specified each time a requirements.txt file is updated.
252 To learn more, see How S3 Versioning works
253 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html).
254  
255  
256  
257 =head2 RequirementsS3Path => Str
258  
259 The relative path to the C<requirements.txt> file on your Amazon S3
260 bucket. For example, C<requirements.txt>. If specified, then a file
261 version is required. To learn more, see Installing Python dependencies
262 (https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html).
263  
264  
265  
266 =head2 Schedulers => Int
267  
268 The number of Apache Airflow schedulers to run in your environment.
269  
270  
271  
272 =head2 B<REQUIRED> SourceBucketArn => Str
273  
274 The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG
275 code and supporting files are stored. For example,
276 C<arn:aws:s3:::my-airflow-bucket-unique-name>. To learn more, see
277 Create an Amazon S3 bucket for Amazon MWAA
278 (https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html).
279  
280  
281  
282 =head2 Tags => L<Paws::MWAA::TagMap>
283  
284 The key-value tag pairs you want to associate to your environment. For
285 example, C<"Environment": "Staging">. To learn more, see Tagging AWS
286 resources
287 (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).
288  
289  
290  
291 =head2 WebserverAccessMode => Str
292  
293 The Apache Airflow I<Web server> access mode. To learn more, see Apache
294 Airflow access modes
295 (https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html).
296  
297 Valid values are: C<"PRIVATE_ONLY">, C<"PUBLIC_ONLY">
298  
299 =head2 WeeklyMaintenanceWindowStart => Str
300  
301 The day and time of the week to start weekly maintenance updates of
302 your environment in the following format: C<DAY:HH:MM>. For example:
303 C<TUE:03:30>. You can specify a start time in 30 minute increments
304 only. Supported input includes the following:
305  
306 =over
307  
308 =item *
309  
310 MON|TUE|WED|THU|FRI|SAT|SUN:([01]\\d|2[0-3]):(00|30)
311  
312 =back
313  
314  
315  
316  
317  
318 =head1 SEE ALSO
319  
320 This class forms part of L<Paws>, documenting arguments for method CreateEnvironment in L<Paws::MWAA>
321  
322 =head1 BUGS and CONTRIBUTIONS
323  
324 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
325  
326 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
327  
328 =cut
329