/* * 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 { /// /// Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment. /// public partial class Environment { private Dictionary _airflowConfigurationOptions = new Dictionary(); private string _airflowVersion; private string _arn; private DateTime? _createdAt; private string _dagS3Path; private string _environmentClass; private string _executionRoleArn; private string _kmsKey; private LastUpdate _lastUpdate; private LoggingConfiguration _loggingConfiguration; private int? _maxWorkers; private int? _minWorkers; private string _name; private NetworkConfiguration _networkConfiguration; private string _pluginsS3ObjectVersion; private string _pluginsS3Path; private string _requirementsS3ObjectVersion; private string _requirementsS3Path; private int? _schedulers; private string _serviceRoleArn; private string _sourceBucketArn; private string _startupScriptS3ObjectVersion; private string _startupScriptS3Path; private EnvironmentStatus _status; private Dictionary _tags = new Dictionary(); private WebserverAccessMode _webserverAccessMode; private string _webserverUrl; private string _weeklyMaintenanceWindowStart; /// /// Gets and sets the property 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. /// /// [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 on your 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 Arn. /// /// The Amazon Resource Name (ARN) of the Amazon MWAA environment. /// /// [AWSProperty(Min=1, Max=1224)] public string Arn { get { return this._arn; } set { this._arn = value; } } // Check to see if Arn property is set internal bool IsSetArn() { return this._arn != null; } /// /// Gets and sets the property CreatedAt. /// /// The day and time the environment was created. /// /// public DateTime CreatedAt { get { return this._createdAt.GetValueOrDefault(); } set { this._createdAt = value; } } // Check to see if CreatedAt property is set internal bool IsSetCreatedAt() { return this._createdAt.HasValue; } /// /// Gets and sets the property 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. /// /// [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 KmsKey. /// /// The Amazon Web Services Key Management Service (KMS) encryption key used to encrypt /// the data in your environment. /// /// [AWSProperty(Min=1, Max=1224)] public string KmsKey { get { return this._kmsKey; } set { this._kmsKey = value; } } // Check to see if KmsKey property is set internal bool IsSetKmsKey() { return this._kmsKey != null; } /// /// Gets and sets the property LastUpdate. /// /// The status of the last update on the environment. /// /// public LastUpdate LastUpdate { get { return this._lastUpdate; } set { this._lastUpdate = value; } } // Check to see if LastUpdate property is set internal bool IsSetLastUpdate() { return this._lastUpdate != null; } /// /// Gets and sets the property LoggingConfiguration. /// /// The Apache Airflow logs published to CloudWatch Logs. /// /// public LoggingConfiguration 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 run in your environment. For example, 20. /// /// [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 run in your environment. 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 the Amazon MWAA environment. For example, MyMWAAEnvironment. /// /// [AWSProperty(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. /// /// 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. /// /// public NetworkConfiguration 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 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. /// /// [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 file in your Amazon S3 bucket. For example, s3://mwaa-environment/plugins.zip. /// 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 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. /// /// [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 in your Amazon S3 bucket. /// For example, s3://mwaa-environment/requirements.txt. 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 that 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 ServiceRoleArn. /// /// The Amazon Resource Name (ARN) for the service-linked role of the environment. For /// more information, see Amazon /// MWAA Service-linked role. /// /// [AWSProperty(Min=1, Max=1224)] public string ServiceRoleArn { get { return this._serviceRoleArn; } set { this._serviceRoleArn = value; } } // Check to see if ServiceRoleArn property is set internal bool IsSetServiceRoleArn() { return this._serviceRoleArn != null; } /// /// 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. /// /// /// /// 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. /// /// 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. /// /// 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 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. /// ///
public EnvironmentStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// /// Gets and sets the property Tags. /// /// The key-value tag pairs associated to your environment. For example, "Environment": /// "Staging". For more information, see Tagging /// Amazon Web Services resources. /// /// [AWSProperty(Min=1, Max=50)] public Dictionary Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// /// 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 WebserverUrl. /// /// The Apache Airflow Web server host name for the Amazon MWAA environment. For /// more information, see Accessing /// the Apache Airflow UI. /// /// [AWSProperty(Min=1, Max=256)] public string WebserverUrl { get { return this._webserverUrl; } set { this._webserverUrl = value; } } // Check to see if WebserverUrl property is set internal bool IsSetWebserverUrl() { return this._webserverUrl != null; } /// /// Gets and sets the property 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. /// /// [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; } } }