Interface Environment.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Environment.Builder,Environment>, SdkBuilder<Environment.Builder,Environment>, SdkPojo
Enclosing class:
Environment

public static interface Environment.Builder extends SdkPojo, CopyableBuilder<Environment.Builder,Environment>
  • Method Details

    • airflowConfigurationOptions

      Environment.Builder airflowConfigurationOptions(Map<String,String> airflowConfigurationOptions)

      A list of key-value pairs containing the Apache Airflow configuration options attached to your environment. For more information, see Apache Airflow configuration options.

      Parameters:
      airflowConfigurationOptions - A list of key-value pairs containing the Apache Airflow configuration options attached to your environment. For more information, see Apache Airflow configuration options.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • airflowVersion

      Environment.Builder airflowVersion(String airflowVersion)

      The Apache Airflow version on your environment.

      Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2.

      Parameters:
      airflowVersion - The Apache Airflow version on your environment.

      Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • arn

      The Amazon Resource Name (ARN) of the Amazon MWAA environment.

      Parameters:
      arn - The Amazon Resource Name (ARN) of the Amazon MWAA environment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdAt

      Environment.Builder createdAt(Instant createdAt)

      The day and time the environment was created.

      Parameters:
      createdAt - The day and time the environment was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dagS3Path

      Environment.Builder dagS3Path(String dagS3Path)

      The relative path to the DAGs folder in your Amazon S3 bucket. For example, s3://mwaa-environment/dags. For more information, see Adding or updating DAGs.

      Parameters:
      dagS3Path - The relative path to the DAGs folder in your Amazon S3 bucket. For example, s3://mwaa-environment/dags. For more information, see Adding or updating DAGs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • environmentClass

      Environment.Builder environmentClass(String environmentClass)

      The environment class type. Valid values: mw1.small, mw1.medium, mw1.large. For more information, see Amazon MWAA environment class.

      Parameters:
      environmentClass - The environment class type. Valid values: mw1.small, mw1.medium, mw1.large. For more information, see Amazon MWAA environment class.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • executionRoleArn

      Environment.Builder executionRoleArn(String executionRoleArn)

      The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution role.

      Parameters:
      executionRoleArn - The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution role.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • kmsKey

      Environment.Builder kmsKey(String kmsKey)

      The Amazon Web Services Key Management Service (KMS) encryption key used to encrypt the data in your environment.

      Parameters:
      kmsKey - The Amazon Web Services Key Management Service (KMS) encryption key used to encrypt the data in your environment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lastUpdate

      Environment.Builder lastUpdate(LastUpdate lastUpdate)

      The status of the last update on the environment.

      Parameters:
      lastUpdate - The status of the last update on the environment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lastUpdate

      default Environment.Builder lastUpdate(Consumer<LastUpdate.Builder> lastUpdate)

      The status of the last update on the environment.

      This is a convenience method that creates an instance of the LastUpdate.Builder avoiding the need to create one manually via LastUpdate.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to lastUpdate(LastUpdate).

      Parameters:
      lastUpdate - a consumer that will call methods on LastUpdate.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • loggingConfiguration

      Environment.Builder loggingConfiguration(LoggingConfiguration loggingConfiguration)

      The Apache Airflow logs published to CloudWatch Logs.

      Parameters:
      loggingConfiguration - The Apache Airflow logs published to CloudWatch Logs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • loggingConfiguration

      default Environment.Builder loggingConfiguration(Consumer<LoggingConfiguration.Builder> loggingConfiguration)

      The Apache Airflow logs published to CloudWatch Logs.

      This is a convenience method that creates an instance of the LoggingConfiguration.Builder avoiding the need to create one manually via LoggingConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to loggingConfiguration(LoggingConfiguration).

      Parameters:
      loggingConfiguration - a consumer that will call methods on LoggingConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • maxWorkers

      Environment.Builder maxWorkers(Integer maxWorkers)

      The maximum number of workers that run in your environment. For example, 20.

      Parameters:
      maxWorkers - The maximum number of workers that run in your environment. For example, 20.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • minWorkers

      Environment.Builder minWorkers(Integer minWorkers)

      The minimum number of workers that run in your environment. For example, 2.

      Parameters:
      minWorkers - The minimum number of workers that run in your environment. For example, 2.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.

      Parameters:
      name - The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • networkConfiguration

      Environment.Builder networkConfiguration(NetworkConfiguration networkConfiguration)

      Describes the VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.

      Parameters:
      networkConfiguration - Describes the VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • networkConfiguration

      default Environment.Builder networkConfiguration(Consumer<NetworkConfiguration.Builder> networkConfiguration)

      Describes the VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.

      This is a convenience method that creates an instance of the NetworkConfiguration.Builder avoiding the need to create one manually via NetworkConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to networkConfiguration(NetworkConfiguration).

      Parameters:
      networkConfiguration - a consumer that will call methods on NetworkConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • pluginsS3ObjectVersion

      Environment.Builder pluginsS3ObjectVersion(String pluginsS3ObjectVersion)

      The version of the plugins.zip file in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

      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 Installing custom plugins.

      Parameters:
      pluginsS3ObjectVersion - The version of the plugins.zip file in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

      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 Installing custom plugins.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • pluginsS3Path

      Environment.Builder pluginsS3Path(String pluginsS3Path)

      The relative path to the file in your Amazon S3 bucket. For example, s3://mwaa-environment/plugins.zip. For more information, see Installing custom plugins.

      Parameters:
      pluginsS3Path - The relative path to the file in your Amazon S3 bucket. For example, s3://mwaa-environment/plugins.zip. For more information, see Installing custom plugins.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requirementsS3ObjectVersion

      Environment.Builder requirementsS3ObjectVersion(String requirementsS3ObjectVersion)

      The version of the requirements.txt file on your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

      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 Installing Python dependencies.

      Parameters:
      requirementsS3ObjectVersion - The version of the requirements.txt file on your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

      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 Installing Python dependencies.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requirementsS3Path

      Environment.Builder requirementsS3Path(String requirementsS3Path)

      The relative path to the requirements.txt file in your Amazon S3 bucket. For example, s3://mwaa-environment/requirements.txt. For more information, see Installing Python dependencies.

      Parameters:
      requirementsS3Path - The relative path to the requirements.txt file in your Amazon S3 bucket. For example, s3://mwaa-environment/requirements.txt. For more information, see Installing Python dependencies.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • schedulers

      Environment.Builder schedulers(Integer schedulers)

      The number of Apache Airflow schedulers that run in your Amazon MWAA environment.

      Parameters:
      schedulers - The number of Apache Airflow schedulers that run in your Amazon MWAA environment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • serviceRoleArn

      Environment.Builder serviceRoleArn(String serviceRoleArn)

      The Amazon Resource Name (ARN) for the service-linked role of the environment. For more information, see Amazon MWAA Service-linked role.

      Parameters:
      serviceRoleArn - The Amazon Resource Name (ARN) for the service-linked role of the environment. For more information, see Amazon MWAA Service-linked role.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceBucketArn

      Environment.Builder sourceBucketArn(String sourceBucketArn)

      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. For more information, see Create an Amazon S3 bucket for Amazon MWAA.

      Parameters:
      sourceBucketArn - 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. For more information, see Create an Amazon S3 bucket for Amazon MWAA.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • startupScriptS3ObjectVersion

      Environment.Builder startupScriptS3ObjectVersion(String startupScriptS3ObjectVersion)

      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.

      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.

      Parameters:
      startupScriptS3ObjectVersion - 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.

      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • startupScriptS3Path

      Environment.Builder startupScriptS3Path(String startupScriptS3Path)

      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.

      Parameters:
      startupScriptS3Path - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • status

      Environment.Builder status(String status)

      The status of the Amazon MWAA environment. Valid values:

      • CREATING - Indicates the request to create the environment is in progress.

      • CREATING_SNAPSHOT - Indicates the request to update environment details, or upgrade the environment version, is in progress and Amazon MWAA is creating a storage volume snapshot of the Amazon RDS database cluster associated with the environment. A database snapshot is a backup created at a specific point in time. Amazon MWAA uses snapshots to recover environment metadata if the process to update or upgrade an environment fails.

      • CREATE_FAILED - Indicates the request to create the environment failed, and the environment could not be created.

      • AVAILABLE - Indicates the request was successful and the environment is ready to use.

      • UPDATING - Indicates the request to update the environment is in progress.

      • ROLLING_BACK - Indicates the request to update environment details, or upgrade the environment version, failed and Amazon MWAA is restoring the environment using the latest storage volume snapshot.

      • DELETING - Indicates the request to delete the environment is in progress.

      • DELETED - Indicates the request to delete the environment is complete, and the environment has been deleted.

      • UNAVAILABLE - Indicates the request failed, but the environment was unable to rollback and is not in a stable state.

      • UPDATE_FAILED - Indicates the request to update the environment failed, and the environment has rolled back successfully and is ready to use.

      We recommend reviewing our troubleshooting guide for a list of common errors and their solutions. For more information, see Amazon MWAA troubleshooting.

      Parameters:
      status - The status of the Amazon MWAA environment. Valid values:

      • CREATING - Indicates the request to create the environment is in progress.

      • CREATING_SNAPSHOT - Indicates the request to update environment details, or upgrade the environment version, is in progress and Amazon MWAA is creating a storage volume snapshot of the Amazon RDS database cluster associated with the environment. A database snapshot is a backup created at a specific point in time. Amazon MWAA uses snapshots to recover environment metadata if the process to update or upgrade an environment fails.

      • CREATE_FAILED - Indicates the request to create the environment failed, and the environment could not be created.

      • AVAILABLE - Indicates the request was successful and the environment is ready to use.

      • UPDATING - Indicates the request to update the environment is in progress.

      • ROLLING_BACK - Indicates the request to update environment details, or upgrade the environment version, failed and Amazon MWAA is restoring the environment using the latest storage volume snapshot.

      • DELETING - Indicates the request to delete the environment is in progress.

      • DELETED - Indicates the request to delete the environment is complete, and the environment has been deleted.

      • UNAVAILABLE - Indicates the request failed, but the environment was unable to rollback and is not in a stable state.

      • UPDATE_FAILED - Indicates the request to update the environment failed, and the environment has rolled back successfully and is ready to use.

      We recommend reviewing our troubleshooting guide for a list of common errors and their solutions. For more information, see Amazon MWAA troubleshooting.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status of the Amazon MWAA environment. Valid values:

      • CREATING - Indicates the request to create the environment is in progress.

      • CREATING_SNAPSHOT - Indicates the request to update environment details, or upgrade the environment version, is in progress and Amazon MWAA is creating a storage volume snapshot of the Amazon RDS database cluster associated with the environment. A database snapshot is a backup created at a specific point in time. Amazon MWAA uses snapshots to recover environment metadata if the process to update or upgrade an environment fails.

      • CREATE_FAILED - Indicates the request to create the environment failed, and the environment could not be created.

      • AVAILABLE - Indicates the request was successful and the environment is ready to use.

      • UPDATING - Indicates the request to update the environment is in progress.

      • ROLLING_BACK - Indicates the request to update environment details, or upgrade the environment version, failed and Amazon MWAA is restoring the environment using the latest storage volume snapshot.

      • DELETING - Indicates the request to delete the environment is in progress.

      • DELETED - Indicates the request to delete the environment is complete, and the environment has been deleted.

      • UNAVAILABLE - Indicates the request failed, but the environment was unable to rollback and is not in a stable state.

      • UPDATE_FAILED - Indicates the request to update the environment failed, and the environment has rolled back successfully and is ready to use.

      We recommend reviewing our troubleshooting guide for a list of common errors and their solutions. For more information, see Amazon MWAA troubleshooting.

      Parameters:
      status - The status of the Amazon MWAA environment. Valid values:

      • CREATING - Indicates the request to create the environment is in progress.

      • CREATING_SNAPSHOT - Indicates the request to update environment details, or upgrade the environment version, is in progress and Amazon MWAA is creating a storage volume snapshot of the Amazon RDS database cluster associated with the environment. A database snapshot is a backup created at a specific point in time. Amazon MWAA uses snapshots to recover environment metadata if the process to update or upgrade an environment fails.

      • CREATE_FAILED - Indicates the request to create the environment failed, and the environment could not be created.

      • AVAILABLE - Indicates the request was successful and the environment is ready to use.

      • UPDATING - Indicates the request to update the environment is in progress.

      • ROLLING_BACK - Indicates the request to update environment details, or upgrade the environment version, failed and Amazon MWAA is restoring the environment using the latest storage volume snapshot.

      • DELETING - Indicates the request to delete the environment is in progress.

      • DELETED - Indicates the request to delete the environment is complete, and the environment has been deleted.

      • UNAVAILABLE - Indicates the request failed, but the environment was unable to rollback and is not in a stable state.

      • UPDATE_FAILED - Indicates the request to update the environment failed, and the environment has rolled back successfully and is ready to use.

      We recommend reviewing our troubleshooting guide for a list of common errors and their solutions. For more information, see Amazon MWAA troubleshooting.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      The key-value tag pairs associated to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.

      Parameters:
      tags - The key-value tag pairs associated to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • webserverAccessMode

      Environment.Builder webserverAccessMode(String webserverAccessMode)

      The Apache Airflow Web server access mode. For more information, see Apache Airflow access modes.

      Parameters:
      webserverAccessMode - The Apache Airflow Web server access mode. For more information, see Apache Airflow access modes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • webserverAccessMode

      Environment.Builder webserverAccessMode(WebserverAccessMode webserverAccessMode)

      The Apache Airflow Web server access mode. For more information, see Apache Airflow access modes.

      Parameters:
      webserverAccessMode - The Apache Airflow Web server access mode. For more information, see Apache Airflow access modes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • webserverUrl

      Environment.Builder webserverUrl(String webserverUrl)

      The Apache Airflow Web server host name for the Amazon MWAA environment. For more information, see Accessing the Apache Airflow UI.

      Parameters:
      webserverUrl - The Apache Airflow Web server host name for the Amazon MWAA environment. For more information, see Accessing the Apache Airflow UI.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • weeklyMaintenanceWindowStart

      Environment.Builder weeklyMaintenanceWindowStart(String weeklyMaintenanceWindowStart)

      The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.

      Parameters:
      weeklyMaintenanceWindowStart - The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.
      Returns:
      Returns a reference to this object so that method calls can be chained together.