{-# 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.EMR.GetBlockPublicAccessConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the Amazon EMR block public access configuration for your Amazon
-- Web Services account in the current Region. For more information see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html Configure Block Public Access for Amazon EMR>
-- in the /Amazon EMR Management Guide/.
module Amazonka.EMR.GetBlockPublicAccessConfiguration
  ( -- * Creating a Request
    GetBlockPublicAccessConfiguration (..),
    newGetBlockPublicAccessConfiguration,

    -- * Destructuring the Response
    GetBlockPublicAccessConfigurationResponse (..),
    newGetBlockPublicAccessConfigurationResponse,

    -- * Response Lenses
    getBlockPublicAccessConfigurationResponse_httpStatus,
    getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration,
    getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata,
  )
where

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

-- | /See:/ 'newGetBlockPublicAccessConfiguration' smart constructor.
data GetBlockPublicAccessConfiguration = GetBlockPublicAccessConfiguration'
  {
  }
  deriving (GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
(GetBlockPublicAccessConfiguration
 -> GetBlockPublicAccessConfiguration -> Bool)
-> (GetBlockPublicAccessConfiguration
    -> GetBlockPublicAccessConfiguration -> Bool)
-> Eq GetBlockPublicAccessConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
$c/= :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
== :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
$c== :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
Prelude.Eq, ReadPrec [GetBlockPublicAccessConfiguration]
ReadPrec GetBlockPublicAccessConfiguration
Int -> ReadS GetBlockPublicAccessConfiguration
ReadS [GetBlockPublicAccessConfiguration]
(Int -> ReadS GetBlockPublicAccessConfiguration)
-> ReadS [GetBlockPublicAccessConfiguration]
-> ReadPrec GetBlockPublicAccessConfiguration
-> ReadPrec [GetBlockPublicAccessConfiguration]
-> Read GetBlockPublicAccessConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBlockPublicAccessConfiguration]
$creadListPrec :: ReadPrec [GetBlockPublicAccessConfiguration]
readPrec :: ReadPrec GetBlockPublicAccessConfiguration
$creadPrec :: ReadPrec GetBlockPublicAccessConfiguration
readList :: ReadS [GetBlockPublicAccessConfiguration]
$creadList :: ReadS [GetBlockPublicAccessConfiguration]
readsPrec :: Int -> ReadS GetBlockPublicAccessConfiguration
$creadsPrec :: Int -> ReadS GetBlockPublicAccessConfiguration
Prelude.Read, Int -> GetBlockPublicAccessConfiguration -> ShowS
[GetBlockPublicAccessConfiguration] -> ShowS
GetBlockPublicAccessConfiguration -> String
(Int -> GetBlockPublicAccessConfiguration -> ShowS)
-> (GetBlockPublicAccessConfiguration -> String)
-> ([GetBlockPublicAccessConfiguration] -> ShowS)
-> Show GetBlockPublicAccessConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBlockPublicAccessConfiguration] -> ShowS
$cshowList :: [GetBlockPublicAccessConfiguration] -> ShowS
show :: GetBlockPublicAccessConfiguration -> String
$cshow :: GetBlockPublicAccessConfiguration -> String
showsPrec :: Int -> GetBlockPublicAccessConfiguration -> ShowS
$cshowsPrec :: Int -> GetBlockPublicAccessConfiguration -> ShowS
Prelude.Show, (forall x.
 GetBlockPublicAccessConfiguration
 -> Rep GetBlockPublicAccessConfiguration x)
-> (forall x.
    Rep GetBlockPublicAccessConfiguration x
    -> GetBlockPublicAccessConfiguration)
-> Generic GetBlockPublicAccessConfiguration
forall x.
Rep GetBlockPublicAccessConfiguration x
-> GetBlockPublicAccessConfiguration
forall x.
GetBlockPublicAccessConfiguration
-> Rep GetBlockPublicAccessConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBlockPublicAccessConfiguration x
-> GetBlockPublicAccessConfiguration
$cfrom :: forall x.
GetBlockPublicAccessConfiguration
-> Rep GetBlockPublicAccessConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'GetBlockPublicAccessConfiguration' 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.
newGetBlockPublicAccessConfiguration ::
  GetBlockPublicAccessConfiguration
newGetBlockPublicAccessConfiguration :: GetBlockPublicAccessConfiguration
newGetBlockPublicAccessConfiguration =
  GetBlockPublicAccessConfiguration
GetBlockPublicAccessConfiguration'

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

instance
  Prelude.Hashable
    GetBlockPublicAccessConfiguration

instance
  Prelude.NFData
    GetBlockPublicAccessConfiguration

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

instance
  Core.ToJSON
    GetBlockPublicAccessConfiguration
  where
  toJSON :: GetBlockPublicAccessConfiguration -> Value
toJSON = Value -> GetBlockPublicAccessConfiguration -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

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

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

-- | /See:/ 'newGetBlockPublicAccessConfigurationResponse' smart constructor.
data GetBlockPublicAccessConfigurationResponse = GetBlockPublicAccessConfigurationResponse'
  { -- | The response's http status code.
    GetBlockPublicAccessConfigurationResponse -> Int
httpStatus :: Prelude.Int,
    -- | A configuration for Amazon EMR block public access. The configuration
    -- applies to all clusters created in your account for the current Region.
    -- The configuration specifies whether block public access is enabled. If
    -- block public access is enabled, security groups associated with the
    -- cluster cannot have rules that allow inbound traffic from 0.0.0.0\/0 or
    -- ::\/0 on a port, unless the port is specified as an exception using
    -- @PermittedPublicSecurityGroupRuleRanges@ in the
    -- @BlockPublicAccessConfiguration@. By default, Port 22 (SSH) is an
    -- exception, and public access is allowed on this port. You can change
    -- this by updating the block public access configuration to remove the
    -- exception.
    --
    -- For accounts that created clusters in a Region before November 25, 2019,
    -- block public access is disabled by default in that Region. To use this
    -- feature, you must manually enable and configure it. For accounts that
    -- did not create an EMR cluster in a Region before this date, block public
    -- access is enabled by default in that Region.
    GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration,
    -- | Properties that describe the Amazon Web Services principal that created
    -- the @BlockPublicAccessConfiguration@ using the
    -- @PutBlockPublicAccessConfiguration@ action as well as the date and time
    -- that the configuration was created. Each time a configuration for block
    -- public access is updated, Amazon EMR updates this metadata.
    GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata :: BlockPublicAccessConfigurationMetadata
  }
  deriving (GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
(GetBlockPublicAccessConfigurationResponse
 -> GetBlockPublicAccessConfigurationResponse -> Bool)
-> (GetBlockPublicAccessConfigurationResponse
    -> GetBlockPublicAccessConfigurationResponse -> Bool)
-> Eq GetBlockPublicAccessConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
$c/= :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
== :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
$c== :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetBlockPublicAccessConfigurationResponse]
ReadPrec GetBlockPublicAccessConfigurationResponse
Int -> ReadS GetBlockPublicAccessConfigurationResponse
ReadS [GetBlockPublicAccessConfigurationResponse]
(Int -> ReadS GetBlockPublicAccessConfigurationResponse)
-> ReadS [GetBlockPublicAccessConfigurationResponse]
-> ReadPrec GetBlockPublicAccessConfigurationResponse
-> ReadPrec [GetBlockPublicAccessConfigurationResponse]
-> Read GetBlockPublicAccessConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBlockPublicAccessConfigurationResponse]
$creadListPrec :: ReadPrec [GetBlockPublicAccessConfigurationResponse]
readPrec :: ReadPrec GetBlockPublicAccessConfigurationResponse
$creadPrec :: ReadPrec GetBlockPublicAccessConfigurationResponse
readList :: ReadS [GetBlockPublicAccessConfigurationResponse]
$creadList :: ReadS [GetBlockPublicAccessConfigurationResponse]
readsPrec :: Int -> ReadS GetBlockPublicAccessConfigurationResponse
$creadsPrec :: Int -> ReadS GetBlockPublicAccessConfigurationResponse
Prelude.Read, Int -> GetBlockPublicAccessConfigurationResponse -> ShowS
[GetBlockPublicAccessConfigurationResponse] -> ShowS
GetBlockPublicAccessConfigurationResponse -> String
(Int -> GetBlockPublicAccessConfigurationResponse -> ShowS)
-> (GetBlockPublicAccessConfigurationResponse -> String)
-> ([GetBlockPublicAccessConfigurationResponse] -> ShowS)
-> Show GetBlockPublicAccessConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBlockPublicAccessConfigurationResponse] -> ShowS
$cshowList :: [GetBlockPublicAccessConfigurationResponse] -> ShowS
show :: GetBlockPublicAccessConfigurationResponse -> String
$cshow :: GetBlockPublicAccessConfigurationResponse -> String
showsPrec :: Int -> GetBlockPublicAccessConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetBlockPublicAccessConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 GetBlockPublicAccessConfigurationResponse
 -> Rep GetBlockPublicAccessConfigurationResponse x)
-> (forall x.
    Rep GetBlockPublicAccessConfigurationResponse x
    -> GetBlockPublicAccessConfigurationResponse)
-> Generic GetBlockPublicAccessConfigurationResponse
forall x.
Rep GetBlockPublicAccessConfigurationResponse x
-> GetBlockPublicAccessConfigurationResponse
forall x.
GetBlockPublicAccessConfigurationResponse
-> Rep GetBlockPublicAccessConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBlockPublicAccessConfigurationResponse x
-> GetBlockPublicAccessConfigurationResponse
$cfrom :: forall x.
GetBlockPublicAccessConfigurationResponse
-> Rep GetBlockPublicAccessConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBlockPublicAccessConfigurationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'getBlockPublicAccessConfigurationResponse_httpStatus' - The response's http status code.
--
-- 'blockPublicAccessConfiguration', 'getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration' - A configuration for Amazon EMR block public access. The configuration
-- applies to all clusters created in your account for the current Region.
-- The configuration specifies whether block public access is enabled. If
-- block public access is enabled, security groups associated with the
-- cluster cannot have rules that allow inbound traffic from 0.0.0.0\/0 or
-- ::\/0 on a port, unless the port is specified as an exception using
-- @PermittedPublicSecurityGroupRuleRanges@ in the
-- @BlockPublicAccessConfiguration@. By default, Port 22 (SSH) is an
-- exception, and public access is allowed on this port. You can change
-- this by updating the block public access configuration to remove the
-- exception.
--
-- For accounts that created clusters in a Region before November 25, 2019,
-- block public access is disabled by default in that Region. To use this
-- feature, you must manually enable and configure it. For accounts that
-- did not create an EMR cluster in a Region before this date, block public
-- access is enabled by default in that Region.
--
-- 'blockPublicAccessConfigurationMetadata', 'getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata' - Properties that describe the Amazon Web Services principal that created
-- the @BlockPublicAccessConfiguration@ using the
-- @PutBlockPublicAccessConfiguration@ action as well as the date and time
-- that the configuration was created. Each time a configuration for block
-- public access is updated, Amazon EMR updates this metadata.
newGetBlockPublicAccessConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'blockPublicAccessConfiguration'
  BlockPublicAccessConfiguration ->
  -- | 'blockPublicAccessConfigurationMetadata'
  BlockPublicAccessConfigurationMetadata ->
  GetBlockPublicAccessConfigurationResponse
newGetBlockPublicAccessConfigurationResponse :: Int
-> BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse
newGetBlockPublicAccessConfigurationResponse
  Int
pHttpStatus_
  BlockPublicAccessConfiguration
pBlockPublicAccessConfiguration_
  BlockPublicAccessConfigurationMetadata
pBlockPublicAccessConfigurationMetadata_ =
    GetBlockPublicAccessConfigurationResponse' :: Int
-> BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse
GetBlockPublicAccessConfigurationResponse'
      { $sel:httpStatus:GetBlockPublicAccessConfigurationResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:blockPublicAccessConfiguration:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfiguration
blockPublicAccessConfiguration =
          BlockPublicAccessConfiguration
pBlockPublicAccessConfiguration_,
        $sel:blockPublicAccessConfigurationMetadata:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata =
          BlockPublicAccessConfigurationMetadata
pBlockPublicAccessConfigurationMetadata_
      }

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

-- | A configuration for Amazon EMR block public access. The configuration
-- applies to all clusters created in your account for the current Region.
-- The configuration specifies whether block public access is enabled. If
-- block public access is enabled, security groups associated with the
-- cluster cannot have rules that allow inbound traffic from 0.0.0.0\/0 or
-- ::\/0 on a port, unless the port is specified as an exception using
-- @PermittedPublicSecurityGroupRuleRanges@ in the
-- @BlockPublicAccessConfiguration@. By default, Port 22 (SSH) is an
-- exception, and public access is allowed on this port. You can change
-- this by updating the block public access configuration to remove the
-- exception.
--
-- For accounts that created clusters in a Region before November 25, 2019,
-- block public access is disabled by default in that Region. To use this
-- feature, you must manually enable and configure it. For accounts that
-- did not create an EMR cluster in a Region before this date, block public
-- access is enabled by default in that Region.
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration :: Lens.Lens' GetBlockPublicAccessConfigurationResponse BlockPublicAccessConfiguration
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration :: (BlockPublicAccessConfiguration
 -> f BlockPublicAccessConfiguration)
-> GetBlockPublicAccessConfigurationResponse
-> f GetBlockPublicAccessConfigurationResponse
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration = (GetBlockPublicAccessConfigurationResponse
 -> BlockPublicAccessConfiguration)
-> (GetBlockPublicAccessConfigurationResponse
    -> BlockPublicAccessConfiguration
    -> GetBlockPublicAccessConfigurationResponse)
-> Lens
     GetBlockPublicAccessConfigurationResponse
     GetBlockPublicAccessConfigurationResponse
     BlockPublicAccessConfiguration
     BlockPublicAccessConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBlockPublicAccessConfigurationResponse' {BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration
$sel:blockPublicAccessConfiguration:GetBlockPublicAccessConfigurationResponse' :: GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfiguration
blockPublicAccessConfiguration} -> BlockPublicAccessConfiguration
blockPublicAccessConfiguration) (\s :: GetBlockPublicAccessConfigurationResponse
s@GetBlockPublicAccessConfigurationResponse' {} BlockPublicAccessConfiguration
a -> GetBlockPublicAccessConfigurationResponse
s {$sel:blockPublicAccessConfiguration:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfiguration
blockPublicAccessConfiguration = BlockPublicAccessConfiguration
a} :: GetBlockPublicAccessConfigurationResponse)

-- | Properties that describe the Amazon Web Services principal that created
-- the @BlockPublicAccessConfiguration@ using the
-- @PutBlockPublicAccessConfiguration@ action as well as the date and time
-- that the configuration was created. Each time a configuration for block
-- public access is updated, Amazon EMR updates this metadata.
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata :: Lens.Lens' GetBlockPublicAccessConfigurationResponse BlockPublicAccessConfigurationMetadata
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata :: (BlockPublicAccessConfigurationMetadata
 -> f BlockPublicAccessConfigurationMetadata)
-> GetBlockPublicAccessConfigurationResponse
-> f GetBlockPublicAccessConfigurationResponse
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata = (GetBlockPublicAccessConfigurationResponse
 -> BlockPublicAccessConfigurationMetadata)
-> (GetBlockPublicAccessConfigurationResponse
    -> BlockPublicAccessConfigurationMetadata
    -> GetBlockPublicAccessConfigurationResponse)
-> Lens
     GetBlockPublicAccessConfigurationResponse
     GetBlockPublicAccessConfigurationResponse
     BlockPublicAccessConfigurationMetadata
     BlockPublicAccessConfigurationMetadata
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBlockPublicAccessConfigurationResponse' {BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata :: BlockPublicAccessConfigurationMetadata
$sel:blockPublicAccessConfigurationMetadata:GetBlockPublicAccessConfigurationResponse' :: GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata} -> BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata) (\s :: GetBlockPublicAccessConfigurationResponse
s@GetBlockPublicAccessConfigurationResponse' {} BlockPublicAccessConfigurationMetadata
a -> GetBlockPublicAccessConfigurationResponse
s {$sel:blockPublicAccessConfigurationMetadata:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata = BlockPublicAccessConfigurationMetadata
a} :: GetBlockPublicAccessConfigurationResponse)

instance
  Prelude.NFData
    GetBlockPublicAccessConfigurationResponse