{-# 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.Transfer.CreateServer
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Instantiates an auto-scaling virtual server based on the selected file
-- transfer protocol in Amazon Web Services. When you make updates to your
-- file transfer protocol-enabled server or when you work with users, use
-- the service-generated @ServerId@ property that is assigned to the newly
-- created server.
module Amazonka.Transfer.CreateServer
  ( -- * Creating a Request
    CreateServer (..),
    newCreateServer,

    -- * Request Lenses
    createServer_certificate,
    createServer_domain,
    createServer_endpointDetails,
    createServer_endpointType,
    createServer_hostKey,
    createServer_identityProviderDetails,
    createServer_identityProviderType,
    createServer_loggingRole,
    createServer_postAuthenticationLoginBanner,
    createServer_preAuthenticationLoginBanner,
    createServer_protocolDetails,
    createServer_protocols,
    createServer_securityPolicyName,
    createServer_tags,
    createServer_workflowDetails,

    -- * Destructuring the Response
    CreateServerResponse (..),
    newCreateServerResponse,

    -- * Response Lenses
    createServerResponse_httpStatus,
    createServerResponse_serverId,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Transfer.Types

-- | /See:/ 'newCreateServer' smart constructor.
data CreateServer = CreateServer'
  { -- | The Amazon Resource Name (ARN) of the Certificate Manager (ACM)
    -- certificate. Required when @Protocols@ is set to @FTPS@.
    --
    -- To request a new public certificate, see
    -- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html Request a public certificate>
    -- in the /Certificate Manager User Guide/.
    --
    -- To import an existing certificate into ACM, see
    -- <https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html Importing certificates into ACM>
    -- in the /Certificate Manager User Guide/.
    --
    -- To request a private certificate to use FTPS through private IP
    -- addresses, see
    -- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html Request a private certificate>
    -- in the /Certificate Manager User Guide/.
    --
    -- Certificates with the following cryptographic algorithms and key sizes
    -- are supported:
    --
    -- -   2048-bit RSA (RSA_2048)
    --
    -- -   4096-bit RSA (RSA_4096)
    --
    -- -   Elliptic Prime Curve 256 bit (EC_prime256v1)
    --
    -- -   Elliptic Prime Curve 384 bit (EC_secp384r1)
    --
    -- -   Elliptic Prime Curve 521 bit (EC_secp521r1)
    --
    -- The certificate must be a valid SSL\/TLS X.509 version 3 certificate
    -- with FQDN or IP address specified and information about the issuer.
    CreateServer -> Maybe Text
certificate :: Prelude.Maybe Prelude.Text,
    -- | The domain of the storage system that is used for file transfers. There
    -- are two domains available: Amazon Simple Storage Service (Amazon S3) and
    -- Amazon Elastic File System (Amazon EFS). The default value is S3.
    --
    -- After the server is created, the domain cannot be changed.
    CreateServer -> Maybe Domain
domain :: Prelude.Maybe Domain,
    -- | The virtual private cloud (VPC) endpoint settings that are configured
    -- for your server. When you host your endpoint within your VPC, you can
    -- make your endpoint accessible only to resources within your VPC, or you
    -- can attach Elastic IP addresses and make your endpoint accessible to
    -- clients over the internet. Your VPC\'s default security groups are
    -- automatically assigned to your endpoint.
    CreateServer -> Maybe EndpointDetails
endpointDetails :: Prelude.Maybe EndpointDetails,
    -- | The type of endpoint that you want your server to use. You can choose to
    -- make your server\'s endpoint publicly accessible (PUBLIC) or host it
    -- inside your VPC. With an endpoint that is hosted in a VPC, you can
    -- restrict access to your server and resources only within your VPC or
    -- choose to make it internet facing by attaching Elastic IP addresses
    -- directly to it.
    --
    -- After May 19, 2021, you won\'t be able to create a server using
    -- @EndpointType=VPC_ENDPOINT@ in your Amazon Web Services account if your
    -- account hasn\'t already done so before May 19, 2021. If you have already
    -- created servers with @EndpointType=VPC_ENDPOINT@ in your Amazon Web
    -- Services account on or before May 19, 2021, you will not be affected.
    -- After this date, use @EndpointType@=@VPC@.
    --
    -- For more information, see
    -- https:\/\/docs.aws.amazon.com\/transfer\/latest\/userguide\/create-server-in-vpc.html#deprecate-vpc-endpoint.
    --
    -- It is recommended that you use @VPC@ as the @EndpointType@. With this
    -- endpoint type, you have the option to directly associate up to three
    -- Elastic IPv4 addresses (BYO IP included) with your server\'s endpoint
    -- and use VPC security groups to restrict traffic by the client\'s public
    -- IP address. This is not possible with @EndpointType@ set to
    -- @VPC_ENDPOINT@.
    CreateServer -> Maybe EndpointType
endpointType :: Prelude.Maybe EndpointType,
    -- | The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled
    -- server. You can add multiple host keys, in case you want to rotate keys,
    -- or have a set of active keys that use different algorithms.
    --
    -- Use the following command to generate an RSA 2048 bit key with no
    -- passphrase:
    --
    -- @ssh-keygen -t rsa -b 2048 -N \"\" -m PEM -f my-new-server-key@.
    --
    -- Use a minimum value of 2048 for the @-b@ option. You can create a
    -- stronger key by using 3072 or 4096.
    --
    -- Use the following command to generate an ECDSA 256 bit key with no
    -- passphrase:
    --
    -- @ssh-keygen -t ecdsa -b 256 -N \"\" -m PEM -f my-new-server-key@.
    --
    -- Valid values for the @-b@ option for ECDSA are 256, 384, and 521.
    --
    -- Use the following command to generate an ED25519 key with no passphrase:
    --
    -- @ssh-keygen -t ed25519 -N \"\" -f my-new-server-key@.
    --
    -- For all of these commands, you can replace /my-new-server-key/ with a
    -- string of your choice.
    --
    -- If you aren\'t planning to migrate existing users from an existing
    -- SFTP-enabled server to a new server, don\'t update the host key.
    -- Accidentally changing a server\'s host key can be disruptive.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key Update host keys for your SFTP-enabled server>
    -- in the /Transfer Family User Guide/.
    CreateServer -> Maybe (Sensitive Text)
hostKey :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Required when @IdentityProviderType@ is set to @AWS_DIRECTORY_SERVICE@
    -- or @API_GATEWAY@. Accepts an array containing all of the information
    -- required to use a directory in @AWS_DIRECTORY_SERVICE@ or invoke a
    -- customer-supplied authentication API, including the API Gateway URL. Not
    -- required when @IdentityProviderType@ is set to @SERVICE_MANAGED@.
    CreateServer -> Maybe IdentityProviderDetails
identityProviderDetails :: Prelude.Maybe IdentityProviderDetails,
    -- | The mode of authentication for a server. The default value is
    -- @SERVICE_MANAGED@, which allows you to store and access user credentials
    -- within the Transfer Family service.
    --
    -- Use @AWS_DIRECTORY_SERVICE@ to provide access to Active Directory groups
    -- in Directory Service for Microsoft Active Directory or Microsoft Active
    -- Directory in your on-premises environment or in Amazon Web Services
    -- using AD Connector. This option also requires you to provide a Directory
    -- ID by using the @IdentityProviderDetails@ parameter.
    --
    -- Use the @API_GATEWAY@ value to integrate with an identity provider of
    -- your choosing. The @API_GATEWAY@ setting requires you to provide an
    -- Amazon API Gateway endpoint URL to call for authentication by using the
    -- @IdentityProviderDetails@ parameter.
    --
    -- Use the @AWS_LAMBDA@ value to directly use an Lambda function as your
    -- identity provider. If you choose this value, you must specify the ARN
    -- for the Lambda function in the @Function@ parameter or the
    -- @IdentityProviderDetails@ data type.
    CreateServer -> Maybe IdentityProviderType
identityProviderType :: Prelude.Maybe IdentityProviderType,
    -- | The Amazon Resource Name (ARN) of the Identity and Access Management
    -- (IAM) role that allows a server to turn on Amazon CloudWatch logging for
    -- Amazon S3 or Amazon EFSevents. When set, you can view user activity in
    -- your CloudWatch logs.
    CreateServer -> Maybe Text
loggingRole :: Prelude.Maybe Prelude.Text,
    -- | Specifies a string to display when users connect to a server. This
    -- string is displayed after the user authenticates.
    --
    -- The SFTP protocol does not support post-authentication display banners.
    CreateServer -> Maybe Text
postAuthenticationLoginBanner :: Prelude.Maybe Prelude.Text,
    -- | Specifies a string to display when users connect to a server. This
    -- string is displayed before the user authenticates. For example, the
    -- following banner displays details about using the system:
    --
    -- @This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.@
    CreateServer -> Maybe Text
preAuthenticationLoginBanner :: Prelude.Maybe Prelude.Text,
    -- | The protocol settings that are configured for your server.
    --
    -- -   To indicate passive mode (for FTP and FTPS protocols), use the
    --     @PassiveIp@ parameter. Enter a single dotted-quad IPv4 address, such
    --     as the external IP address of a firewall, router, or load balancer.
    --
    -- -   To ignore the error that is generated when the client attempts to
    --     use the @SETSTAT@ command on a file that you are uploading to an
    --     Amazon S3 bucket, use the @SetStatOption@ parameter. To have the
    --     Transfer Family server ignore the @SETSTAT@ command and upload files
    --     without needing to make any changes to your SFTP client, set the
    --     value to @ENABLE_NO_OP@. If you set the @SetStatOption@ parameter to
    --     @ENABLE_NO_OP@, Transfer Family generates a log entry to Amazon
    --     CloudWatch Logs, so that you can determine when the client is making
    --     a @SETSTAT@ call.
    --
    -- -   To determine whether your Transfer Family server resumes recent,
    --     negotiated sessions through a unique session ID, use the
    --     @TlsSessionResumptionMode@ parameter.
    --
    -- -   @As2Transports@ indicates the transport method for the AS2 messages.
    --     Currently, only HTTP is supported.
    CreateServer -> Maybe ProtocolDetails
protocolDetails :: Prelude.Maybe ProtocolDetails,
    -- | Specifies the file transfer protocol or protocols over which your file
    -- transfer protocol client can connect to your server\'s endpoint. The
    -- available protocols are:
    --
    -- -   @SFTP@ (Secure Shell (SSH) File Transfer Protocol): File transfer
    --     over SSH
    --
    -- -   @FTPS@ (File Transfer Protocol Secure): File transfer with TLS
    --     encryption
    --
    -- -   @FTP@ (File Transfer Protocol): Unencrypted file transfer
    --
    -- -   @AS2@ (Applicability Statement 2): used for transporting structured
    --     business-to-business data
    --
    -- -   If you select @FTPS@, you must choose a certificate stored in
    --     Certificate Manager (ACM) which is used to identify your server when
    --     clients connect to it over FTPS.
    --
    -- -   If @Protocol@ includes either @FTP@ or @FTPS@, then the
    --     @EndpointType@ must be @VPC@ and the @IdentityProviderType@ must be
    --     @AWS_DIRECTORY_SERVICE@ or @API_GATEWAY@.
    --
    -- -   If @Protocol@ includes @FTP@, then @AddressAllocationIds@ cannot be
    --     associated.
    --
    -- -   If @Protocol@ is set only to @SFTP@, the @EndpointType@ can be set
    --     to @PUBLIC@ and the @IdentityProviderType@ can be set to
    --     @SERVICE_MANAGED@.
    --
    -- -   If @Protocol@ includes @AS2@, then the @EndpointType@ must be @VPC@,
    --     and domain must be Amazon S3.
    CreateServer -> Maybe (NonEmpty Protocol)
protocols :: Prelude.Maybe (Prelude.NonEmpty Protocol),
    -- | Specifies the name of the security policy that is attached to the
    -- server.
    CreateServer -> Maybe Text
securityPolicyName :: Prelude.Maybe Prelude.Text,
    -- | Key-value pairs that can be used to group and search for servers.
    CreateServer -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | Specifies the workflow ID for the workflow to assign and the execution
    -- role that\'s used for executing the workflow.
    --
    -- In additon to a workflow to execute when a file is uploaded completely,
    -- @WorkflowDeatails@ can also contain a workflow ID (and execution role)
    -- for a workflow to execute on partial upload. A partial upload occurs
    -- when a file is open when the session disconnects.
    CreateServer -> Maybe WorkflowDetails
workflowDetails :: Prelude.Maybe WorkflowDetails
  }
  deriving (CreateServer -> CreateServer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateServer -> CreateServer -> Bool
$c/= :: CreateServer -> CreateServer -> Bool
== :: CreateServer -> CreateServer -> Bool
$c== :: CreateServer -> CreateServer -> Bool
Prelude.Eq, Int -> CreateServer -> ShowS
[CreateServer] -> ShowS
CreateServer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateServer] -> ShowS
$cshowList :: [CreateServer] -> ShowS
show :: CreateServer -> String
$cshow :: CreateServer -> String
showsPrec :: Int -> CreateServer -> ShowS
$cshowsPrec :: Int -> CreateServer -> ShowS
Prelude.Show, forall x. Rep CreateServer x -> CreateServer
forall x. CreateServer -> Rep CreateServer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateServer x -> CreateServer
$cfrom :: forall x. CreateServer -> Rep CreateServer x
Prelude.Generic)

-- |
-- Create a value of 'CreateServer' 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:
--
-- 'certificate', 'createServer_certificate' - The Amazon Resource Name (ARN) of the Certificate Manager (ACM)
-- certificate. Required when @Protocols@ is set to @FTPS@.
--
-- To request a new public certificate, see
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html Request a public certificate>
-- in the /Certificate Manager User Guide/.
--
-- To import an existing certificate into ACM, see
-- <https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html Importing certificates into ACM>
-- in the /Certificate Manager User Guide/.
--
-- To request a private certificate to use FTPS through private IP
-- addresses, see
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html Request a private certificate>
-- in the /Certificate Manager User Guide/.
--
-- Certificates with the following cryptographic algorithms and key sizes
-- are supported:
--
-- -   2048-bit RSA (RSA_2048)
--
-- -   4096-bit RSA (RSA_4096)
--
-- -   Elliptic Prime Curve 256 bit (EC_prime256v1)
--
-- -   Elliptic Prime Curve 384 bit (EC_secp384r1)
--
-- -   Elliptic Prime Curve 521 bit (EC_secp521r1)
--
-- The certificate must be a valid SSL\/TLS X.509 version 3 certificate
-- with FQDN or IP address specified and information about the issuer.
--
-- 'domain', 'createServer_domain' - The domain of the storage system that is used for file transfers. There
-- are two domains available: Amazon Simple Storage Service (Amazon S3) and
-- Amazon Elastic File System (Amazon EFS). The default value is S3.
--
-- After the server is created, the domain cannot be changed.
--
-- 'endpointDetails', 'createServer_endpointDetails' - The virtual private cloud (VPC) endpoint settings that are configured
-- for your server. When you host your endpoint within your VPC, you can
-- make your endpoint accessible only to resources within your VPC, or you
-- can attach Elastic IP addresses and make your endpoint accessible to
-- clients over the internet. Your VPC\'s default security groups are
-- automatically assigned to your endpoint.
--
-- 'endpointType', 'createServer_endpointType' - The type of endpoint that you want your server to use. You can choose to
-- make your server\'s endpoint publicly accessible (PUBLIC) or host it
-- inside your VPC. With an endpoint that is hosted in a VPC, you can
-- restrict access to your server and resources only within your VPC or
-- choose to make it internet facing by attaching Elastic IP addresses
-- directly to it.
--
-- After May 19, 2021, you won\'t be able to create a server using
-- @EndpointType=VPC_ENDPOINT@ in your Amazon Web Services account if your
-- account hasn\'t already done so before May 19, 2021. If you have already
-- created servers with @EndpointType=VPC_ENDPOINT@ in your Amazon Web
-- Services account on or before May 19, 2021, you will not be affected.
-- After this date, use @EndpointType@=@VPC@.
--
-- For more information, see
-- https:\/\/docs.aws.amazon.com\/transfer\/latest\/userguide\/create-server-in-vpc.html#deprecate-vpc-endpoint.
--
-- It is recommended that you use @VPC@ as the @EndpointType@. With this
-- endpoint type, you have the option to directly associate up to three
-- Elastic IPv4 addresses (BYO IP included) with your server\'s endpoint
-- and use VPC security groups to restrict traffic by the client\'s public
-- IP address. This is not possible with @EndpointType@ set to
-- @VPC_ENDPOINT@.
--
-- 'hostKey', 'createServer_hostKey' - The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled
-- server. You can add multiple host keys, in case you want to rotate keys,
-- or have a set of active keys that use different algorithms.
--
-- Use the following command to generate an RSA 2048 bit key with no
-- passphrase:
--
-- @ssh-keygen -t rsa -b 2048 -N \"\" -m PEM -f my-new-server-key@.
--
-- Use a minimum value of 2048 for the @-b@ option. You can create a
-- stronger key by using 3072 or 4096.
--
-- Use the following command to generate an ECDSA 256 bit key with no
-- passphrase:
--
-- @ssh-keygen -t ecdsa -b 256 -N \"\" -m PEM -f my-new-server-key@.
--
-- Valid values for the @-b@ option for ECDSA are 256, 384, and 521.
--
-- Use the following command to generate an ED25519 key with no passphrase:
--
-- @ssh-keygen -t ed25519 -N \"\" -f my-new-server-key@.
--
-- For all of these commands, you can replace /my-new-server-key/ with a
-- string of your choice.
--
-- If you aren\'t planning to migrate existing users from an existing
-- SFTP-enabled server to a new server, don\'t update the host key.
-- Accidentally changing a server\'s host key can be disruptive.
--
-- For more information, see
-- <https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key Update host keys for your SFTP-enabled server>
-- in the /Transfer Family User Guide/.
--
-- 'identityProviderDetails', 'createServer_identityProviderDetails' - Required when @IdentityProviderType@ is set to @AWS_DIRECTORY_SERVICE@
-- or @API_GATEWAY@. Accepts an array containing all of the information
-- required to use a directory in @AWS_DIRECTORY_SERVICE@ or invoke a
-- customer-supplied authentication API, including the API Gateway URL. Not
-- required when @IdentityProviderType@ is set to @SERVICE_MANAGED@.
--
-- 'identityProviderType', 'createServer_identityProviderType' - The mode of authentication for a server. The default value is
-- @SERVICE_MANAGED@, which allows you to store and access user credentials
-- within the Transfer Family service.
--
-- Use @AWS_DIRECTORY_SERVICE@ to provide access to Active Directory groups
-- in Directory Service for Microsoft Active Directory or Microsoft Active
-- Directory in your on-premises environment or in Amazon Web Services
-- using AD Connector. This option also requires you to provide a Directory
-- ID by using the @IdentityProviderDetails@ parameter.
--
-- Use the @API_GATEWAY@ value to integrate with an identity provider of
-- your choosing. The @API_GATEWAY@ setting requires you to provide an
-- Amazon API Gateway endpoint URL to call for authentication by using the
-- @IdentityProviderDetails@ parameter.
--
-- Use the @AWS_LAMBDA@ value to directly use an Lambda function as your
-- identity provider. If you choose this value, you must specify the ARN
-- for the Lambda function in the @Function@ parameter or the
-- @IdentityProviderDetails@ data type.
--
-- 'loggingRole', 'createServer_loggingRole' - The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) role that allows a server to turn on Amazon CloudWatch logging for
-- Amazon S3 or Amazon EFSevents. When set, you can view user activity in
-- your CloudWatch logs.
--
-- 'postAuthenticationLoginBanner', 'createServer_postAuthenticationLoginBanner' - Specifies a string to display when users connect to a server. This
-- string is displayed after the user authenticates.
--
-- The SFTP protocol does not support post-authentication display banners.
--
-- 'preAuthenticationLoginBanner', 'createServer_preAuthenticationLoginBanner' - Specifies a string to display when users connect to a server. This
-- string is displayed before the user authenticates. For example, the
-- following banner displays details about using the system:
--
-- @This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.@
--
-- 'protocolDetails', 'createServer_protocolDetails' - The protocol settings that are configured for your server.
--
-- -   To indicate passive mode (for FTP and FTPS protocols), use the
--     @PassiveIp@ parameter. Enter a single dotted-quad IPv4 address, such
--     as the external IP address of a firewall, router, or load balancer.
--
-- -   To ignore the error that is generated when the client attempts to
--     use the @SETSTAT@ command on a file that you are uploading to an
--     Amazon S3 bucket, use the @SetStatOption@ parameter. To have the
--     Transfer Family server ignore the @SETSTAT@ command and upload files
--     without needing to make any changes to your SFTP client, set the
--     value to @ENABLE_NO_OP@. If you set the @SetStatOption@ parameter to
--     @ENABLE_NO_OP@, Transfer Family generates a log entry to Amazon
--     CloudWatch Logs, so that you can determine when the client is making
--     a @SETSTAT@ call.
--
-- -   To determine whether your Transfer Family server resumes recent,
--     negotiated sessions through a unique session ID, use the
--     @TlsSessionResumptionMode@ parameter.
--
-- -   @As2Transports@ indicates the transport method for the AS2 messages.
--     Currently, only HTTP is supported.
--
-- 'protocols', 'createServer_protocols' - Specifies the file transfer protocol or protocols over which your file
-- transfer protocol client can connect to your server\'s endpoint. The
-- available protocols are:
--
-- -   @SFTP@ (Secure Shell (SSH) File Transfer Protocol): File transfer
--     over SSH
--
-- -   @FTPS@ (File Transfer Protocol Secure): File transfer with TLS
--     encryption
--
-- -   @FTP@ (File Transfer Protocol): Unencrypted file transfer
--
-- -   @AS2@ (Applicability Statement 2): used for transporting structured
--     business-to-business data
--
-- -   If you select @FTPS@, you must choose a certificate stored in
--     Certificate Manager (ACM) which is used to identify your server when
--     clients connect to it over FTPS.
--
-- -   If @Protocol@ includes either @FTP@ or @FTPS@, then the
--     @EndpointType@ must be @VPC@ and the @IdentityProviderType@ must be
--     @AWS_DIRECTORY_SERVICE@ or @API_GATEWAY@.
--
-- -   If @Protocol@ includes @FTP@, then @AddressAllocationIds@ cannot be
--     associated.
--
-- -   If @Protocol@ is set only to @SFTP@, the @EndpointType@ can be set
--     to @PUBLIC@ and the @IdentityProviderType@ can be set to
--     @SERVICE_MANAGED@.
--
-- -   If @Protocol@ includes @AS2@, then the @EndpointType@ must be @VPC@,
--     and domain must be Amazon S3.
--
-- 'securityPolicyName', 'createServer_securityPolicyName' - Specifies the name of the security policy that is attached to the
-- server.
--
-- 'tags', 'createServer_tags' - Key-value pairs that can be used to group and search for servers.
--
-- 'workflowDetails', 'createServer_workflowDetails' - Specifies the workflow ID for the workflow to assign and the execution
-- role that\'s used for executing the workflow.
--
-- In additon to a workflow to execute when a file is uploaded completely,
-- @WorkflowDeatails@ can also contain a workflow ID (and execution role)
-- for a workflow to execute on partial upload. A partial upload occurs
-- when a file is open when the session disconnects.
newCreateServer ::
  CreateServer
newCreateServer :: CreateServer
newCreateServer =
  CreateServer'
    { $sel:certificate:CreateServer' :: Maybe Text
certificate = forall a. Maybe a
Prelude.Nothing,
      $sel:domain:CreateServer' :: Maybe Domain
domain = forall a. Maybe a
Prelude.Nothing,
      $sel:endpointDetails:CreateServer' :: Maybe EndpointDetails
endpointDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:endpointType:CreateServer' :: Maybe EndpointType
endpointType = forall a. Maybe a
Prelude.Nothing,
      $sel:hostKey:CreateServer' :: Maybe (Sensitive Text)
hostKey = forall a. Maybe a
Prelude.Nothing,
      $sel:identityProviderDetails:CreateServer' :: Maybe IdentityProviderDetails
identityProviderDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:identityProviderType:CreateServer' :: Maybe IdentityProviderType
identityProviderType = forall a. Maybe a
Prelude.Nothing,
      $sel:loggingRole:CreateServer' :: Maybe Text
loggingRole = forall a. Maybe a
Prelude.Nothing,
      $sel:postAuthenticationLoginBanner:CreateServer' :: Maybe Text
postAuthenticationLoginBanner = forall a. Maybe a
Prelude.Nothing,
      $sel:preAuthenticationLoginBanner:CreateServer' :: Maybe Text
preAuthenticationLoginBanner = forall a. Maybe a
Prelude.Nothing,
      $sel:protocolDetails:CreateServer' :: Maybe ProtocolDetails
protocolDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:protocols:CreateServer' :: Maybe (NonEmpty Protocol)
protocols = forall a. Maybe a
Prelude.Nothing,
      $sel:securityPolicyName:CreateServer' :: Maybe Text
securityPolicyName = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateServer' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:workflowDetails:CreateServer' :: Maybe WorkflowDetails
workflowDetails = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the Certificate Manager (ACM)
-- certificate. Required when @Protocols@ is set to @FTPS@.
--
-- To request a new public certificate, see
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html Request a public certificate>
-- in the /Certificate Manager User Guide/.
--
-- To import an existing certificate into ACM, see
-- <https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html Importing certificates into ACM>
-- in the /Certificate Manager User Guide/.
--
-- To request a private certificate to use FTPS through private IP
-- addresses, see
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html Request a private certificate>
-- in the /Certificate Manager User Guide/.
--
-- Certificates with the following cryptographic algorithms and key sizes
-- are supported:
--
-- -   2048-bit RSA (RSA_2048)
--
-- -   4096-bit RSA (RSA_4096)
--
-- -   Elliptic Prime Curve 256 bit (EC_prime256v1)
--
-- -   Elliptic Prime Curve 384 bit (EC_secp384r1)
--
-- -   Elliptic Prime Curve 521 bit (EC_secp521r1)
--
-- The certificate must be a valid SSL\/TLS X.509 version 3 certificate
-- with FQDN or IP address specified and information about the issuer.
createServer_certificate :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_certificate :: Lens' CreateServer (Maybe Text)
createServer_certificate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
certificate :: Maybe Text
$sel:certificate:CreateServer' :: CreateServer -> Maybe Text
certificate} -> Maybe Text
certificate) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:certificate:CreateServer' :: Maybe Text
certificate = Maybe Text
a} :: CreateServer)

-- | The domain of the storage system that is used for file transfers. There
-- are two domains available: Amazon Simple Storage Service (Amazon S3) and
-- Amazon Elastic File System (Amazon EFS). The default value is S3.
--
-- After the server is created, the domain cannot be changed.
createServer_domain :: Lens.Lens' CreateServer (Prelude.Maybe Domain)
createServer_domain :: Lens' CreateServer (Maybe Domain)
createServer_domain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Domain
domain :: Maybe Domain
$sel:domain:CreateServer' :: CreateServer -> Maybe Domain
domain} -> Maybe Domain
domain) (\s :: CreateServer
s@CreateServer' {} Maybe Domain
a -> CreateServer
s {$sel:domain:CreateServer' :: Maybe Domain
domain = Maybe Domain
a} :: CreateServer)

-- | The virtual private cloud (VPC) endpoint settings that are configured
-- for your server. When you host your endpoint within your VPC, you can
-- make your endpoint accessible only to resources within your VPC, or you
-- can attach Elastic IP addresses and make your endpoint accessible to
-- clients over the internet. Your VPC\'s default security groups are
-- automatically assigned to your endpoint.
createServer_endpointDetails :: Lens.Lens' CreateServer (Prelude.Maybe EndpointDetails)
createServer_endpointDetails :: Lens' CreateServer (Maybe EndpointDetails)
createServer_endpointDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe EndpointDetails
endpointDetails :: Maybe EndpointDetails
$sel:endpointDetails:CreateServer' :: CreateServer -> Maybe EndpointDetails
endpointDetails} -> Maybe EndpointDetails
endpointDetails) (\s :: CreateServer
s@CreateServer' {} Maybe EndpointDetails
a -> CreateServer
s {$sel:endpointDetails:CreateServer' :: Maybe EndpointDetails
endpointDetails = Maybe EndpointDetails
a} :: CreateServer)

-- | The type of endpoint that you want your server to use. You can choose to
-- make your server\'s endpoint publicly accessible (PUBLIC) or host it
-- inside your VPC. With an endpoint that is hosted in a VPC, you can
-- restrict access to your server and resources only within your VPC or
-- choose to make it internet facing by attaching Elastic IP addresses
-- directly to it.
--
-- After May 19, 2021, you won\'t be able to create a server using
-- @EndpointType=VPC_ENDPOINT@ in your Amazon Web Services account if your
-- account hasn\'t already done so before May 19, 2021. If you have already
-- created servers with @EndpointType=VPC_ENDPOINT@ in your Amazon Web
-- Services account on or before May 19, 2021, you will not be affected.
-- After this date, use @EndpointType@=@VPC@.
--
-- For more information, see
-- https:\/\/docs.aws.amazon.com\/transfer\/latest\/userguide\/create-server-in-vpc.html#deprecate-vpc-endpoint.
--
-- It is recommended that you use @VPC@ as the @EndpointType@. With this
-- endpoint type, you have the option to directly associate up to three
-- Elastic IPv4 addresses (BYO IP included) with your server\'s endpoint
-- and use VPC security groups to restrict traffic by the client\'s public
-- IP address. This is not possible with @EndpointType@ set to
-- @VPC_ENDPOINT@.
createServer_endpointType :: Lens.Lens' CreateServer (Prelude.Maybe EndpointType)
createServer_endpointType :: Lens' CreateServer (Maybe EndpointType)
createServer_endpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe EndpointType
endpointType :: Maybe EndpointType
$sel:endpointType:CreateServer' :: CreateServer -> Maybe EndpointType
endpointType} -> Maybe EndpointType
endpointType) (\s :: CreateServer
s@CreateServer' {} Maybe EndpointType
a -> CreateServer
s {$sel:endpointType:CreateServer' :: Maybe EndpointType
endpointType = Maybe EndpointType
a} :: CreateServer)

-- | The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled
-- server. You can add multiple host keys, in case you want to rotate keys,
-- or have a set of active keys that use different algorithms.
--
-- Use the following command to generate an RSA 2048 bit key with no
-- passphrase:
--
-- @ssh-keygen -t rsa -b 2048 -N \"\" -m PEM -f my-new-server-key@.
--
-- Use a minimum value of 2048 for the @-b@ option. You can create a
-- stronger key by using 3072 or 4096.
--
-- Use the following command to generate an ECDSA 256 bit key with no
-- passphrase:
--
-- @ssh-keygen -t ecdsa -b 256 -N \"\" -m PEM -f my-new-server-key@.
--
-- Valid values for the @-b@ option for ECDSA are 256, 384, and 521.
--
-- Use the following command to generate an ED25519 key with no passphrase:
--
-- @ssh-keygen -t ed25519 -N \"\" -f my-new-server-key@.
--
-- For all of these commands, you can replace /my-new-server-key/ with a
-- string of your choice.
--
-- If you aren\'t planning to migrate existing users from an existing
-- SFTP-enabled server to a new server, don\'t update the host key.
-- Accidentally changing a server\'s host key can be disruptive.
--
-- For more information, see
-- <https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key Update host keys for your SFTP-enabled server>
-- in the /Transfer Family User Guide/.
createServer_hostKey :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_hostKey :: Lens' CreateServer (Maybe Text)
createServer_hostKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe (Sensitive Text)
hostKey :: Maybe (Sensitive Text)
$sel:hostKey:CreateServer' :: CreateServer -> Maybe (Sensitive Text)
hostKey} -> Maybe (Sensitive Text)
hostKey) (\s :: CreateServer
s@CreateServer' {} Maybe (Sensitive Text)
a -> CreateServer
s {$sel:hostKey:CreateServer' :: Maybe (Sensitive Text)
hostKey = Maybe (Sensitive Text)
a} :: CreateServer) 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

-- | Required when @IdentityProviderType@ is set to @AWS_DIRECTORY_SERVICE@
-- or @API_GATEWAY@. Accepts an array containing all of the information
-- required to use a directory in @AWS_DIRECTORY_SERVICE@ or invoke a
-- customer-supplied authentication API, including the API Gateway URL. Not
-- required when @IdentityProviderType@ is set to @SERVICE_MANAGED@.
createServer_identityProviderDetails :: Lens.Lens' CreateServer (Prelude.Maybe IdentityProviderDetails)
createServer_identityProviderDetails :: Lens' CreateServer (Maybe IdentityProviderDetails)
createServer_identityProviderDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe IdentityProviderDetails
identityProviderDetails :: Maybe IdentityProviderDetails
$sel:identityProviderDetails:CreateServer' :: CreateServer -> Maybe IdentityProviderDetails
identityProviderDetails} -> Maybe IdentityProviderDetails
identityProviderDetails) (\s :: CreateServer
s@CreateServer' {} Maybe IdentityProviderDetails
a -> CreateServer
s {$sel:identityProviderDetails:CreateServer' :: Maybe IdentityProviderDetails
identityProviderDetails = Maybe IdentityProviderDetails
a} :: CreateServer)

-- | The mode of authentication for a server. The default value is
-- @SERVICE_MANAGED@, which allows you to store and access user credentials
-- within the Transfer Family service.
--
-- Use @AWS_DIRECTORY_SERVICE@ to provide access to Active Directory groups
-- in Directory Service for Microsoft Active Directory or Microsoft Active
-- Directory in your on-premises environment or in Amazon Web Services
-- using AD Connector. This option also requires you to provide a Directory
-- ID by using the @IdentityProviderDetails@ parameter.
--
-- Use the @API_GATEWAY@ value to integrate with an identity provider of
-- your choosing. The @API_GATEWAY@ setting requires you to provide an
-- Amazon API Gateway endpoint URL to call for authentication by using the
-- @IdentityProviderDetails@ parameter.
--
-- Use the @AWS_LAMBDA@ value to directly use an Lambda function as your
-- identity provider. If you choose this value, you must specify the ARN
-- for the Lambda function in the @Function@ parameter or the
-- @IdentityProviderDetails@ data type.
createServer_identityProviderType :: Lens.Lens' CreateServer (Prelude.Maybe IdentityProviderType)
createServer_identityProviderType :: Lens' CreateServer (Maybe IdentityProviderType)
createServer_identityProviderType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe IdentityProviderType
identityProviderType :: Maybe IdentityProviderType
$sel:identityProviderType:CreateServer' :: CreateServer -> Maybe IdentityProviderType
identityProviderType} -> Maybe IdentityProviderType
identityProviderType) (\s :: CreateServer
s@CreateServer' {} Maybe IdentityProviderType
a -> CreateServer
s {$sel:identityProviderType:CreateServer' :: Maybe IdentityProviderType
identityProviderType = Maybe IdentityProviderType
a} :: CreateServer)

-- | The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) role that allows a server to turn on Amazon CloudWatch logging for
-- Amazon S3 or Amazon EFSevents. When set, you can view user activity in
-- your CloudWatch logs.
createServer_loggingRole :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_loggingRole :: Lens' CreateServer (Maybe Text)
createServer_loggingRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
loggingRole :: Maybe Text
$sel:loggingRole:CreateServer' :: CreateServer -> Maybe Text
loggingRole} -> Maybe Text
loggingRole) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:loggingRole:CreateServer' :: Maybe Text
loggingRole = Maybe Text
a} :: CreateServer)

-- | Specifies a string to display when users connect to a server. This
-- string is displayed after the user authenticates.
--
-- The SFTP protocol does not support post-authentication display banners.
createServer_postAuthenticationLoginBanner :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_postAuthenticationLoginBanner :: Lens' CreateServer (Maybe Text)
createServer_postAuthenticationLoginBanner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
postAuthenticationLoginBanner :: Maybe Text
$sel:postAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
postAuthenticationLoginBanner} -> Maybe Text
postAuthenticationLoginBanner) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:postAuthenticationLoginBanner:CreateServer' :: Maybe Text
postAuthenticationLoginBanner = Maybe Text
a} :: CreateServer)

-- | Specifies a string to display when users connect to a server. This
-- string is displayed before the user authenticates. For example, the
-- following banner displays details about using the system:
--
-- @This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.@
createServer_preAuthenticationLoginBanner :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_preAuthenticationLoginBanner :: Lens' CreateServer (Maybe Text)
createServer_preAuthenticationLoginBanner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
preAuthenticationLoginBanner :: Maybe Text
$sel:preAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
preAuthenticationLoginBanner} -> Maybe Text
preAuthenticationLoginBanner) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:preAuthenticationLoginBanner:CreateServer' :: Maybe Text
preAuthenticationLoginBanner = Maybe Text
a} :: CreateServer)

-- | The protocol settings that are configured for your server.
--
-- -   To indicate passive mode (for FTP and FTPS protocols), use the
--     @PassiveIp@ parameter. Enter a single dotted-quad IPv4 address, such
--     as the external IP address of a firewall, router, or load balancer.
--
-- -   To ignore the error that is generated when the client attempts to
--     use the @SETSTAT@ command on a file that you are uploading to an
--     Amazon S3 bucket, use the @SetStatOption@ parameter. To have the
--     Transfer Family server ignore the @SETSTAT@ command and upload files
--     without needing to make any changes to your SFTP client, set the
--     value to @ENABLE_NO_OP@. If you set the @SetStatOption@ parameter to
--     @ENABLE_NO_OP@, Transfer Family generates a log entry to Amazon
--     CloudWatch Logs, so that you can determine when the client is making
--     a @SETSTAT@ call.
--
-- -   To determine whether your Transfer Family server resumes recent,
--     negotiated sessions through a unique session ID, use the
--     @TlsSessionResumptionMode@ parameter.
--
-- -   @As2Transports@ indicates the transport method for the AS2 messages.
--     Currently, only HTTP is supported.
createServer_protocolDetails :: Lens.Lens' CreateServer (Prelude.Maybe ProtocolDetails)
createServer_protocolDetails :: Lens' CreateServer (Maybe ProtocolDetails)
createServer_protocolDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe ProtocolDetails
protocolDetails :: Maybe ProtocolDetails
$sel:protocolDetails:CreateServer' :: CreateServer -> Maybe ProtocolDetails
protocolDetails} -> Maybe ProtocolDetails
protocolDetails) (\s :: CreateServer
s@CreateServer' {} Maybe ProtocolDetails
a -> CreateServer
s {$sel:protocolDetails:CreateServer' :: Maybe ProtocolDetails
protocolDetails = Maybe ProtocolDetails
a} :: CreateServer)

-- | Specifies the file transfer protocol or protocols over which your file
-- transfer protocol client can connect to your server\'s endpoint. The
-- available protocols are:
--
-- -   @SFTP@ (Secure Shell (SSH) File Transfer Protocol): File transfer
--     over SSH
--
-- -   @FTPS@ (File Transfer Protocol Secure): File transfer with TLS
--     encryption
--
-- -   @FTP@ (File Transfer Protocol): Unencrypted file transfer
--
-- -   @AS2@ (Applicability Statement 2): used for transporting structured
--     business-to-business data
--
-- -   If you select @FTPS@, you must choose a certificate stored in
--     Certificate Manager (ACM) which is used to identify your server when
--     clients connect to it over FTPS.
--
-- -   If @Protocol@ includes either @FTP@ or @FTPS@, then the
--     @EndpointType@ must be @VPC@ and the @IdentityProviderType@ must be
--     @AWS_DIRECTORY_SERVICE@ or @API_GATEWAY@.
--
-- -   If @Protocol@ includes @FTP@, then @AddressAllocationIds@ cannot be
--     associated.
--
-- -   If @Protocol@ is set only to @SFTP@, the @EndpointType@ can be set
--     to @PUBLIC@ and the @IdentityProviderType@ can be set to
--     @SERVICE_MANAGED@.
--
-- -   If @Protocol@ includes @AS2@, then the @EndpointType@ must be @VPC@,
--     and domain must be Amazon S3.
createServer_protocols :: Lens.Lens' CreateServer (Prelude.Maybe (Prelude.NonEmpty Protocol))
createServer_protocols :: Lens' CreateServer (Maybe (NonEmpty Protocol))
createServer_protocols = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe (NonEmpty Protocol)
protocols :: Maybe (NonEmpty Protocol)
$sel:protocols:CreateServer' :: CreateServer -> Maybe (NonEmpty Protocol)
protocols} -> Maybe (NonEmpty Protocol)
protocols) (\s :: CreateServer
s@CreateServer' {} Maybe (NonEmpty Protocol)
a -> CreateServer
s {$sel:protocols:CreateServer' :: Maybe (NonEmpty Protocol)
protocols = Maybe (NonEmpty Protocol)
a} :: CreateServer) 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

-- | Specifies the name of the security policy that is attached to the
-- server.
createServer_securityPolicyName :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_securityPolicyName :: Lens' CreateServer (Maybe Text)
createServer_securityPolicyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
securityPolicyName :: Maybe Text
$sel:securityPolicyName:CreateServer' :: CreateServer -> Maybe Text
securityPolicyName} -> Maybe Text
securityPolicyName) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:securityPolicyName:CreateServer' :: Maybe Text
securityPolicyName = Maybe Text
a} :: CreateServer)

-- | Key-value pairs that can be used to group and search for servers.
createServer_tags :: Lens.Lens' CreateServer (Prelude.Maybe (Prelude.NonEmpty Tag))
createServer_tags :: Lens' CreateServer (Maybe (NonEmpty Tag))
createServer_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateServer' :: CreateServer -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateServer
s@CreateServer' {} Maybe (NonEmpty Tag)
a -> CreateServer
s {$sel:tags:CreateServer' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateServer) 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

-- | Specifies the workflow ID for the workflow to assign and the execution
-- role that\'s used for executing the workflow.
--
-- In additon to a workflow to execute when a file is uploaded completely,
-- @WorkflowDeatails@ can also contain a workflow ID (and execution role)
-- for a workflow to execute on partial upload. A partial upload occurs
-- when a file is open when the session disconnects.
createServer_workflowDetails :: Lens.Lens' CreateServer (Prelude.Maybe WorkflowDetails)
createServer_workflowDetails :: Lens' CreateServer (Maybe WorkflowDetails)
createServer_workflowDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe WorkflowDetails
workflowDetails :: Maybe WorkflowDetails
$sel:workflowDetails:CreateServer' :: CreateServer -> Maybe WorkflowDetails
workflowDetails} -> Maybe WorkflowDetails
workflowDetails) (\s :: CreateServer
s@CreateServer' {} Maybe WorkflowDetails
a -> CreateServer
s {$sel:workflowDetails:CreateServer' :: Maybe WorkflowDetails
workflowDetails = Maybe WorkflowDetails
a} :: CreateServer)

instance Core.AWSRequest CreateServer where
  type AWSResponse CreateServer = CreateServerResponse
  request :: (Service -> Service) -> CreateServer -> Request CreateServer
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateServer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateServer)))
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 ->
          Int -> Text -> CreateServerResponse
CreateServerResponse'
            forall (f :: * -> *) a b. Functor 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"ServerId")
      )

instance Prelude.Hashable CreateServer where
  hashWithSalt :: Int -> CreateServer -> Int
hashWithSalt Int
_salt CreateServer' {Maybe (NonEmpty Protocol)
Maybe (NonEmpty Tag)
Maybe Text
Maybe (Sensitive Text)
Maybe Domain
Maybe EndpointDetails
Maybe EndpointType
Maybe IdentityProviderDetails
Maybe IdentityProviderType
Maybe ProtocolDetails
Maybe WorkflowDetails
workflowDetails :: Maybe WorkflowDetails
tags :: Maybe (NonEmpty Tag)
securityPolicyName :: Maybe Text
protocols :: Maybe (NonEmpty Protocol)
protocolDetails :: Maybe ProtocolDetails
preAuthenticationLoginBanner :: Maybe Text
postAuthenticationLoginBanner :: Maybe Text
loggingRole :: Maybe Text
identityProviderType :: Maybe IdentityProviderType
identityProviderDetails :: Maybe IdentityProviderDetails
hostKey :: Maybe (Sensitive Text)
endpointType :: Maybe EndpointType
endpointDetails :: Maybe EndpointDetails
domain :: Maybe Domain
certificate :: Maybe Text
$sel:workflowDetails:CreateServer' :: CreateServer -> Maybe WorkflowDetails
$sel:tags:CreateServer' :: CreateServer -> Maybe (NonEmpty Tag)
$sel:securityPolicyName:CreateServer' :: CreateServer -> Maybe Text
$sel:protocols:CreateServer' :: CreateServer -> Maybe (NonEmpty Protocol)
$sel:protocolDetails:CreateServer' :: CreateServer -> Maybe ProtocolDetails
$sel:preAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
$sel:postAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
$sel:loggingRole:CreateServer' :: CreateServer -> Maybe Text
$sel:identityProviderType:CreateServer' :: CreateServer -> Maybe IdentityProviderType
$sel:identityProviderDetails:CreateServer' :: CreateServer -> Maybe IdentityProviderDetails
$sel:hostKey:CreateServer' :: CreateServer -> Maybe (Sensitive Text)
$sel:endpointType:CreateServer' :: CreateServer -> Maybe EndpointType
$sel:endpointDetails:CreateServer' :: CreateServer -> Maybe EndpointDetails
$sel:domain:CreateServer' :: CreateServer -> Maybe Domain
$sel:certificate:CreateServer' :: CreateServer -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Domain
domain
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EndpointDetails
endpointDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EndpointType
endpointType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
hostKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IdentityProviderDetails
identityProviderDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IdentityProviderType
identityProviderType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
loggingRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
postAuthenticationLoginBanner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preAuthenticationLoginBanner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProtocolDetails
protocolDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Protocol)
protocols
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityPolicyName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkflowDetails
workflowDetails

instance Prelude.NFData CreateServer where
  rnf :: CreateServer -> ()
rnf CreateServer' {Maybe (NonEmpty Protocol)
Maybe (NonEmpty Tag)
Maybe Text
Maybe (Sensitive Text)
Maybe Domain
Maybe EndpointDetails
Maybe EndpointType
Maybe IdentityProviderDetails
Maybe IdentityProviderType
Maybe ProtocolDetails
Maybe WorkflowDetails
workflowDetails :: Maybe WorkflowDetails
tags :: Maybe (NonEmpty Tag)
securityPolicyName :: Maybe Text
protocols :: Maybe (NonEmpty Protocol)
protocolDetails :: Maybe ProtocolDetails
preAuthenticationLoginBanner :: Maybe Text
postAuthenticationLoginBanner :: Maybe Text
loggingRole :: Maybe Text
identityProviderType :: Maybe IdentityProviderType
identityProviderDetails :: Maybe IdentityProviderDetails
hostKey :: Maybe (Sensitive Text)
endpointType :: Maybe EndpointType
endpointDetails :: Maybe EndpointDetails
domain :: Maybe Domain
certificate :: Maybe Text
$sel:workflowDetails:CreateServer' :: CreateServer -> Maybe WorkflowDetails
$sel:tags:CreateServer' :: CreateServer -> Maybe (NonEmpty Tag)
$sel:securityPolicyName:CreateServer' :: CreateServer -> Maybe Text
$sel:protocols:CreateServer' :: CreateServer -> Maybe (NonEmpty Protocol)
$sel:protocolDetails:CreateServer' :: CreateServer -> Maybe ProtocolDetails
$sel:preAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
$sel:postAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
$sel:loggingRole:CreateServer' :: CreateServer -> Maybe Text
$sel:identityProviderType:CreateServer' :: CreateServer -> Maybe IdentityProviderType
$sel:identityProviderDetails:CreateServer' :: CreateServer -> Maybe IdentityProviderDetails
$sel:hostKey:CreateServer' :: CreateServer -> Maybe (Sensitive Text)
$sel:endpointType:CreateServer' :: CreateServer -> Maybe EndpointType
$sel:endpointDetails:CreateServer' :: CreateServer -> Maybe EndpointDetails
$sel:domain:CreateServer' :: CreateServer -> Maybe Domain
$sel:certificate:CreateServer' :: CreateServer -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Domain
domain
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointDetails
endpointDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointType
endpointType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
hostKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IdentityProviderDetails
identityProviderDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IdentityProviderType
identityProviderType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
loggingRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
postAuthenticationLoginBanner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
preAuthenticationLoginBanner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProtocolDetails
protocolDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Protocol)
protocols
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
securityPolicyName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkflowDetails
workflowDetails

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

instance Data.ToJSON CreateServer where
  toJSON :: CreateServer -> Value
toJSON CreateServer' {Maybe (NonEmpty Protocol)
Maybe (NonEmpty Tag)
Maybe Text
Maybe (Sensitive Text)
Maybe Domain
Maybe EndpointDetails
Maybe EndpointType
Maybe IdentityProviderDetails
Maybe IdentityProviderType
Maybe ProtocolDetails
Maybe WorkflowDetails
workflowDetails :: Maybe WorkflowDetails
tags :: Maybe (NonEmpty Tag)
securityPolicyName :: Maybe Text
protocols :: Maybe (NonEmpty Protocol)
protocolDetails :: Maybe ProtocolDetails
preAuthenticationLoginBanner :: Maybe Text
postAuthenticationLoginBanner :: Maybe Text
loggingRole :: Maybe Text
identityProviderType :: Maybe IdentityProviderType
identityProviderDetails :: Maybe IdentityProviderDetails
hostKey :: Maybe (Sensitive Text)
endpointType :: Maybe EndpointType
endpointDetails :: Maybe EndpointDetails
domain :: Maybe Domain
certificate :: Maybe Text
$sel:workflowDetails:CreateServer' :: CreateServer -> Maybe WorkflowDetails
$sel:tags:CreateServer' :: CreateServer -> Maybe (NonEmpty Tag)
$sel:securityPolicyName:CreateServer' :: CreateServer -> Maybe Text
$sel:protocols:CreateServer' :: CreateServer -> Maybe (NonEmpty Protocol)
$sel:protocolDetails:CreateServer' :: CreateServer -> Maybe ProtocolDetails
$sel:preAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
$sel:postAuthenticationLoginBanner:CreateServer' :: CreateServer -> Maybe Text
$sel:loggingRole:CreateServer' :: CreateServer -> Maybe Text
$sel:identityProviderType:CreateServer' :: CreateServer -> Maybe IdentityProviderType
$sel:identityProviderDetails:CreateServer' :: CreateServer -> Maybe IdentityProviderDetails
$sel:hostKey:CreateServer' :: CreateServer -> Maybe (Sensitive Text)
$sel:endpointType:CreateServer' :: CreateServer -> Maybe EndpointType
$sel:endpointDetails:CreateServer' :: CreateServer -> Maybe EndpointDetails
$sel:domain:CreateServer' :: CreateServer -> Maybe Domain
$sel:certificate:CreateServer' :: CreateServer -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Certificate" 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
certificate,
            (Key
"Domain" 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 Domain
domain,
            (Key
"EndpointDetails" 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 EndpointDetails
endpointDetails,
            (Key
"EndpointType" 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 EndpointType
endpointType,
            (Key
"HostKey" 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 Text)
hostKey,
            (Key
"IdentityProviderDetails" 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 IdentityProviderDetails
identityProviderDetails,
            (Key
"IdentityProviderType" 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 IdentityProviderType
identityProviderType,
            (Key
"LoggingRole" 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
loggingRole,
            (Key
"PostAuthenticationLoginBanner" 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
postAuthenticationLoginBanner,
            (Key
"PreAuthenticationLoginBanner" 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
preAuthenticationLoginBanner,
            (Key
"ProtocolDetails" 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 ProtocolDetails
protocolDetails,
            (Key
"Protocols" 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 (NonEmpty Protocol)
protocols,
            (Key
"SecurityPolicyName" 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
securityPolicyName,
            (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 (NonEmpty Tag)
tags,
            (Key
"WorkflowDetails" 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 WorkflowDetails
workflowDetails
          ]
      )

instance Data.ToPath CreateServer where
  toPath :: CreateServer -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newCreateServerResponse' smart constructor.
data CreateServerResponse = CreateServerResponse'
  { -- | The response's http status code.
    CreateServerResponse -> Int
httpStatus :: Prelude.Int,
    -- | The service-assigned identifier of the server that is created.
    CreateServerResponse -> Text
serverId :: Prelude.Text
  }
  deriving (CreateServerResponse -> CreateServerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateServerResponse -> CreateServerResponse -> Bool
$c/= :: CreateServerResponse -> CreateServerResponse -> Bool
== :: CreateServerResponse -> CreateServerResponse -> Bool
$c== :: CreateServerResponse -> CreateServerResponse -> Bool
Prelude.Eq, ReadPrec [CreateServerResponse]
ReadPrec CreateServerResponse
Int -> ReadS CreateServerResponse
ReadS [CreateServerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateServerResponse]
$creadListPrec :: ReadPrec [CreateServerResponse]
readPrec :: ReadPrec CreateServerResponse
$creadPrec :: ReadPrec CreateServerResponse
readList :: ReadS [CreateServerResponse]
$creadList :: ReadS [CreateServerResponse]
readsPrec :: Int -> ReadS CreateServerResponse
$creadsPrec :: Int -> ReadS CreateServerResponse
Prelude.Read, Int -> CreateServerResponse -> ShowS
[CreateServerResponse] -> ShowS
CreateServerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateServerResponse] -> ShowS
$cshowList :: [CreateServerResponse] -> ShowS
show :: CreateServerResponse -> String
$cshow :: CreateServerResponse -> String
showsPrec :: Int -> CreateServerResponse -> ShowS
$cshowsPrec :: Int -> CreateServerResponse -> ShowS
Prelude.Show, forall x. Rep CreateServerResponse x -> CreateServerResponse
forall x. CreateServerResponse -> Rep CreateServerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateServerResponse x -> CreateServerResponse
$cfrom :: forall x. CreateServerResponse -> Rep CreateServerResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateServerResponse' 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:
--
-- 'httpStatus', 'createServerResponse_httpStatus' - The response's http status code.
--
-- 'serverId', 'createServerResponse_serverId' - The service-assigned identifier of the server that is created.
newCreateServerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'serverId'
  Prelude.Text ->
  CreateServerResponse
newCreateServerResponse :: Int -> Text -> CreateServerResponse
newCreateServerResponse Int
pHttpStatus_ Text
pServerId_ =
  CreateServerResponse'
    { $sel:httpStatus:CreateServerResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:serverId:CreateServerResponse' :: Text
serverId = Text
pServerId_
    }

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

-- | The service-assigned identifier of the server that is created.
createServerResponse_serverId :: Lens.Lens' CreateServerResponse Prelude.Text
createServerResponse_serverId :: Lens' CreateServerResponse Text
createServerResponse_serverId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServerResponse' {Text
serverId :: Text
$sel:serverId:CreateServerResponse' :: CreateServerResponse -> Text
serverId} -> Text
serverId) (\s :: CreateServerResponse
s@CreateServerResponse' {} Text
a -> CreateServerResponse
s {$sel:serverId:CreateServerResponse' :: Text
serverId = Text
a} :: CreateServerResponse)

instance Prelude.NFData CreateServerResponse where
  rnf :: CreateServerResponse -> ()
rnf CreateServerResponse' {Int
Text
serverId :: Text
httpStatus :: Int
$sel:serverId:CreateServerResponse' :: CreateServerResponse -> Text
$sel:httpStatus:CreateServerResponse' :: CreateServerResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serverId