@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:49.224Z") public class CfnEnvironment extends CfnResource implements IInspectable
The AWS::MWAA::Environment
resource creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.mwaa.*; Object airflowConfigurationOptions; Object tags; CfnEnvironment cfnEnvironment = CfnEnvironment.Builder.create(this, "MyCfnEnvironment") .name("name") // the properties below are optional .airflowConfigurationOptions(airflowConfigurationOptions) .airflowVersion("airflowVersion") .dagS3Path("dagS3Path") .environmentClass("environmentClass") .executionRoleArn("executionRoleArn") .kmsKey("kmsKey") .loggingConfiguration(LoggingConfigurationProperty.builder() .dagProcessingLogs(ModuleLoggingConfigurationProperty.builder() .cloudWatchLogGroupArn("cloudWatchLogGroupArn") .enabled(false) .logLevel("logLevel") .build()) .schedulerLogs(ModuleLoggingConfigurationProperty.builder() .cloudWatchLogGroupArn("cloudWatchLogGroupArn") .enabled(false) .logLevel("logLevel") .build()) .taskLogs(ModuleLoggingConfigurationProperty.builder() .cloudWatchLogGroupArn("cloudWatchLogGroupArn") .enabled(false) .logLevel("logLevel") .build()) .webserverLogs(ModuleLoggingConfigurationProperty.builder() .cloudWatchLogGroupArn("cloudWatchLogGroupArn") .enabled(false) .logLevel("logLevel") .build()) .workerLogs(ModuleLoggingConfigurationProperty.builder() .cloudWatchLogGroupArn("cloudWatchLogGroupArn") .enabled(false) .logLevel("logLevel") .build()) .build()) .maxWorkers(123) .minWorkers(123) .networkConfiguration(NetworkConfigurationProperty.builder() .securityGroupIds(List.of("securityGroupIds")) .subnetIds(List.of("subnetIds")) .build()) .pluginsS3ObjectVersion("pluginsS3ObjectVersion") .pluginsS3Path("pluginsS3Path") .requirementsS3ObjectVersion("requirementsS3ObjectVersion") .requirementsS3Path("requirementsS3Path") .schedulers(123) .sourceBucketArn("sourceBucketArn") .tags(tags) .webserverAccessMode("webserverAccessMode") .weeklyMaintenanceWindowStart("weeklyMaintenanceWindowStart") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnEnvironment.Builder
A fluent builder for
CfnEnvironment . |
static interface |
CfnEnvironment.LoggingConfigurationProperty
The type of Apache Airflow logs to send to CloudWatch Logs.
|
static interface |
CfnEnvironment.ModuleLoggingConfigurationProperty
Defines the type of logs to send for the Apache Airflow log type (e.g.
|
static interface |
CfnEnvironment.NetworkConfigurationProperty
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnEnvironment(Construct scope,
java.lang.String id,
CfnEnvironmentProps props)
Create a new `AWS::MWAA::Environment`.
|
protected |
CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAirflowConfigurationOptions()
A list of key-value pairs containing the Airflow configuration options for your environment.
|
java.lang.String |
getAirflowVersion()
The version of Apache Airflow to use for the environment.
|
java.lang.String |
getAttrArn()
The ARN for the Amazon MWAA environment.
|
java.lang.String |
getAttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published.
|
java.lang.String |
getAttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published.
|
java.lang.String |
getAttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published.
|
java.lang.String |
getAttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published.
|
java.lang.String |
getAttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published.
|
java.lang.String |
getAttrWebserverUrl()
The URL of your Apache Airflow UI.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDagS3Path()
The relative path to the DAGs folder on your Amazon S3 bucket.
|
java.lang.String |
getEnvironmentClass()
The environment class type.
|
java.lang.String |
getExecutionRoleArn()
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
|
java.lang.String |
getKmsKey()
The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
|
java.lang.Object |
getLoggingConfiguration()
The Apache Airflow logs being sent to CloudWatch Logs: `DagProcessingLogs` , `SchedulerLogs` , `TaskLogs` , `WebserverLogs` , `WorkerLogs` .
|
java.lang.Number |
getMaxWorkers()
The maximum number of workers that you want to run in your environment.
|
java.lang.Number |
getMinWorkers()
The minimum number of workers that you want to run in your environment.
|
java.lang.String |
getName()
The name of your Amazon MWAA environment.
|
java.lang.Object |
getNetworkConfiguration()
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
|
java.lang.String |
getPluginsS3ObjectVersion()
The version of the plugins.zip file on your Amazon S3 bucket.
|
java.lang.String |
getPluginsS3Path()
The relative path to the `plugins.zip` file on your Amazon S3 bucket.
|
java.lang.String |
getRequirementsS3ObjectVersion()
The version of the requirements.txt file on your Amazon S3 bucket.
|
java.lang.String |
getRequirementsS3Path()
The relative path to the `requirements.txt` file on your Amazon S3 bucket.
|
java.lang.Number |
getSchedulers()
The number of schedulers that you want to run in your environment.
|
java.lang.String |
getSourceBucketArn()
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
|
TagManager |
getTags()
The key-value tag pairs associated to your environment.
|
java.lang.String |
getWebserverAccessMode()
The Apache Airflow *Web server* access mode.
|
java.lang.String |
getWeeklyMaintenanceWindowStart()
The day and time of the week to start weekly maintenance updates of your environment in the following format: `DAY:HH:MM` .
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAirflowConfigurationOptions(java.lang.Object value)
A list of key-value pairs containing the Airflow configuration options for your environment.
|
void |
setAirflowVersion(java.lang.String value)
The version of Apache Airflow to use for the environment.
|
void |
setDagS3Path(java.lang.String value)
The relative path to the DAGs folder on your Amazon S3 bucket.
|
void |
setEnvironmentClass(java.lang.String value)
The environment class type.
|
void |
setExecutionRoleArn(java.lang.String value)
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
|
void |
setKmsKey(java.lang.String value)
The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
|
void |
setLoggingConfiguration(CfnEnvironment.LoggingConfigurationProperty value)
The Apache Airflow logs being sent to CloudWatch Logs: `DagProcessingLogs` , `SchedulerLogs` , `TaskLogs` , `WebserverLogs` , `WorkerLogs` .
|
void |
setLoggingConfiguration(IResolvable value)
The Apache Airflow logs being sent to CloudWatch Logs: `DagProcessingLogs` , `SchedulerLogs` , `TaskLogs` , `WebserverLogs` , `WorkerLogs` .
|
void |
setMaxWorkers(java.lang.Number value)
The maximum number of workers that you want to run in your environment.
|
void |
setMinWorkers(java.lang.Number value)
The minimum number of workers that you want to run in your environment.
|
void |
setName(java.lang.String value)
The name of your Amazon MWAA environment.
|
void |
setNetworkConfiguration(CfnEnvironment.NetworkConfigurationProperty value)
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
|
void |
setNetworkConfiguration(IResolvable value)
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
|
void |
setPluginsS3ObjectVersion(java.lang.String value)
The version of the plugins.zip file on your Amazon S3 bucket.
|
void |
setPluginsS3Path(java.lang.String value)
The relative path to the `plugins.zip` file on your Amazon S3 bucket.
|
void |
setRequirementsS3ObjectVersion(java.lang.String value)
The version of the requirements.txt file on your Amazon S3 bucket.
|
void |
setRequirementsS3Path(java.lang.String value)
The relative path to the `requirements.txt` file on your Amazon S3 bucket.
|
void |
setSchedulers(java.lang.Number value)
The number of schedulers that you want to run in your environment.
|
void |
setSourceBucketArn(java.lang.String value)
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
|
void |
setWebserverAccessMode(java.lang.String value)
The Apache Airflow *Web server* access mode.
|
void |
setWeeklyMaintenanceWindowStart(java.lang.String value)
The day and time of the week to start weekly maintenance updates of your environment in the following format: `DAY:HH:MM` .
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnEnvironment(Construct scope, java.lang.String id, CfnEnvironmentProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn()
public java.lang.String getAttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn()
public java.lang.String getAttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn()
public java.lang.String getAttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn()
public java.lang.String getAttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn()
public java.lang.String getAttrWebserverUrl()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For example, "Environment": "Staging"
. To learn more, see Tagging .
public java.lang.Object getAirflowConfigurationOptions()
For example, core.default_timezone: utc
. To learn more, see Apache Airflow configuration options .
public void setAirflowConfigurationOptions(java.lang.Object value)
For example, core.default_timezone: utc
. To learn more, see Apache Airflow configuration options .
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getAirflowVersion()
If no value is specified, defaults to the latest version. Valid values: 2.0.2
, 1.10.12
, 2.2.2
, and 2.4.3
.
public void setAirflowVersion(java.lang.String value)
If no value is specified, defaults to the latest version. Valid values: 2.0.2
, 1.10.12
, 2.2.2
, and 2.4.3
.
public java.lang.String getDagS3Path()
For example, dags
. To learn more, see Adding or updating DAGs .
public void setDagS3Path(java.lang.String value)
For example, dags
. To learn more, see Adding or updating DAGs .
public java.lang.String getEnvironmentClass()
Valid values: mw1.small
, mw1.medium
, mw1.large
. To learn more, see Amazon MWAA environment class .
public void setEnvironmentClass(java.lang.String value)
Valid values: mw1.small
, mw1.medium
, mw1.large
. To learn more, see Amazon MWAA environment class .
public java.lang.String getExecutionRoleArn()
For example, arn:aws:iam::123456789:role/my-execution-role
. To learn more, see Amazon MWAA Execution role .
public void setExecutionRoleArn(java.lang.String value)
For example, arn:aws:iam::123456789:role/my-execution-role
. To learn more, see Amazon MWAA Execution role .
public java.lang.String getKmsKey()
You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).
public void setKmsKey(java.lang.String value)
You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).
public java.lang.Object getLoggingConfiguration()
public void setLoggingConfiguration(IResolvable value)
public void setLoggingConfiguration(CfnEnvironment.LoggingConfigurationProperty value)
public java.lang.Number getMaxWorkers()
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
.
public void setMaxWorkers(java.lang.Number value)
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
.
public java.lang.Number getMinWorkers()
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
.
public void setMinWorkers(java.lang.Number value)
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
.
public java.lang.Object getNetworkConfiguration()
To learn more, see About networking on Amazon MWAA .
public void setNetworkConfiguration(IResolvable value)
To learn more, see About networking on Amazon MWAA .
public void setNetworkConfiguration(CfnEnvironment.NetworkConfigurationProperty value)
To learn more, see About networking on Amazon MWAA .
public java.lang.String getPluginsS3ObjectVersion()
public void setPluginsS3ObjectVersion(java.lang.String value)
public java.lang.String getPluginsS3Path()
public void setPluginsS3Path(java.lang.String value)
public java.lang.String getRequirementsS3ObjectVersion()
public void setRequirementsS3ObjectVersion(java.lang.String value)
public java.lang.String getRequirementsS3Path()
public void setRequirementsS3Path(java.lang.String value)
public java.lang.Number getSchedulers()
public void setSchedulers(java.lang.Number value)
public java.lang.String getSourceBucketArn()
For example, arn:aws:s3:::my-airflow-bucket-unique-name
. To learn more, see Create an Amazon S3 bucket for Amazon MWAA .
public void setSourceBucketArn(java.lang.String value)
For example, arn:aws:s3:::my-airflow-bucket-unique-name
. To learn more, see Create an Amazon S3 bucket for Amazon MWAA .
public java.lang.String getWebserverAccessMode()
To learn more, see Apache Airflow access modes . Valid values: PRIVATE_ONLY
or PUBLIC_ONLY
.
public void setWebserverAccessMode(java.lang.String value)
To learn more, see Apache Airflow access modes . Valid values: PRIVATE_ONLY
or PUBLIC_ONLY
.
public java.lang.String getWeeklyMaintenanceWindowStart()
For example: TUE:03:30
. You can specify a start time in 30 minute increments only. Supported input includes the following:
public void setWeeklyMaintenanceWindowStart(java.lang.String value)
For example: TUE:03:30
. You can specify a start time in 30 minute increments only. Supported input includes the following: