aws-sdk-lambda 1.121.0

AWS SDK for AWS Lambda
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::types::error::_invalid_parameter_value_exception::InvalidParameterValueException;

pub use crate::types::error::_service_exception::ServiceException;

pub use crate::types::error::_too_many_requests_exception::TooManyRequestsException;

pub use crate::types::error::_resource_conflict_exception::ResourceConflictException;

pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundException;

pub use crate::types::error::_callback_timeout_exception::CallbackTimeoutException;

pub use crate::types::error::_capacity_provider_limit_exceeded_exception::CapacityProviderLimitExceededException;

pub use crate::types::error::_resource_in_use_exception::ResourceInUseException;

pub use crate::types::error::_code_signing_config_not_found_exception::CodeSigningConfigNotFoundException;

pub use crate::types::error::_code_storage_exceeded_exception::CodeStorageExceededException;

pub use crate::types::error::_code_verification_failed_exception::CodeVerificationFailedException;

pub use crate::types::error::_function_versions_per_capacity_provider_limit_exceeded_exception::FunctionVersionsPerCapacityProviderLimitExceededException;

pub use crate::types::error::_invalid_code_signature_exception::InvalidCodeSignatureException;

pub use crate::types::error::_precondition_failed_exception::PreconditionFailedException;

pub use crate::types::error::_durable_execution_already_started_exception::DurableExecutionAlreadyStartedException;

pub use crate::types::error::_ec2_access_denied_exception::Ec2AccessDeniedException;

pub use crate::types::error::_ec2_throttled_exception::Ec2ThrottledException;

pub use crate::types::error::_ec2_unexpected_exception::Ec2UnexpectedException;

pub use crate::types::error::_efsio_exception::EfsioException;

pub use crate::types::error::_efs_mount_connectivity_exception::EfsMountConnectivityException;

pub use crate::types::error::_efs_mount_failure_exception::EfsMountFailureException;

pub use crate::types::error::_efs_mount_timeout_exception::EfsMountTimeoutException;

pub use crate::types::error::_eni_limit_reached_exception::EniLimitReachedException;

pub use crate::types::error::_invalid_request_content_exception::InvalidRequestContentException;

pub use crate::types::error::_invalid_runtime_exception::InvalidRuntimeException;

pub use crate::types::error::_invalid_security_group_id_exception::InvalidSecurityGroupIdException;

pub use crate::types::error::_invalid_subnet_id_exception::InvalidSubnetIdException;

pub use crate::types::error::_invalid_zip_file_exception::InvalidZipFileException;

pub use crate::types::error::_kms_access_denied_exception::KmsAccessDeniedException;

pub use crate::types::error::_kms_disabled_exception::KmsDisabledException;

pub use crate::types::error::_kms_invalid_state_exception::KmsInvalidStateException;

pub use crate::types::error::_kms_not_found_exception::KmsNotFoundException;

pub use crate::types::error::_no_published_version_exception::NoPublishedVersionException;

pub use crate::types::error::_recursive_invocation_exception::RecursiveInvocationException;

pub use crate::types::error::_request_too_large_exception::RequestTooLargeException;

pub use crate::types::error::_resource_not_ready_exception::ResourceNotReadyException;

pub use crate::types::error::_s3_files_mount_connectivity_exception::S3FilesMountConnectivityException;

pub use crate::types::error::_s3_files_mount_failure_exception::S3FilesMountFailureException;

pub use crate::types::error::_s3_files_mount_timeout_exception::S3FilesMountTimeoutException;

pub use crate::types::error::_serialized_request_entity_too_large_exception::SerializedRequestEntityTooLargeException;

pub use crate::types::error::_snap_start_exception::SnapStartException;

pub use crate::types::error::_snap_start_not_ready_exception::SnapStartNotReadyException;

pub use crate::types::error::_snap_start_timeout_exception::SnapStartTimeoutException;

pub use crate::types::error::_subnet_ip_address_limit_reached_exception::SubnetIpAddressLimitReachedException;

pub use crate::types::error::_unsupported_media_type_exception::UnsupportedMediaTypeException;

pub use crate::types::error::_policy_length_exceeded_exception::PolicyLengthExceededException;

pub use crate::types::error::_provisioned_concurrency_config_not_found_exception::ProvisionedConcurrencyConfigNotFoundException;

/// Error type for the `InvokeWithResponseStreamResponseEventError` operation.
#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum InvokeWithResponseStreamResponseEventError {
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    #[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-InvokeWithResponseStreamResponseEventError) for what information is available for the error.")]
    Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl InvokeWithResponseStreamResponseEventError {
    /// Creates the `InvokeWithResponseStreamResponseEventError::Unhandled` variant from any error type.
    pub fn unhandled(
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
    ) -> Self {
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source: err.into(),
            meta: ::std::default::Default::default(),
        })
    }

    /// Creates the `InvokeWithResponseStreamResponseEventError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source: err.clone().into(),
            meta: err,
        })
    }
    ///
    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    ///
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
        match self {
            Self::Unhandled(e) => &e.meta,
        }
    }
}
impl ::std::error::Error for InvokeWithResponseStreamResponseEventError {
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
        match self {
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
        }
    }
}
impl ::std::fmt::Display for InvokeWithResponseStreamResponseEventError {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match self {
            Self::Unhandled(_inner) => {
                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 ::aws_smithy_types::retry::ProvideErrorKind for InvokeWithResponseStreamResponseEventError {
    fn code(&self) -> ::std::option::Option<&str> {
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
    }
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
        ::std::option::Option::None
    }
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeWithResponseStreamResponseEventError {
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
        match self {
            Self::Unhandled(_inner) => &_inner.meta,
        }
    }
}
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeWithResponseStreamResponseEventError {
    fn create_unhandled_error(
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
    ) -> Self {
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source,
            meta: meta.unwrap_or_default(),
        })
    }
}
impl ::aws_types::request_id::RequestId for crate::types::error::InvokeWithResponseStreamResponseEventError {
    fn request_id(&self) -> Option<&str> {
        self.meta().request_id()
    }
}

mod _callback_timeout_exception;

mod _capacity_provider_limit_exceeded_exception;

mod _code_signing_config_not_found_exception;

mod _code_storage_exceeded_exception;

mod _code_verification_failed_exception;

mod _durable_execution_already_started_exception;

mod _ec2_access_denied_exception;

mod _ec2_throttled_exception;

mod _ec2_unexpected_exception;

mod _efs_mount_connectivity_exception;

mod _efs_mount_failure_exception;

mod _efs_mount_timeout_exception;

mod _efsio_exception;

mod _eni_limit_reached_exception;

mod _function_versions_per_capacity_provider_limit_exceeded_exception;

mod _invalid_code_signature_exception;

mod _invalid_parameter_value_exception;

mod _invalid_request_content_exception;

mod _invalid_runtime_exception;

mod _invalid_security_group_id_exception;

mod _invalid_subnet_id_exception;

mod _invalid_zip_file_exception;

mod _kms_access_denied_exception;

mod _kms_disabled_exception;

mod _kms_invalid_state_exception;

mod _kms_not_found_exception;

mod _no_published_version_exception;

mod _policy_length_exceeded_exception;

mod _precondition_failed_exception;

mod _provisioned_concurrency_config_not_found_exception;

mod _recursive_invocation_exception;

mod _request_too_large_exception;

mod _resource_conflict_exception;

mod _resource_in_use_exception;

mod _resource_not_found_exception;

mod _resource_not_ready_exception;

mod _s3_files_mount_connectivity_exception;

mod _s3_files_mount_failure_exception;

mod _s3_files_mount_timeout_exception;

mod _serialized_request_entity_too_large_exception;

mod _service_exception;

mod _snap_start_exception;

mod _snap_start_not_ready_exception;

mod _snap_start_timeout_exception;

mod _subnet_ip_address_limit_reached_exception;

mod _too_many_requests_exception;

mod _unsupported_media_type_exception;

/// Builders
pub mod builders;