{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MwAA.CreateEnvironment
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Amazon Managed Workflows for Apache Airflow (MWAA)
-- environment.
module Amazonka.MwAA.CreateEnvironment
  ( -- * Creating a Request
    CreateEnvironment (..),
    newCreateEnvironment,

    -- * Request Lenses
    createEnvironment_schedulers,
    createEnvironment_minWorkers,
    createEnvironment_pluginsS3Path,
    createEnvironment_webserverAccessMode,
    createEnvironment_airflowVersion,
    createEnvironment_kmsKey,
    createEnvironment_weeklyMaintenanceWindowStart,
    createEnvironment_requirementsS3ObjectVersion,
    createEnvironment_pluginsS3ObjectVersion,
    createEnvironment_airflowConfigurationOptions,
    createEnvironment_loggingConfiguration,
    createEnvironment_environmentClass,
    createEnvironment_tags,
    createEnvironment_requirementsS3Path,
    createEnvironment_maxWorkers,
    createEnvironment_dagS3Path,
    createEnvironment_executionRoleArn,
    createEnvironment_name,
    createEnvironment_networkConfiguration,
    createEnvironment_sourceBucketArn,

    -- * Destructuring the Response
    CreateEnvironmentResponse (..),
    newCreateEnvironmentResponse,

    -- * Response Lenses
    createEnvironmentResponse_arn,
    createEnvironmentResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MwAA.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | This section contains the Amazon Managed Workflows for Apache Airflow
-- (MWAA) API reference documentation to create an environment. For more
-- information, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html Get started with Amazon Managed Workflows for Apache Airflow>.
--
-- /See:/ 'newCreateEnvironment' smart constructor.
data CreateEnvironment = CreateEnvironment'
  { -- | The number of Apache Airflow schedulers to run in your environment.
    CreateEnvironment -> Maybe Int
schedulers :: Prelude.Maybe Prelude.Int,
    -- | 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@.
    CreateEnvironment -> Maybe Natural
minWorkers :: Prelude.Maybe Prelude.Natural,
    -- | 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. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html Installing custom plugins>.
    CreateEnvironment -> Maybe Text
pluginsS3Path :: Prelude.Maybe Prelude.Text,
    -- | The Apache Airflow /Web server/ access mode. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html Apache Airflow access modes>.
    CreateEnvironment -> Maybe WebserverAccessMode
webserverAccessMode :: Prelude.Maybe WebserverAccessMode,
    -- | The Apache Airflow version for your environment. For example,
    -- @v1.10.12@. If no value is specified, defaults to the latest version.
    -- Valid values: @v1.10.12@.
    CreateEnvironment -> Maybe Text
airflowVersion :: Prelude.Maybe Prelude.Text,
    -- | The AWS Key Management Service (KMS) key to encrypt the data in your
    -- environment. You can use an AWS owned CMK, or a Customer managed CMK
    -- (advanced). To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html Get started with Amazon Managed Workflows for Apache Airflow>.
    CreateEnvironment -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | The day and time of the week 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.
    -- Supported input includes the following:
    --
    -- -   MON|TUE|WED|THU|FRI|SAT|SUN:([01]\\\\d|2[0-3]):(00|30)
    CreateEnvironment -> Maybe Text
weeklyMaintenanceWindowStart :: Prelude.Maybe Prelude.Text,
    -- | The version of the requirements.txt file on your Amazon S3 bucket. A
    -- version must be specified each time a requirements.txt file is updated.
    -- To learn more, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html How S3 Versioning works>.
    CreateEnvironment -> Maybe Text
requirementsS3ObjectVersion :: Prelude.Maybe Prelude.Text,
    -- | The version of the plugins.zip file on your Amazon S3 bucket. A version
    -- must be specified each time a plugins.zip file is updated. To learn
    -- more, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html How S3 Versioning works>.
    CreateEnvironment -> Maybe Text
pluginsS3ObjectVersion :: Prelude.Maybe Prelude.Text,
    -- | A list of key-value pairs containing the Apache Airflow configuration
    -- options you want to attach to your environment. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html Apache Airflow configuration options>.
    CreateEnvironment -> Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | Defines the Apache Airflow logs to send to CloudWatch Logs:
    -- @DagProcessingLogs@, @SchedulerLogs@, @TaskLogs@, @WebserverLogs@,
    -- @WorkerLogs@.
    CreateEnvironment -> Maybe LoggingConfigurationInput
loggingConfiguration :: Prelude.Maybe LoggingConfigurationInput,
    -- | The environment class type. Valid values: @mw1.small@, @mw1.medium@,
    -- @mw1.large@. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html Amazon MWAA environment class>.
    CreateEnvironment -> Maybe Text
environmentClass :: Prelude.Maybe Prelude.Text,
    -- | The key-value tag pairs you want to associate to your environment. For
    -- example, @\"Environment\": \"Staging\"@. To learn more, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS resources>.
    CreateEnvironment -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | 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. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html Installing Python dependencies>.
    CreateEnvironment -> Maybe Text
requirementsS3Path :: Prelude.Maybe Prelude.Text,
    -- | 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@.
    CreateEnvironment -> Maybe Natural
maxWorkers :: Prelude.Maybe Prelude.Natural,
    -- | The relative path to the DAGs folder on your Amazon S3 bucket. For
    -- example, @dags@. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html Adding or updating DAGs>.
    CreateEnvironment -> Text
dagS3Path :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the execution role for your
    -- environment. An execution role is an AWS Identity and Access Management
    -- (IAM) role that grants MWAA permission to access AWS services and
    -- resources used by your environment. For example,
    -- @arn:aws:iam::123456789:role\/my-execution-role@. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html Amazon MWAA Execution role>.
    CreateEnvironment -> Text
executionRoleArn :: Prelude.Text,
    -- | The name of the Amazon MWAA environment. For example,
    -- @MyMWAAEnvironment@.
    CreateEnvironment -> Text
name :: Prelude.Text,
    -- | The VPC networking components used to secure and enable network traffic
    -- between the AWS resources for your environment. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html About networking on Amazon MWAA>.
    CreateEnvironment -> NetworkConfiguration
networkConfiguration :: NetworkConfiguration,
    -- | 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@. To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html Create an Amazon S3 bucket for Amazon MWAA>.
    CreateEnvironment -> Text
sourceBucketArn :: Prelude.Text
  }
  deriving (CreateEnvironment -> CreateEnvironment -> Bool
(CreateEnvironment -> CreateEnvironment -> Bool)
-> (CreateEnvironment -> CreateEnvironment -> Bool)
-> Eq CreateEnvironment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironment -> CreateEnvironment -> Bool
$c/= :: CreateEnvironment -> CreateEnvironment -> Bool
== :: CreateEnvironment -> CreateEnvironment -> Bool
$c== :: CreateEnvironment -> CreateEnvironment -> Bool
Prelude.Eq, Int -> CreateEnvironment -> ShowS
[CreateEnvironment] -> ShowS
CreateEnvironment -> String
(Int -> CreateEnvironment -> ShowS)
-> (CreateEnvironment -> String)
-> ([CreateEnvironment] -> ShowS)
-> Show CreateEnvironment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironment] -> ShowS
$cshowList :: [CreateEnvironment] -> ShowS
show :: CreateEnvironment -> String
$cshow :: CreateEnvironment -> String
showsPrec :: Int -> CreateEnvironment -> ShowS
$cshowsPrec :: Int -> CreateEnvironment -> ShowS
Prelude.Show, (forall x. CreateEnvironment -> Rep CreateEnvironment x)
-> (forall x. Rep CreateEnvironment x -> CreateEnvironment)
-> Generic CreateEnvironment
forall x. Rep CreateEnvironment x -> CreateEnvironment
forall x. CreateEnvironment -> Rep CreateEnvironment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEnvironment x -> CreateEnvironment
$cfrom :: forall x. CreateEnvironment -> Rep CreateEnvironment x
Prelude.Generic)

-- |
-- Create a value of 'CreateEnvironment' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'schedulers', 'createEnvironment_schedulers' - The number of Apache Airflow schedulers to run in your environment.
--
-- 'minWorkers', 'createEnvironment_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@.
--
-- 'pluginsS3Path', 'createEnvironment_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. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html Installing custom plugins>.
--
-- 'webserverAccessMode', 'createEnvironment_webserverAccessMode' - The Apache Airflow /Web server/ access mode. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html Apache Airflow access modes>.
--
-- 'airflowVersion', 'createEnvironment_airflowVersion' - The Apache Airflow version for your environment. For example,
-- @v1.10.12@. If no value is specified, defaults to the latest version.
-- Valid values: @v1.10.12@.
--
-- 'kmsKey', 'createEnvironment_kmsKey' - The AWS Key Management Service (KMS) key to encrypt the data in your
-- environment. You can use an AWS owned CMK, or a Customer managed CMK
-- (advanced). To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html Get started with Amazon Managed Workflows for Apache Airflow>.
--
-- 'weeklyMaintenanceWindowStart', 'createEnvironment_weeklyMaintenanceWindowStart' - The day and time of the week 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.
-- Supported input includes the following:
--
-- -   MON|TUE|WED|THU|FRI|SAT|SUN:([01]\\\\d|2[0-3]):(00|30)
--
-- 'requirementsS3ObjectVersion', 'createEnvironment_requirementsS3ObjectVersion' - The version of the requirements.txt file on your Amazon S3 bucket. A
-- version must be specified each time a requirements.txt file is updated.
-- To learn more, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html How S3 Versioning works>.
--
-- 'pluginsS3ObjectVersion', 'createEnvironment_pluginsS3ObjectVersion' - The version of the plugins.zip file on your Amazon S3 bucket. A version
-- must be specified each time a plugins.zip file is updated. To learn
-- more, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html How S3 Versioning works>.
--
-- 'airflowConfigurationOptions', 'createEnvironment_airflowConfigurationOptions' - A list of key-value pairs containing the Apache Airflow configuration
-- options you want to attach to your environment. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html Apache Airflow configuration options>.
--
-- 'loggingConfiguration', 'createEnvironment_loggingConfiguration' - Defines the Apache Airflow logs to send to CloudWatch Logs:
-- @DagProcessingLogs@, @SchedulerLogs@, @TaskLogs@, @WebserverLogs@,
-- @WorkerLogs@.
--
-- 'environmentClass', 'createEnvironment_environmentClass' - The environment class type. Valid values: @mw1.small@, @mw1.medium@,
-- @mw1.large@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html Amazon MWAA environment class>.
--
-- 'tags', 'createEnvironment_tags' - The key-value tag pairs you want to associate to your environment. For
-- example, @\"Environment\": \"Staging\"@. To learn more, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS resources>.
--
-- 'requirementsS3Path', 'createEnvironment_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. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html Installing Python dependencies>.
--
-- 'maxWorkers', 'createEnvironment_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@.
--
-- 'dagS3Path', 'createEnvironment_dagS3Path' - The relative path to the DAGs folder on your Amazon S3 bucket. For
-- example, @dags@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html Adding or updating DAGs>.
--
-- 'executionRoleArn', 'createEnvironment_executionRoleArn' - The Amazon Resource Name (ARN) of the execution role for your
-- environment. An execution role is an AWS Identity and Access Management
-- (IAM) role that grants MWAA permission to access AWS services and
-- resources used by your environment. For example,
-- @arn:aws:iam::123456789:role\/my-execution-role@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html Amazon MWAA Execution role>.
--
-- 'name', 'createEnvironment_name' - The name of the Amazon MWAA environment. For example,
-- @MyMWAAEnvironment@.
--
-- 'networkConfiguration', 'createEnvironment_networkConfiguration' - The VPC networking components used to secure and enable network traffic
-- between the AWS resources for your environment. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html About networking on Amazon MWAA>.
--
-- 'sourceBucketArn', 'createEnvironment_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@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html Create an Amazon S3 bucket for Amazon MWAA>.
newCreateEnvironment ::
  -- | 'dagS3Path'
  Prelude.Text ->
  -- | 'executionRoleArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'networkConfiguration'
  NetworkConfiguration ->
  -- | 'sourceBucketArn'
  Prelude.Text ->
  CreateEnvironment
newCreateEnvironment :: Text
-> Text
-> Text
-> NetworkConfiguration
-> Text
-> CreateEnvironment
newCreateEnvironment
  Text
pDagS3Path_
  Text
pExecutionRoleArn_
  Text
pName_
  NetworkConfiguration
pNetworkConfiguration_
  Text
pSourceBucketArn_ =
    CreateEnvironment' :: Maybe Int
-> Maybe Natural
-> Maybe Text
-> Maybe WebserverAccessMode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe LoggingConfigurationInput
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Natural
-> Text
-> Text
-> Text
-> NetworkConfiguration
-> Text
-> CreateEnvironment
CreateEnvironment'
      { $sel:schedulers:CreateEnvironment' :: Maybe Int
schedulers = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:minWorkers:CreateEnvironment' :: Maybe Natural
minWorkers = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:pluginsS3Path:CreateEnvironment' :: Maybe Text
pluginsS3Path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:webserverAccessMode:CreateEnvironment' :: Maybe WebserverAccessMode
webserverAccessMode = Maybe WebserverAccessMode
forall a. Maybe a
Prelude.Nothing,
        $sel:airflowVersion:CreateEnvironment' :: Maybe Text
airflowVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKey:CreateEnvironment' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:weeklyMaintenanceWindowStart:CreateEnvironment' :: Maybe Text
weeklyMaintenanceWindowStart = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:requirementsS3ObjectVersion:CreateEnvironment' :: Maybe Text
requirementsS3ObjectVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pluginsS3ObjectVersion:CreateEnvironment' :: Maybe Text
pluginsS3ObjectVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:airflowConfigurationOptions:CreateEnvironment' :: Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
        $sel:loggingConfiguration:CreateEnvironment' :: Maybe LoggingConfigurationInput
loggingConfiguration = Maybe LoggingConfigurationInput
forall a. Maybe a
Prelude.Nothing,
        $sel:environmentClass:CreateEnvironment' :: Maybe Text
environmentClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEnvironment' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:requirementsS3Path:CreateEnvironment' :: Maybe Text
requirementsS3Path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxWorkers:CreateEnvironment' :: Maybe Natural
maxWorkers = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:dagS3Path:CreateEnvironment' :: Text
dagS3Path = Text
pDagS3Path_,
        $sel:executionRoleArn:CreateEnvironment' :: Text
executionRoleArn = Text
pExecutionRoleArn_,
        $sel:name:CreateEnvironment' :: Text
name = Text
pName_,
        $sel:networkConfiguration:CreateEnvironment' :: NetworkConfiguration
networkConfiguration = NetworkConfiguration
pNetworkConfiguration_,
        $sel:sourceBucketArn:CreateEnvironment' :: Text
sourceBucketArn = Text
pSourceBucketArn_
      }

-- | The number of Apache Airflow schedulers to run in your environment.
createEnvironment_schedulers :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Int)
createEnvironment_schedulers :: (Maybe Int -> f (Maybe Int))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_schedulers = (CreateEnvironment -> Maybe Int)
-> (CreateEnvironment -> Maybe Int -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Int
schedulers :: Maybe Int
$sel:schedulers:CreateEnvironment' :: CreateEnvironment -> Maybe Int
schedulers} -> Maybe Int
schedulers) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Int
a -> CreateEnvironment
s {$sel:schedulers:CreateEnvironment' :: Maybe Int
schedulers = Maybe Int
a} :: CreateEnvironment)

-- | 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@.
createEnvironment_minWorkers :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Natural)
createEnvironment_minWorkers :: (Maybe Natural -> f (Maybe Natural))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_minWorkers = (CreateEnvironment -> Maybe Natural)
-> (CreateEnvironment -> Maybe Natural -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Natural
minWorkers :: Maybe Natural
$sel:minWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
minWorkers} -> Maybe Natural
minWorkers) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Natural
a -> CreateEnvironment
s {$sel:minWorkers:CreateEnvironment' :: Maybe Natural
minWorkers = Maybe Natural
a} :: CreateEnvironment)

-- | 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. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html Installing custom plugins>.
createEnvironment_pluginsS3Path :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_pluginsS3Path :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_pluginsS3Path = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
pluginsS3Path :: Maybe Text
$sel:pluginsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
pluginsS3Path} -> Maybe Text
pluginsS3Path) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:pluginsS3Path:CreateEnvironment' :: Maybe Text
pluginsS3Path = Maybe Text
a} :: CreateEnvironment)

-- | The Apache Airflow /Web server/ access mode. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html Apache Airflow access modes>.
createEnvironment_webserverAccessMode :: Lens.Lens' CreateEnvironment (Prelude.Maybe WebserverAccessMode)
createEnvironment_webserverAccessMode :: (Maybe WebserverAccessMode -> f (Maybe WebserverAccessMode))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_webserverAccessMode = (CreateEnvironment -> Maybe WebserverAccessMode)
-> (CreateEnvironment
    -> Maybe WebserverAccessMode -> CreateEnvironment)
-> Lens
     CreateEnvironment
     CreateEnvironment
     (Maybe WebserverAccessMode)
     (Maybe WebserverAccessMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe WebserverAccessMode
webserverAccessMode :: Maybe WebserverAccessMode
$sel:webserverAccessMode:CreateEnvironment' :: CreateEnvironment -> Maybe WebserverAccessMode
webserverAccessMode} -> Maybe WebserverAccessMode
webserverAccessMode) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe WebserverAccessMode
a -> CreateEnvironment
s {$sel:webserverAccessMode:CreateEnvironment' :: Maybe WebserverAccessMode
webserverAccessMode = Maybe WebserverAccessMode
a} :: CreateEnvironment)

-- | The Apache Airflow version for your environment. For example,
-- @v1.10.12@. If no value is specified, defaults to the latest version.
-- Valid values: @v1.10.12@.
createEnvironment_airflowVersion :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_airflowVersion :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_airflowVersion = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
airflowVersion :: Maybe Text
$sel:airflowVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
airflowVersion} -> Maybe Text
airflowVersion) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:airflowVersion:CreateEnvironment' :: Maybe Text
airflowVersion = Maybe Text
a} :: CreateEnvironment)

-- | The AWS Key Management Service (KMS) key to encrypt the data in your
-- environment. You can use an AWS owned CMK, or a Customer managed CMK
-- (advanced). To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html Get started with Amazon Managed Workflows for Apache Airflow>.
createEnvironment_kmsKey :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_kmsKey :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_kmsKey = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:CreateEnvironment' :: CreateEnvironment -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:kmsKey:CreateEnvironment' :: Maybe Text
kmsKey = Maybe Text
a} :: CreateEnvironment)

-- | The day and time of the week 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.
-- Supported input includes the following:
--
-- -   MON|TUE|WED|THU|FRI|SAT|SUN:([01]\\\\d|2[0-3]):(00|30)
createEnvironment_weeklyMaintenanceWindowStart :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_weeklyMaintenanceWindowStart :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_weeklyMaintenanceWindowStart = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
weeklyMaintenanceWindowStart :: Maybe Text
$sel:weeklyMaintenanceWindowStart:CreateEnvironment' :: CreateEnvironment -> Maybe Text
weeklyMaintenanceWindowStart} -> Maybe Text
weeklyMaintenanceWindowStart) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:weeklyMaintenanceWindowStart:CreateEnvironment' :: Maybe Text
weeklyMaintenanceWindowStart = Maybe Text
a} :: CreateEnvironment)

-- | The version of the requirements.txt file on your Amazon S3 bucket. A
-- version must be specified each time a requirements.txt file is updated.
-- To learn more, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html How S3 Versioning works>.
createEnvironment_requirementsS3ObjectVersion :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_requirementsS3ObjectVersion :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_requirementsS3ObjectVersion = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
requirementsS3ObjectVersion :: Maybe Text
$sel:requirementsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
requirementsS3ObjectVersion} -> Maybe Text
requirementsS3ObjectVersion) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:requirementsS3ObjectVersion:CreateEnvironment' :: Maybe Text
requirementsS3ObjectVersion = Maybe Text
a} :: CreateEnvironment)

-- | The version of the plugins.zip file on your Amazon S3 bucket. A version
-- must be specified each time a plugins.zip file is updated. To learn
-- more, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html How S3 Versioning works>.
createEnvironment_pluginsS3ObjectVersion :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_pluginsS3ObjectVersion :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_pluginsS3ObjectVersion = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
pluginsS3ObjectVersion :: Maybe Text
$sel:pluginsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
pluginsS3ObjectVersion} -> Maybe Text
pluginsS3ObjectVersion) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:pluginsS3ObjectVersion:CreateEnvironment' :: Maybe Text
pluginsS3ObjectVersion = Maybe Text
a} :: CreateEnvironment)

-- | A list of key-value pairs containing the Apache Airflow configuration
-- options you want to attach to your environment. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html Apache Airflow configuration options>.
createEnvironment_airflowConfigurationOptions :: Lens.Lens' CreateEnvironment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createEnvironment_airflowConfigurationOptions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_airflowConfigurationOptions = (CreateEnvironment -> Maybe (Sensitive (HashMap Text Text)))
-> (CreateEnvironment
    -> Maybe (Sensitive (HashMap Text Text)) -> CreateEnvironment)
-> Lens
     CreateEnvironment
     CreateEnvironment
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions :: Maybe (Sensitive (HashMap Text Text))
$sel:airflowConfigurationOptions:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions} -> Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe (Sensitive (HashMap Text Text))
a -> CreateEnvironment
s {$sel:airflowConfigurationOptions:CreateEnvironment' :: Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions = Maybe (Sensitive (HashMap Text Text))
a} :: CreateEnvironment) ((Maybe (Sensitive (HashMap Text Text))
  -> f (Maybe (Sensitive (HashMap Text Text))))
 -> CreateEnvironment -> f CreateEnvironment)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (Sensitive (HashMap Text Text))
    -> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateEnvironment
-> f CreateEnvironment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
-> (Exchange
      (HashMap Text Text)
      (HashMap Text Text)
      (HashMap Text Text)
      (Identity (HashMap Text Text))
    -> Exchange
         (HashMap Text Text)
         (HashMap Text Text)
         (HashMap Text Text)
         (Identity (HashMap Text Text)))
-> AnIso
     (Sensitive (HashMap Text Text))
     (Sensitive (HashMap Text Text))
     (HashMap Text Text)
     (HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (Identity (HashMap Text Text))
-> Exchange
     (HashMap Text Text)
     (HashMap Text Text)
     (HashMap Text Text)
     (Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | Defines the Apache Airflow logs to send to CloudWatch Logs:
-- @DagProcessingLogs@, @SchedulerLogs@, @TaskLogs@, @WebserverLogs@,
-- @WorkerLogs@.
createEnvironment_loggingConfiguration :: Lens.Lens' CreateEnvironment (Prelude.Maybe LoggingConfigurationInput)
createEnvironment_loggingConfiguration :: (Maybe LoggingConfigurationInput
 -> f (Maybe LoggingConfigurationInput))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_loggingConfiguration = (CreateEnvironment -> Maybe LoggingConfigurationInput)
-> (CreateEnvironment
    -> Maybe LoggingConfigurationInput -> CreateEnvironment)
-> Lens
     CreateEnvironment
     CreateEnvironment
     (Maybe LoggingConfigurationInput)
     (Maybe LoggingConfigurationInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe LoggingConfigurationInput
loggingConfiguration :: Maybe LoggingConfigurationInput
$sel:loggingConfiguration:CreateEnvironment' :: CreateEnvironment -> Maybe LoggingConfigurationInput
loggingConfiguration} -> Maybe LoggingConfigurationInput
loggingConfiguration) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe LoggingConfigurationInput
a -> CreateEnvironment
s {$sel:loggingConfiguration:CreateEnvironment' :: Maybe LoggingConfigurationInput
loggingConfiguration = Maybe LoggingConfigurationInput
a} :: CreateEnvironment)

-- | The environment class type. Valid values: @mw1.small@, @mw1.medium@,
-- @mw1.large@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html Amazon MWAA environment class>.
createEnvironment_environmentClass :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_environmentClass :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_environmentClass = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
environmentClass :: Maybe Text
$sel:environmentClass:CreateEnvironment' :: CreateEnvironment -> Maybe Text
environmentClass} -> Maybe Text
environmentClass) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:environmentClass:CreateEnvironment' :: Maybe Text
environmentClass = Maybe Text
a} :: CreateEnvironment)

-- | The key-value tag pairs you want to associate to your environment. For
-- example, @\"Environment\": \"Staging\"@. To learn more, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS resources>.
createEnvironment_tags :: Lens.Lens' CreateEnvironment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createEnvironment_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_tags = (CreateEnvironment -> Maybe (HashMap Text Text))
-> (CreateEnvironment
    -> Maybe (HashMap Text Text) -> CreateEnvironment)
-> Lens
     CreateEnvironment
     CreateEnvironment
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe (HashMap Text Text)
a -> CreateEnvironment
s {$sel:tags:CreateEnvironment' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateEnvironment) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateEnvironment -> f CreateEnvironment)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateEnvironment
-> f CreateEnvironment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Exchange
   (HashMap Text Text)
   (HashMap Text Text)
   (HashMap Text Text)
   (Identity (HashMap Text Text))
 -> Exchange
      (HashMap Text Text)
      (HashMap Text Text)
      (HashMap Text Text)
      (Identity (HashMap Text Text)))
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping Exchange
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (Identity (HashMap Text Text))
-> Exchange
     (HashMap Text Text)
     (HashMap Text Text)
     (HashMap Text Text)
     (Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html Installing Python dependencies>.
createEnvironment_requirementsS3Path :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_requirementsS3Path :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_requirementsS3Path = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
requirementsS3Path :: Maybe Text
$sel:requirementsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
requirementsS3Path} -> Maybe Text
requirementsS3Path) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:requirementsS3Path:CreateEnvironment' :: Maybe Text
requirementsS3Path = Maybe Text
a} :: CreateEnvironment)

-- | 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@.
createEnvironment_maxWorkers :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Natural)
createEnvironment_maxWorkers :: (Maybe Natural -> f (Maybe Natural))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_maxWorkers = (CreateEnvironment -> Maybe Natural)
-> (CreateEnvironment -> Maybe Natural -> CreateEnvironment)
-> Lens
     CreateEnvironment CreateEnvironment (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Natural
maxWorkers :: Maybe Natural
$sel:maxWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
maxWorkers} -> Maybe Natural
maxWorkers) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Natural
a -> CreateEnvironment
s {$sel:maxWorkers:CreateEnvironment' :: Maybe Natural
maxWorkers = Maybe Natural
a} :: CreateEnvironment)

-- | The relative path to the DAGs folder on your Amazon S3 bucket. For
-- example, @dags@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html Adding or updating DAGs>.
createEnvironment_dagS3Path :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_dagS3Path :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_dagS3Path = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
dagS3Path :: Text
$sel:dagS3Path:CreateEnvironment' :: CreateEnvironment -> Text
dagS3Path} -> Text
dagS3Path) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:dagS3Path:CreateEnvironment' :: Text
dagS3Path = Text
a} :: CreateEnvironment)

-- | The Amazon Resource Name (ARN) of the execution role for your
-- environment. An execution role is an AWS Identity and Access Management
-- (IAM) role that grants MWAA permission to access AWS services and
-- resources used by your environment. For example,
-- @arn:aws:iam::123456789:role\/my-execution-role@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html Amazon MWAA Execution role>.
createEnvironment_executionRoleArn :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_executionRoleArn :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_executionRoleArn = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
executionRoleArn :: Text
$sel:executionRoleArn:CreateEnvironment' :: CreateEnvironment -> Text
executionRoleArn} -> Text
executionRoleArn) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:executionRoleArn:CreateEnvironment' :: Text
executionRoleArn = Text
a} :: CreateEnvironment)

-- | The name of the Amazon MWAA environment. For example,
-- @MyMWAAEnvironment@.
createEnvironment_name :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_name :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_name = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
name :: Text
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
name} -> Text
name) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:name:CreateEnvironment' :: Text
name = Text
a} :: CreateEnvironment)

-- | The VPC networking components used to secure and enable network traffic
-- between the AWS resources for your environment. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html About networking on Amazon MWAA>.
createEnvironment_networkConfiguration :: Lens.Lens' CreateEnvironment NetworkConfiguration
createEnvironment_networkConfiguration :: (NetworkConfiguration -> f NetworkConfiguration)
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_networkConfiguration = (CreateEnvironment -> NetworkConfiguration)
-> (CreateEnvironment -> NetworkConfiguration -> CreateEnvironment)
-> Lens
     CreateEnvironment
     CreateEnvironment
     NetworkConfiguration
     NetworkConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {NetworkConfiguration
networkConfiguration :: NetworkConfiguration
$sel:networkConfiguration:CreateEnvironment' :: CreateEnvironment -> NetworkConfiguration
networkConfiguration} -> NetworkConfiguration
networkConfiguration) (\s :: CreateEnvironment
s@CreateEnvironment' {} NetworkConfiguration
a -> CreateEnvironment
s {$sel:networkConfiguration:CreateEnvironment' :: NetworkConfiguration
networkConfiguration = NetworkConfiguration
a} :: CreateEnvironment)

-- | 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@. To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html Create an Amazon S3 bucket for Amazon MWAA>.
createEnvironment_sourceBucketArn :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_sourceBucketArn :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_sourceBucketArn = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
sourceBucketArn :: Text
$sel:sourceBucketArn:CreateEnvironment' :: CreateEnvironment -> Text
sourceBucketArn} -> Text
sourceBucketArn) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:sourceBucketArn:CreateEnvironment' :: Text
sourceBucketArn = Text
a} :: CreateEnvironment)

instance Core.AWSRequest CreateEnvironment where
  type
    AWSResponse CreateEnvironment =
      CreateEnvironmentResponse
  request :: CreateEnvironment -> Request CreateEnvironment
request = Service -> CreateEnvironment -> Request CreateEnvironment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateEnvironment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEnvironment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateEnvironment))
-> Logger
-> Service
-> Proxy CreateEnvironment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEnvironment)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateEnvironmentResponse
CreateEnvironmentResponse'
            (Maybe Text -> Int -> CreateEnvironmentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateEnvironmentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
            Either String (Int -> CreateEnvironmentResponse)
-> Either String Int -> Either String CreateEnvironmentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateEnvironment

instance Prelude.NFData CreateEnvironment

instance Core.ToHeaders CreateEnvironment where
  toHeaders :: CreateEnvironment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateEnvironment -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateEnvironment where
  toJSON :: CreateEnvironment -> Value
toJSON CreateEnvironment' {Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text Text))
Maybe LoggingConfigurationInput
Maybe WebserverAccessMode
Text
NetworkConfiguration
sourceBucketArn :: Text
networkConfiguration :: NetworkConfiguration
name :: Text
executionRoleArn :: Text
dagS3Path :: Text
maxWorkers :: Maybe Natural
requirementsS3Path :: Maybe Text
tags :: Maybe (HashMap Text Text)
environmentClass :: Maybe Text
loggingConfiguration :: Maybe LoggingConfigurationInput
airflowConfigurationOptions :: Maybe (Sensitive (HashMap Text Text))
pluginsS3ObjectVersion :: Maybe Text
requirementsS3ObjectVersion :: Maybe Text
weeklyMaintenanceWindowStart :: Maybe Text
kmsKey :: Maybe Text
airflowVersion :: Maybe Text
webserverAccessMode :: Maybe WebserverAccessMode
pluginsS3Path :: Maybe Text
minWorkers :: Maybe Natural
schedulers :: Maybe Int
$sel:sourceBucketArn:CreateEnvironment' :: CreateEnvironment -> Text
$sel:networkConfiguration:CreateEnvironment' :: CreateEnvironment -> NetworkConfiguration
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
$sel:executionRoleArn:CreateEnvironment' :: CreateEnvironment -> Text
$sel:dagS3Path:CreateEnvironment' :: CreateEnvironment -> Text
$sel:maxWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:requirementsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe (HashMap Text Text)
$sel:environmentClass:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:loggingConfiguration:CreateEnvironment' :: CreateEnvironment -> Maybe LoggingConfigurationInput
$sel:airflowConfigurationOptions:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive (HashMap Text Text))
$sel:pluginsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:requirementsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:weeklyMaintenanceWindowStart:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:kmsKey:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:airflowVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:webserverAccessMode:CreateEnvironment' :: CreateEnvironment -> Maybe WebserverAccessMode
$sel:pluginsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:minWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:schedulers:CreateEnvironment' :: CreateEnvironment -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Schedulers" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
schedulers,
            (Text
"MinWorkers" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
minWorkers,
            (Text
"PluginsS3Path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pluginsS3Path,
            (Text
"WebserverAccessMode" Text -> WebserverAccessMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (WebserverAccessMode -> Pair)
-> Maybe WebserverAccessMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WebserverAccessMode
webserverAccessMode,
            (Text
"AirflowVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
airflowVersion,
            (Text
"KmsKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKey,
            (Text
"WeeklyMaintenanceWindowStart" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
weeklyMaintenanceWindowStart,
            (Text
"RequirementsS3ObjectVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
requirementsS3ObjectVersion,
            (Text
"PluginsS3ObjectVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pluginsS3ObjectVersion,
            (Text
"AirflowConfigurationOptions" Text -> Sensitive (HashMap Text Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive (HashMap Text Text) -> Pair)
-> Maybe (Sensitive (HashMap Text Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
airflowConfigurationOptions,
            (Text
"LoggingConfiguration" Text -> LoggingConfigurationInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LoggingConfigurationInput -> Pair)
-> Maybe LoggingConfigurationInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingConfigurationInput
loggingConfiguration,
            (Text
"EnvironmentClass" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
environmentClass,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            (Text
"RequirementsS3Path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
requirementsS3Path,
            (Text
"MaxWorkers" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxWorkers,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DagS3Path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dagS3Path),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ExecutionRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
executionRoleArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"NetworkConfiguration"
                  Text -> NetworkConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NetworkConfiguration
networkConfiguration
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"SourceBucketArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceBucketArn)
          ]
      )

instance Core.ToPath CreateEnvironment where
  toPath :: CreateEnvironment -> ByteString
toPath CreateEnvironment' {Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text Text))
Maybe LoggingConfigurationInput
Maybe WebserverAccessMode
Text
NetworkConfiguration
sourceBucketArn :: Text
networkConfiguration :: NetworkConfiguration
name :: Text
executionRoleArn :: Text
dagS3Path :: Text
maxWorkers :: Maybe Natural
requirementsS3Path :: Maybe Text
tags :: Maybe (HashMap Text Text)
environmentClass :: Maybe Text
loggingConfiguration :: Maybe LoggingConfigurationInput
airflowConfigurationOptions :: Maybe (Sensitive (HashMap Text Text))
pluginsS3ObjectVersion :: Maybe Text
requirementsS3ObjectVersion :: Maybe Text
weeklyMaintenanceWindowStart :: Maybe Text
kmsKey :: Maybe Text
airflowVersion :: Maybe Text
webserverAccessMode :: Maybe WebserverAccessMode
pluginsS3Path :: Maybe Text
minWorkers :: Maybe Natural
schedulers :: Maybe Int
$sel:sourceBucketArn:CreateEnvironment' :: CreateEnvironment -> Text
$sel:networkConfiguration:CreateEnvironment' :: CreateEnvironment -> NetworkConfiguration
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
$sel:executionRoleArn:CreateEnvironment' :: CreateEnvironment -> Text
$sel:dagS3Path:CreateEnvironment' :: CreateEnvironment -> Text
$sel:maxWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:requirementsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe (HashMap Text Text)
$sel:environmentClass:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:loggingConfiguration:CreateEnvironment' :: CreateEnvironment -> Maybe LoggingConfigurationInput
$sel:airflowConfigurationOptions:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive (HashMap Text Text))
$sel:pluginsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:requirementsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:weeklyMaintenanceWindowStart:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:kmsKey:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:airflowVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:webserverAccessMode:CreateEnvironment' :: CreateEnvironment -> Maybe WebserverAccessMode
$sel:pluginsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:minWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:schedulers:CreateEnvironment' :: CreateEnvironment -> Maybe Int
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/environments/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]

instance Core.ToQuery CreateEnvironment where
  toQuery :: CreateEnvironment -> QueryString
toQuery = QueryString -> CreateEnvironment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateEnvironmentResponse' smart constructor.
data CreateEnvironmentResponse = CreateEnvironmentResponse'
  { -- | The Amazon Resource Name (ARN) returned in the response for the
    -- environment.
    CreateEnvironmentResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateEnvironmentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
(CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool)
-> (CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool)
-> Eq CreateEnvironmentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
$c/= :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
== :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
$c== :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
Prelude.Eq, ReadPrec [CreateEnvironmentResponse]
ReadPrec CreateEnvironmentResponse
Int -> ReadS CreateEnvironmentResponse
ReadS [CreateEnvironmentResponse]
(Int -> ReadS CreateEnvironmentResponse)
-> ReadS [CreateEnvironmentResponse]
-> ReadPrec CreateEnvironmentResponse
-> ReadPrec [CreateEnvironmentResponse]
-> Read CreateEnvironmentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEnvironmentResponse]
$creadListPrec :: ReadPrec [CreateEnvironmentResponse]
readPrec :: ReadPrec CreateEnvironmentResponse
$creadPrec :: ReadPrec CreateEnvironmentResponse
readList :: ReadS [CreateEnvironmentResponse]
$creadList :: ReadS [CreateEnvironmentResponse]
readsPrec :: Int -> ReadS CreateEnvironmentResponse
$creadsPrec :: Int -> ReadS CreateEnvironmentResponse
Prelude.Read, Int -> CreateEnvironmentResponse -> ShowS
[CreateEnvironmentResponse] -> ShowS
CreateEnvironmentResponse -> String
(Int -> CreateEnvironmentResponse -> ShowS)
-> (CreateEnvironmentResponse -> String)
-> ([CreateEnvironmentResponse] -> ShowS)
-> Show CreateEnvironmentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironmentResponse] -> ShowS
$cshowList :: [CreateEnvironmentResponse] -> ShowS
show :: CreateEnvironmentResponse -> String
$cshow :: CreateEnvironmentResponse -> String
showsPrec :: Int -> CreateEnvironmentResponse -> ShowS
$cshowsPrec :: Int -> CreateEnvironmentResponse -> ShowS
Prelude.Show, (forall x.
 CreateEnvironmentResponse -> Rep CreateEnvironmentResponse x)
-> (forall x.
    Rep CreateEnvironmentResponse x -> CreateEnvironmentResponse)
-> Generic CreateEnvironmentResponse
forall x.
Rep CreateEnvironmentResponse x -> CreateEnvironmentResponse
forall x.
CreateEnvironmentResponse -> Rep CreateEnvironmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEnvironmentResponse x -> CreateEnvironmentResponse
$cfrom :: forall x.
CreateEnvironmentResponse -> Rep CreateEnvironmentResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateEnvironmentResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'createEnvironmentResponse_arn' - The Amazon Resource Name (ARN) returned in the response for the
-- environment.
--
-- 'httpStatus', 'createEnvironmentResponse_httpStatus' - The response's http status code.
newCreateEnvironmentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateEnvironmentResponse
newCreateEnvironmentResponse :: Int -> CreateEnvironmentResponse
newCreateEnvironmentResponse Int
pHttpStatus_ =
  CreateEnvironmentResponse' :: Maybe Text -> Int -> CreateEnvironmentResponse
CreateEnvironmentResponse'
    { $sel:arn:CreateEnvironmentResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateEnvironmentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) returned in the response for the
-- environment.
createEnvironmentResponse_arn :: Lens.Lens' CreateEnvironmentResponse (Prelude.Maybe Prelude.Text)
createEnvironmentResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentResponse -> f CreateEnvironmentResponse
createEnvironmentResponse_arn = (CreateEnvironmentResponse -> Maybe Text)
-> (CreateEnvironmentResponse
    -> Maybe Text -> CreateEnvironmentResponse)
-> Lens
     CreateEnvironmentResponse
     CreateEnvironmentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateEnvironmentResponse
s@CreateEnvironmentResponse' {} Maybe Text
a -> CreateEnvironmentResponse
s {$sel:arn:CreateEnvironmentResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateEnvironmentResponse)

-- | The response's http status code.
createEnvironmentResponse_httpStatus :: Lens.Lens' CreateEnvironmentResponse Prelude.Int
createEnvironmentResponse_httpStatus :: (Int -> f Int)
-> CreateEnvironmentResponse -> f CreateEnvironmentResponse
createEnvironmentResponse_httpStatus = (CreateEnvironmentResponse -> Int)
-> (CreateEnvironmentResponse -> Int -> CreateEnvironmentResponse)
-> Lens CreateEnvironmentResponse CreateEnvironmentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateEnvironmentResponse
s@CreateEnvironmentResponse' {} Int
a -> CreateEnvironmentResponse
s {$sel:httpStatus:CreateEnvironmentResponse' :: Int
httpStatus = Int
a} :: CreateEnvironmentResponse)

instance Prelude.NFData CreateEnvironmentResponse