/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the mwaa-2020-07-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.MWAA.Model
{
///
/// Container for the parameters to the UpdateEnvironment operation.
/// Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
///
public partial class UpdateEnvironmentRequest : AmazonMWAARequest
{
private Dictionary _airflowConfigurationOptions = new Dictionary();
private string _airflowVersion;
private string _dagS3Path;
private string _environmentClass;
private string _executionRoleArn;
private LoggingConfigurationInput _loggingConfiguration;
private int? _maxWorkers;
private int? _minWorkers;
private string _name;
private UpdateNetworkConfigurationInput _networkConfiguration;
private string _pluginsS3ObjectVersion;
private string _pluginsS3Path;
private string _requirementsS3ObjectVersion;
private string _requirementsS3Path;
private int? _schedulers;
private string _sourceBucketArn;
private string _startupScriptS3ObjectVersion;
private string _startupScriptS3Path;
private WebserverAccessMode _webserverAccessMode;
private string _weeklyMaintenanceWindowStart;
///
/// Gets and sets the property AirflowConfigurationOptions.
///
/// A list of key-value pairs containing the Apache Airflow configuration options you
/// want to attach to your environment. For more information, see Apache
/// Airflow configuration options.
///
///
[AWSProperty(Sensitive=true)]
public Dictionary AirflowConfigurationOptions
{
get { return this._airflowConfigurationOptions; }
set { this._airflowConfigurationOptions = value; }
}
// Check to see if AirflowConfigurationOptions property is set
internal bool IsSetAirflowConfigurationOptions()
{
return this._airflowConfigurationOptions != null && this._airflowConfigurationOptions.Count > 0;
}
///
/// Gets and sets the property AirflowVersion.
///
/// The Apache Airflow version for your environment. To upgrade your environment, specify
/// a newer version of Apache Airflow supported by Amazon MWAA.
///
///
///
/// Before you upgrade an environment, make sure your requirements, DAGs, plugins, and
/// other resources used in your workflows are compatible with the new Apache Airflow
/// version. For more information about updating your resources, see Upgrading
/// an Amazon MWAA environment.
///
///
///
/// Valid values: 1.10.12
, 2.0.2
, 2.2.2
, 2.4.3
,
/// and 2.5.1
.
///
///
[AWSProperty(Min=1, Max=32)]
public string AirflowVersion
{
get { return this._airflowVersion; }
set { this._airflowVersion = value; }
}
// Check to see if AirflowVersion property is set
internal bool IsSetAirflowVersion()
{
return this._airflowVersion != null;
}
///
/// Gets and sets the property DagS3Path.
///
/// The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags
.
/// For more information, see Adding
/// or updating DAGs.
///
///
[AWSProperty(Min=1, Max=1024)]
public string DagS3Path
{
get { return this._dagS3Path; }
set { this._dagS3Path = value; }
}
// Check to see if DagS3Path property is set
internal bool IsSetDagS3Path()
{
return this._dagS3Path != null;
}
///
/// Gets and sets the property EnvironmentClass.
///
/// The environment class type. Valid values: mw1.small
, mw1.medium
,
/// mw1.large
. For more information, see Amazon
/// MWAA environment class.
///
///
[AWSProperty(Min=1, Max=1024)]
public string EnvironmentClass
{
get { return this._environmentClass; }
set { this._environmentClass = value; }
}
// Check to see if EnvironmentClass property is set
internal bool IsSetEnvironmentClass()
{
return this._environmentClass != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=1224)]
public string ExecutionRoleArn
{
get { return this._executionRoleArn; }
set { this._executionRoleArn = value; }
}
// Check to see if ExecutionRoleArn property is set
internal bool IsSetExecutionRoleArn()
{
return this._executionRoleArn != null;
}
///
/// Gets and sets the property LoggingConfiguration.
///
/// The Apache Airflow log types to send to CloudWatch Logs.
///
///
public LoggingConfigurationInput LoggingConfiguration
{
get { return this._loggingConfiguration; }
set { this._loggingConfiguration = value; }
}
// Check to see if LoggingConfiguration property is set
internal bool IsSetLoggingConfiguration()
{
return this._loggingConfiguration != null;
}
///
/// Gets and sets the property MaxWorkers.
///
/// 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 in MinWorkers
.
///
///
[AWSProperty(Min=1)]
public int MaxWorkers
{
get { return this._maxWorkers.GetValueOrDefault(); }
set { this._maxWorkers = value; }
}
// Check to see if MaxWorkers property is set
internal bool IsSetMaxWorkers()
{
return this._maxWorkers.HasValue;
}
///
/// Gets and sets the property MinWorkers.
///
/// 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 the MinWorkers
/// field. For example, 2
.
///
///
[AWSProperty(Min=1)]
public int MinWorkers
{
get { return this._minWorkers.GetValueOrDefault(); }
set { this._minWorkers = value; }
}
// Check to see if MinWorkers property is set
internal bool IsSetMinWorkers()
{
return this._minWorkers.HasValue;
}
///
/// Gets and sets the property Name.
///
/// The name of your Amazon MWAA environment. For example, MyMWAAEnvironment
.
///
///
[AWSProperty(Required=true, Min=1, Max=80)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property NetworkConfiguration.
///
/// 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.
///
///
public UpdateNetworkConfigurationInput NetworkConfiguration
{
get { return this._networkConfiguration; }
set { this._networkConfiguration = value; }
}
// Check to see if NetworkConfiguration property is set
internal bool IsSetNetworkConfiguration()
{
return this._networkConfiguration != null;
}
///
/// Gets and sets the property PluginsS3ObjectVersion.
///
/// The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version
/// each time a plugins.zip
file is updated. For more information, see How
/// S3 Versioning works.
///
///
[AWSProperty(Min=1, Max=1024)]
public string PluginsS3ObjectVersion
{
get { return this._pluginsS3ObjectVersion; }
set { this._pluginsS3ObjectVersion = value; }
}
// Check to see if PluginsS3ObjectVersion property is set
internal bool IsSetPluginsS3ObjectVersion()
{
return this._pluginsS3ObjectVersion != null;
}
///
/// Gets and sets the property PluginsS3Path.
///
/// The relative path to the plugins.zip
file on your Amazon S3 bucket. For
/// example, plugins.zip
. If specified, then the plugins.zip version is required.
/// For more information, see Installing
/// custom plugins.
///
///
[AWSProperty(Min=1, Max=1024)]
public string PluginsS3Path
{
get { return this._pluginsS3Path; }
set { this._pluginsS3Path = value; }
}
// Check to see if PluginsS3Path property is set
internal bool IsSetPluginsS3Path()
{
return this._pluginsS3Path != null;
}
///
/// Gets and sets the property RequirementsS3ObjectVersion.
///
/// The version of the requirements.txt file on your Amazon S3 bucket. You must specify
/// a version each time a requirements.txt
file is updated. For more information,
/// see How
/// S3 Versioning works.
///
///
[AWSProperty(Min=1, Max=1024)]
public string RequirementsS3ObjectVersion
{
get { return this._requirementsS3ObjectVersion; }
set { this._requirementsS3ObjectVersion = value; }
}
// Check to see if RequirementsS3ObjectVersion property is set
internal bool IsSetRequirementsS3ObjectVersion()
{
return this._requirementsS3ObjectVersion != null;
}
///
/// Gets and sets the property RequirementsS3Path.
///
/// The relative path to the requirements.txt
file on your Amazon S3 bucket.
/// For example, requirements.txt
. If specified, then a file version is required.
/// For more information, see Installing
/// Python dependencies.
///
///
[AWSProperty(Min=1, Max=1024)]
public string RequirementsS3Path
{
get { return this._requirementsS3Path; }
set { this._requirementsS3Path = value; }
}
// Check to see if RequirementsS3Path property is set
internal bool IsSetRequirementsS3Path()
{
return this._requirementsS3Path != null;
}
///
/// Gets and sets the property Schedulers.
///
/// The number of Apache Airflow schedulers to run in your Amazon MWAA environment.
///
///
[AWSProperty(Max=5)]
public int Schedulers
{
get { return this._schedulers.GetValueOrDefault(); }
set { this._schedulers = value; }
}
// Check to see if Schedulers property is set
internal bool IsSetSchedulers()
{
return this._schedulers.HasValue;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=1224)]
public string SourceBucketArn
{
get { return this._sourceBucketArn; }
set { this._sourceBucketArn = value; }
}
// Check to see if SourceBucketArn property is set
internal bool IsSetSourceBucketArn()
{
return this._sourceBucketArn != null;
}
///
/// Gets and sets the property 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 every time you update the script.
///
///
///
/// 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.
///
///
[AWSProperty(Min=1, Max=1024)]
public string StartupScriptS3ObjectVersion
{
get { return this._startupScriptS3ObjectVersion; }
set { this._startupScriptS3ObjectVersion = value; }
}
// Check to see if StartupScriptS3ObjectVersion property is set
internal bool IsSetStartupScriptS3ObjectVersion()
{
return this._startupScriptS3ObjectVersion != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=1024)]
public string StartupScriptS3Path
{
get { return this._startupScriptS3Path; }
set { this._startupScriptS3Path = value; }
}
// Check to see if StartupScriptS3Path property is set
internal bool IsSetStartupScriptS3Path()
{
return this._startupScriptS3Path != null;
}
///
/// Gets and sets the property WebserverAccessMode.
///
/// The Apache Airflow Web server access mode. For more information, see Apache
/// Airflow access modes.
///
///
public WebserverAccessMode WebserverAccessMode
{
get { return this._webserverAccessMode; }
set { this._webserverAccessMode = value; }
}
// Check to see if WebserverAccessMode property is set
internal bool IsSetWebserverAccessMode()
{
return this._webserverAccessMode != null;
}
///
/// Gets and sets the property WeeklyMaintenanceWindowStart.
///
/// The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard
/// time 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.
///
///
[AWSProperty(Min=1, Max=9)]
public string WeeklyMaintenanceWindowStart
{
get { return this._weeklyMaintenanceWindowStart; }
set { this._weeklyMaintenanceWindowStart = value; }
}
// Check to see if WeeklyMaintenanceWindowStart property is set
internal bool IsSetWeeklyMaintenanceWindowStart()
{
return this._weeklyMaintenanceWindowStart != null;
}
}
}