Class CfnEnvironmentProps
Properties for defining a CfnEnvironment
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.MWAA
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnEnvironmentProps : Object, ICfnEnvironmentProps
Syntax (vb)
Public Class CfnEnvironmentProps
Inherits Object
Implements ICfnEnvironmentProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MWAA;
var airflowConfigurationOptions;
var tags;
var cfnEnvironmentProps = new CfnEnvironmentProps {
Name = "name",
// the properties below are optional
AirflowConfigurationOptions = airflowConfigurationOptions,
AirflowVersion = "airflowVersion",
DagS3Path = "dagS3Path",
EndpointManagement = "endpointManagement",
EnvironmentClass = "environmentClass",
ExecutionRoleArn = "executionRoleArn",
KmsKey = "kmsKey",
LoggingConfiguration = new LoggingConfigurationProperty {
DagProcessingLogs = new ModuleLoggingConfigurationProperty {
CloudWatchLogGroupArn = "cloudWatchLogGroupArn",
Enabled = false,
LogLevel = "logLevel"
},
SchedulerLogs = new ModuleLoggingConfigurationProperty {
CloudWatchLogGroupArn = "cloudWatchLogGroupArn",
Enabled = false,
LogLevel = "logLevel"
},
TaskLogs = new ModuleLoggingConfigurationProperty {
CloudWatchLogGroupArn = "cloudWatchLogGroupArn",
Enabled = false,
LogLevel = "logLevel"
},
WebserverLogs = new ModuleLoggingConfigurationProperty {
CloudWatchLogGroupArn = "cloudWatchLogGroupArn",
Enabled = false,
LogLevel = "logLevel"
},
WorkerLogs = new ModuleLoggingConfigurationProperty {
CloudWatchLogGroupArn = "cloudWatchLogGroupArn",
Enabled = false,
LogLevel = "logLevel"
}
},
MaxWorkers = 123,
MinWorkers = 123,
NetworkConfiguration = new NetworkConfigurationProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
},
PluginsS3ObjectVersion = "pluginsS3ObjectVersion",
PluginsS3Path = "pluginsS3Path",
RequirementsS3ObjectVersion = "requirementsS3ObjectVersion",
RequirementsS3Path = "requirementsS3Path",
Schedulers = 123,
SourceBucketArn = "sourceBucketArn",
StartupScriptS3ObjectVersion = "startupScriptS3ObjectVersion",
StartupScriptS3Path = "startupScriptS3Path",
Tags = tags,
WebserverAccessMode = "webserverAccessMode",
WeeklyMaintenanceWindowStart = "weeklyMaintenanceWindowStart"
};
Synopsis
Constructors
CfnEnvironmentProps() |
Properties
AirflowConfigurationOptions | A list of key-value pairs containing the Airflow configuration options for your environment. |
AirflowVersion | The version of Apache Airflow to use for the environment. |
DagS3Path | The relative path to the DAGs folder on your Amazon S3 bucket. |
EndpointManagement | Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. |
EnvironmentClass | The environment class type. |
ExecutionRoleArn | The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment. |
KmsKey | The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment. |
LoggingConfiguration | The Apache Airflow logs being sent to CloudWatch Logs: |
MaxWorkers | The maximum number of workers that you want to run in your environment. |
MinWorkers | The minimum number of workers that you want to run in your environment. |
Name | The name of your Amazon MWAA environment. |
NetworkConfiguration | The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. |
PluginsS3ObjectVersion | The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins . |
PluginsS3Path | The relative path to the |
RequirementsS3ObjectVersion | The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies . |
RequirementsS3Path | The relative path to the |
Schedulers | The number of schedulers that you want to run in your environment. Valid values:. |
SourceBucketArn | The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. |
StartupScriptS3ObjectVersion | The version of the startup shell script in your Amazon S3 bucket. |
StartupScriptS3Path | The relative path to the startup shell script in your Amazon S3 bucket. For example, |
Tags | The key-value tag pairs associated to your environment. For example, |
WebserverAccessMode | The Apache Airflow Web server access mode. |
WeeklyMaintenanceWindowStart | The day and time of the week to start weekly maintenance updates of your environment in the following format: |
Constructors
CfnEnvironmentProps()
public CfnEnvironmentProps()
Properties
AirflowConfigurationOptions
A list of key-value pairs containing the Airflow configuration options for your environment.
public object AirflowConfigurationOptions { get; set; }
Property Value
System.Object
Remarks
For example, core.default_timezone: utc
. To learn more, see Apache Airflow configuration options .
AirflowVersion
The version of Apache Airflow to use for the environment.
public string AirflowVersion { get; set; }
Property Value
System.String
Remarks
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
(latest)
DagS3Path
The relative path to the DAGs folder on your Amazon S3 bucket.
public string DagS3Path { get; set; }
Property Value
System.String
Remarks
For example, dags
. To learn more, see Adding or updating DAGs .
EndpointManagement
Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.
public string EndpointManagement { get; set; }
Property Value
System.String
Remarks
If set to SERVICE
, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to CUSTOMER
, you must create, and manage, the VPC endpoints in your VPC.
EnvironmentClass
The environment class type.
public string EnvironmentClass { get; set; }
Property Value
System.String
Remarks
Valid values: mw1.small
, mw1.medium
, mw1.large
. To learn more, see Amazon MWAA environment class .
ExecutionRoleArn
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
public string ExecutionRoleArn { get; set; }
Property Value
System.String
Remarks
For example, arn:aws:iam::123456789:role/my-execution-role
. To learn more, see Amazon MWAA Execution role .
KmsKey
The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
public string KmsKey { get; set; }
Property Value
System.String
Remarks
You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).
LoggingConfiguration
The Apache Airflow logs being sent to CloudWatch Logs: DagProcessingLogs
, SchedulerLogs
, TaskLogs
, WebserverLogs
, WorkerLogs
.
public object LoggingConfiguration { get; set; }
Property Value
System.Object
Remarks
MaxWorkers
The maximum number of workers that you want to run in your environment.
public Nullable<double> MaxWorkers { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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 in MinWorkers
.
MinWorkers
The minimum number of workers that you want to run in your environment.
public Nullable<double> MinWorkers { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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 the MinWorkers
field. For example, 2
.
Name
The name of your Amazon MWAA environment.
public string Name { get; set; }
Property Value
System.String
Remarks
NetworkConfiguration
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
public object NetworkConfiguration { get; set; }
Property Value
System.Object
Remarks
PluginsS3ObjectVersion
The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins .
public string PluginsS3ObjectVersion { get; set; }
Property Value
System.String
Remarks
PluginsS3Path
The relative path to the plugins.zip
file on your Amazon S3 bucket. For example, plugins.zip
. To learn more, see Installing custom plugins .
public string PluginsS3Path { get; set; }
Property Value
System.String
Remarks
RequirementsS3ObjectVersion
The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies .
public string RequirementsS3ObjectVersion { get; set; }
Property Value
System.String
Remarks
RequirementsS3Path
The relative path to the requirements.txt
file on your Amazon S3 bucket. For example, requirements.txt
. To learn more, see Installing Python dependencies .
public string RequirementsS3Path { get; set; }
Property Value
System.String
Remarks
Schedulers
The number of schedulers that you want to run in your environment. Valid values:.
public Nullable<double> Schedulers { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
SourceBucketArn
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
public string SourceBucketArn { get; set; }
Property Value
System.String
Remarks
For example, arn:aws:s3:::my-airflow-bucket-unique-name
. To learn more, see Create an Amazon S3 bucket for Amazon MWAA .
StartupScriptS3ObjectVersion
The version of the startup shell script in your Amazon S3 bucket.
public string StartupScriptS3ObjectVersion { get; set; }
Property Value
System.String
Remarks
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 .
StartupScriptS3Path
The relative path to the startup shell script in your Amazon S3 bucket. For example, s3://mwaa-environment/startup.sh
.
public string StartupScriptS3Path { get; set; }
Property Value
System.String
Remarks
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 .
Tags
The key-value tag pairs associated to your environment. For example, "Environment": "Staging"
. To learn more, see Tagging .
public object Tags { get; set; }
Property Value
System.Object
Remarks
If you specify new tags for an existing environment, the update requires service interruption before taking effect.
WebserverAccessMode
The Apache Airflow Web server access mode.
public string WebserverAccessMode { get; set; }
Property Value
System.String
Remarks
To learn more, see Apache Airflow access modes . Valid values: PRIVATE_ONLY
or PUBLIC_ONLY
.
WeeklyMaintenanceWindowStart
The day and time of the week to start weekly maintenance updates of your environment in the following format: DAY:HH:MM
.
public string WeeklyMaintenanceWindowStart { get; set; }
Property Value
System.String
Remarks
For example: TUE:03:30
. You can specify a start time in 30 minute increments only. Supported input includes the following: