{-# 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.ApiGatewayV2.CreateIntegration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Integration.
module Amazonka.ApiGatewayV2.CreateIntegration
  ( -- * Creating a Request
    CreateIntegration (..),
    newCreateIntegration,

    -- * Request Lenses
    createIntegration_connectionId,
    createIntegration_connectionType,
    createIntegration_contentHandlingStrategy,
    createIntegration_credentialsArn,
    createIntegration_description,
    createIntegration_integrationMethod,
    createIntegration_integrationSubtype,
    createIntegration_integrationUri,
    createIntegration_passthroughBehavior,
    createIntegration_payloadFormatVersion,
    createIntegration_requestParameters,
    createIntegration_requestTemplates,
    createIntegration_responseParameters,
    createIntegration_templateSelectionExpression,
    createIntegration_timeoutInMillis,
    createIntegration_tlsConfig,
    createIntegration_apiId,
    createIntegration_integrationType,

    -- * Destructuring the Response
    CreateIntegrationResponse' (..),
    newCreateIntegrationResponse',

    -- * Response Lenses
    createIntegrationResponse'_apiGatewayManaged,
    createIntegrationResponse'_connectionId,
    createIntegrationResponse'_connectionType,
    createIntegrationResponse'_contentHandlingStrategy,
    createIntegrationResponse'_credentialsArn,
    createIntegrationResponse'_description,
    createIntegrationResponse'_integrationId,
    createIntegrationResponse'_integrationMethod,
    createIntegrationResponse'_integrationResponseSelectionExpression,
    createIntegrationResponse'_integrationSubtype,
    createIntegrationResponse'_integrationType,
    createIntegrationResponse'_integrationUri,
    createIntegrationResponse'_passthroughBehavior,
    createIntegrationResponse'_payloadFormatVersion,
    createIntegrationResponse'_requestParameters,
    createIntegrationResponse'_requestTemplates,
    createIntegrationResponse'_responseParameters,
    createIntegrationResponse'_templateSelectionExpression,
    createIntegrationResponse'_timeoutInMillis,
    createIntegrationResponse'_tlsConfig,
    createIntegrationResponse'_httpStatus,
  )
where

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

-- | Creates a new Integration resource to represent an integration.
--
-- /See:/ 'newCreateIntegration' smart constructor.
data CreateIntegration = CreateIntegration'
  { -- | The ID of the VPC link for a private integration. Supported only for
    -- HTTP APIs.
    CreateIntegration -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
    -- | The type of the network connection to the integration endpoint. Specify
    -- INTERNET for connections through the public routable internet or
    -- VPC_LINK for private connections between API Gateway and resources in a
    -- VPC. The default value is INTERNET.
    CreateIntegration -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
    -- | Supported only for WebSocket APIs. Specifies how to handle response
    -- payload content type conversions. Supported values are CONVERT_TO_BINARY
    -- and CONVERT_TO_TEXT, with the following behaviors:
    --
    -- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
    -- string to the corresponding binary blob.
    --
    -- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
    -- Base64-encoded string.
    --
    -- If this property is not defined, the response payload will be passed
    -- through from the integration response to the route response or method
    -- response without modification.
    CreateIntegration -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
    -- | Specifies the credentials required for the integration, if any. For AWS
    -- integrations, three options are available. To specify an IAM Role for
    -- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
    -- require that the caller\'s identity be passed through from the request,
    -- specify the string arn:aws:iam::*:user\/*. To use resource-based
    -- permissions on supported AWS services, specify null.
    CreateIntegration -> Maybe Text
credentialsArn :: Prelude.Maybe Prelude.Text,
    -- | The description of the integration.
    CreateIntegration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Specifies the integration\'s HTTP method type.
    CreateIntegration -> Maybe Text
integrationMethod :: Prelude.Maybe Prelude.Text,
    -- | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
    -- service action to invoke. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
    CreateIntegration -> Maybe Text
integrationSubtype :: Prelude.Maybe Prelude.Text,
    -- | For a Lambda integration, specify the URI of a Lambda function.
    --
    -- For an HTTP integration, specify a fully-qualified URL.
    --
    -- For an HTTP API private integration, specify the ARN of an Application
    -- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
    -- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
    -- uses DiscoverInstances to identify resources. You can use query
    -- parameters to target specific resources. To learn more, see
    -- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
    -- For private integrations, all resources must be owned by the same AWS
    -- account.
    CreateIntegration -> Maybe Text
integrationUri :: Prelude.Maybe Prelude.Text,
    -- | Specifies the pass-through behavior for incoming requests based on the
    -- Content-Type header in the request, and the available mapping templates
    -- specified as the requestTemplates property on the Integration resource.
    -- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
    -- NEVER. Supported only for WebSocket APIs.
    --
    -- WHEN_NO_MATCH passes the request body for unmapped content types through
    -- to the integration backend without transformation.
    --
    -- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
    -- Type response.
    --
    -- WHEN_NO_TEMPLATES allows pass-through when the integration has no
    -- content types mapped to templates. However, if there is at least one
    -- content type defined, unmapped content types will be rejected with the
    -- same HTTP 415 Unsupported Media Type response.
    CreateIntegration -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    CreateIntegration -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | For WebSocket APIs, a key-value map specifying request parameters that
    -- are passed from the method request to the backend. The key is an
    -- integration request parameter name and the associated value is a method
    -- request parameter value or static value that must be enclosed within
    -- single quotes and pre-encoded as required by the backend. The method
    -- request parameter value must match the pattern of
    -- method.request.{location}.{name} , where {location} is querystring,
    -- path, or header; and {name} must be a valid and unique method request
    -- parameter name.
    --
    -- For HTTP API integrations with a specified integrationSubtype, request
    -- parameters are a key-value map specifying parameters that are passed to
    -- AWS_PROXY integrations. You can provide static values, or map request
    -- data, stage variables, or context variables that are evaluated at
    -- runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
    --
    -- For HTTP API integrations without a specified integrationSubtype request
    -- parameters are a key-value map specifying how to transform HTTP requests
    -- before sending them to the backend. The key should follow the pattern
    -- \<action>:\<header|querystring|path>.\<location> where action can be
    -- append, overwrite or remove. For values, you can provide static values,
    -- or map request data, stage variables, or context variables that are
    -- evaluated at runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
    CreateIntegration -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Represents a map of Velocity templates that are applied on the request
    -- payload based on the value of the Content-Type header sent by the
    -- client. The content type value is the key in this map, and the template
    -- (as a String) is the value. Supported only for WebSocket APIs.
    CreateIntegration -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Supported only for HTTP APIs. You use response parameters to transform
    -- the HTTP response from a backend integration before returning the
    -- response to clients. Specify a key-value map from a selection key to
    -- response parameters. The selection key must be a valid HTTP status code
    -- within the range of 200-599. Response parameters are a key-value map.
    -- The key must match pattern \<action>:\<header>.\<location> or
    -- overwrite.statuscode. The action can be append, overwrite or remove. The
    -- value can be a static value, or map to response data, stage variables,
    -- or context variables that are evaluated at runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
    CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The template selection expression for the integration.
    CreateIntegration -> Maybe Text
templateSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
    -- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
    -- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
    CreateIntegration -> Maybe Natural
timeoutInMillis :: Prelude.Maybe Prelude.Natural,
    -- | The TLS configuration for a private integration. If you specify a TLS
    -- configuration, private integration traffic uses the HTTPS protocol.
    -- Supported only for HTTP APIs.
    CreateIntegration -> Maybe TlsConfigInput
tlsConfig :: Prelude.Maybe TlsConfigInput,
    -- | The API identifier.
    CreateIntegration -> Text
apiId :: Prelude.Text,
    -- | The integration type of an integration. One of the following:
    --
    -- AWS: for integrating the route or method request with an AWS service
    -- action, including the Lambda function-invoking action. With the Lambda
    -- function-invoking action, this is referred to as the Lambda custom
    -- integration. With any other AWS service action, this is known as AWS
    -- integration. Supported only for WebSocket APIs.
    --
    -- AWS_PROXY: for integrating the route or method request with a Lambda
    -- function or other AWS service action. This integration is also referred
    -- to as a Lambda proxy integration.
    --
    -- HTTP: for integrating the route or method request with an HTTP endpoint.
    -- This integration is also referred to as the HTTP custom integration.
    -- Supported only for WebSocket APIs.
    --
    -- HTTP_PROXY: for integrating the route or method request with an HTTP
    -- endpoint, with the client request passed through as-is. This is also
    -- referred to as HTTP proxy integration. For HTTP API private
    -- integrations, use an HTTP_PROXY integration.
    --
    -- MOCK: for integrating the route or method request with API Gateway as a
    -- \"loopback\" endpoint without invoking any backend. Supported only for
    -- WebSocket APIs.
    CreateIntegration -> IntegrationType
integrationType :: IntegrationType
  }
  deriving (CreateIntegration -> CreateIntegration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntegration -> CreateIntegration -> Bool
$c/= :: CreateIntegration -> CreateIntegration -> Bool
== :: CreateIntegration -> CreateIntegration -> Bool
$c== :: CreateIntegration -> CreateIntegration -> Bool
Prelude.Eq, ReadPrec [CreateIntegration]
ReadPrec CreateIntegration
Int -> ReadS CreateIntegration
ReadS [CreateIntegration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntegration]
$creadListPrec :: ReadPrec [CreateIntegration]
readPrec :: ReadPrec CreateIntegration
$creadPrec :: ReadPrec CreateIntegration
readList :: ReadS [CreateIntegration]
$creadList :: ReadS [CreateIntegration]
readsPrec :: Int -> ReadS CreateIntegration
$creadsPrec :: Int -> ReadS CreateIntegration
Prelude.Read, Int -> CreateIntegration -> ShowS
[CreateIntegration] -> ShowS
CreateIntegration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntegration] -> ShowS
$cshowList :: [CreateIntegration] -> ShowS
show :: CreateIntegration -> String
$cshow :: CreateIntegration -> String
showsPrec :: Int -> CreateIntegration -> ShowS
$cshowsPrec :: Int -> CreateIntegration -> ShowS
Prelude.Show, forall x. Rep CreateIntegration x -> CreateIntegration
forall x. CreateIntegration -> Rep CreateIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIntegration x -> CreateIntegration
$cfrom :: forall x. CreateIntegration -> Rep CreateIntegration x
Prelude.Generic)

-- |
-- Create a value of 'CreateIntegration' 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:
--
-- 'connectionId', 'createIntegration_connectionId' - The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
--
-- 'connectionType', 'createIntegration_connectionType' - The type of the network connection to the integration endpoint. Specify
-- INTERNET for connections through the public routable internet or
-- VPC_LINK for private connections between API Gateway and resources in a
-- VPC. The default value is INTERNET.
--
-- 'contentHandlingStrategy', 'createIntegration_contentHandlingStrategy' - Supported only for WebSocket APIs. Specifies how to handle response
-- payload content type conversions. Supported values are CONVERT_TO_BINARY
-- and CONVERT_TO_TEXT, with the following behaviors:
--
-- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
-- string to the corresponding binary blob.
--
-- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
-- Base64-encoded string.
--
-- If this property is not defined, the response payload will be passed
-- through from the integration response to the route response or method
-- response without modification.
--
-- 'credentialsArn', 'createIntegration_credentialsArn' - Specifies the credentials required for the integration, if any. For AWS
-- integrations, three options are available. To specify an IAM Role for
-- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
-- require that the caller\'s identity be passed through from the request,
-- specify the string arn:aws:iam::*:user\/*. To use resource-based
-- permissions on supported AWS services, specify null.
--
-- 'description', 'createIntegration_description' - The description of the integration.
--
-- 'integrationMethod', 'createIntegration_integrationMethod' - Specifies the integration\'s HTTP method type.
--
-- 'integrationSubtype', 'createIntegration_integrationSubtype' - Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
-- service action to invoke. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
--
-- 'integrationUri', 'createIntegration_integrationUri' - For a Lambda integration, specify the URI of a Lambda function.
--
-- For an HTTP integration, specify a fully-qualified URL.
--
-- For an HTTP API private integration, specify the ARN of an Application
-- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
-- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
-- uses DiscoverInstances to identify resources. You can use query
-- parameters to target specific resources. To learn more, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
-- For private integrations, all resources must be owned by the same AWS
-- account.
--
-- 'passthroughBehavior', 'createIntegration_passthroughBehavior' - Specifies the pass-through behavior for incoming requests based on the
-- Content-Type header in the request, and the available mapping templates
-- specified as the requestTemplates property on the Integration resource.
-- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
-- NEVER. Supported only for WebSocket APIs.
--
-- WHEN_NO_MATCH passes the request body for unmapped content types through
-- to the integration backend without transformation.
--
-- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
-- Type response.
--
-- WHEN_NO_TEMPLATES allows pass-through when the integration has no
-- content types mapped to templates. However, if there is at least one
-- content type defined, unmapped content types will be rejected with the
-- same HTTP 415 Unsupported Media Type response.
--
-- 'payloadFormatVersion', 'createIntegration_payloadFormatVersion' - Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
--
-- 'requestParameters', 'createIntegration_requestParameters' - For WebSocket APIs, a key-value map specifying request parameters that
-- are passed from the method request to the backend. The key is an
-- integration request parameter name and the associated value is a method
-- request parameter value or static value that must be enclosed within
-- single quotes and pre-encoded as required by the backend. The method
-- request parameter value must match the pattern of
-- method.request.{location}.{name} , where {location} is querystring,
-- path, or header; and {name} must be a valid and unique method request
-- parameter name.
--
-- For HTTP API integrations with a specified integrationSubtype, request
-- parameters are a key-value map specifying parameters that are passed to
-- AWS_PROXY integrations. You can provide static values, or map request
-- data, stage variables, or context variables that are evaluated at
-- runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
--
-- For HTTP API integrations without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to the backend. The key should follow the pattern
-- \<action>:\<header|querystring|path>.\<location> where action can be
-- append, overwrite or remove. For values, you can provide static values,
-- or map request data, stage variables, or context variables that are
-- evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
--
-- 'requestTemplates', 'createIntegration_requestTemplates' - Represents a map of Velocity templates that are applied on the request
-- payload based on the value of the Content-Type header sent by the
-- client. The content type value is the key in this map, and the template
-- (as a String) is the value. Supported only for WebSocket APIs.
--
-- 'responseParameters', 'createIntegration_responseParameters' - Supported only for HTTP APIs. You use response parameters to transform
-- the HTTP response from a backend integration before returning the
-- response to clients. Specify a key-value map from a selection key to
-- response parameters. The selection key must be a valid HTTP status code
-- within the range of 200-599. Response parameters are a key-value map.
-- The key must match pattern \<action>:\<header>.\<location> or
-- overwrite.statuscode. The action can be append, overwrite or remove. The
-- value can be a static value, or map to response data, stage variables,
-- or context variables that are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
--
-- 'templateSelectionExpression', 'createIntegration_templateSelectionExpression' - The template selection expression for the integration.
--
-- 'timeoutInMillis', 'createIntegration_timeoutInMillis' - Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
-- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
-- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
--
-- 'tlsConfig', 'createIntegration_tlsConfig' - The TLS configuration for a private integration. If you specify a TLS
-- configuration, private integration traffic uses the HTTPS protocol.
-- Supported only for HTTP APIs.
--
-- 'apiId', 'createIntegration_apiId' - The API identifier.
--
-- 'integrationType', 'createIntegration_integrationType' - The integration type of an integration. One of the following:
--
-- AWS: for integrating the route or method request with an AWS service
-- action, including the Lambda function-invoking action. With the Lambda
-- function-invoking action, this is referred to as the Lambda custom
-- integration. With any other AWS service action, this is known as AWS
-- integration. Supported only for WebSocket APIs.
--
-- AWS_PROXY: for integrating the route or method request with a Lambda
-- function or other AWS service action. This integration is also referred
-- to as a Lambda proxy integration.
--
-- HTTP: for integrating the route or method request with an HTTP endpoint.
-- This integration is also referred to as the HTTP custom integration.
-- Supported only for WebSocket APIs.
--
-- HTTP_PROXY: for integrating the route or method request with an HTTP
-- endpoint, with the client request passed through as-is. This is also
-- referred to as HTTP proxy integration. For HTTP API private
-- integrations, use an HTTP_PROXY integration.
--
-- MOCK: for integrating the route or method request with API Gateway as a
-- \"loopback\" endpoint without invoking any backend. Supported only for
-- WebSocket APIs.
newCreateIntegration ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'integrationType'
  IntegrationType ->
  CreateIntegration
newCreateIntegration :: Text -> IntegrationType -> CreateIntegration
newCreateIntegration Text
pApiId_ IntegrationType
pIntegrationType_ =
  CreateIntegration'
    { $sel:connectionId:CreateIntegration' :: Maybe Text
connectionId = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionType:CreateIntegration' :: Maybe ConnectionType
connectionType = forall a. Maybe a
Prelude.Nothing,
      $sel:contentHandlingStrategy:CreateIntegration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:CreateIntegration' :: Maybe Text
credentialsArn = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateIntegration' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationMethod:CreateIntegration' :: Maybe Text
integrationMethod = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationSubtype:CreateIntegration' :: Maybe Text
integrationSubtype = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationUri:CreateIntegration' :: Maybe Text
integrationUri = forall a. Maybe a
Prelude.Nothing,
      $sel:passthroughBehavior:CreateIntegration' :: Maybe PassthroughBehavior
passthroughBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:payloadFormatVersion:CreateIntegration' :: Maybe Text
payloadFormatVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:CreateIntegration' :: Maybe (HashMap Text Text)
requestParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:requestTemplates:CreateIntegration' :: Maybe (HashMap Text Text)
requestTemplates = forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:CreateIntegration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:templateSelectionExpression:CreateIntegration' :: Maybe Text
templateSelectionExpression = forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMillis:CreateIntegration' :: Maybe Natural
timeoutInMillis = forall a. Maybe a
Prelude.Nothing,
      $sel:tlsConfig:CreateIntegration' :: Maybe TlsConfigInput
tlsConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:apiId:CreateIntegration' :: Text
apiId = Text
pApiId_,
      $sel:integrationType:CreateIntegration' :: IntegrationType
integrationType = IntegrationType
pIntegrationType_
    }

-- | The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
createIntegration_connectionId :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_connectionId :: Lens' CreateIntegration (Maybe Text)
createIntegration_connectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:connectionId:CreateIntegration' :: Maybe Text
connectionId = Maybe Text
a} :: CreateIntegration)

-- | The type of the network connection to the integration endpoint. Specify
-- INTERNET for connections through the public routable internet or
-- VPC_LINK for private connections between API Gateway and resources in a
-- VPC. The default value is INTERNET.
createIntegration_connectionType :: Lens.Lens' CreateIntegration (Prelude.Maybe ConnectionType)
createIntegration_connectionType :: Lens' CreateIntegration (Maybe ConnectionType)
createIntegration_connectionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe ConnectionType
a -> CreateIntegration
s {$sel:connectionType:CreateIntegration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: CreateIntegration)

-- | Supported only for WebSocket APIs. Specifies how to handle response
-- payload content type conversions. Supported values are CONVERT_TO_BINARY
-- and CONVERT_TO_TEXT, with the following behaviors:
--
-- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
-- string to the corresponding binary blob.
--
-- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
-- Base64-encoded string.
--
-- If this property is not defined, the response payload will be passed
-- through from the integration response to the route response or method
-- response without modification.
createIntegration_contentHandlingStrategy :: Lens.Lens' CreateIntegration (Prelude.Maybe ContentHandlingStrategy)
createIntegration_contentHandlingStrategy :: Lens' CreateIntegration (Maybe ContentHandlingStrategy)
createIntegration_contentHandlingStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe ContentHandlingStrategy
a -> CreateIntegration
s {$sel:contentHandlingStrategy:CreateIntegration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: CreateIntegration)

-- | Specifies the credentials required for the integration, if any. For AWS
-- integrations, three options are available. To specify an IAM Role for
-- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
-- require that the caller\'s identity be passed through from the request,
-- specify the string arn:aws:iam::*:user\/*. To use resource-based
-- permissions on supported AWS services, specify null.
createIntegration_credentialsArn :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_credentialsArn :: Lens' CreateIntegration (Maybe Text)
createIntegration_credentialsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
credentialsArn :: Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
credentialsArn} -> Maybe Text
credentialsArn) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:credentialsArn:CreateIntegration' :: Maybe Text
credentialsArn = Maybe Text
a} :: CreateIntegration)

-- | The description of the integration.
createIntegration_description :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_description :: Lens' CreateIntegration (Maybe Text)
createIntegration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
description :: Maybe Text
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:description:CreateIntegration' :: Maybe Text
description = Maybe Text
a} :: CreateIntegration)

-- | Specifies the integration\'s HTTP method type.
createIntegration_integrationMethod :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_integrationMethod :: Lens' CreateIntegration (Maybe Text)
createIntegration_integrationMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
integrationMethod :: Maybe Text
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
integrationMethod} -> Maybe Text
integrationMethod) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:integrationMethod:CreateIntegration' :: Maybe Text
integrationMethod = Maybe Text
a} :: CreateIntegration)

-- | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
-- service action to invoke. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
createIntegration_integrationSubtype :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_integrationSubtype :: Lens' CreateIntegration (Maybe Text)
createIntegration_integrationSubtype = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
integrationSubtype :: Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
integrationSubtype} -> Maybe Text
integrationSubtype) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:integrationSubtype:CreateIntegration' :: Maybe Text
integrationSubtype = Maybe Text
a} :: CreateIntegration)

-- | For a Lambda integration, specify the URI of a Lambda function.
--
-- For an HTTP integration, specify a fully-qualified URL.
--
-- For an HTTP API private integration, specify the ARN of an Application
-- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
-- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
-- uses DiscoverInstances to identify resources. You can use query
-- parameters to target specific resources. To learn more, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
-- For private integrations, all resources must be owned by the same AWS
-- account.
createIntegration_integrationUri :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_integrationUri :: Lens' CreateIntegration (Maybe Text)
createIntegration_integrationUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
integrationUri :: Maybe Text
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
integrationUri} -> Maybe Text
integrationUri) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:integrationUri:CreateIntegration' :: Maybe Text
integrationUri = Maybe Text
a} :: CreateIntegration)

-- | Specifies the pass-through behavior for incoming requests based on the
-- Content-Type header in the request, and the available mapping templates
-- specified as the requestTemplates property on the Integration resource.
-- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
-- NEVER. Supported only for WebSocket APIs.
--
-- WHEN_NO_MATCH passes the request body for unmapped content types through
-- to the integration backend without transformation.
--
-- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
-- Type response.
--
-- WHEN_NO_TEMPLATES allows pass-through when the integration has no
-- content types mapped to templates. However, if there is at least one
-- content type defined, unmapped content types will be rejected with the
-- same HTTP 415 Unsupported Media Type response.
createIntegration_passthroughBehavior :: Lens.Lens' CreateIntegration (Prelude.Maybe PassthroughBehavior)
createIntegration_passthroughBehavior :: Lens' CreateIntegration (Maybe PassthroughBehavior)
createIntegration_passthroughBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe PassthroughBehavior
passthroughBehavior :: Maybe PassthroughBehavior
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
passthroughBehavior} -> Maybe PassthroughBehavior
passthroughBehavior) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe PassthroughBehavior
a -> CreateIntegration
s {$sel:passthroughBehavior:CreateIntegration' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
a} :: CreateIntegration)

-- | Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
createIntegration_payloadFormatVersion :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_payloadFormatVersion :: Lens' CreateIntegration (Maybe Text)
createIntegration_payloadFormatVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
payloadFormatVersion :: Maybe Text
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
payloadFormatVersion} -> Maybe Text
payloadFormatVersion) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:payloadFormatVersion:CreateIntegration' :: Maybe Text
payloadFormatVersion = Maybe Text
a} :: CreateIntegration)

-- | For WebSocket APIs, a key-value map specifying request parameters that
-- are passed from the method request to the backend. The key is an
-- integration request parameter name and the associated value is a method
-- request parameter value or static value that must be enclosed within
-- single quotes and pre-encoded as required by the backend. The method
-- request parameter value must match the pattern of
-- method.request.{location}.{name} , where {location} is querystring,
-- path, or header; and {name} must be a valid and unique method request
-- parameter name.
--
-- For HTTP API integrations with a specified integrationSubtype, request
-- parameters are a key-value map specifying parameters that are passed to
-- AWS_PROXY integrations. You can provide static values, or map request
-- data, stage variables, or context variables that are evaluated at
-- runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
--
-- For HTTP API integrations without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to the backend. The key should follow the pattern
-- \<action>:\<header|querystring|path>.\<location> where action can be
-- append, overwrite or remove. For values, you can provide static values,
-- or map request data, stage variables, or context variables that are
-- evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
createIntegration_requestParameters :: Lens.Lens' CreateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegration_requestParameters :: Lens' CreateIntegration (Maybe (HashMap Text Text))
createIntegration_requestParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe (HashMap Text Text)
a -> CreateIntegration
s {$sel:requestParameters:CreateIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: CreateIntegration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Represents a map of Velocity templates that are applied on the request
-- payload based on the value of the Content-Type header sent by the
-- client. The content type value is the key in this map, and the template
-- (as a String) is the value. Supported only for WebSocket APIs.
createIntegration_requestTemplates :: Lens.Lens' CreateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegration_requestTemplates :: Lens' CreateIntegration (Maybe (HashMap Text Text))
createIntegration_requestTemplates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe (HashMap Text Text)
a -> CreateIntegration
s {$sel:requestTemplates:CreateIntegration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: CreateIntegration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Supported only for HTTP APIs. You use response parameters to transform
-- the HTTP response from a backend integration before returning the
-- response to clients. Specify a key-value map from a selection key to
-- response parameters. The selection key must be a valid HTTP status code
-- within the range of 200-599. Response parameters are a key-value map.
-- The key must match pattern \<action>:\<header>.\<location> or
-- overwrite.statuscode. The action can be append, overwrite or remove. The
-- value can be a static value, or map to response data, stage variables,
-- or context variables that are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
createIntegration_responseParameters :: Lens.Lens' CreateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
createIntegration_responseParameters :: Lens' CreateIntegration (Maybe (HashMap Text (HashMap Text Text)))
createIntegration_responseParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe (HashMap Text (HashMap Text Text))
a -> CreateIntegration
s {$sel:responseParameters:CreateIntegration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: CreateIntegration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The template selection expression for the integration.
createIntegration_templateSelectionExpression :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_templateSelectionExpression :: Lens' CreateIntegration (Maybe Text)
createIntegration_templateSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
templateSelectionExpression :: Maybe Text
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
templateSelectionExpression} -> Maybe Text
templateSelectionExpression) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:templateSelectionExpression:CreateIntegration' :: Maybe Text
templateSelectionExpression = Maybe Text
a} :: CreateIntegration)

-- | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
-- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
-- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
createIntegration_timeoutInMillis :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Natural)
createIntegration_timeoutInMillis :: Lens' CreateIntegration (Maybe Natural)
createIntegration_timeoutInMillis = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Natural
timeoutInMillis :: Maybe Natural
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
timeoutInMillis} -> Maybe Natural
timeoutInMillis) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Natural
a -> CreateIntegration
s {$sel:timeoutInMillis:CreateIntegration' :: Maybe Natural
timeoutInMillis = Maybe Natural
a} :: CreateIntegration)

-- | The TLS configuration for a private integration. If you specify a TLS
-- configuration, private integration traffic uses the HTTPS protocol.
-- Supported only for HTTP APIs.
createIntegration_tlsConfig :: Lens.Lens' CreateIntegration (Prelude.Maybe TlsConfigInput)
createIntegration_tlsConfig :: Lens' CreateIntegration (Maybe TlsConfigInput)
createIntegration_tlsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe TlsConfigInput
tlsConfig :: Maybe TlsConfigInput
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
tlsConfig} -> Maybe TlsConfigInput
tlsConfig) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe TlsConfigInput
a -> CreateIntegration
s {$sel:tlsConfig:CreateIntegration' :: Maybe TlsConfigInput
tlsConfig = Maybe TlsConfigInput
a} :: CreateIntegration)

-- | The API identifier.
createIntegration_apiId :: Lens.Lens' CreateIntegration Prelude.Text
createIntegration_apiId :: Lens' CreateIntegration Text
createIntegration_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Text
apiId :: Text
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
apiId} -> Text
apiId) (\s :: CreateIntegration
s@CreateIntegration' {} Text
a -> CreateIntegration
s {$sel:apiId:CreateIntegration' :: Text
apiId = Text
a} :: CreateIntegration)

-- | The integration type of an integration. One of the following:
--
-- AWS: for integrating the route or method request with an AWS service
-- action, including the Lambda function-invoking action. With the Lambda
-- function-invoking action, this is referred to as the Lambda custom
-- integration. With any other AWS service action, this is known as AWS
-- integration. Supported only for WebSocket APIs.
--
-- AWS_PROXY: for integrating the route or method request with a Lambda
-- function or other AWS service action. This integration is also referred
-- to as a Lambda proxy integration.
--
-- HTTP: for integrating the route or method request with an HTTP endpoint.
-- This integration is also referred to as the HTTP custom integration.
-- Supported only for WebSocket APIs.
--
-- HTTP_PROXY: for integrating the route or method request with an HTTP
-- endpoint, with the client request passed through as-is. This is also
-- referred to as HTTP proxy integration. For HTTP API private
-- integrations, use an HTTP_PROXY integration.
--
-- MOCK: for integrating the route or method request with API Gateway as a
-- \"loopback\" endpoint without invoking any backend. Supported only for
-- WebSocket APIs.
createIntegration_integrationType :: Lens.Lens' CreateIntegration IntegrationType
createIntegration_integrationType :: Lens' CreateIntegration IntegrationType
createIntegration_integrationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {IntegrationType
integrationType :: IntegrationType
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
integrationType} -> IntegrationType
integrationType) (\s :: CreateIntegration
s@CreateIntegration' {} IntegrationType
a -> CreateIntegration
s {$sel:integrationType:CreateIntegration' :: IntegrationType
integrationType = IntegrationType
a} :: CreateIntegration)

instance Core.AWSRequest CreateIntegration where
  type
    AWSResponse CreateIntegration =
      CreateIntegrationResponse'
  request :: (Service -> Service)
-> CreateIntegration -> Request CreateIntegration
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateIntegration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateIntegration)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe ConnectionType
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe IntegrationType
-> Maybe Text
-> Maybe PassthroughBehavior
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text (HashMap Text Text))
-> Maybe Text
-> Maybe Natural
-> Maybe TlsConfig
-> Int
-> CreateIntegrationResponse'
CreateIntegrationResponse''
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiGatewayManaged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"connectionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"connectionType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"contentHandlingStrategy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"credentialsArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationMethod")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationResponseSelectionExpression")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationSubtype")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationUri")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"passthroughBehavior")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"payloadFormatVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"requestParameters"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"requestTemplates"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"responseParameters"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"templateSelectionExpression")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"timeoutInMillis")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tlsConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateIntegration where
  hashWithSalt :: Int -> CreateIntegration -> Int
hashWithSalt Int
_salt CreateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
IntegrationType
integrationType :: IntegrationType
apiId :: Text
tlsConfig :: Maybe TlsConfigInput
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationSubtype :: Maybe Text
integrationMethod :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectionType
connectionType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContentHandlingStrategy
contentHandlingStrategy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
credentialsArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationMethod
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationSubtype
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PassthroughBehavior
passthroughBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
payloadFormatVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
requestParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
requestTemplates
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (HashMap Text Text))
responseParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateSelectionExpression
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutInMillis
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TlsConfigInput
tlsConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` IntegrationType
integrationType

instance Prelude.NFData CreateIntegration where
  rnf :: CreateIntegration -> ()
rnf CreateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
IntegrationType
integrationType :: IntegrationType
apiId :: Text
tlsConfig :: Maybe TlsConfigInput
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationSubtype :: Maybe Text
integrationMethod :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectionType
connectionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContentHandlingStrategy
contentHandlingStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
credentialsArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationMethod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationSubtype
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PassthroughBehavior
passthroughBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
payloadFormatVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestTemplates
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (HashMap Text Text))
responseParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInMillis
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TlsConfigInput
tlsConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
apiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf IntegrationType
integrationType

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

instance Data.ToJSON CreateIntegration where
  toJSON :: CreateIntegration -> Value
toJSON CreateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
IntegrationType
integrationType :: IntegrationType
apiId :: Text
tlsConfig :: Maybe TlsConfigInput
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationSubtype :: Maybe Text
integrationMethod :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"connectionId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
connectionId,
            (Key
"connectionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionType
connectionType,
            (Key
"contentHandlingStrategy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContentHandlingStrategy
contentHandlingStrategy,
            (Key
"credentialsArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
credentialsArn,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"integrationMethod" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
integrationMethod,
            (Key
"integrationSubtype" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
integrationSubtype,
            (Key
"integrationUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
integrationUri,
            (Key
"passthroughBehavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PassthroughBehavior
passthroughBehavior,
            (Key
"payloadFormatVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
payloadFormatVersion,
            (Key
"requestParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
requestParameters,
            (Key
"requestTemplates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
requestTemplates,
            (Key
"responseParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text (HashMap Text Text))
responseParameters,
            (Key
"templateSelectionExpression" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateSelectionExpression,
            (Key
"timeoutInMillis" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInMillis,
            (Key
"tlsConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TlsConfigInput
tlsConfig,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"integrationType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= IntegrationType
integrationType)
          ]
      )

instance Data.ToPath CreateIntegration where
  toPath :: CreateIntegration -> ByteString
toPath CreateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
IntegrationType
integrationType :: IntegrationType
apiId :: Text
tlsConfig :: Maybe TlsConfigInput
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationSubtype :: Maybe Text
integrationMethod :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v2/apis/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
apiId, ByteString
"/integrations"]

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

-- | /See:/ 'newCreateIntegrationResponse'' smart constructor.
data CreateIntegrationResponse' = CreateIntegrationResponse''
  { -- | Specifies whether an integration is managed by API Gateway. If you
    -- created an API using using quick create, the resulting integration is
    -- managed by API Gateway. You can update a managed integration, but you
    -- can\'t delete it.
    CreateIntegrationResponse' -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the VPC link for a private integration. Supported only for
    -- HTTP APIs.
    CreateIntegrationResponse' -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
    -- | The type of the network connection to the integration endpoint. Specify
    -- INTERNET for connections through the public routable internet or
    -- VPC_LINK for private connections between API Gateway and resources in a
    -- VPC. The default value is INTERNET.
    CreateIntegrationResponse' -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
    -- | Supported only for WebSocket APIs. Specifies how to handle response
    -- payload content type conversions. Supported values are CONVERT_TO_BINARY
    -- and CONVERT_TO_TEXT, with the following behaviors:
    --
    -- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
    -- string to the corresponding binary blob.
    --
    -- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
    -- Base64-encoded string.
    --
    -- If this property is not defined, the response payload will be passed
    -- through from the integration response to the route response or method
    -- response without modification.
    CreateIntegrationResponse' -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
    -- | Specifies the credentials required for the integration, if any. For AWS
    -- integrations, three options are available. To specify an IAM Role for
    -- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
    -- require that the caller\'s identity be passed through from the request,
    -- specify the string arn:aws:iam::*:user\/*. To use resource-based
    -- permissions on supported AWS services, specify null.
    CreateIntegrationResponse' -> Maybe Text
credentialsArn :: Prelude.Maybe Prelude.Text,
    -- | Represents the description of an integration.
    CreateIntegrationResponse' -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Represents the identifier of an integration.
    CreateIntegrationResponse' -> Maybe Text
integrationId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the integration\'s HTTP method type.
    CreateIntegrationResponse' -> Maybe Text
integrationMethod :: Prelude.Maybe Prelude.Text,
    -- | The integration response selection expression for the integration.
    -- Supported only for WebSocket APIs. See
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-response-selection-expressions Integration Response Selection Expressions>.
    CreateIntegrationResponse' -> Maybe Text
integrationResponseSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
    -- service action to invoke. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
    CreateIntegrationResponse' -> Maybe Text
integrationSubtype :: Prelude.Maybe Prelude.Text,
    -- | The integration type of an integration. One of the following:
    --
    -- AWS: for integrating the route or method request with an AWS service
    -- action, including the Lambda function-invoking action. With the Lambda
    -- function-invoking action, this is referred to as the Lambda custom
    -- integration. With any other AWS service action, this is known as AWS
    -- integration. Supported only for WebSocket APIs.
    --
    -- AWS_PROXY: for integrating the route or method request with a Lambda
    -- function or other AWS service action. This integration is also referred
    -- to as a Lambda proxy integration.
    --
    -- HTTP: for integrating the route or method request with an HTTP endpoint.
    -- This integration is also referred to as the HTTP custom integration.
    -- Supported only for WebSocket APIs.
    --
    -- HTTP_PROXY: for integrating the route or method request with an HTTP
    -- endpoint, with the client request passed through as-is. This is also
    -- referred to as HTTP proxy integration.
    --
    -- MOCK: for integrating the route or method request with API Gateway as a
    -- \"loopback\" endpoint without invoking any backend. Supported only for
    -- WebSocket APIs.
    CreateIntegrationResponse' -> Maybe IntegrationType
integrationType :: Prelude.Maybe IntegrationType,
    -- | For a Lambda integration, specify the URI of a Lambda function.
    --
    -- For an HTTP integration, specify a fully-qualified URL.
    --
    -- For an HTTP API private integration, specify the ARN of an Application
    -- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
    -- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
    -- uses DiscoverInstances to identify resources. You can use query
    -- parameters to target specific resources. To learn more, see
    -- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
    -- For private integrations, all resources must be owned by the same AWS
    -- account.
    CreateIntegrationResponse' -> Maybe Text
integrationUri :: Prelude.Maybe Prelude.Text,
    -- | Specifies the pass-through behavior for incoming requests based on the
    -- Content-Type header in the request, and the available mapping templates
    -- specified as the requestTemplates property on the Integration resource.
    -- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
    -- NEVER. Supported only for WebSocket APIs.
    --
    -- WHEN_NO_MATCH passes the request body for unmapped content types through
    -- to the integration backend without transformation.
    --
    -- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
    -- Type response.
    --
    -- WHEN_NO_TEMPLATES allows pass-through when the integration has no
    -- content types mapped to templates. However, if there is at least one
    -- content type defined, unmapped content types will be rejected with the
    -- same HTTP 415 Unsupported Media Type response.
    CreateIntegrationResponse' -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    CreateIntegrationResponse' -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | For WebSocket APIs, a key-value map specifying request parameters that
    -- are passed from the method request to the backend. The key is an
    -- integration request parameter name and the associated value is a method
    -- request parameter value or static value that must be enclosed within
    -- single quotes and pre-encoded as required by the backend. The method
    -- request parameter value must match the pattern of
    -- method.request.{location}.{name} , where {location} is querystring,
    -- path, or header; and {name} must be a valid and unique method request
    -- parameter name.
    --
    -- For HTTP API integrations with a specified integrationSubtype, request
    -- parameters are a key-value map specifying parameters that are passed to
    -- AWS_PROXY integrations. You can provide static values, or map request
    -- data, stage variables, or context variables that are evaluated at
    -- runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
    --
    -- For HTTP API itegrations, without a specified integrationSubtype request
    -- parameters are a key-value map specifying how to transform HTTP requests
    -- before sending them to backend integrations. The key should follow the
    -- pattern \<action>:\<header|querystring|path>.\<location>. The action can
    -- be append, overwrite or remove. For values, you can provide static
    -- values, or map request data, stage variables, or context variables that
    -- are evaluated at runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
    CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Represents a map of Velocity templates that are applied on the request
    -- payload based on the value of the Content-Type header sent by the
    -- client. The content type value is the key in this map, and the template
    -- (as a String) is the value. Supported only for WebSocket APIs.
    CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Supported only for HTTP APIs. You use response parameters to transform
    -- the HTTP response from a backend integration before returning the
    -- response to clients. Specify a key-value map from a selection key to
    -- response parameters. The selection key must be a valid HTTP status code
    -- within the range of 200-599. Response parameters are a key-value map.
    -- The key must match pattern \<action>:\<header>.\<location> or
    -- overwrite.statuscode. The action can be append, overwrite or remove. The
    -- value can be a static value, or map to response data, stage variables,
    -- or context variables that are evaluated at runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
    CreateIntegrationResponse'
-> Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The template selection expression for the integration. Supported only
    -- for WebSocket APIs.
    CreateIntegrationResponse' -> Maybe Text
templateSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
    -- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
    -- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
    CreateIntegrationResponse' -> Maybe Natural
timeoutInMillis :: Prelude.Maybe Prelude.Natural,
    -- | The TLS configuration for a private integration. If you specify a TLS
    -- configuration, private integration traffic uses the HTTPS protocol.
    -- Supported only for HTTP APIs.
    CreateIntegrationResponse' -> Maybe TlsConfig
tlsConfig :: Prelude.Maybe TlsConfig,
    -- | The response's http status code.
    CreateIntegrationResponse' -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
$c/= :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
== :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
$c== :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
Prelude.Eq, ReadPrec [CreateIntegrationResponse']
ReadPrec CreateIntegrationResponse'
Int -> ReadS CreateIntegrationResponse'
ReadS [CreateIntegrationResponse']
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntegrationResponse']
$creadListPrec :: ReadPrec [CreateIntegrationResponse']
readPrec :: ReadPrec CreateIntegrationResponse'
$creadPrec :: ReadPrec CreateIntegrationResponse'
readList :: ReadS [CreateIntegrationResponse']
$creadList :: ReadS [CreateIntegrationResponse']
readsPrec :: Int -> ReadS CreateIntegrationResponse'
$creadsPrec :: Int -> ReadS CreateIntegrationResponse'
Prelude.Read, Int -> CreateIntegrationResponse' -> ShowS
[CreateIntegrationResponse'] -> ShowS
CreateIntegrationResponse' -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntegrationResponse'] -> ShowS
$cshowList :: [CreateIntegrationResponse'] -> ShowS
show :: CreateIntegrationResponse' -> String
$cshow :: CreateIntegrationResponse' -> String
showsPrec :: Int -> CreateIntegrationResponse' -> ShowS
$cshowsPrec :: Int -> CreateIntegrationResponse' -> ShowS
Prelude.Show, forall x.
Rep CreateIntegrationResponse' x -> CreateIntegrationResponse'
forall x.
CreateIntegrationResponse' -> Rep CreateIntegrationResponse' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateIntegrationResponse' x -> CreateIntegrationResponse'
$cfrom :: forall x.
CreateIntegrationResponse' -> Rep CreateIntegrationResponse' x
Prelude.Generic)

-- |
-- Create a value of 'CreateIntegrationResponse'' 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:
--
-- 'apiGatewayManaged', 'createIntegrationResponse'_apiGatewayManaged' - Specifies whether an integration is managed by API Gateway. If you
-- created an API using using quick create, the resulting integration is
-- managed by API Gateway. You can update a managed integration, but you
-- can\'t delete it.
--
-- 'connectionId', 'createIntegrationResponse'_connectionId' - The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
--
-- 'connectionType', 'createIntegrationResponse'_connectionType' - The type of the network connection to the integration endpoint. Specify
-- INTERNET for connections through the public routable internet or
-- VPC_LINK for private connections between API Gateway and resources in a
-- VPC. The default value is INTERNET.
--
-- 'contentHandlingStrategy', 'createIntegrationResponse'_contentHandlingStrategy' - Supported only for WebSocket APIs. Specifies how to handle response
-- payload content type conversions. Supported values are CONVERT_TO_BINARY
-- and CONVERT_TO_TEXT, with the following behaviors:
--
-- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
-- string to the corresponding binary blob.
--
-- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
-- Base64-encoded string.
--
-- If this property is not defined, the response payload will be passed
-- through from the integration response to the route response or method
-- response without modification.
--
-- 'credentialsArn', 'createIntegrationResponse'_credentialsArn' - Specifies the credentials required for the integration, if any. For AWS
-- integrations, three options are available. To specify an IAM Role for
-- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
-- require that the caller\'s identity be passed through from the request,
-- specify the string arn:aws:iam::*:user\/*. To use resource-based
-- permissions on supported AWS services, specify null.
--
-- 'description', 'createIntegrationResponse'_description' - Represents the description of an integration.
--
-- 'integrationId', 'createIntegrationResponse'_integrationId' - Represents the identifier of an integration.
--
-- 'integrationMethod', 'createIntegrationResponse'_integrationMethod' - Specifies the integration\'s HTTP method type.
--
-- 'integrationResponseSelectionExpression', 'createIntegrationResponse'_integrationResponseSelectionExpression' - The integration response selection expression for the integration.
-- Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-response-selection-expressions Integration Response Selection Expressions>.
--
-- 'integrationSubtype', 'createIntegrationResponse'_integrationSubtype' - Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
-- service action to invoke. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
--
-- 'integrationType', 'createIntegrationResponse'_integrationType' - The integration type of an integration. One of the following:
--
-- AWS: for integrating the route or method request with an AWS service
-- action, including the Lambda function-invoking action. With the Lambda
-- function-invoking action, this is referred to as the Lambda custom
-- integration. With any other AWS service action, this is known as AWS
-- integration. Supported only for WebSocket APIs.
--
-- AWS_PROXY: for integrating the route or method request with a Lambda
-- function or other AWS service action. This integration is also referred
-- to as a Lambda proxy integration.
--
-- HTTP: for integrating the route or method request with an HTTP endpoint.
-- This integration is also referred to as the HTTP custom integration.
-- Supported only for WebSocket APIs.
--
-- HTTP_PROXY: for integrating the route or method request with an HTTP
-- endpoint, with the client request passed through as-is. This is also
-- referred to as HTTP proxy integration.
--
-- MOCK: for integrating the route or method request with API Gateway as a
-- \"loopback\" endpoint without invoking any backend. Supported only for
-- WebSocket APIs.
--
-- 'integrationUri', 'createIntegrationResponse'_integrationUri' - For a Lambda integration, specify the URI of a Lambda function.
--
-- For an HTTP integration, specify a fully-qualified URL.
--
-- For an HTTP API private integration, specify the ARN of an Application
-- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
-- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
-- uses DiscoverInstances to identify resources. You can use query
-- parameters to target specific resources. To learn more, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
-- For private integrations, all resources must be owned by the same AWS
-- account.
--
-- 'passthroughBehavior', 'createIntegrationResponse'_passthroughBehavior' - Specifies the pass-through behavior for incoming requests based on the
-- Content-Type header in the request, and the available mapping templates
-- specified as the requestTemplates property on the Integration resource.
-- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
-- NEVER. Supported only for WebSocket APIs.
--
-- WHEN_NO_MATCH passes the request body for unmapped content types through
-- to the integration backend without transformation.
--
-- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
-- Type response.
--
-- WHEN_NO_TEMPLATES allows pass-through when the integration has no
-- content types mapped to templates. However, if there is at least one
-- content type defined, unmapped content types will be rejected with the
-- same HTTP 415 Unsupported Media Type response.
--
-- 'payloadFormatVersion', 'createIntegrationResponse'_payloadFormatVersion' - Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
--
-- 'requestParameters', 'createIntegrationResponse'_requestParameters' - For WebSocket APIs, a key-value map specifying request parameters that
-- are passed from the method request to the backend. The key is an
-- integration request parameter name and the associated value is a method
-- request parameter value or static value that must be enclosed within
-- single quotes and pre-encoded as required by the backend. The method
-- request parameter value must match the pattern of
-- method.request.{location}.{name} , where {location} is querystring,
-- path, or header; and {name} must be a valid and unique method request
-- parameter name.
--
-- For HTTP API integrations with a specified integrationSubtype, request
-- parameters are a key-value map specifying parameters that are passed to
-- AWS_PROXY integrations. You can provide static values, or map request
-- data, stage variables, or context variables that are evaluated at
-- runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
--
-- For HTTP API itegrations, without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to backend integrations. The key should follow the
-- pattern \<action>:\<header|querystring|path>.\<location>. The action can
-- be append, overwrite or remove. For values, you can provide static
-- values, or map request data, stage variables, or context variables that
-- are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
--
-- 'requestTemplates', 'createIntegrationResponse'_requestTemplates' - Represents a map of Velocity templates that are applied on the request
-- payload based on the value of the Content-Type header sent by the
-- client. The content type value is the key in this map, and the template
-- (as a String) is the value. Supported only for WebSocket APIs.
--
-- 'responseParameters', 'createIntegrationResponse'_responseParameters' - Supported only for HTTP APIs. You use response parameters to transform
-- the HTTP response from a backend integration before returning the
-- response to clients. Specify a key-value map from a selection key to
-- response parameters. The selection key must be a valid HTTP status code
-- within the range of 200-599. Response parameters are a key-value map.
-- The key must match pattern \<action>:\<header>.\<location> or
-- overwrite.statuscode. The action can be append, overwrite or remove. The
-- value can be a static value, or map to response data, stage variables,
-- or context variables that are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
--
-- 'templateSelectionExpression', 'createIntegrationResponse'_templateSelectionExpression' - The template selection expression for the integration. Supported only
-- for WebSocket APIs.
--
-- 'timeoutInMillis', 'createIntegrationResponse'_timeoutInMillis' - Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
-- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
-- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
--
-- 'tlsConfig', 'createIntegrationResponse'_tlsConfig' - The TLS configuration for a private integration. If you specify a TLS
-- configuration, private integration traffic uses the HTTPS protocol.
-- Supported only for HTTP APIs.
--
-- 'httpStatus', 'createIntegrationResponse'_httpStatus' - The response's http status code.
newCreateIntegrationResponse' ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateIntegrationResponse'
newCreateIntegrationResponse' :: Int -> CreateIntegrationResponse'
newCreateIntegrationResponse' Int
pHttpStatus_ =
  CreateIntegrationResponse''
    { $sel:apiGatewayManaged:CreateIntegrationResponse'' :: Maybe Bool
apiGatewayManaged =
        forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:CreateIntegrationResponse'' :: Maybe Text
connectionId = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionType:CreateIntegrationResponse'' :: Maybe ConnectionType
connectionType = forall a. Maybe a
Prelude.Nothing,
      $sel:contentHandlingStrategy:CreateIntegrationResponse'' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:CreateIntegrationResponse'' :: Maybe Text
credentialsArn = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateIntegrationResponse'' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationId:CreateIntegrationResponse'' :: Maybe Text
integrationId = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationMethod:CreateIntegrationResponse'' :: Maybe Text
integrationMethod = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
integrationResponseSelectionExpression =
        forall a. Maybe a
Prelude.Nothing,
      $sel:integrationSubtype:CreateIntegrationResponse'' :: Maybe Text
integrationSubtype = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationType:CreateIntegrationResponse'' :: Maybe IntegrationType
integrationType = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationUri:CreateIntegrationResponse'' :: Maybe Text
integrationUri = forall a. Maybe a
Prelude.Nothing,
      $sel:passthroughBehavior:CreateIntegrationResponse'' :: Maybe PassthroughBehavior
passthroughBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:payloadFormatVersion:CreateIntegrationResponse'' :: Maybe Text
payloadFormatVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:requestTemplates:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestTemplates = forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:templateSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
templateSelectionExpression = forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMillis:CreateIntegrationResponse'' :: Maybe Natural
timeoutInMillis = forall a. Maybe a
Prelude.Nothing,
      $sel:tlsConfig:CreateIntegrationResponse'' :: Maybe TlsConfig
tlsConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateIntegrationResponse'' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Specifies whether an integration is managed by API Gateway. If you
-- created an API using using quick create, the resulting integration is
-- managed by API Gateway. You can update a managed integration, but you
-- can\'t delete it.
createIntegrationResponse'_apiGatewayManaged :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Bool)
createIntegrationResponse'_apiGatewayManaged :: Lens' CreateIntegrationResponse' (Maybe Bool)
createIntegrationResponse'_apiGatewayManaged = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Bool
a -> CreateIntegrationResponse'
s {$sel:apiGatewayManaged:CreateIntegrationResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: CreateIntegrationResponse')

-- | The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
createIntegrationResponse'_connectionId :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_connectionId :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_connectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:connectionId:CreateIntegrationResponse'' :: Maybe Text
connectionId = Maybe Text
a} :: CreateIntegrationResponse')

-- | The type of the network connection to the integration endpoint. Specify
-- INTERNET for connections through the public routable internet or
-- VPC_LINK for private connections between API Gateway and resources in a
-- VPC. The default value is INTERNET.
createIntegrationResponse'_connectionType :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe ConnectionType)
createIntegrationResponse'_connectionType :: Lens' CreateIntegrationResponse' (Maybe ConnectionType)
createIntegrationResponse'_connectionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe ConnectionType
a -> CreateIntegrationResponse'
s {$sel:connectionType:CreateIntegrationResponse'' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: CreateIntegrationResponse')

-- | Supported only for WebSocket APIs. Specifies how to handle response
-- payload content type conversions. Supported values are CONVERT_TO_BINARY
-- and CONVERT_TO_TEXT, with the following behaviors:
--
-- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
-- string to the corresponding binary blob.
--
-- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
-- Base64-encoded string.
--
-- If this property is not defined, the response payload will be passed
-- through from the integration response to the route response or method
-- response without modification.
createIntegrationResponse'_contentHandlingStrategy :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe ContentHandlingStrategy)
createIntegrationResponse'_contentHandlingStrategy :: Lens' CreateIntegrationResponse' (Maybe ContentHandlingStrategy)
createIntegrationResponse'_contentHandlingStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe ContentHandlingStrategy
a -> CreateIntegrationResponse'
s {$sel:contentHandlingStrategy:CreateIntegrationResponse'' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: CreateIntegrationResponse')

-- | Specifies the credentials required for the integration, if any. For AWS
-- integrations, three options are available. To specify an IAM Role for
-- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
-- require that the caller\'s identity be passed through from the request,
-- specify the string arn:aws:iam::*:user\/*. To use resource-based
-- permissions on supported AWS services, specify null.
createIntegrationResponse'_credentialsArn :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_credentialsArn :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_credentialsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
credentialsArn :: Maybe Text
$sel:credentialsArn:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
credentialsArn} -> Maybe Text
credentialsArn) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:credentialsArn:CreateIntegrationResponse'' :: Maybe Text
credentialsArn = Maybe Text
a} :: CreateIntegrationResponse')

-- | Represents the description of an integration.
createIntegrationResponse'_description :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_description :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
description :: Maybe Text
$sel:description:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:description:CreateIntegrationResponse'' :: Maybe Text
description = Maybe Text
a} :: CreateIntegrationResponse')

-- | Represents the identifier of an integration.
createIntegrationResponse'_integrationId :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationId :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_integrationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationId :: Maybe Text
$sel:integrationId:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationId} -> Maybe Text
integrationId) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationId:CreateIntegrationResponse'' :: Maybe Text
integrationId = Maybe Text
a} :: CreateIntegrationResponse')

-- | Specifies the integration\'s HTTP method type.
createIntegrationResponse'_integrationMethod :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationMethod :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_integrationMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationMethod :: Maybe Text
$sel:integrationMethod:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationMethod} -> Maybe Text
integrationMethod) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationMethod:CreateIntegrationResponse'' :: Maybe Text
integrationMethod = Maybe Text
a} :: CreateIntegrationResponse')

-- | The integration response selection expression for the integration.
-- Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-response-selection-expressions Integration Response Selection Expressions>.
createIntegrationResponse'_integrationResponseSelectionExpression :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationResponseSelectionExpression :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_integrationResponseSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationResponseSelectionExpression :: Maybe Text
$sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationResponseSelectionExpression} -> Maybe Text
integrationResponseSelectionExpression) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
integrationResponseSelectionExpression = Maybe Text
a} :: CreateIntegrationResponse')

-- | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
-- service action to invoke. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
createIntegrationResponse'_integrationSubtype :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationSubtype :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_integrationSubtype = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationSubtype :: Maybe Text
$sel:integrationSubtype:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationSubtype} -> Maybe Text
integrationSubtype) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationSubtype:CreateIntegrationResponse'' :: Maybe Text
integrationSubtype = Maybe Text
a} :: CreateIntegrationResponse')

-- | The integration type of an integration. One of the following:
--
-- AWS: for integrating the route or method request with an AWS service
-- action, including the Lambda function-invoking action. With the Lambda
-- function-invoking action, this is referred to as the Lambda custom
-- integration. With any other AWS service action, this is known as AWS
-- integration. Supported only for WebSocket APIs.
--
-- AWS_PROXY: for integrating the route or method request with a Lambda
-- function or other AWS service action. This integration is also referred
-- to as a Lambda proxy integration.
--
-- HTTP: for integrating the route or method request with an HTTP endpoint.
-- This integration is also referred to as the HTTP custom integration.
-- Supported only for WebSocket APIs.
--
-- HTTP_PROXY: for integrating the route or method request with an HTTP
-- endpoint, with the client request passed through as-is. This is also
-- referred to as HTTP proxy integration.
--
-- MOCK: for integrating the route or method request with API Gateway as a
-- \"loopback\" endpoint without invoking any backend. Supported only for
-- WebSocket APIs.
createIntegrationResponse'_integrationType :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe IntegrationType)
createIntegrationResponse'_integrationType :: Lens' CreateIntegrationResponse' (Maybe IntegrationType)
createIntegrationResponse'_integrationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe IntegrationType
integrationType :: Maybe IntegrationType
$sel:integrationType:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe IntegrationType
integrationType} -> Maybe IntegrationType
integrationType) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe IntegrationType
a -> CreateIntegrationResponse'
s {$sel:integrationType:CreateIntegrationResponse'' :: Maybe IntegrationType
integrationType = Maybe IntegrationType
a} :: CreateIntegrationResponse')

-- | For a Lambda integration, specify the URI of a Lambda function.
--
-- For an HTTP integration, specify a fully-qualified URL.
--
-- For an HTTP API private integration, specify the ARN of an Application
-- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
-- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
-- uses DiscoverInstances to identify resources. You can use query
-- parameters to target specific resources. To learn more, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
-- For private integrations, all resources must be owned by the same AWS
-- account.
createIntegrationResponse'_integrationUri :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationUri :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_integrationUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationUri :: Maybe Text
$sel:integrationUri:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationUri} -> Maybe Text
integrationUri) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationUri:CreateIntegrationResponse'' :: Maybe Text
integrationUri = Maybe Text
a} :: CreateIntegrationResponse')

-- | Specifies the pass-through behavior for incoming requests based on the
-- Content-Type header in the request, and the available mapping templates
-- specified as the requestTemplates property on the Integration resource.
-- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
-- NEVER. Supported only for WebSocket APIs.
--
-- WHEN_NO_MATCH passes the request body for unmapped content types through
-- to the integration backend without transformation.
--
-- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
-- Type response.
--
-- WHEN_NO_TEMPLATES allows pass-through when the integration has no
-- content types mapped to templates. However, if there is at least one
-- content type defined, unmapped content types will be rejected with the
-- same HTTP 415 Unsupported Media Type response.
createIntegrationResponse'_passthroughBehavior :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe PassthroughBehavior)
createIntegrationResponse'_passthroughBehavior :: Lens' CreateIntegrationResponse' (Maybe PassthroughBehavior)
createIntegrationResponse'_passthroughBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe PassthroughBehavior
passthroughBehavior :: Maybe PassthroughBehavior
$sel:passthroughBehavior:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe PassthroughBehavior
passthroughBehavior} -> Maybe PassthroughBehavior
passthroughBehavior) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe PassthroughBehavior
a -> CreateIntegrationResponse'
s {$sel:passthroughBehavior:CreateIntegrationResponse'' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
a} :: CreateIntegrationResponse')

-- | Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
createIntegrationResponse'_payloadFormatVersion :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_payloadFormatVersion :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_payloadFormatVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
payloadFormatVersion :: Maybe Text
$sel:payloadFormatVersion:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
payloadFormatVersion} -> Maybe Text
payloadFormatVersion) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:payloadFormatVersion:CreateIntegrationResponse'' :: Maybe Text
payloadFormatVersion = Maybe Text
a} :: CreateIntegrationResponse')

-- | For WebSocket APIs, a key-value map specifying request parameters that
-- are passed from the method request to the backend. The key is an
-- integration request parameter name and the associated value is a method
-- request parameter value or static value that must be enclosed within
-- single quotes and pre-encoded as required by the backend. The method
-- request parameter value must match the pattern of
-- method.request.{location}.{name} , where {location} is querystring,
-- path, or header; and {name} must be a valid and unique method request
-- parameter name.
--
-- For HTTP API integrations with a specified integrationSubtype, request
-- parameters are a key-value map specifying parameters that are passed to
-- AWS_PROXY integrations. You can provide static values, or map request
-- data, stage variables, or context variables that are evaluated at
-- runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
--
-- For HTTP API itegrations, without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to backend integrations. The key should follow the
-- pattern \<action>:\<header|querystring|path>.\<location>. The action can
-- be append, overwrite or remove. For values, you can provide static
-- values, or map request data, stage variables, or context variables that
-- are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
createIntegrationResponse'_requestParameters :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponse'_requestParameters :: Lens' CreateIntegrationResponse' (Maybe (HashMap Text Text))
createIntegrationResponse'_requestParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponse'
s {$sel:requestParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponse') forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Represents a map of Velocity templates that are applied on the request
-- payload based on the value of the Content-Type header sent by the
-- client. The content type value is the key in this map, and the template
-- (as a String) is the value. Supported only for WebSocket APIs.
createIntegrationResponse'_requestTemplates :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponse'_requestTemplates :: Lens' CreateIntegrationResponse' (Maybe (HashMap Text Text))
createIntegrationResponse'_requestTemplates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponse'
s {$sel:requestTemplates:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponse') forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Supported only for HTTP APIs. You use response parameters to transform
-- the HTTP response from a backend integration before returning the
-- response to clients. Specify a key-value map from a selection key to
-- response parameters. The selection key must be a valid HTTP status code
-- within the range of 200-599. Response parameters are a key-value map.
-- The key must match pattern \<action>:\<header>.\<location> or
-- overwrite.statuscode. The action can be append, overwrite or remove. The
-- value can be a static value, or map to response data, stage variables,
-- or context variables that are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
createIntegrationResponse'_responseParameters :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
createIntegrationResponse'_responseParameters :: Lens'
  CreateIntegrationResponse'
  (Maybe (HashMap Text (HashMap Text Text)))
createIntegrationResponse'_responseParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:CreateIntegrationResponse'' :: CreateIntegrationResponse'
-> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe (HashMap Text (HashMap Text Text))
a -> CreateIntegrationResponse'
s {$sel:responseParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: CreateIntegrationResponse') forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The template selection expression for the integration. Supported only
-- for WebSocket APIs.
createIntegrationResponse'_templateSelectionExpression :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_templateSelectionExpression :: Lens' CreateIntegrationResponse' (Maybe Text)
createIntegrationResponse'_templateSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
templateSelectionExpression :: Maybe Text
$sel:templateSelectionExpression:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
templateSelectionExpression} -> Maybe Text
templateSelectionExpression) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:templateSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
templateSelectionExpression = Maybe Text
a} :: CreateIntegrationResponse')

-- | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
-- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
-- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
createIntegrationResponse'_timeoutInMillis :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Natural)
createIntegrationResponse'_timeoutInMillis :: Lens' CreateIntegrationResponse' (Maybe Natural)
createIntegrationResponse'_timeoutInMillis = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Natural
timeoutInMillis :: Maybe Natural
$sel:timeoutInMillis:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Natural
timeoutInMillis} -> Maybe Natural
timeoutInMillis) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Natural
a -> CreateIntegrationResponse'
s {$sel:timeoutInMillis:CreateIntegrationResponse'' :: Maybe Natural
timeoutInMillis = Maybe Natural
a} :: CreateIntegrationResponse')

-- | The TLS configuration for a private integration. If you specify a TLS
-- configuration, private integration traffic uses the HTTPS protocol.
-- Supported only for HTTP APIs.
createIntegrationResponse'_tlsConfig :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe TlsConfig)
createIntegrationResponse'_tlsConfig :: Lens' CreateIntegrationResponse' (Maybe TlsConfig)
createIntegrationResponse'_tlsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
$sel:tlsConfig:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe TlsConfig
tlsConfig} -> Maybe TlsConfig
tlsConfig) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe TlsConfig
a -> CreateIntegrationResponse'
s {$sel:tlsConfig:CreateIntegrationResponse'' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
a} :: CreateIntegrationResponse')

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

instance Prelude.NFData CreateIntegrationResponse' where
  rnf :: CreateIntegrationResponse' -> ()
rnf CreateIntegrationResponse'' {Int
Maybe Bool
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe IntegrationType
Maybe PassthroughBehavior
Maybe TlsConfig
httpStatus :: Int
tlsConfig :: Maybe TlsConfig
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationType :: Maybe IntegrationType
integrationSubtype :: Maybe Text
integrationResponseSelectionExpression :: Maybe Text
integrationMethod :: Maybe Text
integrationId :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
apiGatewayManaged :: Maybe Bool
$sel:httpStatus:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Int
$sel:tlsConfig:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe TlsConfig
$sel:timeoutInMillis:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:responseParameters:CreateIntegrationResponse'' :: CreateIntegrationResponse'
-> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:passthroughBehavior:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe PassthroughBehavior
$sel:integrationUri:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:integrationType:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe IntegrationType
$sel:integrationSubtype:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:integrationMethod:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:integrationId:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:description:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:credentialsArn:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe ContentHandlingStrategy
$sel:connectionType:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe ConnectionType
$sel:connectionId:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
$sel:apiGatewayManaged:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
apiGatewayManaged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectionType
connectionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContentHandlingStrategy
contentHandlingStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
credentialsArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationMethod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationResponseSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationSubtype
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IntegrationType
integrationType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PassthroughBehavior
passthroughBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
payloadFormatVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestTemplates
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (HashMap Text Text))
responseParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
templateSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInMillis
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TlsConfig
tlsConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus