Class CfnEnvironment.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEnvironment>
- Enclosing class:
CfnEnvironment
CfnEnvironment
.-
Method Summary
Modifier and TypeMethodDescriptionairflowConfigurationOptions
(Object airflowConfigurationOptions) A list of key-value pairs containing the Airflow configuration options for your environment.airflowVersion
(String airflowVersion) The version of Apache Airflow to use for the environment.build()
static CfnEnvironment.Builder
The relative path to the DAGs folder on your Amazon S3 bucket.endpointManagement
(String endpointManagement) Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.environmentClass
(String environmentClass) The environment class type.executionRoleArn
(String executionRoleArn) The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.loggingConfiguration
(IResolvable loggingConfiguration) The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.loggingConfiguration
(CfnEnvironment.LoggingConfigurationProperty loggingConfiguration) The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.maxWebservers
(Number maxWebservers) The maximum number of web servers that you want to run in your environment.maxWorkers
(Number maxWorkers) The maximum number of workers that you want to run in your environment.minWebservers
(Number minWebservers) The minimum number of web servers that you want to run in your environment.minWorkers
(Number minWorkers) The minimum number of workers that you want to run in your environment.The name of your Amazon MWAA environment.networkConfiguration
(IResolvable networkConfiguration) The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.networkConfiguration
(CfnEnvironment.NetworkConfigurationProperty networkConfiguration) The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.pluginsS3ObjectVersion
(String pluginsS3ObjectVersion) The version of the plugins.zip file on your Amazon S3 bucket.pluginsS3Path
(String pluginsS3Path) The relative path to theplugins.zip
file on your Amazon S3 bucket.requirementsS3ObjectVersion
(String requirementsS3ObjectVersion) The version of the requirements.txt file on your Amazon S3 bucket.requirementsS3Path
(String requirementsS3Path) The relative path to therequirements.txt
file on your Amazon S3 bucket.schedulers
(Number schedulers) The number of schedulers that you want to run in your environment.sourceBucketArn
(String sourceBucketArn) The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.startupScriptS3ObjectVersion
(String startupScriptS3ObjectVersion) The version of the startup shell script in your Amazon S3 bucket.startupScriptS3Path
(String startupScriptS3Path) The relative path to the startup shell script in your Amazon S3 bucket.The key-value tag pairs associated to your environment.webserverAccessMode
(String webserverAccessMode) The Apache Airflow Web server access mode.weeklyMaintenanceWindowStart
(String weeklyMaintenanceWindowStart) The day and time of the week to start weekly maintenance updates of your environment in the following format:DAY:HH:MM
.
-
Method Details
-
create
@Stability(Stable) public static CfnEnvironment.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnEnvironment.Builder
.
-
name
The name of your Amazon MWAA environment.- Parameters:
name
- The name of your Amazon MWAA environment. This parameter is required.- Returns:
this
- See Also:
-
airflowConfigurationOptions
@Stability(Stable) public CfnEnvironment.Builder airflowConfigurationOptions(Object airflowConfigurationOptions) A list of key-value pairs containing the Airflow configuration options for your environment.For example,
core.default_timezone: utc
. To learn more, see Apache Airflow configuration options .- Parameters:
airflowConfigurationOptions
- A list of key-value pairs containing the Airflow configuration options for your environment. This parameter is required.- Returns:
this
- See Also:
-
airflowVersion
The version of Apache Airflow to use for the environment.If no value is specified, defaults to the latest version.
If you specify a newer version number for an existing environment, the version update requires some service interruption before taking effect.
Allowed Values :
1.10.12
|2.0.2
|2.2.2
|2.4.3
|2.5.1
|2.6.3
|2.7.2
|2.8.1
|2.9.2
(latest)- Parameters:
airflowVersion
- The version of Apache Airflow to use for the environment. This parameter is required.- Returns:
this
- See Also:
-
dagS3Path
The relative path to the DAGs folder on your Amazon S3 bucket.For example,
dags
. To learn more, see Adding or updating DAGs .- Parameters:
dagS3Path
- The relative path to the DAGs folder on your Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
endpointManagement
Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.If set to
SERVICE
, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set toCUSTOMER
, you must create, and manage, the VPC endpoints in your VPC.- Parameters:
endpointManagement
- Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. This parameter is required.- Returns:
this
- See Also:
-
environmentClass
The environment class type.Valid values:
mw1.small
,mw1.medium
,mw1.large
. To learn more, see Amazon MWAA environment class .- Parameters:
environmentClass
- The environment class type. This parameter is required.- Returns:
this
- See Also:
-
executionRoleArn
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.For example,
arn:aws:iam::123456789:role/my-execution-role
. To learn more, see Amazon MWAA Execution role .- Parameters:
executionRoleArn
- The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment. This parameter is required.- Returns:
this
- See Also:
-
kmsKey
The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).
- Parameters:
kmsKey
- The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment. This parameter is required.- Returns:
this
- See Also:
-
loggingConfiguration
@Stability(Stable) public CfnEnvironment.Builder loggingConfiguration(IResolvable loggingConfiguration) The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.- Parameters:
loggingConfiguration
- The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
. This parameter is required.- Returns:
this
- See Also:
-
loggingConfiguration
@Stability(Stable) public CfnEnvironment.Builder loggingConfiguration(CfnEnvironment.LoggingConfigurationProperty loggingConfiguration) The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.- Parameters:
loggingConfiguration
- The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
. This parameter is required.- Returns:
this
- See Also:
-
maxWebservers
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
MaxWebservers
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 inMaxWebserers
. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set inMinxWebserers
.Valid values: Accepts between
2
and5
. Defaults to2
.- Parameters:
maxWebservers
- The maximum number of web servers that you want to run in your environment. This parameter is required.- Returns:
this
- See Also:
-
maxWorkers
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
MaxWorkers
field. For example,20
. 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 inMinWorkers
.- Parameters:
maxWorkers
- The maximum number of workers that you want to run in your environment. This parameter is required.- Returns:
this
- See Also:
-
minWebservers
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
MaxWebservers
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 inMinxWebserers
.Valid values: Accepts between
2
and5
. Defaults to2
.- Parameters:
minWebservers
- The minimum number of web servers that you want to run in your environment. This parameter is required.- Returns:
this
- See Also:
-
minWorkers
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
MaxWorkers
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 theMinWorkers
field. For example,2
.- Parameters:
minWorkers
- The minimum number of workers that you want to run in your environment. This parameter is required.- Returns:
this
- See Also:
-
networkConfiguration
@Stability(Stable) public CfnEnvironment.Builder networkConfiguration(IResolvable networkConfiguration) The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.To learn more, see About networking on Amazon MWAA .
- Parameters:
networkConfiguration
- The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. This parameter is required.- Returns:
this
- See Also:
-
networkConfiguration
@Stability(Stable) public CfnEnvironment.Builder networkConfiguration(CfnEnvironment.NetworkConfigurationProperty networkConfiguration) The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.To learn more, see About networking on Amazon MWAA .
- Parameters:
networkConfiguration
- The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. This parameter is required.- Returns:
this
- See Also:
-
pluginsS3ObjectVersion
@Stability(Stable) public CfnEnvironment.Builder pluginsS3ObjectVersion(String pluginsS3ObjectVersion) The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins .- Parameters:
pluginsS3ObjectVersion
- The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins . This parameter is required.- Returns:
this
- See Also:
-
pluginsS3Path
The relative path to theplugins.zip
file on your Amazon S3 bucket. For example,plugins.zip
. To learn more, see Installing custom plugins .- Parameters:
pluginsS3Path
- The relative path to theplugins.zip
file on your Amazon S3 bucket. For example,plugins.zip
. To learn more, see Installing custom plugins . This parameter is required.- Returns:
this
- See Also:
-
requirementsS3ObjectVersion
@Stability(Stable) public CfnEnvironment.Builder requirementsS3ObjectVersion(String requirementsS3ObjectVersion) The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies .- Parameters:
requirementsS3ObjectVersion
- The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies . This parameter is required.- Returns:
this
- See Also:
-
requirementsS3Path
The relative path to therequirements.txt
file on your Amazon S3 bucket. For example,requirements.txt
. To learn more, see Installing Python dependencies .- Parameters:
requirementsS3Path
- The relative path to therequirements.txt
file on your Amazon S3 bucket. For example,requirements.txt
. To learn more, see Installing Python dependencies . This parameter is required.- Returns:
this
- See Also:
-
schedulers
The number of schedulers that you want to run in your environment. Valid values:.- v2 - Accepts between 2 to 5. Defaults to 2.
- v1 - Accepts 1.
- Parameters:
schedulers
- The number of schedulers that you want to run in your environment. Valid values:. This parameter is required.- Returns:
this
- See Also:
-
sourceBucketArn
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.For example,
arn:aws:s3:::my-airflow-bucket-unique-name
. To learn more, see Create an Amazon S3 bucket for Amazon MWAA .- Parameters:
sourceBucketArn
- The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. This parameter is required.- Returns:
this
- See Also:
-
startupScriptS3ObjectVersion
@Stability(Stable) public CfnEnvironment.Builder startupScriptS3ObjectVersion(String startupScriptS3ObjectVersion) The version of the startup shell script in your Amazon S3 bucket.You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
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:
3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo
For more information, see Using a startup script .
- Parameters:
startupScriptS3ObjectVersion
- The version of the startup shell script in your Amazon S3 bucket. This parameter is required.- Returns:
this
- See Also:
-
startupScriptS3Path
The relative path to the startup shell script in your Amazon S3 bucket. For example,s3://mwaa-environment/startup.sh
.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 Using a startup script .
- Parameters:
startupScriptS3Path
- The relative path to the startup shell script in your Amazon S3 bucket. For example,s3://mwaa-environment/startup.sh
. This parameter is required.- Returns:
this
- See Also:
-
tags
The key-value tag pairs associated to your environment. For example,"Environment": "Staging"
. To learn more, see Tagging .If you specify new tags for an existing environment, the update requires service interruption before taking effect.
- Parameters:
tags
- The key-value tag pairs associated to your environment. For example,"Environment": "Staging"
. To learn more, see Tagging . This parameter is required.- Returns:
this
- See Also:
-
webserverAccessMode
The Apache Airflow Web server access mode.To learn more, see Apache Airflow access modes . Valid values:
PRIVATE_ONLY
orPUBLIC_ONLY
.- Parameters:
webserverAccessMode
- The Apache Airflow Web server access mode. This parameter is required.- Returns:
this
- See Also:
-
weeklyMaintenanceWindowStart
@Stability(Stable) public CfnEnvironment.Builder weeklyMaintenanceWindowStart(String weeklyMaintenanceWindowStart) The day and time of the week to start weekly maintenance updates of your environment in the following format:DAY:HH:MM
.For example:
TUE:03:30
. You can specify a start time in 30 minute increments only. Supported input includes the following:- MON|TUE|WED|THU|FRI|SAT|SUN:([01]\d|2[0-3]):(00|30)
- Parameters:
weeklyMaintenanceWindowStart
- The day and time of the week to start weekly maintenance updates of your environment in the following format:DAY:HH:MM
. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnEnvironment>
- Returns:
- a newly built instance of
CfnEnvironment
.
-