CfnEnvironment
- class aws_cdk.aws_mwaa.CfnEnvironment(scope, id, *, name, airflow_configuration_options=None, airflow_version=None, dag_s3_path=None, endpoint_management=None, environment_class=None, execution_role_arn=None, kms_key=None, logging_configuration=None, max_webservers=None, max_workers=None, min_webservers=None, min_workers=None, network_configuration=None, plugins_s3_object_version=None, plugins_s3_path=None, requirements_s3_object_version=None, requirements_s3_path=None, schedulers=None, source_bucket_arn=None, startup_script_s3_object_version=None, startup_script_s3_path=None, tags=None, webserver_access_mode=None, weekly_maintenance_window_start=None)
Bases:
CfnResource
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
- 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 import aws_mwaa as mwaa # airflow_configuration_options: Any # tags: Any cfn_environment = mwaa.CfnEnvironment(self, "MyCfnEnvironment", name="name", # the properties below are optional 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.CfnEnvironment.LoggingConfigurationProperty( dag_processing_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), scheduler_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), task_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), webserver_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), worker_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ) ), max_webservers=123, max_workers=123, min_webservers=123, min_workers=123, network_configuration=mwaa.CfnEnvironment.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" )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).name (
str
) – The name of your Amazon MWAA environment.airflow_configuration_options (
Any
) – 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 .airflow_version (
Optional
[str
]) – 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)dag_s3_path (
Optional
[str
]) – The relative path to the DAGs folder on your Amazon S3 bucket. For example,dags
. To learn more, see Adding or updating DAGs .endpoint_management (
Optional
[str
]) – Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set toSERVICE
, 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.environment_class (
Optional
[str
]) – The environment class type. Valid values:mw1.small
,mw1.medium
,mw1.large
. To learn more, see Amazon MWAA environment class .execution_role_arn (
Optional
[str
]) – 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 .kms_key (
Optional
[str
]) – 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).logging_configuration (
Union
[IResolvable
,LoggingConfigurationProperty
,Dict
[str
,Any
],None
]) – The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.max_webservers (
Union
[int
,float
,None
]) – 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 forMaxWebservers
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 between2
and5
. Defaults to2
.max_workers (
Union
[int
,float
,None
]) – 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 theMaxWorkers
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
.min_webservers (
Union
[int
,float
,None
]) – 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 forMaxWebservers
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 between2
and5
. Defaults to2
.min_workers (
Union
[int
,float
,None
]) – 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 theMaxWorkers
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
.network_configuration (
Union
[IResolvable
,NetworkConfigurationProperty
,Dict
[str
,Any
],None
]) – 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 .plugins_s3_object_version (
Optional
[str
]) – The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins .plugins_s3_path (
Optional
[str
]) –The relative path to the
plugins.zip
file on your Amazon S3 bucket. For example,plugins.zip
. To learn more, see Installing custom plugins .requirements_s3_object_version (
Optional
[str
]) – The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies .requirements_s3_path (
Optional
[str
]) –The relative path to the
requirements.txt
file on your Amazon S3 bucket. For example,requirements.txt
. To learn more, see Installing Python dependencies .schedulers (
Union
[int
,float
,None
]) – 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.source_bucket_arn (
Optional
[str
]) – 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 .startup_script_s3_object_version (
Optional
[str
]) – 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 .startup_script_s3_path (
Optional
[str
]) –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 .tags (
Any
) – 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.webserver_access_mode (
Optional
[str
]) – The Apache Airflow Web server access mode. To learn more, see Apache Airflow access modes . Valid values:PRIVATE_ONLY
orPUBLIC_ONLY
.weekly_maintenance_window_start (
Optional
[str
]) – 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)
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::MWAA::Environment'
- airflow_configuration_options
A list of key-value pairs containing the Airflow configuration options for your environment.
- airflow_version
The version of Apache Airflow to use for the environment.
- attr_arn
The ARN for the Amazon MWAA environment.
- CloudformationAttribute:
Arn
- attr_celery_executor_queue
//airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/celery.html>`_ . Amazon MWAA uses a Celery Executor to distribute tasks across multiple workers. When you create an environment in a shared VPC, you must provide access to the Celery Executor queue from your VPC.
- CloudformationAttribute:
CeleryExecutorQueue
- Type:
The queue ARN for the environment’s `Celery Executor <https
- Type:
//docs.aws.amazon.com/https
- attr_database_vpc_endpoint_service
The VPC endpoint for the environment’s Amazon RDS database.
- CloudformationAttribute:
DatabaseVpcEndpointService
- attr_logging_configuration_dag_processing_logs_cloud_watch_log_group_arn
The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published.
- CloudformationAttribute:
LoggingConfiguration.DagProcessingLogs.CloudWatchLogGroupArn
- attr_logging_configuration_scheduler_logs_cloud_watch_log_group_arn
The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published.
- CloudformationAttribute:
LoggingConfiguration.SchedulerLogs.CloudWatchLogGroupArn
- attr_logging_configuration_task_logs_cloud_watch_log_group_arn
The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published.
- CloudformationAttribute:
LoggingConfiguration.TaskLogs.CloudWatchLogGroupArn
- attr_logging_configuration_webserver_logs_cloud_watch_log_group_arn
The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published.
- CloudformationAttribute:
LoggingConfiguration.WebserverLogs.CloudWatchLogGroupArn
- attr_logging_configuration_worker_logs_cloud_watch_log_group_arn
The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published.
- CloudformationAttribute:
LoggingConfiguration.WorkerLogs.CloudWatchLogGroupArn
- attr_webserver_url
The URL of your Apache Airflow UI.
- CloudformationAttribute:
WebserverUrl
- attr_webserver_vpc_endpoint_service
The VPC endpoint for the environment’s web server.
- CloudformationAttribute:
WebserverVpcEndpointService
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- dag_s3_path
The relative path to the DAGs folder on your Amazon S3 bucket.
- endpoint_management
Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.
- environment_class
The environment class type.
- execution_role_arn
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
- kms_key
The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
- logging_configuration
DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.- Type:
The Apache Airflow logs being sent to CloudWatch Logs
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- max_webservers
The maximum number of web servers that you want to run in your environment.
- max_workers
The maximum number of workers that you want to run in your environment.
- min_webservers
The minimum number of web servers that you want to run in your environment.
- min_workers
The minimum number of workers that you want to run in your environment.
- name
The name of your Amazon MWAA environment.
- network_configuration
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
- node
The tree node.
- plugins_s3_object_version
//docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html>`_ .
- Type:
The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see `Installing custom plugins <https
- plugins_s3_path
//docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html>`_ .
- Type:
The relative path to the
plugins.zip
file on your Amazon S3 bucket. For example,plugins.zip
. To learn more, see `Installing custom plugins <https
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- requirements_s3_object_version
//docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html>`_ .
- Type:
The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see `Installing Python dependencies <https
- requirements_s3_path
//docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html>`_ .
- Type:
The relative path to the
requirements.txt
file on your Amazon S3 bucket. For example,requirements.txt
. To learn more, see `Installing Python dependencies <https
- schedulers
The number of schedulers that you want to run in your environment.
Valid values:.
- source_bucket_arn
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- startup_script_s3_object_version
The version of the startup shell script in your Amazon S3 bucket.
- startup_script_s3_path
The relative path to the startup shell script in your Amazon S3 bucket.
For example,
s3://mwaa-environment/startup.sh
.
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
The key-value tag pairs associated to your environment.
For example,
"Environment": "Staging"
. To learn more, see Tagging .
- webserver_access_mode
The Apache Airflow Web server access mode.
- weekly_maintenance_window_start
DAY:HH:MM
.- Type:
The day and time of the week to start weekly maintenance updates of your environment in the following format
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
LoggingConfigurationProperty
- class CfnEnvironment.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:
dag_processing_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,Dict
[str
,Any
],None
]) – Defines the processing logs sent to CloudWatch Logs and the logging level to send.scheduler_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,Dict
[str
,Any
],None
]) – Defines the scheduler logs sent to CloudWatch Logs and the logging level to send.task_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,Dict
[str
,Any
],None
]) – Defines the task logs sent to CloudWatch Logs and the logging level to send.webserver_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,Dict
[str
,Any
],None
]) – Defines the web server logs sent to CloudWatch Logs and the logging level to send.worker_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,Dict
[str
,Any
],None
]) – Defines the worker logs sent to CloudWatch Logs and the logging level to send.
- See:
- 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 import aws_mwaa as mwaa logging_configuration_property = mwaa.CfnEnvironment.LoggingConfigurationProperty( dag_processing_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), scheduler_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), task_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), webserver_logs=mwaa.CfnEnvironment.ModuleLoggingConfigurationProperty( cloud_watch_log_group_arn="cloudWatchLogGroupArn", enabled=False, log_level="logLevel" ), worker_logs=mwaa.CfnEnvironment.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.
- scheduler_logs
Defines the scheduler logs sent to CloudWatch Logs and the logging level to send.
- task_logs
Defines the task logs sent to CloudWatch Logs and the logging level to send.
- webserver_logs
Defines the web server logs sent to CloudWatch Logs and the logging level to send.
- worker_logs
Defines the worker logs sent to CloudWatch Logs and the logging level to send.
ModuleLoggingConfigurationProperty
- class CfnEnvironment.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:
cloud_watch_log_group_arn (
Optional
[str
]) – The ARN of the CloudWatch Logs log group for each type of Apache Airflow log type that you have enabled. .. epigraph::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 forCloudWatchLogGroupArn
is discarded by Amazon MWAA.enabled (
Union
[bool
,IResolvable
,None
]) – Indicates whether to enable the Apache Airflow log type (e.g.DagProcessingLogs
) in CloudWatch Logs.log_level (
Optional
[str
]) – Defines the Apache Airflow logs to send for the log type (e.g.DagProcessingLogs
) to CloudWatch Logs. Valid values:CRITICAL
,ERROR
,WARNING
,INFO
.
- See:
- 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 import aws_mwaa as mwaa module_logging_configuration_property = mwaa.CfnEnvironment.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 forCloudWatchLogGroupArn
is discarded by Amazon MWAA.
- enabled
Indicates whether to enable the Apache Airflow log type (e.g.
DagProcessingLogs
) in CloudWatch Logs.
- log_level
CRITICAL
,ERROR
,WARNING
,INFO
.- See:
- Type:
Defines the Apache Airflow logs to send for the log type (e.g.
DagProcessingLogs
) to CloudWatch Logs. Valid values
NetworkConfigurationProperty
- class CfnEnvironment.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:
- 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 import aws_mwaa as mwaa network_configuration_property = mwaa.CfnEnvironment.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 .
- 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 .