{-# 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.DMS.CreateEndpoint
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an endpoint using the provided settings.
--
-- For a MySQL source or target endpoint, don\'t explicitly specify the
-- database using the @DatabaseName@ request parameter on the
-- @CreateEndpoint@ API call. Specifying @DatabaseName@ when you create a
-- MySQL endpoint replicates all the task tables to this single database.
-- For MySQL endpoints, you specify the database only when you specify the
-- schema in the table-mapping rules of the DMS task.
module Amazonka.DMS.CreateEndpoint
  ( -- * Creating a Request
    CreateEndpoint (..),
    newCreateEndpoint,

    -- * Request Lenses
    createEndpoint_dmsTransferSettings,
    createEndpoint_mySQLSettings,
    createEndpoint_serverName,
    createEndpoint_microsoftSQLServerSettings,
    createEndpoint_certificateArn,
    createEndpoint_serviceAccessRoleArn,
    createEndpoint_docDbSettings,
    createEndpoint_postgreSQLSettings,
    createEndpoint_extraConnectionAttributes,
    createEndpoint_kafkaSettings,
    createEndpoint_oracleSettings,
    createEndpoint_redshiftSettings,
    createEndpoint_elasticsearchSettings,
    createEndpoint_username,
    createEndpoint_externalTableDefinition,
    createEndpoint_redisSettings,
    createEndpoint_neptuneSettings,
    createEndpoint_iBMDb2Settings,
    createEndpoint_kmsKeyId,
    createEndpoint_mongoDbSettings,
    createEndpoint_sslMode,
    createEndpoint_password,
    createEndpoint_sybaseSettings,
    createEndpoint_databaseName,
    createEndpoint_s3Settings,
    createEndpoint_kinesisSettings,
    createEndpoint_dynamoDbSettings,
    createEndpoint_resourceIdentifier,
    createEndpoint_tags,
    createEndpoint_port,
    createEndpoint_endpointIdentifier,
    createEndpoint_endpointType,
    createEndpoint_engineName,

    -- * Destructuring the Response
    CreateEndpointResponse (..),
    newCreateEndpointResponse,

    -- * Response Lenses
    createEndpointResponse_endpoint,
    createEndpointResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateEndpoint' smart constructor.
data CreateEndpoint = CreateEndpoint'
  { -- | The settings in JSON format for the DMS transfer type of source
    -- endpoint.
    --
    -- Possible settings include the following:
    --
    -- -   @ServiceAccessRoleArn@ - The Amazon Resource Name (ARN) used by the
    --     service access IAM role. The role must allow the @iam:PassRole@
    --     action.
    --
    -- -   @BucketName@ - The name of the S3 bucket to use.
    --
    -- Shorthand syntax for these settings is as follows:
    -- @ServiceAccessRoleArn=string,BucketName=string@
    --
    -- JSON syntax for these settings is as follows:
    -- @{ \"ServiceAccessRoleArn\": \"string\", \"BucketName\": \"string\", } @
    CreateEndpoint -> Maybe DmsTransferSettings
dmsTransferSettings :: Prelude.Maybe DmsTransferSettings,
    -- | Settings in JSON format for the source and target MySQL endpoint. For
    -- information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html#CHAP_Source.MySQL.ConnectionAttrib Extra connection attributes when using MySQL as a source for DMS>
    -- and
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html#CHAP_Target.MySQL.ConnectionAttrib Extra connection attributes when using a MySQL-compatible database as a target for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe MySQLSettings
mySQLSettings :: Prelude.Maybe MySQLSettings,
    -- | The name of the server where the endpoint database resides.
    CreateEndpoint -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | Settings in JSON format for the source and target Microsoft SQL Server
    -- endpoint. For information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SQLServer.html#CHAP_Source.SQLServer.ConnectionAttrib Extra connection attributes when using SQL Server as a source for DMS>
    -- and
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SQLServer.html#CHAP_Target.SQLServer.ConnectionAttrib Extra connection attributes when using SQL Server as a target for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings :: Prelude.Maybe MicrosoftSQLServerSettings,
    -- | The Amazon Resource Name (ARN) for the certificate.
    CreateEndpoint -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the service access role that you want
    -- to use to create the endpoint. The role must allow the @iam:PassRole@
    -- action.
    CreateEndpoint -> Maybe Text
serviceAccessRoleArn :: Prelude.Maybe Prelude.Text,
    CreateEndpoint -> Maybe DocDbSettings
docDbSettings :: Prelude.Maybe DocDbSettings,
    -- | Settings in JSON format for the source and target PostgreSQL endpoint.
    -- For information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.ConnectionAttrib Extra connection attributes when using PostgreSQL as a source for DMS>
    -- and
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.ConnectionAttrib Extra connection attributes when using PostgreSQL as a target for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe PostgreSQLSettings
postgreSQLSettings :: Prelude.Maybe PostgreSQLSettings,
    -- | Additional attributes associated with the connection. Each attribute is
    -- specified as a name-value pair associated by an equal sign (=). Multiple
    -- attributes are separated by a semicolon (;) with no additional white
    -- space. For information on the attributes available for connecting your
    -- source or target endpoint, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html Working with DMS Endpoints>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe Text
extraConnectionAttributes :: Prelude.Maybe Prelude.Text,
    -- | Settings in JSON format for the target Apache Kafka endpoint. For more
    -- information about the available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping Using object mapping to migrate data to a Kafka topic>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe KafkaSettings
kafkaSettings :: Prelude.Maybe KafkaSettings,
    -- | Settings in JSON format for the source and target Oracle endpoint. For
    -- information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.ConnectionAttrib Extra connection attributes when using Oracle as a source for DMS>
    -- and
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html#CHAP_Target.Oracle.ConnectionAttrib Extra connection attributes when using Oracle as a target for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe OracleSettings
oracleSettings :: Prelude.Maybe OracleSettings,
    CreateEndpoint -> Maybe RedshiftSettings
redshiftSettings :: Prelude.Maybe RedshiftSettings,
    -- | Settings in JSON format for the target Elasticsearch endpoint. For more
    -- information about the available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration Extra Connection Attributes When Using Elasticsearch as a Target for DMS>
    -- in the /Database Migration Service User Guide/.
    CreateEndpoint -> Maybe ElasticsearchSettings
elasticsearchSettings :: Prelude.Maybe ElasticsearchSettings,
    -- | The user name to be used to log in to the endpoint database.
    CreateEndpoint -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | The external table definition.
    CreateEndpoint -> Maybe Text
externalTableDefinition :: Prelude.Maybe Prelude.Text,
    -- | Settings in JSON format for the target Redis endpoint.
    CreateEndpoint -> Maybe RedisSettings
redisSettings :: Prelude.Maybe RedisSettings,
    -- | Settings in JSON format for the target Amazon Neptune endpoint. For more
    -- information about the available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings Specifying graph-mapping rules using Gremlin and R2RML for Amazon Neptune as a target>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe NeptuneSettings
neptuneSettings :: Prelude.Maybe NeptuneSettings,
    -- | Settings in JSON format for the source IBM Db2 LUW endpoint. For
    -- information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DB2.html#CHAP_Source.DB2.ConnectionAttrib Extra connection attributes when using Db2 LUW as a source for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe IBMDb2Settings
iBMDb2Settings :: Prelude.Maybe IBMDb2Settings,
    -- | An KMS key identifier that is used to encrypt the connection parameters
    -- for the endpoint.
    --
    -- If you don\'t specify a value for the @KmsKeyId@ parameter, then DMS
    -- uses your default encryption key.
    --
    -- KMS creates the default encryption key for your Amazon Web Services
    -- account. Your Amazon Web Services account has a different default
    -- encryption key for each Amazon Web Services Region.
    CreateEndpoint -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Settings in JSON format for the source MongoDB endpoint. For more
    -- information about the available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html#CHAP_Source.MongoDB.Configuration Endpoint configuration settings when using MongoDB as a source for Database Migration Service>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe MongoDbSettings
mongoDbSettings :: Prelude.Maybe MongoDbSettings,
    -- | The Secure Sockets Layer (SSL) mode to use for the SSL connection. The
    -- default is @none@
    CreateEndpoint -> Maybe DmsSslModeValue
sslMode :: Prelude.Maybe DmsSslModeValue,
    -- | The password to be used to log in to the endpoint database.
    CreateEndpoint -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Settings in JSON format for the source and target SAP ASE endpoint. For
    -- information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SAP.html#CHAP_Source.SAP.ConnectionAttrib Extra connection attributes when using SAP ASE as a source for DMS>
    -- and
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SAP.html#CHAP_Target.SAP.ConnectionAttrib Extra connection attributes when using SAP ASE as a target for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe SybaseSettings
sybaseSettings :: Prelude.Maybe SybaseSettings,
    -- | The name of the endpoint database. For a MySQL source or target
    -- endpoint, do not specify DatabaseName.
    CreateEndpoint -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | Settings in JSON format for the target Amazon S3 endpoint. For more
    -- information about the available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring Extra Connection Attributes When Using Amazon S3 as a Target for DMS>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe S3Settings
s3Settings :: Prelude.Maybe S3Settings,
    -- | Settings in JSON format for the target endpoint for Amazon Kinesis Data
    -- Streams. For more information about the available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping Using object mapping to migrate data to a Kinesis data stream>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe KinesisSettings
kinesisSettings :: Prelude.Maybe KinesisSettings,
    -- | Settings in JSON format for the target Amazon DynamoDB endpoint. For
    -- information about other available settings, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html#CHAP_Target.DynamoDB.ObjectMapping Using Object Mapping to Migrate Data to DynamoDB>
    -- in the /Database Migration Service User Guide./
    CreateEndpoint -> Maybe DynamoDbSettings
dynamoDbSettings :: Prelude.Maybe DynamoDbSettings,
    -- | A friendly name for the resource identifier at the end of the
    -- @EndpointArn@ response parameter that is returned in the created
    -- @Endpoint@ object. The value for this parameter can have up to 31
    -- characters. It can contain only ASCII letters, digits, and hyphen
    -- (\'-\'). Also, it can\'t end with a hyphen or contain two consecutive
    -- hyphens, and can only begin with a letter, such as @Example-App-ARN1@.
    -- For example, this value might result in the @EndpointArn@ value
    -- @arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1@. If you don\'t
    -- specify a @ResourceIdentifier@ value, DMS generates a default identifier
    -- value for the end of @EndpointArn@.
    CreateEndpoint -> Maybe Text
resourceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | One or more tags to be assigned to the endpoint.
    CreateEndpoint -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The port used by the endpoint database.
    CreateEndpoint -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The database endpoint identifier. Identifiers must begin with a letter
    -- and must contain only ASCII letters, digits, and hyphens. They can\'t
    -- end with a hyphen, or contain two consecutive hyphens.
    CreateEndpoint -> Text
endpointIdentifier :: Prelude.Text,
    -- | The type of endpoint. Valid values are @source@ and @target@.
    CreateEndpoint -> ReplicationEndpointTypeValue
endpointType :: ReplicationEndpointTypeValue,
    -- | The type of engine for the endpoint. Valid values, depending on the
    -- @EndpointType@ value, include @\"mysql\"@, @\"oracle\"@, @\"postgres\"@,
    -- @\"mariadb\"@, @\"aurora\"@, @\"aurora-postgresql\"@, @\"redshift\"@,
    -- @\"s3\"@, @\"db2\"@, @\"azuredb\"@, @\"sybase\"@, @\"dynamodb\"@,
    -- @\"mongodb\"@, @\"kinesis\"@, @\"kafka\"@, @\"elasticsearch\"@,
    -- @\"docdb\"@, @\"sqlserver\"@, and @\"neptune\"@.
    CreateEndpoint -> Text
engineName :: Prelude.Text
  }
  deriving (CreateEndpoint -> CreateEndpoint -> Bool
(CreateEndpoint -> CreateEndpoint -> Bool)
-> (CreateEndpoint -> CreateEndpoint -> Bool) -> Eq CreateEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEndpoint -> CreateEndpoint -> Bool
$c/= :: CreateEndpoint -> CreateEndpoint -> Bool
== :: CreateEndpoint -> CreateEndpoint -> Bool
$c== :: CreateEndpoint -> CreateEndpoint -> Bool
Prelude.Eq, Int -> CreateEndpoint -> ShowS
[CreateEndpoint] -> ShowS
CreateEndpoint -> String
(Int -> CreateEndpoint -> ShowS)
-> (CreateEndpoint -> String)
-> ([CreateEndpoint] -> ShowS)
-> Show CreateEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEndpoint] -> ShowS
$cshowList :: [CreateEndpoint] -> ShowS
show :: CreateEndpoint -> String
$cshow :: CreateEndpoint -> String
showsPrec :: Int -> CreateEndpoint -> ShowS
$cshowsPrec :: Int -> CreateEndpoint -> ShowS
Prelude.Show, (forall x. CreateEndpoint -> Rep CreateEndpoint x)
-> (forall x. Rep CreateEndpoint x -> CreateEndpoint)
-> Generic CreateEndpoint
forall x. Rep CreateEndpoint x -> CreateEndpoint
forall x. CreateEndpoint -> Rep CreateEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEndpoint x -> CreateEndpoint
$cfrom :: forall x. CreateEndpoint -> Rep CreateEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'CreateEndpoint' 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:
--
-- 'dmsTransferSettings', 'createEndpoint_dmsTransferSettings' - The settings in JSON format for the DMS transfer type of source
-- endpoint.
--
-- Possible settings include the following:
--
-- -   @ServiceAccessRoleArn@ - The Amazon Resource Name (ARN) used by the
--     service access IAM role. The role must allow the @iam:PassRole@
--     action.
--
-- -   @BucketName@ - The name of the S3 bucket to use.
--
-- Shorthand syntax for these settings is as follows:
-- @ServiceAccessRoleArn=string,BucketName=string@
--
-- JSON syntax for these settings is as follows:
-- @{ \"ServiceAccessRoleArn\": \"string\", \"BucketName\": \"string\", } @
--
-- 'mySQLSettings', 'createEndpoint_mySQLSettings' - Settings in JSON format for the source and target MySQL endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html#CHAP_Source.MySQL.ConnectionAttrib Extra connection attributes when using MySQL as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html#CHAP_Target.MySQL.ConnectionAttrib Extra connection attributes when using a MySQL-compatible database as a target for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'serverName', 'createEndpoint_serverName' - The name of the server where the endpoint database resides.
--
-- 'microsoftSQLServerSettings', 'createEndpoint_microsoftSQLServerSettings' - Settings in JSON format for the source and target Microsoft SQL Server
-- endpoint. For information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SQLServer.html#CHAP_Source.SQLServer.ConnectionAttrib Extra connection attributes when using SQL Server as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SQLServer.html#CHAP_Target.SQLServer.ConnectionAttrib Extra connection attributes when using SQL Server as a target for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'certificateArn', 'createEndpoint_certificateArn' - The Amazon Resource Name (ARN) for the certificate.
--
-- 'serviceAccessRoleArn', 'createEndpoint_serviceAccessRoleArn' - The Amazon Resource Name (ARN) for the service access role that you want
-- to use to create the endpoint. The role must allow the @iam:PassRole@
-- action.
--
-- 'docDbSettings', 'createEndpoint_docDbSettings' - Undocumented member.
--
-- 'postgreSQLSettings', 'createEndpoint_postgreSQLSettings' - Settings in JSON format for the source and target PostgreSQL endpoint.
-- For information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.ConnectionAttrib Extra connection attributes when using PostgreSQL as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.ConnectionAttrib Extra connection attributes when using PostgreSQL as a target for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'extraConnectionAttributes', 'createEndpoint_extraConnectionAttributes' - Additional attributes associated with the connection. Each attribute is
-- specified as a name-value pair associated by an equal sign (=). Multiple
-- attributes are separated by a semicolon (;) with no additional white
-- space. For information on the attributes available for connecting your
-- source or target endpoint, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html Working with DMS Endpoints>
-- in the /Database Migration Service User Guide./
--
-- 'kafkaSettings', 'createEndpoint_kafkaSettings' - Settings in JSON format for the target Apache Kafka endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping Using object mapping to migrate data to a Kafka topic>
-- in the /Database Migration Service User Guide./
--
-- 'oracleSettings', 'createEndpoint_oracleSettings' - Settings in JSON format for the source and target Oracle endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.ConnectionAttrib Extra connection attributes when using Oracle as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html#CHAP_Target.Oracle.ConnectionAttrib Extra connection attributes when using Oracle as a target for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'redshiftSettings', 'createEndpoint_redshiftSettings' - Undocumented member.
--
-- 'elasticsearchSettings', 'createEndpoint_elasticsearchSettings' - Settings in JSON format for the target Elasticsearch endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration Extra Connection Attributes When Using Elasticsearch as a Target for DMS>
-- in the /Database Migration Service User Guide/.
--
-- 'username', 'createEndpoint_username' - The user name to be used to log in to the endpoint database.
--
-- 'externalTableDefinition', 'createEndpoint_externalTableDefinition' - The external table definition.
--
-- 'redisSettings', 'createEndpoint_redisSettings' - Settings in JSON format for the target Redis endpoint.
--
-- 'neptuneSettings', 'createEndpoint_neptuneSettings' - Settings in JSON format for the target Amazon Neptune endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings Specifying graph-mapping rules using Gremlin and R2RML for Amazon Neptune as a target>
-- in the /Database Migration Service User Guide./
--
-- 'iBMDb2Settings', 'createEndpoint_iBMDb2Settings' - Settings in JSON format for the source IBM Db2 LUW endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DB2.html#CHAP_Source.DB2.ConnectionAttrib Extra connection attributes when using Db2 LUW as a source for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'kmsKeyId', 'createEndpoint_kmsKeyId' - An KMS key identifier that is used to encrypt the connection parameters
-- for the endpoint.
--
-- If you don\'t specify a value for the @KmsKeyId@ parameter, then DMS
-- uses your default encryption key.
--
-- KMS creates the default encryption key for your Amazon Web Services
-- account. Your Amazon Web Services account has a different default
-- encryption key for each Amazon Web Services Region.
--
-- 'mongoDbSettings', 'createEndpoint_mongoDbSettings' - Settings in JSON format for the source MongoDB endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html#CHAP_Source.MongoDB.Configuration Endpoint configuration settings when using MongoDB as a source for Database Migration Service>
-- in the /Database Migration Service User Guide./
--
-- 'sslMode', 'createEndpoint_sslMode' - The Secure Sockets Layer (SSL) mode to use for the SSL connection. The
-- default is @none@
--
-- 'password', 'createEndpoint_password' - The password to be used to log in to the endpoint database.
--
-- 'sybaseSettings', 'createEndpoint_sybaseSettings' - Settings in JSON format for the source and target SAP ASE endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SAP.html#CHAP_Source.SAP.ConnectionAttrib Extra connection attributes when using SAP ASE as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SAP.html#CHAP_Target.SAP.ConnectionAttrib Extra connection attributes when using SAP ASE as a target for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'databaseName', 'createEndpoint_databaseName' - The name of the endpoint database. For a MySQL source or target
-- endpoint, do not specify DatabaseName.
--
-- 's3Settings', 'createEndpoint_s3Settings' - Settings in JSON format for the target Amazon S3 endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring Extra Connection Attributes When Using Amazon S3 as a Target for DMS>
-- in the /Database Migration Service User Guide./
--
-- 'kinesisSettings', 'createEndpoint_kinesisSettings' - Settings in JSON format for the target endpoint for Amazon Kinesis Data
-- Streams. For more information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping Using object mapping to migrate data to a Kinesis data stream>
-- in the /Database Migration Service User Guide./
--
-- 'dynamoDbSettings', 'createEndpoint_dynamoDbSettings' - Settings in JSON format for the target Amazon DynamoDB endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html#CHAP_Target.DynamoDB.ObjectMapping Using Object Mapping to Migrate Data to DynamoDB>
-- in the /Database Migration Service User Guide./
--
-- 'resourceIdentifier', 'createEndpoint_resourceIdentifier' - A friendly name for the resource identifier at the end of the
-- @EndpointArn@ response parameter that is returned in the created
-- @Endpoint@ object. The value for this parameter can have up to 31
-- characters. It can contain only ASCII letters, digits, and hyphen
-- (\'-\'). Also, it can\'t end with a hyphen or contain two consecutive
-- hyphens, and can only begin with a letter, such as @Example-App-ARN1@.
-- For example, this value might result in the @EndpointArn@ value
-- @arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1@. If you don\'t
-- specify a @ResourceIdentifier@ value, DMS generates a default identifier
-- value for the end of @EndpointArn@.
--
-- 'tags', 'createEndpoint_tags' - One or more tags to be assigned to the endpoint.
--
-- 'port', 'createEndpoint_port' - The port used by the endpoint database.
--
-- 'endpointIdentifier', 'createEndpoint_endpointIdentifier' - The database endpoint identifier. Identifiers must begin with a letter
-- and must contain only ASCII letters, digits, and hyphens. They can\'t
-- end with a hyphen, or contain two consecutive hyphens.
--
-- 'endpointType', 'createEndpoint_endpointType' - The type of endpoint. Valid values are @source@ and @target@.
--
-- 'engineName', 'createEndpoint_engineName' - The type of engine for the endpoint. Valid values, depending on the
-- @EndpointType@ value, include @\"mysql\"@, @\"oracle\"@, @\"postgres\"@,
-- @\"mariadb\"@, @\"aurora\"@, @\"aurora-postgresql\"@, @\"redshift\"@,
-- @\"s3\"@, @\"db2\"@, @\"azuredb\"@, @\"sybase\"@, @\"dynamodb\"@,
-- @\"mongodb\"@, @\"kinesis\"@, @\"kafka\"@, @\"elasticsearch\"@,
-- @\"docdb\"@, @\"sqlserver\"@, and @\"neptune\"@.
newCreateEndpoint ::
  -- | 'endpointIdentifier'
  Prelude.Text ->
  -- | 'endpointType'
  ReplicationEndpointTypeValue ->
  -- | 'engineName'
  Prelude.Text ->
  CreateEndpoint
newCreateEndpoint :: Text -> ReplicationEndpointTypeValue -> Text -> CreateEndpoint
newCreateEndpoint
  Text
pEndpointIdentifier_
  ReplicationEndpointTypeValue
pEndpointType_
  Text
pEngineName_ =
    CreateEndpoint' :: Maybe DmsTransferSettings
-> Maybe MySQLSettings
-> Maybe Text
-> Maybe MicrosoftSQLServerSettings
-> Maybe Text
-> Maybe Text
-> Maybe DocDbSettings
-> Maybe PostgreSQLSettings
-> Maybe Text
-> Maybe KafkaSettings
-> Maybe OracleSettings
-> Maybe RedshiftSettings
-> Maybe ElasticsearchSettings
-> Maybe Text
-> Maybe Text
-> Maybe RedisSettings
-> Maybe NeptuneSettings
-> Maybe IBMDb2Settings
-> Maybe Text
-> Maybe MongoDbSettings
-> Maybe DmsSslModeValue
-> Maybe (Sensitive Text)
-> Maybe SybaseSettings
-> Maybe Text
-> Maybe S3Settings
-> Maybe KinesisSettings
-> Maybe DynamoDbSettings
-> Maybe Text
-> Maybe [Tag]
-> Maybe Int
-> Text
-> ReplicationEndpointTypeValue
-> Text
-> CreateEndpoint
CreateEndpoint'
      { $sel:dmsTransferSettings:CreateEndpoint' :: Maybe DmsTransferSettings
dmsTransferSettings =
          Maybe DmsTransferSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:mySQLSettings:CreateEndpoint' :: Maybe MySQLSettings
mySQLSettings = Maybe MySQLSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:serverName:CreateEndpoint' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:microsoftSQLServerSettings:CreateEndpoint' :: Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings = Maybe MicrosoftSQLServerSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:certificateArn:CreateEndpoint' :: Maybe Text
certificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:serviceAccessRoleArn:CreateEndpoint' :: Maybe Text
serviceAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:docDbSettings:CreateEndpoint' :: Maybe DocDbSettings
docDbSettings = Maybe DocDbSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:postgreSQLSettings:CreateEndpoint' :: Maybe PostgreSQLSettings
postgreSQLSettings = Maybe PostgreSQLSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:extraConnectionAttributes:CreateEndpoint' :: Maybe Text
extraConnectionAttributes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kafkaSettings:CreateEndpoint' :: Maybe KafkaSettings
kafkaSettings = Maybe KafkaSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:oracleSettings:CreateEndpoint' :: Maybe OracleSettings
oracleSettings = Maybe OracleSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:redshiftSettings:CreateEndpoint' :: Maybe RedshiftSettings
redshiftSettings = Maybe RedshiftSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:elasticsearchSettings:CreateEndpoint' :: Maybe ElasticsearchSettings
elasticsearchSettings = Maybe ElasticsearchSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:username:CreateEndpoint' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:externalTableDefinition:CreateEndpoint' :: Maybe Text
externalTableDefinition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:redisSettings:CreateEndpoint' :: Maybe RedisSettings
redisSettings = Maybe RedisSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:neptuneSettings:CreateEndpoint' :: Maybe NeptuneSettings
neptuneSettings = Maybe NeptuneSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:iBMDb2Settings:CreateEndpoint' :: Maybe IBMDb2Settings
iBMDb2Settings = Maybe IBMDb2Settings
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateEndpoint' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:mongoDbSettings:CreateEndpoint' :: Maybe MongoDbSettings
mongoDbSettings = Maybe MongoDbSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:sslMode:CreateEndpoint' :: Maybe DmsSslModeValue
sslMode = Maybe DmsSslModeValue
forall a. Maybe a
Prelude.Nothing,
        $sel:password:CreateEndpoint' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:sybaseSettings:CreateEndpoint' :: Maybe SybaseSettings
sybaseSettings = Maybe SybaseSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:databaseName:CreateEndpoint' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:s3Settings:CreateEndpoint' :: Maybe S3Settings
s3Settings = Maybe S3Settings
forall a. Maybe a
Prelude.Nothing,
        $sel:kinesisSettings:CreateEndpoint' :: Maybe KinesisSettings
kinesisSettings = Maybe KinesisSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:dynamoDbSettings:CreateEndpoint' :: Maybe DynamoDbSettings
dynamoDbSettings = Maybe DynamoDbSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceIdentifier:CreateEndpoint' :: Maybe Text
resourceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEndpoint' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateEndpoint' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:endpointIdentifier:CreateEndpoint' :: Text
endpointIdentifier = Text
pEndpointIdentifier_,
        $sel:endpointType:CreateEndpoint' :: ReplicationEndpointTypeValue
endpointType = ReplicationEndpointTypeValue
pEndpointType_,
        $sel:engineName:CreateEndpoint' :: Text
engineName = Text
pEngineName_
      }

-- | The settings in JSON format for the DMS transfer type of source
-- endpoint.
--
-- Possible settings include the following:
--
-- -   @ServiceAccessRoleArn@ - The Amazon Resource Name (ARN) used by the
--     service access IAM role. The role must allow the @iam:PassRole@
--     action.
--
-- -   @BucketName@ - The name of the S3 bucket to use.
--
-- Shorthand syntax for these settings is as follows:
-- @ServiceAccessRoleArn=string,BucketName=string@
--
-- JSON syntax for these settings is as follows:
-- @{ \"ServiceAccessRoleArn\": \"string\", \"BucketName\": \"string\", } @
createEndpoint_dmsTransferSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe DmsTransferSettings)
createEndpoint_dmsTransferSettings :: (Maybe DmsTransferSettings -> f (Maybe DmsTransferSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_dmsTransferSettings = (CreateEndpoint -> Maybe DmsTransferSettings)
-> (CreateEndpoint -> Maybe DmsTransferSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe DmsTransferSettings)
     (Maybe DmsTransferSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe DmsTransferSettings
dmsTransferSettings :: Maybe DmsTransferSettings
$sel:dmsTransferSettings:CreateEndpoint' :: CreateEndpoint -> Maybe DmsTransferSettings
dmsTransferSettings} -> Maybe DmsTransferSettings
dmsTransferSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe DmsTransferSettings
a -> CreateEndpoint
s {$sel:dmsTransferSettings:CreateEndpoint' :: Maybe DmsTransferSettings
dmsTransferSettings = Maybe DmsTransferSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the source and target MySQL endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html#CHAP_Source.MySQL.ConnectionAttrib Extra connection attributes when using MySQL as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html#CHAP_Target.MySQL.ConnectionAttrib Extra connection attributes when using a MySQL-compatible database as a target for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_mySQLSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe MySQLSettings)
createEndpoint_mySQLSettings :: (Maybe MySQLSettings -> f (Maybe MySQLSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_mySQLSettings = (CreateEndpoint -> Maybe MySQLSettings)
-> (CreateEndpoint -> Maybe MySQLSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe MySQLSettings)
     (Maybe MySQLSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe MySQLSettings
mySQLSettings :: Maybe MySQLSettings
$sel:mySQLSettings:CreateEndpoint' :: CreateEndpoint -> Maybe MySQLSettings
mySQLSettings} -> Maybe MySQLSettings
mySQLSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe MySQLSettings
a -> CreateEndpoint
s {$sel:mySQLSettings:CreateEndpoint' :: Maybe MySQLSettings
mySQLSettings = Maybe MySQLSettings
a} :: CreateEndpoint)

-- | The name of the server where the endpoint database resides.
createEndpoint_serverName :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_serverName :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_serverName = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
serverName :: Maybe Text
$sel:serverName:CreateEndpoint' :: CreateEndpoint -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:serverName:CreateEndpoint' :: Maybe Text
serverName = Maybe Text
a} :: CreateEndpoint)

-- | Settings in JSON format for the source and target Microsoft SQL Server
-- endpoint. For information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SQLServer.html#CHAP_Source.SQLServer.ConnectionAttrib Extra connection attributes when using SQL Server as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SQLServer.html#CHAP_Target.SQLServer.ConnectionAttrib Extra connection attributes when using SQL Server as a target for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_microsoftSQLServerSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe MicrosoftSQLServerSettings)
createEndpoint_microsoftSQLServerSettings :: (Maybe MicrosoftSQLServerSettings
 -> f (Maybe MicrosoftSQLServerSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_microsoftSQLServerSettings = (CreateEndpoint -> Maybe MicrosoftSQLServerSettings)
-> (CreateEndpoint
    -> Maybe MicrosoftSQLServerSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe MicrosoftSQLServerSettings)
     (Maybe MicrosoftSQLServerSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings :: Maybe MicrosoftSQLServerSettings
$sel:microsoftSQLServerSettings:CreateEndpoint' :: CreateEndpoint -> Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings} -> Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe MicrosoftSQLServerSettings
a -> CreateEndpoint
s {$sel:microsoftSQLServerSettings:CreateEndpoint' :: Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings = Maybe MicrosoftSQLServerSettings
a} :: CreateEndpoint)

-- | The Amazon Resource Name (ARN) for the certificate.
createEndpoint_certificateArn :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_certificateArn :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_certificateArn = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:CreateEndpoint' :: CreateEndpoint -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:certificateArn:CreateEndpoint' :: Maybe Text
certificateArn = Maybe Text
a} :: CreateEndpoint)

-- | The Amazon Resource Name (ARN) for the service access role that you want
-- to use to create the endpoint. The role must allow the @iam:PassRole@
-- action.
createEndpoint_serviceAccessRoleArn :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_serviceAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_serviceAccessRoleArn = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
serviceAccessRoleArn :: Maybe Text
$sel:serviceAccessRoleArn:CreateEndpoint' :: CreateEndpoint -> Maybe Text
serviceAccessRoleArn} -> Maybe Text
serviceAccessRoleArn) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:serviceAccessRoleArn:CreateEndpoint' :: Maybe Text
serviceAccessRoleArn = Maybe Text
a} :: CreateEndpoint)

-- | Undocumented member.
createEndpoint_docDbSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe DocDbSettings)
createEndpoint_docDbSettings :: (Maybe DocDbSettings -> f (Maybe DocDbSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_docDbSettings = (CreateEndpoint -> Maybe DocDbSettings)
-> (CreateEndpoint -> Maybe DocDbSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe DocDbSettings)
     (Maybe DocDbSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe DocDbSettings
docDbSettings :: Maybe DocDbSettings
$sel:docDbSettings:CreateEndpoint' :: CreateEndpoint -> Maybe DocDbSettings
docDbSettings} -> Maybe DocDbSettings
docDbSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe DocDbSettings
a -> CreateEndpoint
s {$sel:docDbSettings:CreateEndpoint' :: Maybe DocDbSettings
docDbSettings = Maybe DocDbSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the source and target PostgreSQL endpoint.
-- For information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.ConnectionAttrib Extra connection attributes when using PostgreSQL as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.ConnectionAttrib Extra connection attributes when using PostgreSQL as a target for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_postgreSQLSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe PostgreSQLSettings)
createEndpoint_postgreSQLSettings :: (Maybe PostgreSQLSettings -> f (Maybe PostgreSQLSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_postgreSQLSettings = (CreateEndpoint -> Maybe PostgreSQLSettings)
-> (CreateEndpoint -> Maybe PostgreSQLSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe PostgreSQLSettings)
     (Maybe PostgreSQLSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe PostgreSQLSettings
postgreSQLSettings :: Maybe PostgreSQLSettings
$sel:postgreSQLSettings:CreateEndpoint' :: CreateEndpoint -> Maybe PostgreSQLSettings
postgreSQLSettings} -> Maybe PostgreSQLSettings
postgreSQLSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe PostgreSQLSettings
a -> CreateEndpoint
s {$sel:postgreSQLSettings:CreateEndpoint' :: Maybe PostgreSQLSettings
postgreSQLSettings = Maybe PostgreSQLSettings
a} :: CreateEndpoint)

-- | Additional attributes associated with the connection. Each attribute is
-- specified as a name-value pair associated by an equal sign (=). Multiple
-- attributes are separated by a semicolon (;) with no additional white
-- space. For information on the attributes available for connecting your
-- source or target endpoint, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html Working with DMS Endpoints>
-- in the /Database Migration Service User Guide./
createEndpoint_extraConnectionAttributes :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_extraConnectionAttributes :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_extraConnectionAttributes = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
extraConnectionAttributes :: Maybe Text
$sel:extraConnectionAttributes:CreateEndpoint' :: CreateEndpoint -> Maybe Text
extraConnectionAttributes} -> Maybe Text
extraConnectionAttributes) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:extraConnectionAttributes:CreateEndpoint' :: Maybe Text
extraConnectionAttributes = Maybe Text
a} :: CreateEndpoint)

-- | Settings in JSON format for the target Apache Kafka endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping Using object mapping to migrate data to a Kafka topic>
-- in the /Database Migration Service User Guide./
createEndpoint_kafkaSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe KafkaSettings)
createEndpoint_kafkaSettings :: (Maybe KafkaSettings -> f (Maybe KafkaSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_kafkaSettings = (CreateEndpoint -> Maybe KafkaSettings)
-> (CreateEndpoint -> Maybe KafkaSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe KafkaSettings)
     (Maybe KafkaSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe KafkaSettings
kafkaSettings :: Maybe KafkaSettings
$sel:kafkaSettings:CreateEndpoint' :: CreateEndpoint -> Maybe KafkaSettings
kafkaSettings} -> Maybe KafkaSettings
kafkaSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe KafkaSettings
a -> CreateEndpoint
s {$sel:kafkaSettings:CreateEndpoint' :: Maybe KafkaSettings
kafkaSettings = Maybe KafkaSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the source and target Oracle endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.ConnectionAttrib Extra connection attributes when using Oracle as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html#CHAP_Target.Oracle.ConnectionAttrib Extra connection attributes when using Oracle as a target for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_oracleSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe OracleSettings)
createEndpoint_oracleSettings :: (Maybe OracleSettings -> f (Maybe OracleSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_oracleSettings = (CreateEndpoint -> Maybe OracleSettings)
-> (CreateEndpoint -> Maybe OracleSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe OracleSettings)
     (Maybe OracleSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe OracleSettings
oracleSettings :: Maybe OracleSettings
$sel:oracleSettings:CreateEndpoint' :: CreateEndpoint -> Maybe OracleSettings
oracleSettings} -> Maybe OracleSettings
oracleSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe OracleSettings
a -> CreateEndpoint
s {$sel:oracleSettings:CreateEndpoint' :: Maybe OracleSettings
oracleSettings = Maybe OracleSettings
a} :: CreateEndpoint)

-- | Undocumented member.
createEndpoint_redshiftSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe RedshiftSettings)
createEndpoint_redshiftSettings :: (Maybe RedshiftSettings -> f (Maybe RedshiftSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_redshiftSettings = (CreateEndpoint -> Maybe RedshiftSettings)
-> (CreateEndpoint -> Maybe RedshiftSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe RedshiftSettings)
     (Maybe RedshiftSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe RedshiftSettings
redshiftSettings :: Maybe RedshiftSettings
$sel:redshiftSettings:CreateEndpoint' :: CreateEndpoint -> Maybe RedshiftSettings
redshiftSettings} -> Maybe RedshiftSettings
redshiftSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe RedshiftSettings
a -> CreateEndpoint
s {$sel:redshiftSettings:CreateEndpoint' :: Maybe RedshiftSettings
redshiftSettings = Maybe RedshiftSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the target Elasticsearch endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration Extra Connection Attributes When Using Elasticsearch as a Target for DMS>
-- in the /Database Migration Service User Guide/.
createEndpoint_elasticsearchSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe ElasticsearchSettings)
createEndpoint_elasticsearchSettings :: (Maybe ElasticsearchSettings -> f (Maybe ElasticsearchSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_elasticsearchSettings = (CreateEndpoint -> Maybe ElasticsearchSettings)
-> (CreateEndpoint
    -> Maybe ElasticsearchSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe ElasticsearchSettings)
     (Maybe ElasticsearchSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe ElasticsearchSettings
elasticsearchSettings :: Maybe ElasticsearchSettings
$sel:elasticsearchSettings:CreateEndpoint' :: CreateEndpoint -> Maybe ElasticsearchSettings
elasticsearchSettings} -> Maybe ElasticsearchSettings
elasticsearchSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe ElasticsearchSettings
a -> CreateEndpoint
s {$sel:elasticsearchSettings:CreateEndpoint' :: Maybe ElasticsearchSettings
elasticsearchSettings = Maybe ElasticsearchSettings
a} :: CreateEndpoint)

-- | The user name to be used to log in to the endpoint database.
createEndpoint_username :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_username :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_username = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
username :: Maybe Text
$sel:username:CreateEndpoint' :: CreateEndpoint -> Maybe Text
username} -> Maybe Text
username) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:username:CreateEndpoint' :: Maybe Text
username = Maybe Text
a} :: CreateEndpoint)

-- | The external table definition.
createEndpoint_externalTableDefinition :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_externalTableDefinition :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_externalTableDefinition = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
externalTableDefinition :: Maybe Text
$sel:externalTableDefinition:CreateEndpoint' :: CreateEndpoint -> Maybe Text
externalTableDefinition} -> Maybe Text
externalTableDefinition) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:externalTableDefinition:CreateEndpoint' :: Maybe Text
externalTableDefinition = Maybe Text
a} :: CreateEndpoint)

-- | Settings in JSON format for the target Redis endpoint.
createEndpoint_redisSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe RedisSettings)
createEndpoint_redisSettings :: (Maybe RedisSettings -> f (Maybe RedisSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_redisSettings = (CreateEndpoint -> Maybe RedisSettings)
-> (CreateEndpoint -> Maybe RedisSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe RedisSettings)
     (Maybe RedisSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe RedisSettings
redisSettings :: Maybe RedisSettings
$sel:redisSettings:CreateEndpoint' :: CreateEndpoint -> Maybe RedisSettings
redisSettings} -> Maybe RedisSettings
redisSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe RedisSettings
a -> CreateEndpoint
s {$sel:redisSettings:CreateEndpoint' :: Maybe RedisSettings
redisSettings = Maybe RedisSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the target Amazon Neptune endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings Specifying graph-mapping rules using Gremlin and R2RML for Amazon Neptune as a target>
-- in the /Database Migration Service User Guide./
createEndpoint_neptuneSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe NeptuneSettings)
createEndpoint_neptuneSettings :: (Maybe NeptuneSettings -> f (Maybe NeptuneSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_neptuneSettings = (CreateEndpoint -> Maybe NeptuneSettings)
-> (CreateEndpoint -> Maybe NeptuneSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe NeptuneSettings)
     (Maybe NeptuneSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe NeptuneSettings
neptuneSettings :: Maybe NeptuneSettings
$sel:neptuneSettings:CreateEndpoint' :: CreateEndpoint -> Maybe NeptuneSettings
neptuneSettings} -> Maybe NeptuneSettings
neptuneSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe NeptuneSettings
a -> CreateEndpoint
s {$sel:neptuneSettings:CreateEndpoint' :: Maybe NeptuneSettings
neptuneSettings = Maybe NeptuneSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the source IBM Db2 LUW endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DB2.html#CHAP_Source.DB2.ConnectionAttrib Extra connection attributes when using Db2 LUW as a source for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_iBMDb2Settings :: Lens.Lens' CreateEndpoint (Prelude.Maybe IBMDb2Settings)
createEndpoint_iBMDb2Settings :: (Maybe IBMDb2Settings -> f (Maybe IBMDb2Settings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_iBMDb2Settings = (CreateEndpoint -> Maybe IBMDb2Settings)
-> (CreateEndpoint -> Maybe IBMDb2Settings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe IBMDb2Settings)
     (Maybe IBMDb2Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe IBMDb2Settings
iBMDb2Settings :: Maybe IBMDb2Settings
$sel:iBMDb2Settings:CreateEndpoint' :: CreateEndpoint -> Maybe IBMDb2Settings
iBMDb2Settings} -> Maybe IBMDb2Settings
iBMDb2Settings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe IBMDb2Settings
a -> CreateEndpoint
s {$sel:iBMDb2Settings:CreateEndpoint' :: Maybe IBMDb2Settings
iBMDb2Settings = Maybe IBMDb2Settings
a} :: CreateEndpoint)

-- | An KMS key identifier that is used to encrypt the connection parameters
-- for the endpoint.
--
-- If you don\'t specify a value for the @KmsKeyId@ parameter, then DMS
-- uses your default encryption key.
--
-- KMS creates the default encryption key for your Amazon Web Services
-- account. Your Amazon Web Services account has a different default
-- encryption key for each Amazon Web Services Region.
createEndpoint_kmsKeyId :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_kmsKeyId = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateEndpoint' :: CreateEndpoint -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:kmsKeyId:CreateEndpoint' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateEndpoint)

-- | Settings in JSON format for the source MongoDB endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html#CHAP_Source.MongoDB.Configuration Endpoint configuration settings when using MongoDB as a source for Database Migration Service>
-- in the /Database Migration Service User Guide./
createEndpoint_mongoDbSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe MongoDbSettings)
createEndpoint_mongoDbSettings :: (Maybe MongoDbSettings -> f (Maybe MongoDbSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_mongoDbSettings = (CreateEndpoint -> Maybe MongoDbSettings)
-> (CreateEndpoint -> Maybe MongoDbSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe MongoDbSettings)
     (Maybe MongoDbSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe MongoDbSettings
mongoDbSettings :: Maybe MongoDbSettings
$sel:mongoDbSettings:CreateEndpoint' :: CreateEndpoint -> Maybe MongoDbSettings
mongoDbSettings} -> Maybe MongoDbSettings
mongoDbSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe MongoDbSettings
a -> CreateEndpoint
s {$sel:mongoDbSettings:CreateEndpoint' :: Maybe MongoDbSettings
mongoDbSettings = Maybe MongoDbSettings
a} :: CreateEndpoint)

-- | The Secure Sockets Layer (SSL) mode to use for the SSL connection. The
-- default is @none@
createEndpoint_sslMode :: Lens.Lens' CreateEndpoint (Prelude.Maybe DmsSslModeValue)
createEndpoint_sslMode :: (Maybe DmsSslModeValue -> f (Maybe DmsSslModeValue))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_sslMode = (CreateEndpoint -> Maybe DmsSslModeValue)
-> (CreateEndpoint -> Maybe DmsSslModeValue -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe DmsSslModeValue)
     (Maybe DmsSslModeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe DmsSslModeValue
sslMode :: Maybe DmsSslModeValue
$sel:sslMode:CreateEndpoint' :: CreateEndpoint -> Maybe DmsSslModeValue
sslMode} -> Maybe DmsSslModeValue
sslMode) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe DmsSslModeValue
a -> CreateEndpoint
s {$sel:sslMode:CreateEndpoint' :: Maybe DmsSslModeValue
sslMode = Maybe DmsSslModeValue
a} :: CreateEndpoint)

-- | The password to be used to log in to the endpoint database.
createEndpoint_password :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_password :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_password = (CreateEndpoint -> Maybe (Sensitive Text))
-> (CreateEndpoint -> Maybe (Sensitive Text) -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:CreateEndpoint' :: CreateEndpoint -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe (Sensitive Text)
a -> CreateEndpoint
s {$sel:password:CreateEndpoint' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: CreateEndpoint) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateEndpoint -> f CreateEndpoint)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateEndpoint
-> f CreateEndpoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Settings in JSON format for the source and target SAP ASE endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SAP.html#CHAP_Source.SAP.ConnectionAttrib Extra connection attributes when using SAP ASE as a source for DMS>
-- and
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SAP.html#CHAP_Target.SAP.ConnectionAttrib Extra connection attributes when using SAP ASE as a target for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_sybaseSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe SybaseSettings)
createEndpoint_sybaseSettings :: (Maybe SybaseSettings -> f (Maybe SybaseSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_sybaseSettings = (CreateEndpoint -> Maybe SybaseSettings)
-> (CreateEndpoint -> Maybe SybaseSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe SybaseSettings)
     (Maybe SybaseSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe SybaseSettings
sybaseSettings :: Maybe SybaseSettings
$sel:sybaseSettings:CreateEndpoint' :: CreateEndpoint -> Maybe SybaseSettings
sybaseSettings} -> Maybe SybaseSettings
sybaseSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe SybaseSettings
a -> CreateEndpoint
s {$sel:sybaseSettings:CreateEndpoint' :: Maybe SybaseSettings
sybaseSettings = Maybe SybaseSettings
a} :: CreateEndpoint)

-- | The name of the endpoint database. For a MySQL source or target
-- endpoint, do not specify DatabaseName.
createEndpoint_databaseName :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_databaseName :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_databaseName = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:CreateEndpoint' :: CreateEndpoint -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:databaseName:CreateEndpoint' :: Maybe Text
databaseName = Maybe Text
a} :: CreateEndpoint)

-- | Settings in JSON format for the target Amazon S3 endpoint. For more
-- information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring Extra Connection Attributes When Using Amazon S3 as a Target for DMS>
-- in the /Database Migration Service User Guide./
createEndpoint_s3Settings :: Lens.Lens' CreateEndpoint (Prelude.Maybe S3Settings)
createEndpoint_s3Settings :: (Maybe S3Settings -> f (Maybe S3Settings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_s3Settings = (CreateEndpoint -> Maybe S3Settings)
-> (CreateEndpoint -> Maybe S3Settings -> CreateEndpoint)
-> Lens
     CreateEndpoint CreateEndpoint (Maybe S3Settings) (Maybe S3Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe S3Settings
s3Settings :: Maybe S3Settings
$sel:s3Settings:CreateEndpoint' :: CreateEndpoint -> Maybe S3Settings
s3Settings} -> Maybe S3Settings
s3Settings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe S3Settings
a -> CreateEndpoint
s {$sel:s3Settings:CreateEndpoint' :: Maybe S3Settings
s3Settings = Maybe S3Settings
a} :: CreateEndpoint)

-- | Settings in JSON format for the target endpoint for Amazon Kinesis Data
-- Streams. For more information about the available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping Using object mapping to migrate data to a Kinesis data stream>
-- in the /Database Migration Service User Guide./
createEndpoint_kinesisSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe KinesisSettings)
createEndpoint_kinesisSettings :: (Maybe KinesisSettings -> f (Maybe KinesisSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_kinesisSettings = (CreateEndpoint -> Maybe KinesisSettings)
-> (CreateEndpoint -> Maybe KinesisSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe KinesisSettings)
     (Maybe KinesisSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe KinesisSettings
kinesisSettings :: Maybe KinesisSettings
$sel:kinesisSettings:CreateEndpoint' :: CreateEndpoint -> Maybe KinesisSettings
kinesisSettings} -> Maybe KinesisSettings
kinesisSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe KinesisSettings
a -> CreateEndpoint
s {$sel:kinesisSettings:CreateEndpoint' :: Maybe KinesisSettings
kinesisSettings = Maybe KinesisSettings
a} :: CreateEndpoint)

-- | Settings in JSON format for the target Amazon DynamoDB endpoint. For
-- information about other available settings, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html#CHAP_Target.DynamoDB.ObjectMapping Using Object Mapping to Migrate Data to DynamoDB>
-- in the /Database Migration Service User Guide./
createEndpoint_dynamoDbSettings :: Lens.Lens' CreateEndpoint (Prelude.Maybe DynamoDbSettings)
createEndpoint_dynamoDbSettings :: (Maybe DynamoDbSettings -> f (Maybe DynamoDbSettings))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_dynamoDbSettings = (CreateEndpoint -> Maybe DynamoDbSettings)
-> (CreateEndpoint -> Maybe DynamoDbSettings -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     (Maybe DynamoDbSettings)
     (Maybe DynamoDbSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe DynamoDbSettings
dynamoDbSettings :: Maybe DynamoDbSettings
$sel:dynamoDbSettings:CreateEndpoint' :: CreateEndpoint -> Maybe DynamoDbSettings
dynamoDbSettings} -> Maybe DynamoDbSettings
dynamoDbSettings) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe DynamoDbSettings
a -> CreateEndpoint
s {$sel:dynamoDbSettings:CreateEndpoint' :: Maybe DynamoDbSettings
dynamoDbSettings = Maybe DynamoDbSettings
a} :: CreateEndpoint)

-- | A friendly name for the resource identifier at the end of the
-- @EndpointArn@ response parameter that is returned in the created
-- @Endpoint@ object. The value for this parameter can have up to 31
-- characters. It can contain only ASCII letters, digits, and hyphen
-- (\'-\'). Also, it can\'t end with a hyphen or contain two consecutive
-- hyphens, and can only begin with a letter, such as @Example-App-ARN1@.
-- For example, this value might result in the @EndpointArn@ value
-- @arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1@. If you don\'t
-- specify a @ResourceIdentifier@ value, DMS generates a default identifier
-- value for the end of @EndpointArn@.
createEndpoint_resourceIdentifier :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Text)
createEndpoint_resourceIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_resourceIdentifier = (CreateEndpoint -> Maybe Text)
-> (CreateEndpoint -> Maybe Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Text
resourceIdentifier :: Maybe Text
$sel:resourceIdentifier:CreateEndpoint' :: CreateEndpoint -> Maybe Text
resourceIdentifier} -> Maybe Text
resourceIdentifier) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Text
a -> CreateEndpoint
s {$sel:resourceIdentifier:CreateEndpoint' :: Maybe Text
resourceIdentifier = Maybe Text
a} :: CreateEndpoint)

-- | One or more tags to be assigned to the endpoint.
createEndpoint_tags :: Lens.Lens' CreateEndpoint (Prelude.Maybe [Tag])
createEndpoint_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_tags = (CreateEndpoint -> Maybe [Tag])
-> (CreateEndpoint -> Maybe [Tag] -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateEndpoint' :: CreateEndpoint -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe [Tag]
a -> CreateEndpoint
s {$sel:tags:CreateEndpoint' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateEndpoint) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateEndpoint -> f CreateEndpoint)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEndpoint
-> f CreateEndpoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The port used by the endpoint database.
createEndpoint_port :: Lens.Lens' CreateEndpoint (Prelude.Maybe Prelude.Int)
createEndpoint_port :: (Maybe Int -> f (Maybe Int)) -> CreateEndpoint -> f CreateEndpoint
createEndpoint_port = (CreateEndpoint -> Maybe Int)
-> (CreateEndpoint -> Maybe Int -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Maybe Int
port :: Maybe Int
$sel:port:CreateEndpoint' :: CreateEndpoint -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateEndpoint
s@CreateEndpoint' {} Maybe Int
a -> CreateEndpoint
s {$sel:port:CreateEndpoint' :: Maybe Int
port = Maybe Int
a} :: CreateEndpoint)

-- | The database endpoint identifier. Identifiers must begin with a letter
-- and must contain only ASCII letters, digits, and hyphens. They can\'t
-- end with a hyphen, or contain two consecutive hyphens.
createEndpoint_endpointIdentifier :: Lens.Lens' CreateEndpoint Prelude.Text
createEndpoint_endpointIdentifier :: (Text -> f Text) -> CreateEndpoint -> f CreateEndpoint
createEndpoint_endpointIdentifier = (CreateEndpoint -> Text)
-> (CreateEndpoint -> Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Text
endpointIdentifier :: Text
$sel:endpointIdentifier:CreateEndpoint' :: CreateEndpoint -> Text
endpointIdentifier} -> Text
endpointIdentifier) (\s :: CreateEndpoint
s@CreateEndpoint' {} Text
a -> CreateEndpoint
s {$sel:endpointIdentifier:CreateEndpoint' :: Text
endpointIdentifier = Text
a} :: CreateEndpoint)

-- | The type of endpoint. Valid values are @source@ and @target@.
createEndpoint_endpointType :: Lens.Lens' CreateEndpoint ReplicationEndpointTypeValue
createEndpoint_endpointType :: (ReplicationEndpointTypeValue -> f ReplicationEndpointTypeValue)
-> CreateEndpoint -> f CreateEndpoint
createEndpoint_endpointType = (CreateEndpoint -> ReplicationEndpointTypeValue)
-> (CreateEndpoint
    -> ReplicationEndpointTypeValue -> CreateEndpoint)
-> Lens
     CreateEndpoint
     CreateEndpoint
     ReplicationEndpointTypeValue
     ReplicationEndpointTypeValue
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {ReplicationEndpointTypeValue
endpointType :: ReplicationEndpointTypeValue
$sel:endpointType:CreateEndpoint' :: CreateEndpoint -> ReplicationEndpointTypeValue
endpointType} -> ReplicationEndpointTypeValue
endpointType) (\s :: CreateEndpoint
s@CreateEndpoint' {} ReplicationEndpointTypeValue
a -> CreateEndpoint
s {$sel:endpointType:CreateEndpoint' :: ReplicationEndpointTypeValue
endpointType = ReplicationEndpointTypeValue
a} :: CreateEndpoint)

-- | The type of engine for the endpoint. Valid values, depending on the
-- @EndpointType@ value, include @\"mysql\"@, @\"oracle\"@, @\"postgres\"@,
-- @\"mariadb\"@, @\"aurora\"@, @\"aurora-postgresql\"@, @\"redshift\"@,
-- @\"s3\"@, @\"db2\"@, @\"azuredb\"@, @\"sybase\"@, @\"dynamodb\"@,
-- @\"mongodb\"@, @\"kinesis\"@, @\"kafka\"@, @\"elasticsearch\"@,
-- @\"docdb\"@, @\"sqlserver\"@, and @\"neptune\"@.
createEndpoint_engineName :: Lens.Lens' CreateEndpoint Prelude.Text
createEndpoint_engineName :: (Text -> f Text) -> CreateEndpoint -> f CreateEndpoint
createEndpoint_engineName = (CreateEndpoint -> Text)
-> (CreateEndpoint -> Text -> CreateEndpoint)
-> Lens CreateEndpoint CreateEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpoint' {Text
engineName :: Text
$sel:engineName:CreateEndpoint' :: CreateEndpoint -> Text
engineName} -> Text
engineName) (\s :: CreateEndpoint
s@CreateEndpoint' {} Text
a -> CreateEndpoint
s {$sel:engineName:CreateEndpoint' :: Text
engineName = Text
a} :: CreateEndpoint)

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

instance Prelude.Hashable CreateEndpoint

instance Prelude.NFData CreateEndpoint

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

instance Core.ToJSON CreateEndpoint where
  toJSON :: CreateEndpoint -> Value
toJSON CreateEndpoint' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe DmsSslModeValue
Maybe DmsTransferSettings
Maybe DynamoDbSettings
Maybe ElasticsearchSettings
Maybe IBMDb2Settings
Maybe KinesisSettings
Maybe KafkaSettings
Maybe NeptuneSettings
Maybe MongoDbSettings
Maybe DocDbSettings
Maybe OracleSettings
Maybe PostgreSQLSettings
Maybe RedshiftSettings
Maybe S3Settings
Maybe MicrosoftSQLServerSettings
Maybe RedisSettings
Maybe SybaseSettings
Maybe MySQLSettings
Text
ReplicationEndpointTypeValue
engineName :: Text
endpointType :: ReplicationEndpointTypeValue
endpointIdentifier :: Text
port :: Maybe Int
tags :: Maybe [Tag]
resourceIdentifier :: Maybe Text
dynamoDbSettings :: Maybe DynamoDbSettings
kinesisSettings :: Maybe KinesisSettings
s3Settings :: Maybe S3Settings
databaseName :: Maybe Text
sybaseSettings :: Maybe SybaseSettings
password :: Maybe (Sensitive Text)
sslMode :: Maybe DmsSslModeValue
mongoDbSettings :: Maybe MongoDbSettings
kmsKeyId :: Maybe Text
iBMDb2Settings :: Maybe IBMDb2Settings
neptuneSettings :: Maybe NeptuneSettings
redisSettings :: Maybe RedisSettings
externalTableDefinition :: Maybe Text
username :: Maybe Text
elasticsearchSettings :: Maybe ElasticsearchSettings
redshiftSettings :: Maybe RedshiftSettings
oracleSettings :: Maybe OracleSettings
kafkaSettings :: Maybe KafkaSettings
extraConnectionAttributes :: Maybe Text
postgreSQLSettings :: Maybe PostgreSQLSettings
docDbSettings :: Maybe DocDbSettings
serviceAccessRoleArn :: Maybe Text
certificateArn :: Maybe Text
microsoftSQLServerSettings :: Maybe MicrosoftSQLServerSettings
serverName :: Maybe Text
mySQLSettings :: Maybe MySQLSettings
dmsTransferSettings :: Maybe DmsTransferSettings
$sel:engineName:CreateEndpoint' :: CreateEndpoint -> Text
$sel:endpointType:CreateEndpoint' :: CreateEndpoint -> ReplicationEndpointTypeValue
$sel:endpointIdentifier:CreateEndpoint' :: CreateEndpoint -> Text
$sel:port:CreateEndpoint' :: CreateEndpoint -> Maybe Int
$sel:tags:CreateEndpoint' :: CreateEndpoint -> Maybe [Tag]
$sel:resourceIdentifier:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:dynamoDbSettings:CreateEndpoint' :: CreateEndpoint -> Maybe DynamoDbSettings
$sel:kinesisSettings:CreateEndpoint' :: CreateEndpoint -> Maybe KinesisSettings
$sel:s3Settings:CreateEndpoint' :: CreateEndpoint -> Maybe S3Settings
$sel:databaseName:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:sybaseSettings:CreateEndpoint' :: CreateEndpoint -> Maybe SybaseSettings
$sel:password:CreateEndpoint' :: CreateEndpoint -> Maybe (Sensitive Text)
$sel:sslMode:CreateEndpoint' :: CreateEndpoint -> Maybe DmsSslModeValue
$sel:mongoDbSettings:CreateEndpoint' :: CreateEndpoint -> Maybe MongoDbSettings
$sel:kmsKeyId:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:iBMDb2Settings:CreateEndpoint' :: CreateEndpoint -> Maybe IBMDb2Settings
$sel:neptuneSettings:CreateEndpoint' :: CreateEndpoint -> Maybe NeptuneSettings
$sel:redisSettings:CreateEndpoint' :: CreateEndpoint -> Maybe RedisSettings
$sel:externalTableDefinition:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:username:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:elasticsearchSettings:CreateEndpoint' :: CreateEndpoint -> Maybe ElasticsearchSettings
$sel:redshiftSettings:CreateEndpoint' :: CreateEndpoint -> Maybe RedshiftSettings
$sel:oracleSettings:CreateEndpoint' :: CreateEndpoint -> Maybe OracleSettings
$sel:kafkaSettings:CreateEndpoint' :: CreateEndpoint -> Maybe KafkaSettings
$sel:extraConnectionAttributes:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:postgreSQLSettings:CreateEndpoint' :: CreateEndpoint -> Maybe PostgreSQLSettings
$sel:docDbSettings:CreateEndpoint' :: CreateEndpoint -> Maybe DocDbSettings
$sel:serviceAccessRoleArn:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:certificateArn:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:microsoftSQLServerSettings:CreateEndpoint' :: CreateEndpoint -> Maybe MicrosoftSQLServerSettings
$sel:serverName:CreateEndpoint' :: CreateEndpoint -> Maybe Text
$sel:mySQLSettings:CreateEndpoint' :: CreateEndpoint -> Maybe MySQLSettings
$sel:dmsTransferSettings:CreateEndpoint' :: CreateEndpoint -> Maybe DmsTransferSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DmsTransferSettings" Text -> DmsTransferSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DmsTransferSettings -> Pair)
-> Maybe DmsTransferSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DmsTransferSettings
dmsTransferSettings,
            (Text
"MySQLSettings" Text -> MySQLSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MySQLSettings -> Pair) -> Maybe MySQLSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MySQLSettings
mySQLSettings,
            (Text
"ServerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serverName,
            (Text
"MicrosoftSQLServerSettings" Text -> MicrosoftSQLServerSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MicrosoftSQLServerSettings -> Pair)
-> Maybe MicrosoftSQLServerSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MicrosoftSQLServerSettings
microsoftSQLServerSettings,
            (Text
"CertificateArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificateArn,
            (Text
"ServiceAccessRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceAccessRoleArn,
            (Text
"DocDbSettings" Text -> DocDbSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DocDbSettings -> Pair) -> Maybe DocDbSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocDbSettings
docDbSettings,
            (Text
"PostgreSQLSettings" Text -> PostgreSQLSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (PostgreSQLSettings -> Pair)
-> Maybe PostgreSQLSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PostgreSQLSettings
postgreSQLSettings,
            (Text
"ExtraConnectionAttributes" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
extraConnectionAttributes,
            (Text
"KafkaSettings" Text -> KafkaSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (KafkaSettings -> Pair) -> Maybe KafkaSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KafkaSettings
kafkaSettings,
            (Text
"OracleSettings" Text -> OracleSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OracleSettings -> Pair) -> Maybe OracleSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OracleSettings
oracleSettings,
            (Text
"RedshiftSettings" Text -> RedshiftSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RedshiftSettings -> Pair) -> Maybe RedshiftSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedshiftSettings
redshiftSettings,
            (Text
"ElasticsearchSettings" Text -> ElasticsearchSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ElasticsearchSettings -> Pair)
-> Maybe ElasticsearchSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchSettings
elasticsearchSettings,
            (Text
"Username" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
username,
            (Text
"ExternalTableDefinition" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
externalTableDefinition,
            (Text
"RedisSettings" Text -> RedisSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RedisSettings -> Pair) -> Maybe RedisSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedisSettings
redisSettings,
            (Text
"NeptuneSettings" Text -> NeptuneSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NeptuneSettings -> Pair) -> Maybe NeptuneSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NeptuneSettings
neptuneSettings,
            (Text
"IBMDb2Settings" Text -> IBMDb2Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (IBMDb2Settings -> Pair) -> Maybe IBMDb2Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IBMDb2Settings
iBMDb2Settings,
            (Text
"KmsKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKeyId,
            (Text
"MongoDbSettings" Text -> MongoDbSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MongoDbSettings -> Pair) -> Maybe MongoDbSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MongoDbSettings
mongoDbSettings,
            (Text
"SslMode" Text -> DmsSslModeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DmsSslModeValue -> Pair) -> Maybe DmsSslModeValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DmsSslModeValue
sslMode,
            (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
password,
            (Text
"SybaseSettings" Text -> SybaseSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SybaseSettings -> Pair) -> Maybe SybaseSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SybaseSettings
sybaseSettings,
            (Text
"DatabaseName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
databaseName,
            (Text
"S3Settings" Text -> S3Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (S3Settings -> Pair) -> Maybe S3Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3Settings
s3Settings,
            (Text
"KinesisSettings" Text -> KinesisSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (KinesisSettings -> Pair) -> Maybe KinesisSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisSettings
kinesisSettings,
            (Text
"DynamoDbSettings" Text -> DynamoDbSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DynamoDbSettings -> Pair) -> Maybe DynamoDbSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DynamoDbSettings
dynamoDbSettings,
            (Text
"ResourceIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceIdentifier,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Text
"Port" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
port,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"EndpointIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointIdentifier),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EndpointType" Text -> ReplicationEndpointTypeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ReplicationEndpointTypeValue
endpointType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EngineName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
engineName)
          ]
      )

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

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

-- |
--
-- /See:/ 'newCreateEndpointResponse' smart constructor.
data CreateEndpointResponse = CreateEndpointResponse'
  { -- | The endpoint that was created.
    CreateEndpointResponse -> Maybe Endpoint
endpoint :: Prelude.Maybe Endpoint,
    -- | The response's http status code.
    CreateEndpointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateEndpointResponse -> CreateEndpointResponse -> Bool
(CreateEndpointResponse -> CreateEndpointResponse -> Bool)
-> (CreateEndpointResponse -> CreateEndpointResponse -> Bool)
-> Eq CreateEndpointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEndpointResponse -> CreateEndpointResponse -> Bool
$c/= :: CreateEndpointResponse -> CreateEndpointResponse -> Bool
== :: CreateEndpointResponse -> CreateEndpointResponse -> Bool
$c== :: CreateEndpointResponse -> CreateEndpointResponse -> Bool
Prelude.Eq, Int -> CreateEndpointResponse -> ShowS
[CreateEndpointResponse] -> ShowS
CreateEndpointResponse -> String
(Int -> CreateEndpointResponse -> ShowS)
-> (CreateEndpointResponse -> String)
-> ([CreateEndpointResponse] -> ShowS)
-> Show CreateEndpointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEndpointResponse] -> ShowS
$cshowList :: [CreateEndpointResponse] -> ShowS
show :: CreateEndpointResponse -> String
$cshow :: CreateEndpointResponse -> String
showsPrec :: Int -> CreateEndpointResponse -> ShowS
$cshowsPrec :: Int -> CreateEndpointResponse -> ShowS
Prelude.Show, (forall x. CreateEndpointResponse -> Rep CreateEndpointResponse x)
-> (forall x.
    Rep CreateEndpointResponse x -> CreateEndpointResponse)
-> Generic CreateEndpointResponse
forall x. Rep CreateEndpointResponse x -> CreateEndpointResponse
forall x. CreateEndpointResponse -> Rep CreateEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEndpointResponse x -> CreateEndpointResponse
$cfrom :: forall x. CreateEndpointResponse -> Rep CreateEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateEndpointResponse' 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:
--
-- 'endpoint', 'createEndpointResponse_endpoint' - The endpoint that was created.
--
-- 'httpStatus', 'createEndpointResponse_httpStatus' - The response's http status code.
newCreateEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateEndpointResponse
newCreateEndpointResponse :: Int -> CreateEndpointResponse
newCreateEndpointResponse Int
pHttpStatus_ =
  CreateEndpointResponse' :: Maybe Endpoint -> Int -> CreateEndpointResponse
CreateEndpointResponse'
    { $sel:endpoint:CreateEndpointResponse' :: Maybe Endpoint
endpoint = Maybe Endpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The endpoint that was created.
createEndpointResponse_endpoint :: Lens.Lens' CreateEndpointResponse (Prelude.Maybe Endpoint)
createEndpointResponse_endpoint :: (Maybe Endpoint -> f (Maybe Endpoint))
-> CreateEndpointResponse -> f CreateEndpointResponse
createEndpointResponse_endpoint = (CreateEndpointResponse -> Maybe Endpoint)
-> (CreateEndpointResponse
    -> Maybe Endpoint -> CreateEndpointResponse)
-> Lens
     CreateEndpointResponse
     CreateEndpointResponse
     (Maybe Endpoint)
     (Maybe Endpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointResponse' {Maybe Endpoint
endpoint :: Maybe Endpoint
$sel:endpoint:CreateEndpointResponse' :: CreateEndpointResponse -> Maybe Endpoint
endpoint} -> Maybe Endpoint
endpoint) (\s :: CreateEndpointResponse
s@CreateEndpointResponse' {} Maybe Endpoint
a -> CreateEndpointResponse
s {$sel:endpoint:CreateEndpointResponse' :: Maybe Endpoint
endpoint = Maybe Endpoint
a} :: CreateEndpointResponse)

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

instance Prelude.NFData CreateEndpointResponse