pub struct DescribeComplianceByResource { /* private fields */ }Expand description
Fluent builder constructing a request to DescribeComplianceByResource.
Indicates whether the specified Amazon Web Services resources are compliant. If a resource is noncompliant, this action returns the number of Config rules that the resource does not comply with.
A resource is compliant if it complies with all the Config rules that evaluate it. It is noncompliant if it does not comply with one or more of these rules.
If Config has no current evaluation results for the resource, it returns INSUFFICIENT_DATA. This result might indicate one of the following conditions about the rules that evaluate the resource:
-
Config has never invoked an evaluation for the rule. To check whether it has, use the
DescribeConfigRuleEvaluationStatusaction to get theLastSuccessfulInvocationTimeandLastFailedInvocationTime. -
The rule's Lambda function is failing to send evaluation results to Config. Verify that the role that you assigned to your configuration recorder includes the
config:PutEvaluationspermission. If the rule is a custom rule, verify that the Lambda execution role includes theconfig:PutEvaluationspermission. -
The rule's Lambda function has returned
NOT_APPLICABLEfor all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.
Implementations
sourceimpl DescribeComplianceByResource
impl DescribeComplianceByResource
sourcepub async fn send(
self
) -> Result<DescribeComplianceByResourceOutput, SdkError<DescribeComplianceByResourceError>>
pub async fn send(
self
) -> Result<DescribeComplianceByResourceOutput, SdkError<DescribeComplianceByResourceError>>
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) -> DescribeComplianceByResourcePaginator
pub fn into_paginator(self) -> DescribeComplianceByResourcePaginator
Create a paginator for this request
Paginators are used by calling send().await which returns a Stream.
sourcepub fn resource_type(self, input: impl Into<String>) -> Self
pub fn resource_type(self, input: impl Into<String>) -> Self
The types of Amazon Web Services resources for which you want compliance information (for example, AWS::EC2::Instance). For this action, you can specify that the resource type is an Amazon Web Services account by specifying AWS::::Account.
sourcepub fn set_resource_type(self, input: Option<String>) -> Self
pub fn set_resource_type(self, input: Option<String>) -> Self
The types of Amazon Web Services resources for which you want compliance information (for example, AWS::EC2::Instance). For this action, you can specify that the resource type is an Amazon Web Services account by specifying AWS::::Account.
sourcepub fn resource_id(self, input: impl Into<String>) -> Self
pub fn resource_id(self, input: impl Into<String>) -> Self
The ID of the Amazon Web Services resource for which you want compliance information. You can specify only one resource ID. If you specify a resource ID, you must also specify a type for ResourceType.
sourcepub fn set_resource_id(self, input: Option<String>) -> Self
pub fn set_resource_id(self, input: Option<String>) -> Self
The ID of the Amazon Web Services resource for which you want compliance information. You can specify only one resource ID. If you specify a resource ID, you must also specify a type for ResourceType.
sourcepub fn compliance_types(self, input: ComplianceType) -> Self
pub fn compliance_types(self, input: ComplianceType) -> Self
Appends an item to ComplianceTypes.
To override the contents of this collection use set_compliance_types.
Filters the results by compliance.
The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA.
sourcepub fn set_compliance_types(self, input: Option<Vec<ComplianceType>>) -> Self
pub fn set_compliance_types(self, input: Option<Vec<ComplianceType>>) -> Self
Filters the results by compliance.
The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA.
sourcepub fn limit(self, input: i32) -> Self
pub fn limit(self, input: i32) -> Self
The maximum number of evaluation results returned on each page. The default is 10. 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 evaluation results returned on each page. The default is 10. 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
sourceimpl Clone for DescribeComplianceByResource
impl Clone for DescribeComplianceByResource
sourcefn clone(&self) -> DescribeComplianceByResource
fn clone(&self) -> DescribeComplianceByResource
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for DescribeComplianceByResource
impl Send for DescribeComplianceByResource
impl Sync for DescribeComplianceByResource
impl Unpin for DescribeComplianceByResource
impl !UnwindSafe for DescribeComplianceByResource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more