{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_airflowConfigurationOptions,
    createEnvironment_airflowVersion,
    createEnvironment_environmentClass,
    createEnvironment_kmsKey,
    createEnvironment_loggingConfiguration,
    createEnvironment_maxWorkers,
    createEnvironment_minWorkers,
    createEnvironment_pluginsS3ObjectVersion,
    createEnvironment_pluginsS3Path,
    createEnvironment_requirementsS3ObjectVersion,
    createEnvironment_requirementsS3Path,
    createEnvironment_schedulers,
    createEnvironment_tags,
    createEnvironment_webserverAccessMode,
    createEnvironment_weeklyMaintenanceWindowStart,
    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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | 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 (Sensitive Text)))
airflowConfigurationOptions :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text))),
    -- | 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@, and @2.4.3@. For more information, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA)>.
    CreateEnvironment -> Maybe Text
airflowVersion :: Prelude.Maybe Prelude.Text,
    -- | 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 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). To learn more, see
    -- <https://docs.aws.amazon.com/mwaa/latest/userguide/create-environment.html Create an Amazon MWAA environment>.
    CreateEnvironment -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | Defines the Apache Airflow logs to send to CloudWatch Logs.
    CreateEnvironment -> Maybe LoggingConfigurationInput
loggingConfiguration :: Prelude.Maybe LoggingConfigurationInput,
    -- | 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 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 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,
    -- | 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 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 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 number of Apache Airflow schedulers to run in your environment.
    -- Valid values:
    --
    -- -   v2 - Accepts between 2 to 5. Defaults to 2.
    --
    -- -   v1 - Accepts 1.
    CreateEnvironment -> Maybe Int
schedulers :: Prelude.Maybe Prelude.Int,
    -- | 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 Amazon Web Services resources>.
    CreateEnvironment -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text 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 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.
    CreateEnvironment -> Maybe Text
weeklyMaintenanceWindowStart :: Prelude.Maybe Prelude.Text,
    -- | 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 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@. 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 Amazon Web Services 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
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
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. 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:
--
-- '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>.
--
-- 'airflowVersion', 'createEnvironment_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@, and @2.4.3@. For more information, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA)>.
--
-- '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>.
--
-- 'kmsKey', 'createEnvironment_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). To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/create-environment.html Create an Amazon MWAA environment>.
--
-- 'loggingConfiguration', 'createEnvironment_loggingConfiguration' - Defines the Apache Airflow logs to send to CloudWatch Logs.
--
-- '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@.
--
-- '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@.
--
-- '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>.
--
-- '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>.
--
-- '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>.
--
-- '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>.
--
-- 'schedulers', 'createEnvironment_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.
--
-- '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 Amazon Web Services resources>.
--
-- '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>.
--
-- 'weeklyMaintenanceWindowStart', 'createEnvironment_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.
--
-- '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 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@. 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 Amazon Web Services 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'
      { $sel:airflowConfigurationOptions:CreateEnvironment' :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:airflowVersion:CreateEnvironment' :: Maybe Text
airflowVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:environmentClass:CreateEnvironment' :: Maybe Text
environmentClass = forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKey:CreateEnvironment' :: Maybe Text
kmsKey = forall a. Maybe a
Prelude.Nothing,
        $sel:loggingConfiguration:CreateEnvironment' :: Maybe LoggingConfigurationInput
loggingConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:maxWorkers:CreateEnvironment' :: Maybe Natural
maxWorkers = forall a. Maybe a
Prelude.Nothing,
        $sel:minWorkers:CreateEnvironment' :: Maybe Natural
minWorkers = forall a. Maybe a
Prelude.Nothing,
        $sel:pluginsS3ObjectVersion:CreateEnvironment' :: Maybe Text
pluginsS3ObjectVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:pluginsS3Path:CreateEnvironment' :: Maybe Text
pluginsS3Path = forall a. Maybe a
Prelude.Nothing,
        $sel:requirementsS3ObjectVersion:CreateEnvironment' :: Maybe Text
requirementsS3ObjectVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:requirementsS3Path:CreateEnvironment' :: Maybe Text
requirementsS3Path = forall a. Maybe a
Prelude.Nothing,
        $sel:schedulers:CreateEnvironment' :: Maybe Int
schedulers = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEnvironment' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:webserverAccessMode:CreateEnvironment' :: Maybe WebserverAccessMode
webserverAccessMode = forall a. Maybe a
Prelude.Nothing,
        $sel:weeklyMaintenanceWindowStart:CreateEnvironment' :: Maybe Text
weeklyMaintenanceWindowStart = 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_
      }

-- | 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 :: Lens' CreateEnvironment (Maybe (HashMap Text Text))
createEnvironment_airflowConfigurationOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$sel:airflowConfigurationOptions:CreateEnvironment' :: CreateEnvironment
-> Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions} -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe (Sensitive (HashMap Text (Sensitive Text)))
a -> CreateEnvironment
s {$sel:airflowConfigurationOptions:CreateEnvironment' :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions = Maybe (Sensitive (HashMap Text (Sensitive Text)))
a} :: CreateEnvironment) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | 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@, and @2.4.3@. For more information, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA)>.
createEnvironment_airflowVersion :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_airflowVersion :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_airflowVersion = 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 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 :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_environmentClass = 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 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). To learn more, see
-- <https://docs.aws.amazon.com/mwaa/latest/userguide/create-environment.html Create an Amazon MWAA environment>.
createEnvironment_kmsKey :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_kmsKey :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_kmsKey = 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)

-- | Defines the Apache Airflow logs to send to CloudWatch Logs.
createEnvironment_loggingConfiguration :: Lens.Lens' CreateEnvironment (Prelude.Maybe LoggingConfigurationInput)
createEnvironment_loggingConfiguration :: Lens' CreateEnvironment (Maybe LoggingConfigurationInput)
createEnvironment_loggingConfiguration = 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 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 :: Lens' CreateEnvironment (Maybe Natural)
createEnvironment_maxWorkers = 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 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 :: Lens' CreateEnvironment (Maybe Natural)
createEnvironment_minWorkers = 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 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 :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_pluginsS3ObjectVersion = 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)

-- | 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 :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_pluginsS3Path = 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 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 :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_requirementsS3ObjectVersion = 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 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 :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_requirementsS3Path = 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 number of Apache Airflow schedulers to run in your environment.
-- Valid values:
--
-- -   v2 - Accepts between 2 to 5. Defaults to 2.
--
-- -   v1 - Accepts 1.
createEnvironment_schedulers :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Int)
createEnvironment_schedulers :: Lens' CreateEnvironment (Maybe Int)
createEnvironment_schedulers = 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 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 Amazon Web Services resources>.
createEnvironment_tags :: Lens.Lens' CreateEnvironment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createEnvironment_tags :: Lens' CreateEnvironment (Maybe (HashMap Text Text))
createEnvironment_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' CreateEnvironment (Maybe WebserverAccessMode)
createEnvironment_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 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.
createEnvironment_weeklyMaintenanceWindowStart :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_weeklyMaintenanceWindowStart :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_weeklyMaintenanceWindowStart = 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 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 :: Lens' CreateEnvironment Text
createEnvironment_dagS3Path = 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 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@. 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 :: Lens' CreateEnvironment Text
createEnvironment_executionRoleArn = 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 :: Lens' CreateEnvironment Text
createEnvironment_name = 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 Amazon Web Services 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 :: Lens' CreateEnvironment NetworkConfiguration
createEnvironment_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 :: Lens' CreateEnvironment Text
createEnvironment_sourceBucketArn = 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 :: (Service -> Service)
-> CreateEnvironment -> Request CreateEnvironment
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateEnvironment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEnvironment)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateEnvironmentResponse
CreateEnvironmentResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateEnvironment where
  hashWithSalt :: Int -> CreateEnvironment -> Int
hashWithSalt Int
_salt CreateEnvironment' {Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text (Sensitive Text)))
Maybe LoggingConfigurationInput
Maybe WebserverAccessMode
Text
NetworkConfiguration
sourceBucketArn :: Text
networkConfiguration :: NetworkConfiguration
name :: Text
executionRoleArn :: Text
dagS3Path :: Text
weeklyMaintenanceWindowStart :: Maybe Text
webserverAccessMode :: Maybe WebserverAccessMode
tags :: Maybe (HashMap Text Text)
schedulers :: Maybe Int
requirementsS3Path :: Maybe Text
requirementsS3ObjectVersion :: Maybe Text
pluginsS3Path :: Maybe Text
pluginsS3ObjectVersion :: Maybe Text
minWorkers :: Maybe Natural
maxWorkers :: Maybe Natural
loggingConfiguration :: Maybe LoggingConfigurationInput
kmsKey :: Maybe Text
environmentClass :: Maybe Text
airflowVersion :: Maybe Text
airflowConfigurationOptions :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$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:weeklyMaintenanceWindowStart:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:webserverAccessMode:CreateEnvironment' :: CreateEnvironment -> Maybe WebserverAccessMode
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe (HashMap Text Text)
$sel:schedulers:CreateEnvironment' :: CreateEnvironment -> Maybe Int
$sel:requirementsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:requirementsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:pluginsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:pluginsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:minWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:maxWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:loggingConfiguration:CreateEnvironment' :: CreateEnvironment -> Maybe LoggingConfigurationInput
$sel:kmsKey:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:environmentClass:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:airflowVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:airflowConfigurationOptions:CreateEnvironment' :: CreateEnvironment
-> Maybe (Sensitive (HashMap Text (Sensitive Text)))
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
airflowVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
environmentClass
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LoggingConfigurationInput
loggingConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxWorkers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
minWorkers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pluginsS3ObjectVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pluginsS3Path
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requirementsS3ObjectVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requirementsS3Path
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
schedulers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WebserverAccessMode
webserverAccessMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
weeklyMaintenanceWindowStart
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dagS3Path
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
executionRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NetworkConfiguration
networkConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceBucketArn

instance Prelude.NFData CreateEnvironment where
  rnf :: CreateEnvironment -> ()
rnf CreateEnvironment' {Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text (Sensitive Text)))
Maybe LoggingConfigurationInput
Maybe WebserverAccessMode
Text
NetworkConfiguration
sourceBucketArn :: Text
networkConfiguration :: NetworkConfiguration
name :: Text
executionRoleArn :: Text
dagS3Path :: Text
weeklyMaintenanceWindowStart :: Maybe Text
webserverAccessMode :: Maybe WebserverAccessMode
tags :: Maybe (HashMap Text Text)
schedulers :: Maybe Int
requirementsS3Path :: Maybe Text
requirementsS3ObjectVersion :: Maybe Text
pluginsS3Path :: Maybe Text
pluginsS3ObjectVersion :: Maybe Text
minWorkers :: Maybe Natural
maxWorkers :: Maybe Natural
loggingConfiguration :: Maybe LoggingConfigurationInput
kmsKey :: Maybe Text
environmentClass :: Maybe Text
airflowVersion :: Maybe Text
airflowConfigurationOptions :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$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:weeklyMaintenanceWindowStart:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:webserverAccessMode:CreateEnvironment' :: CreateEnvironment -> Maybe WebserverAccessMode
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe (HashMap Text Text)
$sel:schedulers:CreateEnvironment' :: CreateEnvironment -> Maybe Int
$sel:requirementsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:requirementsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:pluginsS3Path:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:pluginsS3ObjectVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:minWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:maxWorkers:CreateEnvironment' :: CreateEnvironment -> Maybe Natural
$sel:loggingConfiguration:CreateEnvironment' :: CreateEnvironment -> Maybe LoggingConfigurationInput
$sel:kmsKey:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:environmentClass:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:airflowVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:airflowConfigurationOptions:CreateEnvironment' :: CreateEnvironment
-> Maybe (Sensitive (HashMap Text (Sensitive Text)))
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text (Sensitive Text)))
airflowConfigurationOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
airflowVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
environmentClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LoggingConfigurationInput
loggingConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxWorkers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
minWorkers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pluginsS3ObjectVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pluginsS3Path
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requirementsS3ObjectVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requirementsS3Path
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
schedulers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WebserverAccessMode
webserverAccessMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
weeklyMaintenanceWindowStart
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dagS3Path
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
executionRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NetworkConfiguration
networkConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceBucketArn

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

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

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

instance Data.ToQuery CreateEnvironment where
  toQuery :: CreateEnvironment -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
    { $sel:arn:CreateEnvironmentResponse' :: Maybe Text
arn = 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 :: Lens' CreateEnvironmentResponse (Maybe Text)
createEnvironmentResponse_arn = 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 :: Lens' CreateEnvironmentResponse Int
createEnvironmentResponse_httpStatus = 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 where
  rnf :: CreateEnvironmentResponse -> ()
rnf CreateEnvironmentResponse' {Int
Maybe Text
httpStatus :: Int
arn :: Maybe Text
$sel:httpStatus:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Int
$sel:arn:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus