CfnEnvironment¶
-
class
aws_cdk.aws_mwaa.
CfnEnvironment
(scope, id, *, name, airflow_configuration_options=None, airflow_version=None, dag_s3_path=None, environment_class=None, execution_role_arn=None, kms_key=None, logging_configuration=None, max_workers=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, tags=None, webserver_access_mode=None, weekly_maintenance_window_start=None)¶ Bases:
aws_cdk.core.CfnResource
A CloudFormation
AWS::MWAA::Environment
.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
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.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", 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_workers=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", tags=tags, webserver_access_mode="webserverAccessMode", weekly_maintenance_window_start="weeklyMaintenanceWindowStart" )
Create a new
AWS::MWAA::Environment
.- Parameters
scope (
Construct
) –scope in which this resource is defined.
id (
str
) –scoped id of the resource.
name (
str
) – The name of your Amazon MWAA environment.airflow_configuration_options (
Optional
[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. Valid values:2.0.2
,1.10.12
.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 .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
,None
]) – The Apache Airflow logs being sent to CloudWatch Logs:DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.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_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
,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.0.2 - Accepts between 2 to 5. Defaults to 2. - v1.10.12 - 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 .tags (
Optional
[Any
]) – The key-value tag pairs associated to your environment. For example,"Environment": "Staging"
. To learn more, see Tagging .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_depends_on
(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_metadata
(key, value)¶ Add a value to the CloudFormation Resource Metadata.
- Parameters
key (
str
) –value (
Any
) –
- See
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.
- Return type
None
-
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 intermdediate 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
).- 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 resoure, please consult that specific resource’s documentation.
- Return type
None
-
get_att
(attribute_name)¶ 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.- Return type
-
get_metadata
(key)¶ Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters
key (
str
) –- See
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.
- Return type
Any
-
inspect
(inspector)¶ Examines the CloudFormation resource and discloses attributes.
- Parameters
inspector (
TreeInspector
) –tree inspector to collect and process attributes.
- Return type
None
-
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
-
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.
For example,
core.default_timezone: utc
. To learn more, see Apache Airflow configuration options .
-
airflow_version
¶ The version of Apache Airflow to use for the environment.
If no value is specified, defaults to the latest version. Valid values:
2.0.2
,1.10.12
.
-
attr_arn
¶ The ARN for the Amazon MWAA environment.
- CloudformationAttribute
Arn
- Return type
str
-
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
- Return type
str
-
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
- Return type
str
-
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
- Return type
str
-
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
- Return type
str
-
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
- Return type
str
-
attr_webserver_url
¶ The URL of your Apache Airflow UI.
- CloudformationAttribute
WebserverUrl
- Return type
str
-
cfn_options
¶ Options for this resource, such as condition, update policy etc.
- Return type
-
cfn_resource_type
¶ AWS resource type.
- Return type
str
-
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.
- Return type
List
[str
]
-
dag_s3_path
¶ The relative path to the DAGs folder on your Amazon S3 bucket.
For example,
dags
. To learn more, see Adding or updating DAGs .
-
environment_class
¶ The environment class type.
Valid values:
mw1.small
,mw1.medium
,mw1.large
. To learn more, see Amazon MWAA environment class .
-
execution_role_arn
¶ 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
¶ 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).
- Link
- Return type
Optional
[str
]
-
logging_configuration
¶ DagProcessingLogs
,SchedulerLogs
,TaskLogs
,WebserverLogs
,WorkerLogs
.- Link
- Type
The Apache Airflow logs being sent to CloudWatch Logs
- Return type
Union
[IResolvable
,LoggingConfigurationProperty
,None
]
-
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)
.- Return type
str
- Returns
the logical ID as a stringified token. This value will only get resolved during synthesis.
-
max_workers
¶ 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
.- Link
- Return type
Union
[int
,float
,None
]
-
min_workers
¶ 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
.- Link
- Return type
Union
[int
,float
,None
]
-
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.
To learn more, see About networking on Amazon MWAA .
-
node
¶ The construct tree node associated with this construct.
- Return type
-
plugins_s3_object_version
¶ //docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html>`_ .
- Link
- Type
The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see `Installing custom plugins <https
- Return type
Optional
[str
]
-
plugins_s3_path
¶ //docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html>`_ .
- Link
- 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- Return type
Optional
[str
]
-
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 })
.- Return type
str
-
requirements_s3_object_version
¶ //docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html>`_ .
- Link
- Type
The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see `Installing Python dependencies <https
- Return type
Optional
[str
]
-
requirements_s3_path
¶ //docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html>`_ .
- Link
- 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- Return type
Optional
[str
]
-
schedulers
¶ .
v2.0.2 - Accepts between 2 to 5. Defaults to 2.
v1.10.12 - Accepts 1.
- Link
- Type
The number of schedulers that you want to run in your environment. Valid values
- Return type
Union
[int
,float
,None
]
-
source_bucket_arn
¶ 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 .
-
stack
¶ The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- Return type
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.
To learn more, see Apache Airflow access modes . Valid values:
PRIVATE_ONLY
orPUBLIC_ONLY
.
-
weekly_maintenance_window_start
¶ 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)
- Link
- Type
The day and time of the week to start weekly maintenance updates of your environment in the following format
- Return type
Optional
[str
]
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
(construct)¶ Check whether the given construct is a CfnResource.
- Parameters
construct (
IConstruct
) –- Return type
bool
-
classmethod
is_construct
(x)¶ Return whether the given object is a Construct.
- Parameters
x (
Any
) –- Return type
bool
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
,None
]) – Defines the processing logs sent to CloudWatch Logs and the logging level to send.scheduler_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,None
]) – Defines the scheduler logs sent to CloudWatch Logs and the logging level to send.task_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,None
]) – Defines the task logs sent to CloudWatch Logs and the logging level to send.webserver_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,None
]) – Defines the web server logs sent to CloudWatch Logs and the logging level to send.worker_logs (
Union
[IResolvable
,ModuleLoggingConfigurationProperty
,None
]) – Defines the worker logs sent to CloudWatch Logs and the logging level to send.
- Link
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.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
.
- Link
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.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
.- Link
- Type
Defines the Apache Airflow logs to send for the log type (e.g.
DagProcessingLogs
) to CloudWatch Logs. Valid values- Return type
Optional
[str
]
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 .
- Link
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.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 .