Copyright | (c) 2013-2018 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) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- getDiscoveredResourceCounts :: GetDiscoveredResourceCounts
- data GetDiscoveredResourceCounts
- gdrcNextToken :: Lens' GetDiscoveredResourceCounts (Maybe Text)
- gdrcLimit :: Lens' GetDiscoveredResourceCounts (Maybe Natural)
- gdrcResourceTypes :: Lens' GetDiscoveredResourceCounts [Text]
- getDiscoveredResourceCountsResponse :: Int -> GetDiscoveredResourceCountsResponse
- data GetDiscoveredResourceCountsResponse
- gdrcrsTotalDiscoveredResources :: Lens' GetDiscoveredResourceCountsResponse (Maybe Integer)
- gdrcrsNextToken :: Lens' GetDiscoveredResourceCountsResponse (Maybe Text)
- gdrcrsResourceCounts :: Lens' GetDiscoveredResourceCountsResponse [ResourceCount]
- gdrcrsResponseStatus :: Lens' GetDiscoveredResourceCountsResponse Int
Creating a Request
getDiscoveredResourceCounts :: GetDiscoveredResourceCounts Source #
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
- ThenextToken
string returned on a previous page that you use to get the next page of results in a paginated response.gdrcLimit
- The maximum number ofResourceCount
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 forresourceTypes
is not specified, AWS Config returns all resource types that AWS Config is recording in the region for your account.
data GetDiscoveredResourceCounts Source #
See: getDiscoveredResourceCounts
smart constructor.
Request Lenses
gdrcNextToken :: Lens' GetDiscoveredResourceCounts (Maybe Text) Source #
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) Source #
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] Source #
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 Source #
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 theGetDiscoveredResourceCounts
action and specify the resource type,AWS::EC2::Instances
, in the request. * AWS Config returns 25 fortotalDiscoveredResources
.gdrcrsNextToken
- The string that you use in a subsequent request to get the next page of results in a paginated response.gdrcrsResourceCounts
- The list ofResourceCount
objects. Each object is listed in descending order by the number of resources.gdrcrsResponseStatus
- -- | The response status code.
data GetDiscoveredResourceCountsResponse Source #
See: getDiscoveredResourceCountsResponse
smart constructor.
Response Lenses
gdrcrsTotalDiscoveredResources :: Lens' GetDiscoveredResourceCountsResponse (Maybe Integer) Source #
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) Source #
The string that you use in a subsequent request to get the next page of results in a paginated response.
gdrcrsResourceCounts :: Lens' GetDiscoveredResourceCountsResponse [ResourceCount] Source #
The list of ResourceCount
objects. Each object is listed in descending order by the number of resources.
gdrcrsResponseStatus :: Lens' GetDiscoveredResourceCountsResponse Int Source #
- - | The response status code.