CfnEnvironmentPropsMixin

class aws_cdk.mixins_preview.aws_mwaa.mixins.CfnEnvironmentPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::MWAA::Environment resource creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html

CloudformationResource:

AWS::MWAA::Environment

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_mwaa import mixins as mwaa_mixins

# airflow_configuration_options: Any
# tags: Any

cfn_environment_props_mixin = mwaa_mixins.CfnEnvironmentPropsMixin(mwaa_mixins.CfnEnvironmentMixinProps(
    airflow_configuration_options=airflow_configuration_options,
    airflow_version="airflowVersion",
    dag_s3_path="dagS3Path",
    endpoint_management="endpointManagement",
    environment_class="environmentClass",
    execution_role_arn="executionRoleArn",
    kms_key="kmsKey",
    logging_configuration=mwaa_mixins.CfnEnvironmentPropsMixin.LoggingConfigurationProperty(
        dag_processing_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
            cloud_watch_log_group_arn="cloudWatchLogGroupArn",
            enabled=False,
            log_level="logLevel"
        ),
        scheduler_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
            cloud_watch_log_group_arn="cloudWatchLogGroupArn",
            enabled=False,
            log_level="logLevel"
        ),
        task_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
            cloud_watch_log_group_arn="cloudWatchLogGroupArn",
            enabled=False,
            log_level="logLevel"
        ),
        webserver_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
            cloud_watch_log_group_arn="cloudWatchLogGroupArn",
            enabled=False,
            log_level="logLevel"
        ),
        worker_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
            cloud_watch_log_group_arn="cloudWatchLogGroupArn",
            enabled=False,
            log_level="logLevel"
        )
    ),
    max_webservers=123,
    max_workers=123,
    min_webservers=123,
    min_workers=123,
    name="name",
    network_configuration=mwaa_mixins.CfnEnvironmentPropsMixin.NetworkConfigurationProperty(
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"]
    ),
    plugins_s3_object_version="pluginsS3ObjectVersion",
    plugins_s3_path="pluginsS3Path",
    requirements_s3_object_version="requirementsS3ObjectVersion",
    requirements_s3_path="requirementsS3Path",
    schedulers=123,
    source_bucket_arn="sourceBucketArn",
    startup_script_s3_object_version="startupScriptS3ObjectVersion",
    startup_script_s3_path="startupScriptS3Path",
    tags=tags,
    webserver_access_mode="webserverAccessMode",
    weekly_maintenance_window_start="weeklyMaintenanceWindowStart",
    worker_replacement_strategy="workerReplacementStrategy"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::MWAA::Environment.

Parameters:
  • props (Union[CfnEnvironmentMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['airflowConfigurationOptions', 'airflowVersion', 'dagS3Path', 'endpointManagement', 'environmentClass', 'executionRoleArn', 'kmsKey', 'loggingConfiguration', 'maxWebservers', 'maxWorkers', 'minWebservers', 'minWorkers', 'name', 'networkConfiguration', 'pluginsS3ObjectVersion', 'pluginsS3Path', 'requirementsS3ObjectVersion', 'requirementsS3Path', 'schedulers', 'sourceBucketArn', 'startupScriptS3ObjectVersion', 'startupScriptS3Path', 'tags', 'webserverAccessMode', 'weeklyMaintenanceWindowStart', 'workerReplacementStrategy']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

LoggingConfigurationProperty

class CfnEnvironmentPropsMixin.LoggingConfigurationProperty(*, dag_processing_logs=None, scheduler_logs=None, task_logs=None, webserver_logs=None, worker_logs=None)

Bases: object

The type of Apache Airflow logs to send to CloudWatch Logs.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_mwaa import mixins as mwaa_mixins

logging_configuration_property = mwaa_mixins.CfnEnvironmentPropsMixin.LoggingConfigurationProperty(
    dag_processing_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
        cloud_watch_log_group_arn="cloudWatchLogGroupArn",
        enabled=False,
        log_level="logLevel"
    ),
    scheduler_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
        cloud_watch_log_group_arn="cloudWatchLogGroupArn",
        enabled=False,
        log_level="logLevel"
    ),
    task_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
        cloud_watch_log_group_arn="cloudWatchLogGroupArn",
        enabled=False,
        log_level="logLevel"
    ),
    webserver_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
        cloud_watch_log_group_arn="cloudWatchLogGroupArn",
        enabled=False,
        log_level="logLevel"
    ),
    worker_logs=mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
        cloud_watch_log_group_arn="cloudWatchLogGroupArn",
        enabled=False,
        log_level="logLevel"
    )
)

Attributes

dag_processing_logs

Defines the processing logs sent to CloudWatch Logs and the logging level to send.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-dagprocessinglogs

scheduler_logs

Defines the scheduler logs sent to CloudWatch Logs and the logging level to send.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-schedulerlogs

task_logs

Defines the task logs sent to CloudWatch Logs and the logging level to send.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-tasklogs

webserver_logs

Defines the web server logs sent to CloudWatch Logs and the logging level to send.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-webserverlogs

worker_logs

Defines the worker logs sent to CloudWatch Logs and the logging level to send.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-workerlogs

ModuleLoggingConfigurationProperty

class CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(*, cloud_watch_log_group_arn=None, enabled=None, log_level=None)

Bases: object

Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ).

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_mwaa import mixins as mwaa_mixins

module_logging_configuration_property = mwaa_mixins.CfnEnvironmentPropsMixin.ModuleLoggingConfigurationProperty(
    cloud_watch_log_group_arn="cloudWatchLogGroupArn",
    enabled=False,
    log_level="logLevel"
)

Attributes

cloud_watch_log_group_arn

The ARN of the CloudWatch Logs log group for each type of Apache Airflow log type that you have enabled.

CloudWatchLogGroupArn is available only as a return value, accessible when specified as an attribute in the `Fn:GetAtt <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#aws-resource-mwaa-environment-return-values>`_ intrinsic function. Any value you provide for CloudWatchLogGroupArn is discarded by Amazon MWAA.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html#cfn-mwaa-environment-moduleloggingconfiguration-cloudwatchloggrouparn

enabled

Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html#cfn-mwaa-environment-moduleloggingconfiguration-enabled

log_level

Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html#cfn-mwaa-environment-moduleloggingconfiguration-loglevel

NetworkConfigurationProperty

class CfnEnvironmentPropsMixin.NetworkConfigurationProperty(*, security_group_ids=None, subnet_ids=None)

Bases: object

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:
  • security_group_ids (Optional[Sequence[str]]) – A list of one or more security group IDs. Accepts up to 5 security group IDs. A security group must be attached to the same VPC as the subnets. To learn more, see Security in your VPC on Amazon MWAA .

  • subnet_ids (Optional[Sequence[str]]) –

    A list of subnet IDs. Required to create an environment. Must be private subnets in two different availability zones. A subnet must be attached to the same VPC as the security group. To learn more, see About networking on Amazon MWAA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_mwaa import mixins as mwaa_mixins

network_configuration_property = mwaa_mixins.CfnEnvironmentPropsMixin.NetworkConfigurationProperty(
    security_group_ids=["securityGroupIds"],
    subnet_ids=["subnetIds"]
)

Attributes

security_group_ids

A list of one or more security group IDs.

Accepts up to 5 security group IDs. A security group must be attached to the same VPC as the subnets. To learn more, see Security in your VPC on Amazon MWAA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html#cfn-mwaa-environment-networkconfiguration-securitygroupids

subnet_ids

A list of subnet IDs.

Required to create an environment. Must be private subnets in two different availability zones. A subnet must be attached to the same VPC as the security group. To learn more, see About networking on Amazon MWAA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html#cfn-mwaa-environment-networkconfiguration-subnetids