Enum aws_sdk_config::operation::get_organization_custom_rule_policy::GetOrganizationCustomRulePolicyError
source · #[non_exhaustive]pub enum GetOrganizationCustomRulePolicyError {
NoSuchOrganizationConfigRuleException(NoSuchOrganizationConfigRuleException),
OrganizationAccessDeniedException(OrganizationAccessDeniedException),
Unhandled(Unhandled),
}Expand description
Error type for the GetOrganizationCustomRulePolicyError operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoSuchOrganizationConfigRuleException(NoSuchOrganizationConfigRuleException)
The Config rule in the request is not valid. Verify that the rule is an organization Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are used before trying again.
OrganizationAccessDeniedException(OrganizationAccessDeniedException)
For PutConfigurationAggregator API, you can see this exception for the following reasons:
-
No permission to call
EnableAWSServiceAccessAPI -
The configuration aggregator cannot be updated because your Amazon Web Services Organization management account or the delegated administrator role changed. Delete this aggregator and create a new one with the current Amazon Web Services Organization.
-
The configuration aggregator is associated with a previous Amazon Web Services Organization and Config cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a new one with the current Amazon Web Services Organization.
-
You are not a registered delegated administrator for Config with permissions to call
ListDelegatedAdministratorsAPI. Ensure that the management account registers delagated administrator for Config service principle name before the delegated administrator creates an aggregator.
For all OrganizationConfigRule and OrganizationConformancePack APIs, Config throws an exception if APIs are called from member accounts. All APIs must be called from organization management account.
Unhandled(Unhandled)
Unhandled directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code():
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl GetOrganizationCustomRulePolicyError
impl GetOrganizationCustomRulePolicyError
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the GetOrganizationCustomRulePolicyError::Unhandled variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the GetOrganizationCustomRulePolicyError::Unhandled variant from an ErrorMetadata.
sourcepub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn is_no_such_organization_config_rule_exception(&self) -> bool
pub fn is_no_such_organization_config_rule_exception(&self) -> bool
Returns true if the error kind is GetOrganizationCustomRulePolicyError::NoSuchOrganizationConfigRuleException.
sourcepub fn is_organization_access_denied_exception(&self) -> bool
pub fn is_organization_access_denied_exception(&self) -> bool
Returns true if the error kind is GetOrganizationCustomRulePolicyError::OrganizationAccessDeniedException.
Trait Implementations§
source§impl CreateUnhandledError for GetOrganizationCustomRulePolicyError
impl CreateUnhandledError for GetOrganizationCustomRulePolicyError
source§fn create_unhandled_error(
source: Box<dyn Error + Send + Sync + 'static>,
meta: Option<ErrorMetadata>
) -> Self
fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata> ) -> Self
source and error metadata.source§impl Error for GetOrganizationCustomRulePolicyError
impl Error for GetOrganizationCustomRulePolicyError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<GetOrganizationCustomRulePolicyError> for Error
impl From<GetOrganizationCustomRulePolicyError> for Error
source§fn from(err: GetOrganizationCustomRulePolicyError) -> Self
fn from(err: GetOrganizationCustomRulePolicyError) -> Self
source§impl ProvideErrorMetadata for GetOrganizationCustomRulePolicyError
impl ProvideErrorMetadata for GetOrganizationCustomRulePolicyError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for GetOrganizationCustomRulePolicyError
impl RequestId for GetOrganizationCustomRulePolicyError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None if the service could not be reached.