/* * 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 CreateEnvironment operation. /// Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment. /// public partial class CreateEnvironmentRequest : AmazonMWAARequest { private Dictionary _airflowConfigurationOptions = new Dictionary(); private string _airflowVersion; private string _dagS3Path; private string _environmentClass; private string _executionRoleArn; private string _kmsKey; private LoggingConfigurationInput _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 _sourceBucketArn; private string _startupScriptS3ObjectVersion; private string _startupScriptS3Path; private Dictionary _tags = new Dictionary(); 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. If no value is specified, it defaults /// to the latest version. Valid values: 1.10.12, 2.0.2, 2.2.2, /// 2.4.3, and 2.5.1. For more information, see Apache /// Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA). /// /// [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(Required=true, 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 for your environment. An execution /// role is an Amazon Web Services Identity and Access Management (IAM) role that grants /// MWAA permission to access Amazon Web Services services and resources used by your /// environment. For example, arn:aws:iam::123456789:role/my-execution-role. /// For more information, see Amazon /// MWAA Execution role. /// /// [AWSProperty(Required=true, 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) key to encrypt the data in your /// environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK /// (advanced). For more information, see Create /// an Amazon MWAA 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 LoggingConfiguration. /// /// Defines the Apache Airflow logs 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 the 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. /// /// [AWSProperty(Required=true)] 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 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 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 environment. Valid values: /// ///
  • /// /// v2 - Accepts between 2 to 5. Defaults to 2. /// ///
  • /// /// v1 - Accepts 1. /// ///
///
[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(Required=true, 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 Tags. /// /// The key-value tag pairs you want to associate 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 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; } } }