@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.996Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnEnvironment(software.constructs.Construct scope,
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 |
|---|---|
Object |
getAirflowConfigurationOptions()
A list of key-value pairs containing the Airflow configuration options for your environment.
|
String |
getAirflowVersion()
The version of Apache Airflow to use for the environment.
|
String |
getAttrArn()
The ARN for the Amazon MWAA environment.
|
String |
getAttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published.
|
String |
getAttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published.
|
String |
getAttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published.
|
String |
getAttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published.
|
String |
getAttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn()
The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published.
|
String |
getAttrWebserverUrl()
The URL of your Apache Airflow UI.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDagS3Path()
The relative path to the DAGs folder on your Amazon S3 bucket.
|
String |
getEnvironmentClass()
The environment class type.
|
String |
getExecutionRoleArn()
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
|
String |
getKmsKey()
The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
|
Object |
getLoggingConfiguration()
The Apache Airflow logs being sent to CloudWatch Logs: `DagProcessingLogs` , `SchedulerLogs` , `TaskLogs` , `WebserverLogs` , `WorkerLogs` .
|
Number |
getMaxWorkers()
The maximum number of workers that you want to run in your environment.
|
Number |
getMinWorkers()
The minimum number of workers that you want to run in your environment.
|
String |
getName()
The name of your Amazon MWAA environment.
|
Object |
getNetworkConfiguration()
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
|
String |
getPluginsS3ObjectVersion()
The version of the plugins.zip file on your Amazon S3 bucket.
|
String |
getPluginsS3Path()
The relative path to the `plugins.zip` file on your Amazon S3 bucket.
|
String |
getRequirementsS3ObjectVersion()
The version of the requirements.txt file on your Amazon S3 bucket.
|
String |
getRequirementsS3Path()
The relative path to the `requirements.txt` file on your Amazon S3 bucket.
|
Number |
getSchedulers()
The number of schedulers that you want to run in your environment.
|
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.
|
String |
getWebserverAccessMode()
The Apache Airflow *Web server* access mode.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAirflowConfigurationOptions(Object value)
A list of key-value pairs containing the Airflow configuration options for your environment.
|
void |
setAirflowVersion(String value)
The version of Apache Airflow to use for the environment.
|
void |
setDagS3Path(String value)
The relative path to the DAGs folder on your Amazon S3 bucket.
|
void |
setEnvironmentClass(String value)
The environment class type.
|
void |
setExecutionRoleArn(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(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(Number value)
The maximum number of workers that you want to run in your environment.
|
void |
setMinWorkers(Number value)
The minimum number of workers that you want to run in your environment.
|
void |
setName(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(String value)
The version of the plugins.zip file on your Amazon S3 bucket.
|
void |
setPluginsS3Path(String value)
The relative path to the `plugins.zip` file on your Amazon S3 bucket.
|
void |
setRequirementsS3ObjectVersion(String value)
The version of the requirements.txt file on your Amazon S3 bucket.
|
void |
setRequirementsS3Path(String value)
The relative path to the `requirements.txt` file on your Amazon S3 bucket.
|
void |
setSchedulers(Number value)
The number of schedulers that you want to run in your environment.
|
void |
setSourceBucketArn(String value)
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
|
void |
setWebserverAccessMode(String value)
The Apache Airflow *Web server* access mode.
|
void |
setWeeklyMaintenanceWindowStart(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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnEnvironment(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn()
@Stability(value=Stable) @NotNull public String getAttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn()
@Stability(value=Stable) @NotNull public String getAttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn()
@Stability(value=Stable) @NotNull public String getAttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn()
@Stability(value=Stable) @NotNull public String getAttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn()
@Stability(value=Stable) @NotNull public String getAttrWebserverUrl()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For example, "Environment": "Staging" . To learn more, see Tagging .
@Stability(value=Stable) @NotNull public Object getAirflowConfigurationOptions()
For example, core.default_timezone: utc . To learn more, see Apache Airflow configuration options .
@Stability(value=Stable)
public void setAirflowConfigurationOptions(@NotNull
Object value)
For example, core.default_timezone: utc . To learn more, see Apache Airflow configuration options .
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getAirflowVersion()
If no value is specified, defaults to the latest version. Valid values: 2.0.2 , 1.10.12 .
@Stability(value=Stable)
public void setAirflowVersion(@Nullable
String value)
If no value is specified, defaults to the latest version. Valid values: 2.0.2 , 1.10.12 .
@Stability(value=Stable) @Nullable public String getDagS3Path()
For example, dags . To learn more, see Adding or updating DAGs .
@Stability(value=Stable)
public void setDagS3Path(@Nullable
String value)
For example, dags . To learn more, see Adding or updating DAGs .
@Stability(value=Stable) @Nullable public String getEnvironmentClass()
Valid values: mw1.small , mw1.medium , mw1.large . To learn more, see Amazon MWAA environment class .
@Stability(value=Stable)
public void setEnvironmentClass(@Nullable
String value)
Valid values: mw1.small , mw1.medium , mw1.large . To learn more, see Amazon MWAA environment class .
@Stability(value=Stable) @Nullable public String getExecutionRoleArn()
For example, arn:aws:iam::123456789:role/my-execution-role . To learn more, see Amazon MWAA Execution role .
@Stability(value=Stable)
public void setExecutionRoleArn(@Nullable
String value)
For example, arn:aws:iam::123456789:role/my-execution-role . To learn more, see Amazon MWAA Execution role .
@Stability(value=Stable) @Nullable public String getKmsKey()
You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).
@Stability(value=Stable)
public void setKmsKey(@Nullable
String value)
You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).
@Stability(value=Stable) @Nullable public Object getLoggingConfiguration()
@Stability(value=Stable)
public void setLoggingConfiguration(@Nullable
CfnEnvironment.LoggingConfigurationProperty value)
@Stability(value=Stable)
public void setLoggingConfiguration(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public 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 .
@Stability(value=Stable)
public void setMaxWorkers(@Nullable
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 .
@Stability(value=Stable) @Nullable public 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 .
@Stability(value=Stable)
public void setMinWorkers(@Nullable
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 .
@Stability(value=Stable) @Nullable public Object getNetworkConfiguration()
To learn more, see About networking on Amazon MWAA .
@Stability(value=Stable)
public void setNetworkConfiguration(@Nullable
CfnEnvironment.NetworkConfigurationProperty value)
To learn more, see About networking on Amazon MWAA .
@Stability(value=Stable)
public void setNetworkConfiguration(@Nullable
IResolvable value)
To learn more, see About networking on Amazon MWAA .
@Stability(value=Stable) @Nullable public String getPluginsS3ObjectVersion()
@Stability(value=Stable)
public void setPluginsS3ObjectVersion(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getPluginsS3Path()
@Stability(value=Stable)
public void setPluginsS3Path(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getRequirementsS3ObjectVersion()
@Stability(value=Stable)
public void setRequirementsS3ObjectVersion(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getRequirementsS3Path()
@Stability(value=Stable)
public void setRequirementsS3Path(@Nullable
String value)
@Stability(value=Stable) @Nullable public Number getSchedulers()
@Stability(value=Stable)
public void setSchedulers(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getSourceBucketArn()
For example, arn:aws:s3:::my-airflow-bucket-unique-name . To learn more, see Create an Amazon S3 bucket for Amazon MWAA .
@Stability(value=Stable)
public void setSourceBucketArn(@Nullable
String value)
For example, arn:aws:s3:::my-airflow-bucket-unique-name . To learn more, see Create an Amazon S3 bucket for Amazon MWAA .
@Stability(value=Stable) @Nullable public String getWebserverAccessMode()
To learn more, see Apache Airflow access modes . Valid values: PRIVATE_ONLY or PUBLIC_ONLY .
@Stability(value=Stable)
public void setWebserverAccessMode(@Nullable
String value)
To learn more, see Apache Airflow access modes . Valid values: PRIVATE_ONLY or PUBLIC_ONLY .
@Stability(value=Stable) @Nullable public String getWeeklyMaintenanceWindowStart()
For example: TUE:03:30 . You can specify a start time in 30 minute increments only. Supported input includes the following:
@Stability(value=Stable)
public void setWeeklyMaintenanceWindowStart(@Nullable
String value)
For example: TUE:03:30 . You can specify a start time in 30 minute increments only. Supported input includes the following:
Copyright © 2022. All rights reserved.