amazonka-config-1.6.0: Amazon Config SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Config.GetDiscoveredResourceCounts

Contents

Description

Returns the resource types, the number of each resource type, and the total number of resources that AWS Config is recording in this region for your AWS account.

Example

  • AWS Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets.
  • You make a call to the GetDiscoveredResourceCounts action and specify that you want all resource types.
  • AWS Config returns the following:
  • The resource types (EC2 instances, IAM users, and S3 buckets).
  • The number of each resource type (25, 20, and 15).
  • The total number of all resources (60).

The response is paginated. By default, AWS Config lists 100 ResourceCount objects on each page. You can customize this number with the limit parameter. The response includes a nextToken string. To get the next page of results, run the request again and specify the string for the nextToken parameter.

Synopsis

Creating a Request

getDiscoveredResourceCounts :: GetDiscoveredResourceCounts #

Creates a value of GetDiscoveredResourceCounts with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • gdrcNextToken - The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.
  • gdrcLimit - The maximum number of ResourceCount objects returned on each page. The default is 100. You cannot specify a number greater than 100. If you specify 0, AWS Config uses the default.
  • gdrcResourceTypes - The comma-separated list that specifies the resource types that you want AWS Config to return (for example, AWS::EC2::Instance , AWS::IAM::User ). If a value for resourceTypes is not specified, AWS Config returns all resource types that AWS Config is recording in the region for your account.

data GetDiscoveredResourceCounts #

See: getDiscoveredResourceCounts smart constructor.

Instances

Eq GetDiscoveredResourceCounts # 
Data GetDiscoveredResourceCounts # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetDiscoveredResourceCounts -> c GetDiscoveredResourceCounts #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetDiscoveredResourceCounts #

toConstr :: GetDiscoveredResourceCounts -> Constr #

dataTypeOf :: GetDiscoveredResourceCounts -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetDiscoveredResourceCounts) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetDiscoveredResourceCounts) #

gmapT :: (forall b. Data b => b -> b) -> GetDiscoveredResourceCounts -> GetDiscoveredResourceCounts #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetDiscoveredResourceCounts -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetDiscoveredResourceCounts -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetDiscoveredResourceCounts -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetDiscoveredResourceCounts -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetDiscoveredResourceCounts -> m GetDiscoveredResourceCounts #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetDiscoveredResourceCounts -> m GetDiscoveredResourceCounts #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetDiscoveredResourceCounts -> m GetDiscoveredResourceCounts #

Read GetDiscoveredResourceCounts # 
Show GetDiscoveredResourceCounts # 
Generic GetDiscoveredResourceCounts # 
Hashable GetDiscoveredResourceCounts # 
ToJSON GetDiscoveredResourceCounts # 
NFData GetDiscoveredResourceCounts # 
AWSRequest GetDiscoveredResourceCounts # 
ToHeaders GetDiscoveredResourceCounts # 
ToPath GetDiscoveredResourceCounts # 
ToQuery GetDiscoveredResourceCounts # 
type Rep GetDiscoveredResourceCounts # 
type Rep GetDiscoveredResourceCounts = D1 * (MetaData "GetDiscoveredResourceCounts" "Network.AWS.Config.GetDiscoveredResourceCounts" "amazonka-config-1.6.0-BQWWAOBXDMaLRM4ns599nE" False) (C1 * (MetaCons "GetDiscoveredResourceCounts'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_gdrcNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gdrcLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Nat))) (S1 * (MetaSel (Just Symbol "_gdrcResourceTypes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Text]))))))
type Rs GetDiscoveredResourceCounts # 

Request Lenses

gdrcNextToken :: Lens' GetDiscoveredResourceCounts (Maybe Text) #

The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

gdrcLimit :: Lens' GetDiscoveredResourceCounts (Maybe Natural) #

The maximum number of ResourceCount objects returned on each page. The default is 100. You cannot specify a number greater than 100. If you specify 0, AWS Config uses the default.

gdrcResourceTypes :: Lens' GetDiscoveredResourceCounts [Text] #

The comma-separated list that specifies the resource types that you want AWS Config to return (for example, AWS::EC2::Instance , AWS::IAM::User ). If a value for resourceTypes is not specified, AWS Config returns all resource types that AWS Config is recording in the region for your account.

Destructuring the Response

getDiscoveredResourceCountsResponse #

Creates a value of GetDiscoveredResourceCountsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • gdrcrsTotalDiscoveredResources - The total number of resources that AWS Config is recording in the region for your account. If you specify resource types in the request, AWS Config returns only the total number of resources for those resource types. Example * AWS Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for a total of 60 resources. * You make a call to the GetDiscoveredResourceCounts action and specify the resource type, AWS::EC2::Instances , in the request. * AWS Config returns 25 for totalDiscoveredResources .
  • gdrcrsNextToken - The string that you use in a subsequent request to get the next page of results in a paginated response.
  • gdrcrsResourceCounts - The list of ResourceCount objects. Each object is listed in descending order by the number of resources.
  • gdrcrsResponseStatus - -- | The response status code.

data GetDiscoveredResourceCountsResponse #

See: getDiscoveredResourceCountsResponse smart constructor.

Instances

Eq GetDiscoveredResourceCountsResponse # 
Data GetDiscoveredResourceCountsResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetDiscoveredResourceCountsResponse -> c GetDiscoveredResourceCountsResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetDiscoveredResourceCountsResponse #

toConstr :: GetDiscoveredResourceCountsResponse -> Constr #

dataTypeOf :: GetDiscoveredResourceCountsResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetDiscoveredResourceCountsResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetDiscoveredResourceCountsResponse) #

gmapT :: (forall b. Data b => b -> b) -> GetDiscoveredResourceCountsResponse -> GetDiscoveredResourceCountsResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetDiscoveredResourceCountsResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetDiscoveredResourceCountsResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetDiscoveredResourceCountsResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetDiscoveredResourceCountsResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetDiscoveredResourceCountsResponse -> m GetDiscoveredResourceCountsResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetDiscoveredResourceCountsResponse -> m GetDiscoveredResourceCountsResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetDiscoveredResourceCountsResponse -> m GetDiscoveredResourceCountsResponse #

Read GetDiscoveredResourceCountsResponse # 
Show GetDiscoveredResourceCountsResponse # 
Generic GetDiscoveredResourceCountsResponse # 
NFData GetDiscoveredResourceCountsResponse # 
type Rep GetDiscoveredResourceCountsResponse # 
type Rep GetDiscoveredResourceCountsResponse = D1 * (MetaData "GetDiscoveredResourceCountsResponse" "Network.AWS.Config.GetDiscoveredResourceCounts" "amazonka-config-1.6.0-BQWWAOBXDMaLRM4ns599nE" False) (C1 * (MetaCons "GetDiscoveredResourceCountsResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gdrcrsTotalDiscoveredResources") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Integer))) (S1 * (MetaSel (Just Symbol "_gdrcrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gdrcrsResourceCounts") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [ResourceCount]))) (S1 * (MetaSel (Just Symbol "_gdrcrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

Response Lenses

gdrcrsTotalDiscoveredResources :: Lens' GetDiscoveredResourceCountsResponse (Maybe Integer) #

The total number of resources that AWS Config is recording in the region for your account. If you specify resource types in the request, AWS Config returns only the total number of resources for those resource types. Example * AWS Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for a total of 60 resources. * You make a call to the GetDiscoveredResourceCounts action and specify the resource type, AWS::EC2::Instances , in the request. * AWS Config returns 25 for totalDiscoveredResources .

gdrcrsNextToken :: Lens' GetDiscoveredResourceCountsResponse (Maybe Text) #

The string that you use in a subsequent request to get the next page of results in a paginated response.

gdrcrsResourceCounts :: Lens' GetDiscoveredResourceCountsResponse [ResourceCount] #

The list of ResourceCount objects. Each object is listed in descending order by the number of resources.