Class CfnEnvironment

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:05.851Z") @Stability(Stable) public class CfnEnvironment extends CfnResource implements IInspectable, ITaggable
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")
         .endpointManagement("endpointManagement")
         .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())
         .maxWebservers(123)
         .maxWorkers(123)
         .minWebservers(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")
         .startupScriptS3ObjectVersion("startupScriptS3ObjectVersion")
         .startupScriptS3Path("startupScriptS3Path")
         .tags(tags)
         .webserverAccessMode("webserverAccessMode")
         .weeklyMaintenanceWindowStart("weeklyMaintenanceWindowStart")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnEnvironment

      protected CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnEnvironment

      protected CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnEnvironment

      @Stability(Stable) public CfnEnvironment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEnvironmentProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN for the Amazon MWAA environment.
    • getAttrCeleryExecutorQueue

      @Stability(Stable) @NotNull public String getAttrCeleryExecutorQueue()
      The queue ARN for the environment's Celery Executor . 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.
    • getAttrDatabaseVpcEndpointService

      @Stability(Stable) @NotNull public String getAttrDatabaseVpcEndpointService()
      The VPC endpoint for the environment's Amazon RDS database.
    • getAttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn

      @Stability(Stable) @NotNull public String getAttrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn()
      The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published.
    • getAttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn

      @Stability(Stable) @NotNull public String getAttrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn()
      The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published.
    • getAttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn

      @Stability(Stable) @NotNull public String getAttrLoggingConfigurationTaskLogsCloudWatchLogGroupArn()
      The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published.
    • getAttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn

      @Stability(Stable) @NotNull public String getAttrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn()
      The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published.
    • getAttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn

      @Stability(Stable) @NotNull public String getAttrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn()
      The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published.
    • getAttrWebserverUrl

      @Stability(Stable) @NotNull public String getAttrWebserverUrl()
      The URL of your Apache Airflow UI.
    • getAttrWebserverVpcEndpointService

      @Stability(Stable) @NotNull public String getAttrWebserverVpcEndpointService()
      The VPC endpoint for the environment's web server.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of your Amazon MWAA environment.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of your Amazon MWAA environment.
    • getAirflowConfigurationOptions

      @Stability(Stable) @Nullable public Object getAirflowConfigurationOptions()
      A list of key-value pairs containing the Airflow configuration options for your environment.
    • setAirflowConfigurationOptions

      @Stability(Stable) public void setAirflowConfigurationOptions(@Nullable Object value)
      A list of key-value pairs containing the Airflow configuration options for your environment.
    • getAirflowVersion

      @Stability(Stable) @Nullable public String getAirflowVersion()
      The version of Apache Airflow to use for the environment.
    • setAirflowVersion

      @Stability(Stable) public void setAirflowVersion(@Nullable String value)
      The version of Apache Airflow to use for the environment.
    • getDagS3Path

      @Stability(Stable) @Nullable public String getDagS3Path()
      The relative path to the DAGs folder on your Amazon S3 bucket.
    • setDagS3Path

      @Stability(Stable) public void setDagS3Path(@Nullable String value)
      The relative path to the DAGs folder on your Amazon S3 bucket.
    • getEndpointManagement

      @Stability(Stable) @Nullable public String getEndpointManagement()
      Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.
    • setEndpointManagement

      @Stability(Stable) public void setEndpointManagement(@Nullable String value)
      Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.
    • getEnvironmentClass

      @Stability(Stable) @Nullable public String getEnvironmentClass()
      The environment class type.
    • setEnvironmentClass

      @Stability(Stable) public void setEnvironmentClass(@Nullable String value)
      The environment class type.
    • getExecutionRoleArn

      @Stability(Stable) @Nullable public String getExecutionRoleArn()
      The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.
    • getKmsKey

      @Stability(Stable) @Nullable public String getKmsKey()
      The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
    • setKmsKey

      @Stability(Stable) public void setKmsKey(@Nullable String value)
      The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.
    • getLoggingConfiguration

      @Stability(Stable) @Nullable public Object getLoggingConfiguration()
      The Apache Airflow logs being sent to CloudWatch Logs: DagProcessingLogs , SchedulerLogs , TaskLogs , WebserverLogs , WorkerLogs .
    • setLoggingConfiguration

      @Stability(Stable) public void setLoggingConfiguration(@Nullable IResolvable value)
      The Apache Airflow logs being sent to CloudWatch Logs: DagProcessingLogs , SchedulerLogs , TaskLogs , WebserverLogs , WorkerLogs .
    • setLoggingConfiguration

      @Stability(Stable) public void setLoggingConfiguration(@Nullable CfnEnvironment.LoggingConfigurationProperty value)
      The Apache Airflow logs being sent to CloudWatch Logs: DagProcessingLogs , SchedulerLogs , TaskLogs , WebserverLogs , WorkerLogs .
    • getMaxWebservers

      @Stability(Stable) @Nullable public Number getMaxWebservers()
      The maximum number of web servers that you want to run in your environment.
    • setMaxWebservers

      @Stability(Stable) public void setMaxWebservers(@Nullable Number value)
      The maximum number of web servers that you want to run in your environment.
    • getMaxWorkers

      @Stability(Stable) @Nullable public Number getMaxWorkers()
      The maximum number of workers that you want to run in your environment.
    • setMaxWorkers

      @Stability(Stable) public void setMaxWorkers(@Nullable Number value)
      The maximum number of workers that you want to run in your environment.
    • getMinWebservers

      @Stability(Stable) @Nullable public Number getMinWebservers()
      The minimum number of web servers that you want to run in your environment.
    • setMinWebservers

      @Stability(Stable) public void setMinWebservers(@Nullable Number value)
      The minimum number of web servers that you want to run in your environment.
    • getMinWorkers

      @Stability(Stable) @Nullable public Number getMinWorkers()
      The minimum number of workers that you want to run in your environment.
    • setMinWorkers

      @Stability(Stable) public void setMinWorkers(@Nullable Number value)
      The minimum number of workers that you want to run in your environment.
    • getNetworkConfiguration

      @Stability(Stable) @Nullable public Object getNetworkConfiguration()
      The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
    • setNetworkConfiguration

      @Stability(Stable) public void setNetworkConfiguration(@Nullable IResolvable value)
      The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
    • setNetworkConfiguration

      @Stability(Stable) public void setNetworkConfiguration(@Nullable CfnEnvironment.NetworkConfigurationProperty value)
      The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.
    • getPluginsS3ObjectVersion

      @Stability(Stable) @Nullable public String getPluginsS3ObjectVersion()
      The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins .
    • setPluginsS3ObjectVersion

      @Stability(Stable) public void setPluginsS3ObjectVersion(@Nullable String value)
      The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins .
    • getPluginsS3Path

      @Stability(Stable) @Nullable public String getPluginsS3Path()
      The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip . To learn more, see Installing custom plugins .
    • setPluginsS3Path

      @Stability(Stable) public void setPluginsS3Path(@Nullable String value)
      The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip . To learn more, see Installing custom plugins .
    • getRequirementsS3ObjectVersion

      @Stability(Stable) @Nullable public String getRequirementsS3ObjectVersion()
      The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies .
    • setRequirementsS3ObjectVersion

      @Stability(Stable) public void setRequirementsS3ObjectVersion(@Nullable String value)
      The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies .
    • getRequirementsS3Path

      @Stability(Stable) @Nullable public String getRequirementsS3Path()
      The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt . To learn more, see Installing Python dependencies .
    • setRequirementsS3Path

      @Stability(Stable) public void setRequirementsS3Path(@Nullable String value)
      The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt . To learn more, see Installing Python dependencies .
    • getSchedulers

      @Stability(Stable) @Nullable public Number getSchedulers()
      The number of schedulers that you want to run in your environment.

      Valid values:.

    • setSchedulers

      @Stability(Stable) public void setSchedulers(@Nullable Number value)
      The number of schedulers that you want to run in your environment.

      Valid values:.

    • getSourceBucketArn

      @Stability(Stable) @Nullable public String getSourceBucketArn()
      The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
    • setSourceBucketArn

      @Stability(Stable) public void setSourceBucketArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.
    • getStartupScriptS3ObjectVersion

      @Stability(Stable) @Nullable public String getStartupScriptS3ObjectVersion()
      The version of the startup shell script in your Amazon S3 bucket.
    • setStartupScriptS3ObjectVersion

      @Stability(Stable) public void setStartupScriptS3ObjectVersion(@Nullable String value)
      The version of the startup shell script in your Amazon S3 bucket.
    • getStartupScriptS3Path

      @Stability(Stable) @Nullable public String getStartupScriptS3Path()
      The relative path to the startup shell script in your Amazon S3 bucket.

      For example, s3://mwaa-environment/startup.sh .

    • setStartupScriptS3Path

      @Stability(Stable) public void setStartupScriptS3Path(@Nullable String value)
      The relative path to the startup shell script in your Amazon S3 bucket.

      For example, s3://mwaa-environment/startup.sh .

    • getTagsRaw

      @Stability(Stable) @Nullable public Object getTagsRaw()
      The key-value tag pairs associated to your environment.

      For example, "Environment": "Staging" . To learn more, see Tagging .

    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Object value)
      The key-value tag pairs associated to your environment.

      For example, "Environment": "Staging" . To learn more, see Tagging .

    • getWebserverAccessMode

      @Stability(Stable) @Nullable public String getWebserverAccessMode()
      The Apache Airflow Web server access mode.
    • setWebserverAccessMode

      @Stability(Stable) public void setWebserverAccessMode(@Nullable String value)
      The Apache Airflow Web server access mode.
    • getWeeklyMaintenanceWindowStart

      @Stability(Stable) @Nullable public String getWeeklyMaintenanceWindowStart()
      The day and time of the week to start weekly maintenance updates of your environment in the following format: DAY:HH:MM .
    • setWeeklyMaintenanceWindowStart

      @Stability(Stable) public void setWeeklyMaintenanceWindowStart(@Nullable String value)
      The day and time of the week to start weekly maintenance updates of your environment in the following format: DAY:HH:MM .