Class CfnEnvironment
A CloudFormation AWS::MWAA::Environment
.
Inherited Members
Namespace: Amazon.CDK.AWS.MWAA
Assembly: Amazon.CDK.AWS.MWAA.dll
Syntax (csharp)
public class CfnEnvironment : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnEnvironment
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::MWAA::Environment
resource creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
CloudformationResource: AWS::MWAA::Environment
Link: 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 cfnEnvironment = new CfnEnvironment(this, "MyCfnEnvironment", new CfnEnvironmentProps {
Name = "name",
// the properties below are optional
AirflowConfigurationOptions = airflowConfigurationOptions,
AirflowVersion = "airflowVersion",
DagS3Path = "dagS3Path",
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
CfnEnvironment(Construct, String, ICfnEnvironmentProps) | Create a new |
CfnEnvironment(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnEnvironment(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
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. |
AttrArn | The ARN for the Amazon MWAA environment. |
AttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn | The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published. |
AttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn | The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published. |
AttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn | The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published. |
AttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn | The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published. |
AttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn | The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published. |
AttrWebserverUrl | The URL of your Apache Airflow UI. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DagS3Path | The relative path to the DAGs folder on your Amazon S3 bucket. |
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. |
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: |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnEnvironment(Construct, String, ICfnEnvironmentProps)
Create a new AWS::MWAA::Environment
.
public CfnEnvironment(Construct scope, string id, ICfnEnvironmentProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnEnvironmentProps
- resource properties.
CfnEnvironment(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnEnvironment(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnEnvironment(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnEnvironment(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AirflowConfigurationOptions
A list of key-value pairs containing the Airflow configuration options for your environment.
public virtual 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 virtual string AirflowVersion { get; set; }
Property Value
System.String
Remarks
If no value is specified, defaults to the latest version.
Allowed Values : 2.0.2
| 1.10.12
| 2.2.2
| 2.4.3
| 2.5.1
(latest)
AttrArn
The ARN for the Amazon MWAA environment.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn
The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published.
public virtual string AttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LoggingConfiguration.DagProcessingLogs.CloudWatchLogGroupArn
AttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn
The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published.
public virtual string AttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LoggingConfiguration.SchedulerLogs.CloudWatchLogGroupArn
AttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn
The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published.
public virtual string AttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LoggingConfiguration.TaskLogs.CloudWatchLogGroupArn
AttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn
The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published.
public virtual string AttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LoggingConfiguration.WebserverLogs.CloudWatchLogGroupArn
AttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn
The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published.
public virtual string AttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LoggingConfiguration.WorkerLogs.CloudWatchLogGroupArn
AttrWebserverUrl
The URL of your Apache Airflow UI.
public virtual string AttrWebserverUrl { get; }
Property Value
System.String
Remarks
CloudformationAttribute: WebserverUrl
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DagS3Path
The relative path to the DAGs folder on your Amazon S3 bucket.
public virtual string DagS3Path { get; set; }
Property Value
System.String
Remarks
For example, dags
. To learn more, see Adding or updating DAGs .
EnvironmentClass
The environment class type.
public virtual 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 virtual 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 virtual 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 virtual object LoggingConfiguration { get; set; }
Property Value
System.Object
Remarks
MaxWorkers
The maximum number of workers that you want to run in your environment.
public virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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.
public virtual TagManager Tags { get; }
Property Value
Remarks
For example, "Environment": "Staging"
. To learn more, see Tagging .
WebserverAccessMode
The Apache Airflow Web server access mode.
public virtual 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 virtual 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:
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>