pub struct GetDiscoveredResourceCounts { /* private fields */ }Expand description
Fluent builder constructing a request to GetDiscoveredResourceCounts.
Returns the resource types, the number of each resource type, and the total number of resources that Config is recording in this region for your Amazon Web Services account.
Example
-
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
GetDiscoveredResourceCountsaction and specify that you want all resource types. -
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, 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.
If you make a call to the GetDiscoveredResourceCounts action, you might not immediately receive resource counts in the following situations:
-
You are a new Config customer.
-
You just enabled resource recording.
It might take a few minutes for Config to record and count your resources. Wait a few minutes and then retry the GetDiscoveredResourceCounts action.
Implementations§
source§impl GetDiscoveredResourceCounts
impl GetDiscoveredResourceCounts
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<GetDiscoveredResourceCounts, AwsResponseRetryClassifier>, SdkError<GetDiscoveredResourceCountsError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<GetDiscoveredResourceCounts, AwsResponseRetryClassifier>, SdkError<GetDiscoveredResourceCountsError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<GetDiscoveredResourceCountsOutput, SdkError<GetDiscoveredResourceCountsError>>
pub async fn send(
self
) -> Result<GetDiscoveredResourceCountsOutput, SdkError<GetDiscoveredResourceCountsError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn into_paginator(self) -> GetDiscoveredResourceCountsPaginator
pub fn into_paginator(self) -> GetDiscoveredResourceCountsPaginator
Create a paginator for this request
Paginators are used by calling send().await which returns a Stream.
sourcepub fn resource_types(self, input: impl Into<String>) -> Self
pub fn resource_types(self, input: impl Into<String>) -> Self
Appends an item to resourceTypes.
To override the contents of this collection use set_resource_types.
The comma-separated list that specifies the resource types that you want Config to return (for example, "AWS::EC2::Instance", "AWS::IAM::User").
If a value for resourceTypes is not specified, Config returns all resource types that Config is recording in the region for your account.
If the configuration recorder is turned off, Config returns an empty list of ResourceCount objects. If the configuration recorder is not recording a specific resource type (for example, S3 buckets), that resource type is not returned in the list of ResourceCount objects.
sourcepub fn set_resource_types(self, input: Option<Vec<String>>) -> Self
pub fn set_resource_types(self, input: Option<Vec<String>>) -> Self
The comma-separated list that specifies the resource types that you want Config to return (for example, "AWS::EC2::Instance", "AWS::IAM::User").
If a value for resourceTypes is not specified, Config returns all resource types that Config is recording in the region for your account.
If the configuration recorder is turned off, Config returns an empty list of ResourceCount objects. If the configuration recorder is not recording a specific resource type (for example, S3 buckets), that resource type is not returned in the list of ResourceCount objects.
sourcepub fn limit(self, input: i32) -> Self
pub fn limit(self, input: i32) -> Self
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, Config uses the default.
sourcepub fn set_limit(self, input: Option<i32>) -> Self
pub fn set_limit(self, input: Option<i32>) -> Self
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, Config uses the default.
sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Trait Implementations§
source§impl Clone for GetDiscoveredResourceCounts
impl Clone for GetDiscoveredResourceCounts
source§fn clone(&self) -> GetDiscoveredResourceCounts
fn clone(&self) -> GetDiscoveredResourceCounts
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more