aws_sdk_mwaa/client/create_environment.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateEnvironment`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_name):<br>required: **true**<br><p>The name of the Amazon MWAA environment. For example, <code>MyMWAAEnvironment</code>.</p><br>
7 /// - [`execution_role_arn(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::execution_role_arn) / [`set_execution_role_arn(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_execution_role_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the execution role for your environment. An execution role is an Amazon Web Services Identity and Access Management (IAM) role that grants MWAA permission to access Amazon Web Services services and resources used by your environment. For example, <code>arn:aws:iam::123456789:role/my-execution-role</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html">Amazon MWAA Execution role</a>.</p><br>
8 /// - [`source_bucket_arn(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::source_bucket_arn) / [`set_source_bucket_arn(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_source_bucket_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, <code>arn:aws:s3:::my-airflow-bucket-unique-name</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html">Create an Amazon S3 bucket for Amazon MWAA</a>.</p><br>
9 /// - [`dag_s3_path(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::dag_s3_path) / [`set_dag_s3_path(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_dag_s3_path):<br>required: **true**<br><p>The relative path to the DAGs folder on your Amazon S3 bucket. For example, <code>dags</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html">Adding or updating DAGs</a>.</p><br>
10 /// - [`network_configuration(NetworkConfiguration)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::network_configuration) / [`set_network_configuration(Option<NetworkConfiguration>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_network_configuration):<br>required: **true**<br><p>The VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html">About networking on Amazon MWAA</a>.</p><br>
11 /// - [`plugins_s3_path(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::plugins_s3_path) / [`set_plugins_s3_path(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_plugins_s3_path):<br>required: **false**<br><p>The relative path to the <code>plugins.zip</code> file on your Amazon S3 bucket. For example, <code>plugins.zip</code>. If specified, then the <code>plugins.zip</code> version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html">Installing custom plugins</a>.</p><br>
12 /// - [`plugins_s3_object_version(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::plugins_s3_object_version) / [`set_plugins_s3_object_version(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_plugins_s3_object_version):<br>required: **false**<br><p>The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p><br>
13 /// - [`requirements_s3_path(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::requirements_s3_path) / [`set_requirements_s3_path(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_requirements_s3_path):<br>required: **false**<br><p>The relative path to the <code>requirements.txt</code> file on your Amazon S3 bucket. For example, <code>requirements.txt</code>. If specified, then a version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html">Installing Python dependencies</a>.</p><br>
14 /// - [`requirements_s3_object_version(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::requirements_s3_object_version) / [`set_requirements_s3_object_version(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_requirements_s3_object_version):<br>required: **false**<br><p>The version of the <code>requirements.txt</code> file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p><br>
15 /// - [`startup_script_s3_path(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::startup_script_s3_path) / [`set_startup_script_s3_path(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_startup_script_s3_path):<br>required: **false**<br><p>The relative path to the startup shell script in your Amazon S3 bucket. For example, <code>s3://mwaa-environment/startup.sh</code>.</p> <p>Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p><br>
16 /// - [`startup_script_s3_object_version(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::startup_script_s3_object_version) / [`set_startup_script_s3_object_version(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_startup_script_s3_object_version):<br>required: **false**<br><p>The version of the startup shell script in your Amazon S3 bucket. You must specify the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">version ID</a> that Amazon S3 assigns to the file every time you update the script.</p> <p>Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:</p> <p><code>3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo</code></p> <p>For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p><br>
17 /// - [`airflow_configuration_options(impl Into<String>, impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::airflow_configuration_options) / [`set_airflow_configuration_options(Option<HashMap::<String, String>>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_airflow_configuration_options):<br>required: **false**<br><p>A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html">Apache Airflow configuration options</a>.</p><br>
18 /// - [`environment_class(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::environment_class) / [`set_environment_class(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_environment_class):<br>required: **false**<br><p>The environment class type. Valid values: <code>mw1.micro</code>, <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p><br>
19 /// - [`max_workers(i32)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::max_workers) / [`set_max_workers(Option<i32>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_max_workers):<br>required: **false**<br><p>The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the <code>MaxWorkers</code> field. For example, <code>20</code>. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in <code>MinWorkers</code>.</p><br>
20 /// - [`kms_key(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::kms_key) / [`set_kms_key(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_kms_key):<br>required: **false**<br><p>The Amazon Web Services Key Management Service (KMS) key to encrypt the data in your environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK (advanced). For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/create-environment.html">Create an Amazon MWAA environment</a>.</p><br>
21 /// - [`airflow_version(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::airflow_version) / [`set_airflow_version(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_airflow_version):<br>required: **false**<br><p>The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html">Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA)</a>.</p> <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>, <code>2.9.2</code>, <code>2.10.1</code>, and <code>2.10.3</code>.</p><br>
22 /// - [`logging_configuration(LoggingConfigurationInput)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::logging_configuration) / [`set_logging_configuration(Option<LoggingConfigurationInput>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_logging_configuration):<br>required: **false**<br><p>Defines the Apache Airflow logs to send to CloudWatch Logs.</p><br>
23 /// - [`weekly_maintenance_window_start(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::weekly_maintenance_window_start) / [`set_weekly_maintenance_window_start(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_weekly_maintenance_window_start):<br>required: **false**<br><p>The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format: <code>DAY:HH:MM</code>. For example: <code>TUE:03:30</code>. You can specify a start time in 30 minute increments only.</p><br>
24 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_tags):<br>required: **false**<br><p>The key-value tag pairs you want to associate to your environment. For example, <code>"Environment": "Staging"</code>. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p><br>
25 /// - [`webserver_access_mode(WebserverAccessMode)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::webserver_access_mode) / [`set_webserver_access_mode(Option<WebserverAccessMode>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_webserver_access_mode):<br>required: **false**<br><p>Defines the access mode for the Apache Airflow <i>web server</i>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p><br>
26 /// - [`min_workers(i32)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::min_workers) / [`set_min_workers(Option<i32>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_min_workers):<br>required: **false**<br><p>The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the <code>MaxWorkers</code> field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the <code>MinWorkers</code> field. For example, <code>2</code>.</p><br>
27 /// - [`schedulers(i32)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::schedulers) / [`set_schedulers(Option<i32>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_schedulers):<br>required: **false**<br><p>The number of Apache Airflow schedulers to run in your environment. Valid values:</p> <ul> <li> <p>v2 - For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p></li> <li> <p>v1 - Accepts <code>1</code>.</p></li> </ul><br>
28 /// - [`endpoint_management(EndpointManagement)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::endpoint_management) / [`set_endpoint_management(Option<EndpointManagement>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_endpoint_management):<br>required: **false**<br><p>Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to <code>SERVICE</code>, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to <code>CUSTOMER</code>, you must create, and manage, the VPC endpoints for your VPC. If you choose to create an environment in a shared VPC, you must set this value to <code>CUSTOMER</code>. In a shared VPC deployment, the environment will remain in <code>PENDING</code> status until you create the VPC endpoints. If you do not take action to create the endpoints within 72 hours, the status will change to <code>CREATE_FAILED</code>. You can delete the failed environment and create a new one.</p><br>
29 /// - [`min_webservers(i32)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::min_webservers) / [`set_min_webservers(Option<i32>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_min_webservers):<br>required: **false**<br><p>The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code> when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.</p> <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p><br>
30 /// - [`max_webservers(i32)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::max_webservers) / [`set_max_webservers(Option<i32>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_max_webservers):<br>required: **false**<br><p>The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code> when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in <code>MaxWebserers</code>. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.</p> <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p><br>
31 /// - On success, responds with [`CreateEnvironmentOutput`](crate::operation::create_environment::CreateEnvironmentOutput) with field(s):
32 /// - [`arn(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::arn): <p>The Amazon Resource Name (ARN) returned in the response for the environment.</p>
33 /// - On failure, responds with [`SdkError<CreateEnvironmentError>`](crate::operation::create_environment::CreateEnvironmentError)
34 pub fn create_environment(&self) -> crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder {
35 crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::new(self.handle.clone())
36 }
37}