#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ConflictException(crate::types::error::ConflictException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ThrottlingException(crate::types::error::ThrottlingException),
ValidationException(crate::types::error::ValidationException),
#[deprecated(note = "Matching `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`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AccessDeniedException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(_) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: value.into(),
meta: ::std::default::Default::default(),
})
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
match self {
Self::AccessDeniedException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::ValidationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError> for Error {
fn from(err: crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError) -> Self {
match err {
crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::batch_delete_instrumentation_configurations::BatchDeleteInstrumentationConfigurationsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError> for Error {
fn from(err: crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError) -> Self {
match err {
crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError> for Error {
fn from(err: crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError) -> Self {
match err {
crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError> for Error {
fn from(err: crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError) -> Self {
match err {
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError> for Error {
fn from(err: crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError) -> Self {
match err {
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError> for Error {
fn from(err: crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError) -> Self {
match err {
crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError> for Error {
fn from(err: crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError) -> Self {
match err {
crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_instrumentation_configuration::DeleteInstrumentationConfigurationError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError> for Error {
fn from(err: crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError) -> Self {
match err {
crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError> for Error {
fn from(err: crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError) -> Self {
match err {
crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_instrumentation_configuration::GetInstrumentationConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError> for Error {
fn from(err: crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError) -> Self {
match err {
crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_instrumentation_configuration_status::GetInstrumentationConfigurationStatusError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service::GetServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service::GetServiceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_service::GetServiceError> for Error {
fn from(err: crate::operation::get_service::GetServiceError) -> Self {
match err {
crate::operation::get_service::GetServiceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_service::GetServiceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_service::GetServiceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_level_objective::GetServiceLevelObjectiveError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_level_objective::GetServiceLevelObjectiveError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_service_level_objective::GetServiceLevelObjectiveError> for Error {
fn from(err: crate::operation::get_service_level_objective::GetServiceLevelObjectiveError) -> Self {
match err {
crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_audit_findings::ListAuditFindingsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_audit_findings::ListAuditFindingsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_audit_findings::ListAuditFindingsError> for Error {
fn from(err: crate::operation::list_audit_findings::ListAuditFindingsError) -> Self {
match err {
crate::operation::list_audit_findings::ListAuditFindingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_audit_findings::ListAuditFindingsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_audit_findings::ListAuditFindingsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_events::ListEntityEventsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_events::ListEntityEventsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_entity_events::ListEntityEventsError> for Error {
fn from(err: crate::operation::list_entity_events::ListEntityEventsError) -> Self {
match err {
crate::operation::list_entity_events::ListEntityEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_entity_events::ListEntityEventsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_entity_events::ListEntityEventsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError> for Error {
fn from(err: crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError) -> Self {
match err {
crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError> for Error {
fn from(err: crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError) -> Self {
match err {
crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_instrumentation_configurations::ListInstrumentationConfigurationsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependencies::ListServiceDependenciesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependencies::ListServiceDependenciesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_service_dependencies::ListServiceDependenciesError> for Error {
fn from(err: crate::operation::list_service_dependencies::ListServiceDependenciesError) -> Self {
match err {
crate::operation::list_service_dependencies::ListServiceDependenciesError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_service_dependencies::ListServiceDependenciesError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_service_dependencies::ListServiceDependenciesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependents::ListServiceDependentsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependents::ListServiceDependentsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_service_dependents::ListServiceDependentsError> for Error {
fn from(err: crate::operation::list_service_dependents::ListServiceDependentsError) -> Self {
match err {
crate::operation::list_service_dependents::ListServiceDependentsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_service_dependents::ListServiceDependentsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_service_dependents::ListServiceDependentsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError> for Error {
fn from(err: crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError) -> Self {
match err {
crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError> for Error {
fn from(err: crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError) -> Self {
match err {
crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_operations::ListServiceOperationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_operations::ListServiceOperationsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_service_operations::ListServiceOperationsError> for Error {
fn from(err: crate::operation::list_service_operations::ListServiceOperationsError) -> Self {
match err {
crate::operation::list_service_operations::ListServiceOperationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_service_operations::ListServiceOperationsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_service_operations::ListServiceOperationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_services::ListServicesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_services::ListServicesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_services::ListServicesError> for Error {
fn from(err: crate::operation::list_services::ListServicesError) -> Self {
match err {
crate::operation::list_services::ListServicesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_services::ListServicesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_services::ListServicesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_states::ListServiceStatesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_states::ListServiceStatesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_service_states::ListServiceStatesError> for Error {
fn from(err: crate::operation::list_service_states::ListServiceStatesError) -> Self {
match err {
crate::operation::list_service_states::ListServiceStatesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_service_states::ListServiceStatesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_service_states::ListServiceStatesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
match err {
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_grouping_configuration::PutGroupingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_grouping_configuration::PutGroupingConfigurationError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_grouping_configuration::PutGroupingConfigurationError> for Error {
fn from(err: crate::operation::put_grouping_configuration::PutGroupingConfigurationError) -> Self {
match err {
crate::operation::put_grouping_configuration::PutGroupingConfigurationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::put_grouping_configuration::PutGroupingConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::put_grouping_configuration::PutGroupingConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::put_grouping_configuration::PutGroupingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError> for Error {
fn from(err: crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError) -> Self {
match err {
crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::report_instrumentation_configuration_status::ReportInstrumentationConfigurationStatusError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_discovery::StartDiscoveryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_discovery::StartDiscoveryError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::start_discovery::StartDiscoveryError> for Error {
fn from(err: crate::operation::start_discovery::StartDiscoveryError) -> Self {
match err {
crate::operation::start_discovery::StartDiscoveryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_discovery::StartDiscoveryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_discovery::StartDiscoveryError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_discovery::StartDiscoveryError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::tag_resource::TagResourceError> for Error {
fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
match err {
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError> for Error {
fn from(err: crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError) -> Self {
match err {
crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::AccessDeniedException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::ValidationException(inner) => inner.source(),
Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
}
}
}
impl ::aws_types::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::AccessDeniedException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}