{-# 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.Route53Resolver.ListResolverQueryLogConfigAssociations
-- 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)
--
-- Lists information about associations between Amazon VPCs and query
-- logging configurations.
--
-- This operation returns paginated results.
module Amazonka.Route53Resolver.ListResolverQueryLogConfigAssociations
  ( -- * Creating a Request
    ListResolverQueryLogConfigAssociations (..),
    newListResolverQueryLogConfigAssociations,

    -- * Request Lenses
    listResolverQueryLogConfigAssociations_filters,
    listResolverQueryLogConfigAssociations_nextToken,
    listResolverQueryLogConfigAssociations_sortOrder,
    listResolverQueryLogConfigAssociations_maxResults,
    listResolverQueryLogConfigAssociations_sortBy,

    -- * Destructuring the Response
    ListResolverQueryLogConfigAssociationsResponse (..),
    newListResolverQueryLogConfigAssociationsResponse,

    -- * Response Lenses
    listResolverQueryLogConfigAssociationsResponse_totalFilteredCount,
    listResolverQueryLogConfigAssociationsResponse_resolverQueryLogConfigAssociations,
    listResolverQueryLogConfigAssociationsResponse_nextToken,
    listResolverQueryLogConfigAssociationsResponse_totalCount,
    listResolverQueryLogConfigAssociationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListResolverQueryLogConfigAssociations' smart constructor.
data ListResolverQueryLogConfigAssociations = ListResolverQueryLogConfigAssociations'
  { -- | An optional specification to return a subset of query logging
    -- associations.
    --
    -- If you submit a second or subsequent
    -- @ListResolverQueryLogConfigAssociations@ request and specify the
    -- @NextToken@ parameter, you must use the same values for @Filters@, if
    -- any, as in the previous request.
    ListResolverQueryLogConfigAssociations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | For the first @ListResolverQueryLogConfigAssociations@ request, omit
    -- this value.
    --
    -- If there are more than @MaxResults@ query logging associations that
    -- match the values that you specify for @Filters@, you can submit another
    -- @ListResolverQueryLogConfigAssociations@ request to get the next group
    -- of associations. In the next request, specify the value of @NextToken@
    -- from the previous response.
    ListResolverQueryLogConfigAssociations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | If you specified a value for @SortBy@, the order that you want query
    -- logging associations to be listed in, @ASCENDING@ or @DESCENDING@.
    --
    -- If you submit a second or subsequent
    -- @ListResolverQueryLogConfigAssociations@ request and specify the
    -- @NextToken@ parameter, you must use the same value for @SortOrder@, if
    -- any, as in the previous request.
    ListResolverQueryLogConfigAssociations -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | The maximum number of query logging associations that you want to return
    -- in the response to a @ListResolverQueryLogConfigAssociations@ request.
    -- If you don\'t specify a value for @MaxResults@, Resolver returns up to
    -- 100 query logging associations.
    ListResolverQueryLogConfigAssociations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The element that you want Resolver to sort query logging associations
    -- by.
    --
    -- If you submit a second or subsequent
    -- @ListResolverQueryLogConfigAssociations@ request and specify the
    -- @NextToken@ parameter, you must use the same value for @SortBy@, if any,
    -- as in the previous request.
    --
    -- Valid values include the following elements:
    --
    -- -   @CreationTime@: The ID of the query logging association.
    --
    -- -   @Error@: If the value of @Status@ is @FAILED@, the value of @Error@
    --     indicates the cause:
    --
    --     -   @DESTINATION_NOT_FOUND@: The specified destination (for example,
    --         an Amazon S3 bucket) was deleted.
    --
    --     -   @ACCESS_DENIED@: Permissions don\'t allow sending logs to the
    --         destination.
    --
    --     If @Status@ is a value other than @FAILED@, @ERROR@ is null.
    --
    -- -   @Id@: The ID of the query logging association
    --
    -- -   @ResolverQueryLogConfigId@: The ID of the query logging
    --     configuration
    --
    -- -   @ResourceId@: The ID of the VPC that is associated with the query
    --     logging configuration
    --
    -- -   @Status@: The current status of the configuration. Valid values
    --     include the following:
    --
    --     -   @CREATING@: Resolver is creating an association between an
    --         Amazon VPC and a query logging configuration.
    --
    --     -   @CREATED@: The association between an Amazon VPC and a query
    --         logging configuration was successfully created. Resolver is
    --         logging queries that originate in the specified VPC.
    --
    --     -   @DELETING@: Resolver is deleting this query logging association.
    --
    --     -   @FAILED@: Resolver either couldn\'t create or couldn\'t delete
    --         the query logging association. Here are two common causes:
    --
    --         -   The specified destination (for example, an Amazon S3 bucket)
    --             was deleted.
    --
    --         -   Permissions don\'t allow sending logs to the destination.
    ListResolverQueryLogConfigAssociations -> Maybe Text
sortBy :: Prelude.Maybe Prelude.Text
  }
  deriving (ListResolverQueryLogConfigAssociations
-> ListResolverQueryLogConfigAssociations -> Bool
(ListResolverQueryLogConfigAssociations
 -> ListResolverQueryLogConfigAssociations -> Bool)
-> (ListResolverQueryLogConfigAssociations
    -> ListResolverQueryLogConfigAssociations -> Bool)
-> Eq ListResolverQueryLogConfigAssociations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResolverQueryLogConfigAssociations
-> ListResolverQueryLogConfigAssociations -> Bool
$c/= :: ListResolverQueryLogConfigAssociations
-> ListResolverQueryLogConfigAssociations -> Bool
== :: ListResolverQueryLogConfigAssociations
-> ListResolverQueryLogConfigAssociations -> Bool
$c== :: ListResolverQueryLogConfigAssociations
-> ListResolverQueryLogConfigAssociations -> Bool
Prelude.Eq, ReadPrec [ListResolverQueryLogConfigAssociations]
ReadPrec ListResolverQueryLogConfigAssociations
Int -> ReadS ListResolverQueryLogConfigAssociations
ReadS [ListResolverQueryLogConfigAssociations]
(Int -> ReadS ListResolverQueryLogConfigAssociations)
-> ReadS [ListResolverQueryLogConfigAssociations]
-> ReadPrec ListResolverQueryLogConfigAssociations
-> ReadPrec [ListResolverQueryLogConfigAssociations]
-> Read ListResolverQueryLogConfigAssociations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResolverQueryLogConfigAssociations]
$creadListPrec :: ReadPrec [ListResolverQueryLogConfigAssociations]
readPrec :: ReadPrec ListResolverQueryLogConfigAssociations
$creadPrec :: ReadPrec ListResolverQueryLogConfigAssociations
readList :: ReadS [ListResolverQueryLogConfigAssociations]
$creadList :: ReadS [ListResolverQueryLogConfigAssociations]
readsPrec :: Int -> ReadS ListResolverQueryLogConfigAssociations
$creadsPrec :: Int -> ReadS ListResolverQueryLogConfigAssociations
Prelude.Read, Int -> ListResolverQueryLogConfigAssociations -> ShowS
[ListResolverQueryLogConfigAssociations] -> ShowS
ListResolverQueryLogConfigAssociations -> String
(Int -> ListResolverQueryLogConfigAssociations -> ShowS)
-> (ListResolverQueryLogConfigAssociations -> String)
-> ([ListResolverQueryLogConfigAssociations] -> ShowS)
-> Show ListResolverQueryLogConfigAssociations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResolverQueryLogConfigAssociations] -> ShowS
$cshowList :: [ListResolverQueryLogConfigAssociations] -> ShowS
show :: ListResolverQueryLogConfigAssociations -> String
$cshow :: ListResolverQueryLogConfigAssociations -> String
showsPrec :: Int -> ListResolverQueryLogConfigAssociations -> ShowS
$cshowsPrec :: Int -> ListResolverQueryLogConfigAssociations -> ShowS
Prelude.Show, (forall x.
 ListResolverQueryLogConfigAssociations
 -> Rep ListResolverQueryLogConfigAssociations x)
-> (forall x.
    Rep ListResolverQueryLogConfigAssociations x
    -> ListResolverQueryLogConfigAssociations)
-> Generic ListResolverQueryLogConfigAssociations
forall x.
Rep ListResolverQueryLogConfigAssociations x
-> ListResolverQueryLogConfigAssociations
forall x.
ListResolverQueryLogConfigAssociations
-> Rep ListResolverQueryLogConfigAssociations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResolverQueryLogConfigAssociations x
-> ListResolverQueryLogConfigAssociations
$cfrom :: forall x.
ListResolverQueryLogConfigAssociations
-> Rep ListResolverQueryLogConfigAssociations x
Prelude.Generic)

-- |
-- Create a value of 'ListResolverQueryLogConfigAssociations' 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:
--
-- 'filters', 'listResolverQueryLogConfigAssociations_filters' - An optional specification to return a subset of query logging
-- associations.
--
-- If you submit a second or subsequent
-- @ListResolverQueryLogConfigAssociations@ request and specify the
-- @NextToken@ parameter, you must use the same values for @Filters@, if
-- any, as in the previous request.
--
-- 'nextToken', 'listResolverQueryLogConfigAssociations_nextToken' - For the first @ListResolverQueryLogConfigAssociations@ request, omit
-- this value.
--
-- If there are more than @MaxResults@ query logging associations that
-- match the values that you specify for @Filters@, you can submit another
-- @ListResolverQueryLogConfigAssociations@ request to get the next group
-- of associations. In the next request, specify the value of @NextToken@
-- from the previous response.
--
-- 'sortOrder', 'listResolverQueryLogConfigAssociations_sortOrder' - If you specified a value for @SortBy@, the order that you want query
-- logging associations to be listed in, @ASCENDING@ or @DESCENDING@.
--
-- If you submit a second or subsequent
-- @ListResolverQueryLogConfigAssociations@ request and specify the
-- @NextToken@ parameter, you must use the same value for @SortOrder@, if
-- any, as in the previous request.
--
-- 'maxResults', 'listResolverQueryLogConfigAssociations_maxResults' - The maximum number of query logging associations that you want to return
-- in the response to a @ListResolverQueryLogConfigAssociations@ request.
-- If you don\'t specify a value for @MaxResults@, Resolver returns up to
-- 100 query logging associations.
--
-- 'sortBy', 'listResolverQueryLogConfigAssociations_sortBy' - The element that you want Resolver to sort query logging associations
-- by.
--
-- If you submit a second or subsequent
-- @ListResolverQueryLogConfigAssociations@ request and specify the
-- @NextToken@ parameter, you must use the same value for @SortBy@, if any,
-- as in the previous request.
--
-- Valid values include the following elements:
--
-- -   @CreationTime@: The ID of the query logging association.
--
-- -   @Error@: If the value of @Status@ is @FAILED@, the value of @Error@
--     indicates the cause:
--
--     -   @DESTINATION_NOT_FOUND@: The specified destination (for example,
--         an Amazon S3 bucket) was deleted.
--
--     -   @ACCESS_DENIED@: Permissions don\'t allow sending logs to the
--         destination.
--
--     If @Status@ is a value other than @FAILED@, @ERROR@ is null.
--
-- -   @Id@: The ID of the query logging association
--
-- -   @ResolverQueryLogConfigId@: The ID of the query logging
--     configuration
--
-- -   @ResourceId@: The ID of the VPC that is associated with the query
--     logging configuration
--
-- -   @Status@: The current status of the configuration. Valid values
--     include the following:
--
--     -   @CREATING@: Resolver is creating an association between an
--         Amazon VPC and a query logging configuration.
--
--     -   @CREATED@: The association between an Amazon VPC and a query
--         logging configuration was successfully created. Resolver is
--         logging queries that originate in the specified VPC.
--
--     -   @DELETING@: Resolver is deleting this query logging association.
--
--     -   @FAILED@: Resolver either couldn\'t create or couldn\'t delete
--         the query logging association. Here are two common causes:
--
--         -   The specified destination (for example, an Amazon S3 bucket)
--             was deleted.
--
--         -   Permissions don\'t allow sending logs to the destination.
newListResolverQueryLogConfigAssociations ::
  ListResolverQueryLogConfigAssociations
newListResolverQueryLogConfigAssociations :: ListResolverQueryLogConfigAssociations
newListResolverQueryLogConfigAssociations =
  ListResolverQueryLogConfigAssociations' :: Maybe [Filter]
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe Text
-> ListResolverQueryLogConfigAssociations
ListResolverQueryLogConfigAssociations'
    { $sel:filters:ListResolverQueryLogConfigAssociations' :: Maybe [Filter]
filters =
        Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResolverQueryLogConfigAssociations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListResolverQueryLogConfigAssociations' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListResolverQueryLogConfigAssociations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListResolverQueryLogConfigAssociations' :: Maybe Text
sortBy = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | An optional specification to return a subset of query logging
-- associations.
--
-- If you submit a second or subsequent
-- @ListResolverQueryLogConfigAssociations@ request and specify the
-- @NextToken@ parameter, you must use the same values for @Filters@, if
-- any, as in the previous request.
listResolverQueryLogConfigAssociations_filters :: Lens.Lens' ListResolverQueryLogConfigAssociations (Prelude.Maybe [Filter])
listResolverQueryLogConfigAssociations_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ListResolverQueryLogConfigAssociations
-> f ListResolverQueryLogConfigAssociations
listResolverQueryLogConfigAssociations_filters = (ListResolverQueryLogConfigAssociations -> Maybe [Filter])
-> (ListResolverQueryLogConfigAssociations
    -> Maybe [Filter] -> ListResolverQueryLogConfigAssociations)
-> Lens
     ListResolverQueryLogConfigAssociations
     ListResolverQueryLogConfigAssociations
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociations' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListResolverQueryLogConfigAssociations
s@ListResolverQueryLogConfigAssociations' {} Maybe [Filter]
a -> ListResolverQueryLogConfigAssociations
s {$sel:filters:ListResolverQueryLogConfigAssociations' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListResolverQueryLogConfigAssociations) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> ListResolverQueryLogConfigAssociations
 -> f ListResolverQueryLogConfigAssociations)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListResolverQueryLogConfigAssociations
-> f ListResolverQueryLogConfigAssociations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | For the first @ListResolverQueryLogConfigAssociations@ request, omit
-- this value.
--
-- If there are more than @MaxResults@ query logging associations that
-- match the values that you specify for @Filters@, you can submit another
-- @ListResolverQueryLogConfigAssociations@ request to get the next group
-- of associations. In the next request, specify the value of @NextToken@
-- from the previous response.
listResolverQueryLogConfigAssociations_nextToken :: Lens.Lens' ListResolverQueryLogConfigAssociations (Prelude.Maybe Prelude.Text)
listResolverQueryLogConfigAssociations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResolverQueryLogConfigAssociations
-> f ListResolverQueryLogConfigAssociations
listResolverQueryLogConfigAssociations_nextToken = (ListResolverQueryLogConfigAssociations -> Maybe Text)
-> (ListResolverQueryLogConfigAssociations
    -> Maybe Text -> ListResolverQueryLogConfigAssociations)
-> Lens
     ListResolverQueryLogConfigAssociations
     ListResolverQueryLogConfigAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResolverQueryLogConfigAssociations
s@ListResolverQueryLogConfigAssociations' {} Maybe Text
a -> ListResolverQueryLogConfigAssociations
s {$sel:nextToken:ListResolverQueryLogConfigAssociations' :: Maybe Text
nextToken = Maybe Text
a} :: ListResolverQueryLogConfigAssociations)

-- | If you specified a value for @SortBy@, the order that you want query
-- logging associations to be listed in, @ASCENDING@ or @DESCENDING@.
--
-- If you submit a second or subsequent
-- @ListResolverQueryLogConfigAssociations@ request and specify the
-- @NextToken@ parameter, you must use the same value for @SortOrder@, if
-- any, as in the previous request.
listResolverQueryLogConfigAssociations_sortOrder :: Lens.Lens' ListResolverQueryLogConfigAssociations (Prelude.Maybe SortOrder)
listResolverQueryLogConfigAssociations_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListResolverQueryLogConfigAssociations
-> f ListResolverQueryLogConfigAssociations
listResolverQueryLogConfigAssociations_sortOrder = (ListResolverQueryLogConfigAssociations -> Maybe SortOrder)
-> (ListResolverQueryLogConfigAssociations
    -> Maybe SortOrder -> ListResolverQueryLogConfigAssociations)
-> Lens
     ListResolverQueryLogConfigAssociations
     ListResolverQueryLogConfigAssociations
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociations' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListResolverQueryLogConfigAssociations
s@ListResolverQueryLogConfigAssociations' {} Maybe SortOrder
a -> ListResolverQueryLogConfigAssociations
s {$sel:sortOrder:ListResolverQueryLogConfigAssociations' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListResolverQueryLogConfigAssociations)

-- | The maximum number of query logging associations that you want to return
-- in the response to a @ListResolverQueryLogConfigAssociations@ request.
-- If you don\'t specify a value for @MaxResults@, Resolver returns up to
-- 100 query logging associations.
listResolverQueryLogConfigAssociations_maxResults :: Lens.Lens' ListResolverQueryLogConfigAssociations (Prelude.Maybe Prelude.Natural)
listResolverQueryLogConfigAssociations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListResolverQueryLogConfigAssociations
-> f ListResolverQueryLogConfigAssociations
listResolverQueryLogConfigAssociations_maxResults = (ListResolverQueryLogConfigAssociations -> Maybe Natural)
-> (ListResolverQueryLogConfigAssociations
    -> Maybe Natural -> ListResolverQueryLogConfigAssociations)
-> Lens
     ListResolverQueryLogConfigAssociations
     ListResolverQueryLogConfigAssociations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListResolverQueryLogConfigAssociations
s@ListResolverQueryLogConfigAssociations' {} Maybe Natural
a -> ListResolverQueryLogConfigAssociations
s {$sel:maxResults:ListResolverQueryLogConfigAssociations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListResolverQueryLogConfigAssociations)

-- | The element that you want Resolver to sort query logging associations
-- by.
--
-- If you submit a second or subsequent
-- @ListResolverQueryLogConfigAssociations@ request and specify the
-- @NextToken@ parameter, you must use the same value for @SortBy@, if any,
-- as in the previous request.
--
-- Valid values include the following elements:
--
-- -   @CreationTime@: The ID of the query logging association.
--
-- -   @Error@: If the value of @Status@ is @FAILED@, the value of @Error@
--     indicates the cause:
--
--     -   @DESTINATION_NOT_FOUND@: The specified destination (for example,
--         an Amazon S3 bucket) was deleted.
--
--     -   @ACCESS_DENIED@: Permissions don\'t allow sending logs to the
--         destination.
--
--     If @Status@ is a value other than @FAILED@, @ERROR@ is null.
--
-- -   @Id@: The ID of the query logging association
--
-- -   @ResolverQueryLogConfigId@: The ID of the query logging
--     configuration
--
-- -   @ResourceId@: The ID of the VPC that is associated with the query
--     logging configuration
--
-- -   @Status@: The current status of the configuration. Valid values
--     include the following:
--
--     -   @CREATING@: Resolver is creating an association between an
--         Amazon VPC and a query logging configuration.
--
--     -   @CREATED@: The association between an Amazon VPC and a query
--         logging configuration was successfully created. Resolver is
--         logging queries that originate in the specified VPC.
--
--     -   @DELETING@: Resolver is deleting this query logging association.
--
--     -   @FAILED@: Resolver either couldn\'t create or couldn\'t delete
--         the query logging association. Here are two common causes:
--
--         -   The specified destination (for example, an Amazon S3 bucket)
--             was deleted.
--
--         -   Permissions don\'t allow sending logs to the destination.
listResolverQueryLogConfigAssociations_sortBy :: Lens.Lens' ListResolverQueryLogConfigAssociations (Prelude.Maybe Prelude.Text)
listResolverQueryLogConfigAssociations_sortBy :: (Maybe Text -> f (Maybe Text))
-> ListResolverQueryLogConfigAssociations
-> f ListResolverQueryLogConfigAssociations
listResolverQueryLogConfigAssociations_sortBy = (ListResolverQueryLogConfigAssociations -> Maybe Text)
-> (ListResolverQueryLogConfigAssociations
    -> Maybe Text -> ListResolverQueryLogConfigAssociations)
-> Lens
     ListResolverQueryLogConfigAssociations
     ListResolverQueryLogConfigAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociations' {Maybe Text
sortBy :: Maybe Text
$sel:sortBy:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe Text
sortBy} -> Maybe Text
sortBy) (\s :: ListResolverQueryLogConfigAssociations
s@ListResolverQueryLogConfigAssociations' {} Maybe Text
a -> ListResolverQueryLogConfigAssociations
s {$sel:sortBy:ListResolverQueryLogConfigAssociations' :: Maybe Text
sortBy = Maybe Text
a} :: ListResolverQueryLogConfigAssociations)

instance
  Core.AWSPager
    ListResolverQueryLogConfigAssociations
  where
  page :: ListResolverQueryLogConfigAssociations
-> AWSResponse ListResolverQueryLogConfigAssociations
-> Maybe ListResolverQueryLogConfigAssociations
page ListResolverQueryLogConfigAssociations
rq AWSResponse ListResolverQueryLogConfigAssociations
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListResolverQueryLogConfigAssociations
ListResolverQueryLogConfigAssociationsResponse
rs
            ListResolverQueryLogConfigAssociationsResponse
-> Getting
     (First Text) ListResolverQueryLogConfigAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResolverQueryLogConfigAssociationsResponse
-> Const
     (First Text) ListResolverQueryLogConfigAssociationsResponse
Lens' ListResolverQueryLogConfigAssociationsResponse (Maybe Text)
listResolverQueryLogConfigAssociationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListResolverQueryLogConfigAssociationsResponse
 -> Const
      (First Text) ListResolverQueryLogConfigAssociationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) ListResolverQueryLogConfigAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListResolverQueryLogConfigAssociations
forall a. Maybe a
Prelude.Nothing
    | Maybe [ResolverQueryLogConfigAssociation] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListResolverQueryLogConfigAssociations
ListResolverQueryLogConfigAssociationsResponse
rs
            ListResolverQueryLogConfigAssociationsResponse
-> Getting
     (First [ResolverQueryLogConfigAssociation])
     ListResolverQueryLogConfigAssociationsResponse
     [ResolverQueryLogConfigAssociation]
-> Maybe [ResolverQueryLogConfigAssociation]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ResolverQueryLogConfigAssociation]
 -> Const
      (First [ResolverQueryLogConfigAssociation])
      (Maybe [ResolverQueryLogConfigAssociation]))
-> ListResolverQueryLogConfigAssociationsResponse
-> Const
     (First [ResolverQueryLogConfigAssociation])
     ListResolverQueryLogConfigAssociationsResponse
Lens'
  ListResolverQueryLogConfigAssociationsResponse
  (Maybe [ResolverQueryLogConfigAssociation])
listResolverQueryLogConfigAssociationsResponse_resolverQueryLogConfigAssociations
              ((Maybe [ResolverQueryLogConfigAssociation]
  -> Const
       (First [ResolverQueryLogConfigAssociation])
       (Maybe [ResolverQueryLogConfigAssociation]))
 -> ListResolverQueryLogConfigAssociationsResponse
 -> Const
      (First [ResolverQueryLogConfigAssociation])
      ListResolverQueryLogConfigAssociationsResponse)
-> (([ResolverQueryLogConfigAssociation]
     -> Const
          (First [ResolverQueryLogConfigAssociation])
          [ResolverQueryLogConfigAssociation])
    -> Maybe [ResolverQueryLogConfigAssociation]
    -> Const
         (First [ResolverQueryLogConfigAssociation])
         (Maybe [ResolverQueryLogConfigAssociation]))
-> Getting
     (First [ResolverQueryLogConfigAssociation])
     ListResolverQueryLogConfigAssociationsResponse
     [ResolverQueryLogConfigAssociation]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ResolverQueryLogConfigAssociation]
 -> Const
      (First [ResolverQueryLogConfigAssociation])
      [ResolverQueryLogConfigAssociation])
-> Maybe [ResolverQueryLogConfigAssociation]
-> Const
     (First [ResolverQueryLogConfigAssociation])
     (Maybe [ResolverQueryLogConfigAssociation])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListResolverQueryLogConfigAssociations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListResolverQueryLogConfigAssociations
-> Maybe ListResolverQueryLogConfigAssociations
forall a. a -> Maybe a
Prelude.Just (ListResolverQueryLogConfigAssociations
 -> Maybe ListResolverQueryLogConfigAssociations)
-> ListResolverQueryLogConfigAssociations
-> Maybe ListResolverQueryLogConfigAssociations
forall a b. (a -> b) -> a -> b
Prelude.$
        ListResolverQueryLogConfigAssociations
rq
          ListResolverQueryLogConfigAssociations
-> (ListResolverQueryLogConfigAssociations
    -> ListResolverQueryLogConfigAssociations)
-> ListResolverQueryLogConfigAssociations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListResolverQueryLogConfigAssociations
-> Identity ListResolverQueryLogConfigAssociations
Lens
  ListResolverQueryLogConfigAssociations
  ListResolverQueryLogConfigAssociations
  (Maybe Text)
  (Maybe Text)
listResolverQueryLogConfigAssociations_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListResolverQueryLogConfigAssociations
 -> Identity ListResolverQueryLogConfigAssociations)
-> Maybe Text
-> ListResolverQueryLogConfigAssociations
-> ListResolverQueryLogConfigAssociations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListResolverQueryLogConfigAssociations
ListResolverQueryLogConfigAssociationsResponse
rs
            ListResolverQueryLogConfigAssociationsResponse
-> Getting
     (First Text) ListResolverQueryLogConfigAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResolverQueryLogConfigAssociationsResponse
-> Const
     (First Text) ListResolverQueryLogConfigAssociationsResponse
Lens' ListResolverQueryLogConfigAssociationsResponse (Maybe Text)
listResolverQueryLogConfigAssociationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListResolverQueryLogConfigAssociationsResponse
 -> Const
      (First Text) ListResolverQueryLogConfigAssociationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) ListResolverQueryLogConfigAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    ListResolverQueryLogConfigAssociations
  where
  type
    AWSResponse
      ListResolverQueryLogConfigAssociations =
      ListResolverQueryLogConfigAssociationsResponse
  request :: ListResolverQueryLogConfigAssociations
-> Request ListResolverQueryLogConfigAssociations
request = Service
-> ListResolverQueryLogConfigAssociations
-> Request ListResolverQueryLogConfigAssociations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListResolverQueryLogConfigAssociations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListResolverQueryLogConfigAssociations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse ListResolverQueryLogConfigAssociations))
-> Logger
-> Service
-> Proxy ListResolverQueryLogConfigAssociations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListResolverQueryLogConfigAssociations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Int
-> Maybe [ResolverQueryLogConfigAssociation]
-> Maybe Text
-> Maybe Int
-> Int
-> ListResolverQueryLogConfigAssociationsResponse
ListResolverQueryLogConfigAssociationsResponse'
            (Maybe Int
 -> Maybe [ResolverQueryLogConfigAssociation]
 -> Maybe Text
 -> Maybe Int
 -> Int
 -> ListResolverQueryLogConfigAssociationsResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [ResolverQueryLogConfigAssociation]
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> ListResolverQueryLogConfigAssociationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalFilteredCount")
              Either
  String
  (Maybe [ResolverQueryLogConfigAssociation]
   -> Maybe Text
   -> Maybe Int
   -> Int
   -> ListResolverQueryLogConfigAssociationsResponse)
-> Either String (Maybe [ResolverQueryLogConfigAssociation])
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Int
      -> ListResolverQueryLogConfigAssociationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe [ResolverQueryLogConfigAssociation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResolverQueryLogConfigAssociations"
                              Either String (Maybe (Maybe [ResolverQueryLogConfigAssociation]))
-> Maybe [ResolverQueryLogConfigAssociation]
-> Either String (Maybe [ResolverQueryLogConfigAssociation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ResolverQueryLogConfigAssociation]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String
  (Maybe Text
   -> Maybe Int
   -> Int
   -> ListResolverQueryLogConfigAssociationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Int -> ListResolverQueryLogConfigAssociationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
              Either
  String
  (Maybe Int
   -> Int -> ListResolverQueryLogConfigAssociationsResponse)
-> Either String (Maybe Int)
-> Either
     String (Int -> ListResolverQueryLogConfigAssociationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalCount")
              Either
  String (Int -> ListResolverQueryLogConfigAssociationsResponse)
-> Either String Int
-> Either String ListResolverQueryLogConfigAssociationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListResolverQueryLogConfigAssociations

instance
  Prelude.NFData
    ListResolverQueryLogConfigAssociations

instance
  Core.ToHeaders
    ListResolverQueryLogConfigAssociations
  where
  toHeaders :: ListResolverQueryLogConfigAssociations -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ListResolverQueryLogConfigAssociations -> 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
"Route53Resolver.ListResolverQueryLogConfigAssociations" ::
                          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
    ListResolverQueryLogConfigAssociations
  where
  toJSON :: ListResolverQueryLogConfigAssociations -> Value
toJSON ListResolverQueryLogConfigAssociations' {Maybe Natural
Maybe [Filter]
Maybe Text
Maybe SortOrder
sortBy :: Maybe Text
maxResults :: Maybe Natural
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:sortBy:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe Text
$sel:maxResults:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe Natural
$sel:sortOrder:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe SortOrder
$sel:nextToken:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe Text
$sel:filters:ListResolverQueryLogConfigAssociations' :: ListResolverQueryLogConfigAssociations -> Maybe [Filter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Text
"SortBy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sortBy
          ]
      )

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

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

-- | /See:/ 'newListResolverQueryLogConfigAssociationsResponse' smart constructor.
data ListResolverQueryLogConfigAssociationsResponse = ListResolverQueryLogConfigAssociationsResponse'
  { -- | The total number of query logging associations that were created by the
    -- current account in the specified Region and that match the filters that
    -- were specified in the @ListResolverQueryLogConfigAssociations@ request.
    -- For the total number of associations that were created by the current
    -- account in the specified Region, see @TotalCount@.
    ListResolverQueryLogConfigAssociationsResponse -> Maybe Int
totalFilteredCount :: Prelude.Maybe Prelude.Int,
    -- | A list that contains one @ResolverQueryLogConfigAssociations@ element
    -- for each query logging association that matches the values that you
    -- specified for @Filter@.
    ListResolverQueryLogConfigAssociationsResponse
-> Maybe [ResolverQueryLogConfigAssociation]
resolverQueryLogConfigAssociations :: Prelude.Maybe [ResolverQueryLogConfigAssociation],
    -- | If there are more than @MaxResults@ query logging associations, you can
    -- submit another @ListResolverQueryLogConfigAssociations@ request to get
    -- the next group of associations. In the next request, specify the value
    -- of @NextToken@ from the previous response.
    ListResolverQueryLogConfigAssociationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The total number of query logging associations that were created by the
    -- current account in the specified Region. This count can differ from the
    -- number of associations that are returned in a
    -- @ListResolverQueryLogConfigAssociations@ response, depending on the
    -- values that you specify in the request.
    ListResolverQueryLogConfigAssociationsResponse -> Maybe Int
totalCount :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    ListResolverQueryLogConfigAssociationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListResolverQueryLogConfigAssociationsResponse
-> ListResolverQueryLogConfigAssociationsResponse -> Bool
(ListResolverQueryLogConfigAssociationsResponse
 -> ListResolverQueryLogConfigAssociationsResponse -> Bool)
-> (ListResolverQueryLogConfigAssociationsResponse
    -> ListResolverQueryLogConfigAssociationsResponse -> Bool)
-> Eq ListResolverQueryLogConfigAssociationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResolverQueryLogConfigAssociationsResponse
-> ListResolverQueryLogConfigAssociationsResponse -> Bool
$c/= :: ListResolverQueryLogConfigAssociationsResponse
-> ListResolverQueryLogConfigAssociationsResponse -> Bool
== :: ListResolverQueryLogConfigAssociationsResponse
-> ListResolverQueryLogConfigAssociationsResponse -> Bool
$c== :: ListResolverQueryLogConfigAssociationsResponse
-> ListResolverQueryLogConfigAssociationsResponse -> Bool
Prelude.Eq, ReadPrec [ListResolverQueryLogConfigAssociationsResponse]
ReadPrec ListResolverQueryLogConfigAssociationsResponse
Int -> ReadS ListResolverQueryLogConfigAssociationsResponse
ReadS [ListResolverQueryLogConfigAssociationsResponse]
(Int -> ReadS ListResolverQueryLogConfigAssociationsResponse)
-> ReadS [ListResolverQueryLogConfigAssociationsResponse]
-> ReadPrec ListResolverQueryLogConfigAssociationsResponse
-> ReadPrec [ListResolverQueryLogConfigAssociationsResponse]
-> Read ListResolverQueryLogConfigAssociationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResolverQueryLogConfigAssociationsResponse]
$creadListPrec :: ReadPrec [ListResolverQueryLogConfigAssociationsResponse]
readPrec :: ReadPrec ListResolverQueryLogConfigAssociationsResponse
$creadPrec :: ReadPrec ListResolverQueryLogConfigAssociationsResponse
readList :: ReadS [ListResolverQueryLogConfigAssociationsResponse]
$creadList :: ReadS [ListResolverQueryLogConfigAssociationsResponse]
readsPrec :: Int -> ReadS ListResolverQueryLogConfigAssociationsResponse
$creadsPrec :: Int -> ReadS ListResolverQueryLogConfigAssociationsResponse
Prelude.Read, Int -> ListResolverQueryLogConfigAssociationsResponse -> ShowS
[ListResolverQueryLogConfigAssociationsResponse] -> ShowS
ListResolverQueryLogConfigAssociationsResponse -> String
(Int -> ListResolverQueryLogConfigAssociationsResponse -> ShowS)
-> (ListResolverQueryLogConfigAssociationsResponse -> String)
-> ([ListResolverQueryLogConfigAssociationsResponse] -> ShowS)
-> Show ListResolverQueryLogConfigAssociationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResolverQueryLogConfigAssociationsResponse] -> ShowS
$cshowList :: [ListResolverQueryLogConfigAssociationsResponse] -> ShowS
show :: ListResolverQueryLogConfigAssociationsResponse -> String
$cshow :: ListResolverQueryLogConfigAssociationsResponse -> String
showsPrec :: Int -> ListResolverQueryLogConfigAssociationsResponse -> ShowS
$cshowsPrec :: Int -> ListResolverQueryLogConfigAssociationsResponse -> ShowS
Prelude.Show, (forall x.
 ListResolverQueryLogConfigAssociationsResponse
 -> Rep ListResolverQueryLogConfigAssociationsResponse x)
-> (forall x.
    Rep ListResolverQueryLogConfigAssociationsResponse x
    -> ListResolverQueryLogConfigAssociationsResponse)
-> Generic ListResolverQueryLogConfigAssociationsResponse
forall x.
Rep ListResolverQueryLogConfigAssociationsResponse x
-> ListResolverQueryLogConfigAssociationsResponse
forall x.
ListResolverQueryLogConfigAssociationsResponse
-> Rep ListResolverQueryLogConfigAssociationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResolverQueryLogConfigAssociationsResponse x
-> ListResolverQueryLogConfigAssociationsResponse
$cfrom :: forall x.
ListResolverQueryLogConfigAssociationsResponse
-> Rep ListResolverQueryLogConfigAssociationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListResolverQueryLogConfigAssociationsResponse' 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:
--
-- 'totalFilteredCount', 'listResolverQueryLogConfigAssociationsResponse_totalFilteredCount' - The total number of query logging associations that were created by the
-- current account in the specified Region and that match the filters that
-- were specified in the @ListResolverQueryLogConfigAssociations@ request.
-- For the total number of associations that were created by the current
-- account in the specified Region, see @TotalCount@.
--
-- 'resolverQueryLogConfigAssociations', 'listResolverQueryLogConfigAssociationsResponse_resolverQueryLogConfigAssociations' - A list that contains one @ResolverQueryLogConfigAssociations@ element
-- for each query logging association that matches the values that you
-- specified for @Filter@.
--
-- 'nextToken', 'listResolverQueryLogConfigAssociationsResponse_nextToken' - If there are more than @MaxResults@ query logging associations, you can
-- submit another @ListResolverQueryLogConfigAssociations@ request to get
-- the next group of associations. In the next request, specify the value
-- of @NextToken@ from the previous response.
--
-- 'totalCount', 'listResolverQueryLogConfigAssociationsResponse_totalCount' - The total number of query logging associations that were created by the
-- current account in the specified Region. This count can differ from the
-- number of associations that are returned in a
-- @ListResolverQueryLogConfigAssociations@ response, depending on the
-- values that you specify in the request.
--
-- 'httpStatus', 'listResolverQueryLogConfigAssociationsResponse_httpStatus' - The response's http status code.
newListResolverQueryLogConfigAssociationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResolverQueryLogConfigAssociationsResponse
newListResolverQueryLogConfigAssociationsResponse :: Int -> ListResolverQueryLogConfigAssociationsResponse
newListResolverQueryLogConfigAssociationsResponse
  Int
pHttpStatus_ =
    ListResolverQueryLogConfigAssociationsResponse' :: Maybe Int
-> Maybe [ResolverQueryLogConfigAssociation]
-> Maybe Text
-> Maybe Int
-> Int
-> ListResolverQueryLogConfigAssociationsResponse
ListResolverQueryLogConfigAssociationsResponse'
      { $sel:totalFilteredCount:ListResolverQueryLogConfigAssociationsResponse' :: Maybe Int
totalFilteredCount =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:resolverQueryLogConfigAssociations:ListResolverQueryLogConfigAssociationsResponse' :: Maybe [ResolverQueryLogConfigAssociation]
resolverQueryLogConfigAssociations =
          Maybe [ResolverQueryLogConfigAssociation]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListResolverQueryLogConfigAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:totalCount:ListResolverQueryLogConfigAssociationsResponse' :: Maybe Int
totalCount =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListResolverQueryLogConfigAssociationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The total number of query logging associations that were created by the
-- current account in the specified Region and that match the filters that
-- were specified in the @ListResolverQueryLogConfigAssociations@ request.
-- For the total number of associations that were created by the current
-- account in the specified Region, see @TotalCount@.
listResolverQueryLogConfigAssociationsResponse_totalFilteredCount :: Lens.Lens' ListResolverQueryLogConfigAssociationsResponse (Prelude.Maybe Prelude.Int)
listResolverQueryLogConfigAssociationsResponse_totalFilteredCount :: (Maybe Int -> f (Maybe Int))
-> ListResolverQueryLogConfigAssociationsResponse
-> f ListResolverQueryLogConfigAssociationsResponse
listResolverQueryLogConfigAssociationsResponse_totalFilteredCount = (ListResolverQueryLogConfigAssociationsResponse -> Maybe Int)
-> (ListResolverQueryLogConfigAssociationsResponse
    -> Maybe Int -> ListResolverQueryLogConfigAssociationsResponse)
-> Lens
     ListResolverQueryLogConfigAssociationsResponse
     ListResolverQueryLogConfigAssociationsResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociationsResponse' {Maybe Int
totalFilteredCount :: Maybe Int
$sel:totalFilteredCount:ListResolverQueryLogConfigAssociationsResponse' :: ListResolverQueryLogConfigAssociationsResponse -> Maybe Int
totalFilteredCount} -> Maybe Int
totalFilteredCount) (\s :: ListResolverQueryLogConfigAssociationsResponse
s@ListResolverQueryLogConfigAssociationsResponse' {} Maybe Int
a -> ListResolverQueryLogConfigAssociationsResponse
s {$sel:totalFilteredCount:ListResolverQueryLogConfigAssociationsResponse' :: Maybe Int
totalFilteredCount = Maybe Int
a} :: ListResolverQueryLogConfigAssociationsResponse)

-- | A list that contains one @ResolverQueryLogConfigAssociations@ element
-- for each query logging association that matches the values that you
-- specified for @Filter@.
listResolverQueryLogConfigAssociationsResponse_resolverQueryLogConfigAssociations :: Lens.Lens' ListResolverQueryLogConfigAssociationsResponse (Prelude.Maybe [ResolverQueryLogConfigAssociation])
listResolverQueryLogConfigAssociationsResponse_resolverQueryLogConfigAssociations :: (Maybe [ResolverQueryLogConfigAssociation]
 -> f (Maybe [ResolverQueryLogConfigAssociation]))
-> ListResolverQueryLogConfigAssociationsResponse
-> f ListResolverQueryLogConfigAssociationsResponse
listResolverQueryLogConfigAssociationsResponse_resolverQueryLogConfigAssociations = (ListResolverQueryLogConfigAssociationsResponse
 -> Maybe [ResolverQueryLogConfigAssociation])
-> (ListResolverQueryLogConfigAssociationsResponse
    -> Maybe [ResolverQueryLogConfigAssociation]
    -> ListResolverQueryLogConfigAssociationsResponse)
-> Lens'
     ListResolverQueryLogConfigAssociationsResponse
     (Maybe [ResolverQueryLogConfigAssociation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociationsResponse' {Maybe [ResolverQueryLogConfigAssociation]
resolverQueryLogConfigAssociations :: Maybe [ResolverQueryLogConfigAssociation]
$sel:resolverQueryLogConfigAssociations:ListResolverQueryLogConfigAssociationsResponse' :: ListResolverQueryLogConfigAssociationsResponse
-> Maybe [ResolverQueryLogConfigAssociation]
resolverQueryLogConfigAssociations} -> Maybe [ResolverQueryLogConfigAssociation]
resolverQueryLogConfigAssociations) (\s :: ListResolverQueryLogConfigAssociationsResponse
s@ListResolverQueryLogConfigAssociationsResponse' {} Maybe [ResolverQueryLogConfigAssociation]
a -> ListResolverQueryLogConfigAssociationsResponse
s {$sel:resolverQueryLogConfigAssociations:ListResolverQueryLogConfigAssociationsResponse' :: Maybe [ResolverQueryLogConfigAssociation]
resolverQueryLogConfigAssociations = Maybe [ResolverQueryLogConfigAssociation]
a} :: ListResolverQueryLogConfigAssociationsResponse) ((Maybe [ResolverQueryLogConfigAssociation]
  -> f (Maybe [ResolverQueryLogConfigAssociation]))
 -> ListResolverQueryLogConfigAssociationsResponse
 -> f ListResolverQueryLogConfigAssociationsResponse)
-> ((Maybe [ResolverQueryLogConfigAssociation]
     -> f (Maybe [ResolverQueryLogConfigAssociation]))
    -> Maybe [ResolverQueryLogConfigAssociation]
    -> f (Maybe [ResolverQueryLogConfigAssociation]))
-> (Maybe [ResolverQueryLogConfigAssociation]
    -> f (Maybe [ResolverQueryLogConfigAssociation]))
-> ListResolverQueryLogConfigAssociationsResponse
-> f ListResolverQueryLogConfigAssociationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResolverQueryLogConfigAssociation]
  [ResolverQueryLogConfigAssociation]
  [ResolverQueryLogConfigAssociation]
  [ResolverQueryLogConfigAssociation]
-> Iso
     (Maybe [ResolverQueryLogConfigAssociation])
     (Maybe [ResolverQueryLogConfigAssociation])
     (Maybe [ResolverQueryLogConfigAssociation])
     (Maybe [ResolverQueryLogConfigAssociation])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [ResolverQueryLogConfigAssociation]
  [ResolverQueryLogConfigAssociation]
  [ResolverQueryLogConfigAssociation]
  [ResolverQueryLogConfigAssociation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If there are more than @MaxResults@ query logging associations, you can
-- submit another @ListResolverQueryLogConfigAssociations@ request to get
-- the next group of associations. In the next request, specify the value
-- of @NextToken@ from the previous response.
listResolverQueryLogConfigAssociationsResponse_nextToken :: Lens.Lens' ListResolverQueryLogConfigAssociationsResponse (Prelude.Maybe Prelude.Text)
listResolverQueryLogConfigAssociationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResolverQueryLogConfigAssociationsResponse
-> f ListResolverQueryLogConfigAssociationsResponse
listResolverQueryLogConfigAssociationsResponse_nextToken = (ListResolverQueryLogConfigAssociationsResponse -> Maybe Text)
-> (ListResolverQueryLogConfigAssociationsResponse
    -> Maybe Text -> ListResolverQueryLogConfigAssociationsResponse)
-> Lens'
     ListResolverQueryLogConfigAssociationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResolverQueryLogConfigAssociationsResponse' :: ListResolverQueryLogConfigAssociationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResolverQueryLogConfigAssociationsResponse
s@ListResolverQueryLogConfigAssociationsResponse' {} Maybe Text
a -> ListResolverQueryLogConfigAssociationsResponse
s {$sel:nextToken:ListResolverQueryLogConfigAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListResolverQueryLogConfigAssociationsResponse)

-- | The total number of query logging associations that were created by the
-- current account in the specified Region. This count can differ from the
-- number of associations that are returned in a
-- @ListResolverQueryLogConfigAssociations@ response, depending on the
-- values that you specify in the request.
listResolverQueryLogConfigAssociationsResponse_totalCount :: Lens.Lens' ListResolverQueryLogConfigAssociationsResponse (Prelude.Maybe Prelude.Int)
listResolverQueryLogConfigAssociationsResponse_totalCount :: (Maybe Int -> f (Maybe Int))
-> ListResolverQueryLogConfigAssociationsResponse
-> f ListResolverQueryLogConfigAssociationsResponse
listResolverQueryLogConfigAssociationsResponse_totalCount = (ListResolverQueryLogConfigAssociationsResponse -> Maybe Int)
-> (ListResolverQueryLogConfigAssociationsResponse
    -> Maybe Int -> ListResolverQueryLogConfigAssociationsResponse)
-> Lens
     ListResolverQueryLogConfigAssociationsResponse
     ListResolverQueryLogConfigAssociationsResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigAssociationsResponse' {Maybe Int
totalCount :: Maybe Int
$sel:totalCount:ListResolverQueryLogConfigAssociationsResponse' :: ListResolverQueryLogConfigAssociationsResponse -> Maybe Int
totalCount} -> Maybe Int
totalCount) (\s :: ListResolverQueryLogConfigAssociationsResponse
s@ListResolverQueryLogConfigAssociationsResponse' {} Maybe Int
a -> ListResolverQueryLogConfigAssociationsResponse
s {$sel:totalCount:ListResolverQueryLogConfigAssociationsResponse' :: Maybe Int
totalCount = Maybe Int
a} :: ListResolverQueryLogConfigAssociationsResponse)

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

instance
  Prelude.NFData
    ListResolverQueryLogConfigAssociationsResponse